Skip to content

fa33az/is-zero-zero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-zero-zero

  _____               ______                     ______
  |_   _|             |___  /                    |___  /
    | |  ___ ______ ___  / / ___ _ __ ___ ______  / / ___ _ __ ___
    | | / __|______/ _ \/ / / _ \ '__/ _ \______/ / / _ \ '__/ _ \
   _| |_\__ \     |  __/ /_|  __/ | | (_) |    / /_|  __/ | | (_) |
  |_____|___/      \___\___/\___|_|  \___/    /_____\___|_|  \___/

"The definitive, multi-disciplinary, and highly overengineered proof suite verifying the mathematical, logical, and structural equivalence of $0 \equiv 0$."


Executive Summary

In software engineering and pure mathematics, the equivalence of identity 0 == 0 is often dogmatically assumed without empirical verification. However, on real-world systems susceptible to failures such as hardware memory faults or cosmic bit-flips, this validity must be rigorously validated.

The is-zero-zero project is a satirical Python library built with professional software architecture standards to verify the fundamental truth of zero equivalence ($0 \equiv 0$) across 20 distinct scientific and mathematical paradigms.


How It Works

Each verification methodology is isolated into a self-contained Prover Agent that inherits from the BaseProver abstract base class. A central VerificationEngine dynamically scans and initializes all active agents at runtime using reflection, executes their assertion routines, measures execution performance in microseconds (us), and compiles a unified report.

Below is the detailed breakdown of the 20 supported prover strategies:

1. Arithmetic & Mathematical Analysis (arithmetic.py)

  • Additive Inverse Subtraction: Asserts the fundamental identity properties of fields, verifying $x - x = 0$ when $x = 0$.
  • Symbolic Limit Continuity: Utilizes sympy to symbolically calculate the limit of the identity function $f(x) = x$ as $x$ approaches $0$ from both the left and right sides, verifying mathematical continuity at zero.
  • Trivial Matrix Determinant: Proves that the determinant of a $2 \times 2$ zero matrix (calculated analytically via $ad - bc$) is identically zero using numpy linear algebra routines.
  • Peano Axiomatic Induction: Models natural numbers under Peano Axioms where zero is represented as the initial element (which has no successor), asserting the reflexivity of the equality relation on this base case.

2. Propositional & Boolean Logic (logical.py)

  • Bitwise Operator Identity: Tests low-level binary operator identity. Asserts that 0 & 0 = 0, 0 | 0 = 0, 0 ^ 0 = 0, and the two's complement negation ~(-1) all yield numerical zero.
  • Boolean Representation: Verifies that Python's False behaves as a subclass of int equivalent to 0, asserting boolean reflexivity (False == False).
  • De Morgan Boolean Negation: Proves De Morgan's Laws ($\neg(A \lor B) \equiv \neg A \land \neg B$) using boolean inputs that resolve to logical false.

3. Runtime & CPython Memory Architecture (identity.py)

  • CPython Small Integer Cache: Asserts memory-level singleton caching in CPython where integers from $-5$ to $256$ are pre-allocated. It verifies that two independent statements yielding zero point to the exact same physical heap address using the is operator.
  • Memory Address Pointer Equality: Direct comparison of raw memory addresses using the id() function to ensure literal instances of zero are mapped to identical addresses.
  • Integer Hash Invariance: Verifies the Python hashing protocol where hash(0) must return 0 consistently.

4. Floating-Point & IEEE-754 (floating_point.py)

  • Negative Zero Equivalence: In accordance with the IEEE-754 specification, floating-point numbers have distinct binary representations for +0.0 (sign bit 0) and -0.0 (sign bit 1). The prover unpacks these representations at the binary level and verifies that the CPU evaluates them as equal.
  • Machine Epsilon Underflow Bound: Proves rounding bounds at the double-precision level (machine epsilon $\epsilon$). Demonstrates that adding zero to a constant yields exactly the original constant ($1.0 + 0.0 \equiv 1.0$).

5. Compilers & Bytecode (bytecode.py)

  • CPython Compiler Behavior: Disassembles CPython bytecode using dis to inspect whether the compiler performs compile-time optimization (constant folding) on 0 == 0, or resolves it at runtime via a COMPARE_OP instruction.
  • Abstract Syntax Tree (AST) Parsing: Parses the expression "0 == 0" into syntax nodes using ast to ensure the parser grammar recognizes the expression as a structurally valid comparison of constant literals.

6. Abstract Algebra (algebraic.py)

  • Additive Group Identity: Proves zero is the unique additive identity element in the group $(\mathbb{Z}, +)$ by testing it across elements in the domain $[-100, 100]$.
  • Trivial Ring Isomorphism: Models trivial rings $R_1, R_2$ consisting of a single element ${0}$ and verifies that the identity mapping homomorphism $f(x) = x$ preserves ring properties.

7. Mathematical Statistics (statistical.py)

  • Two-Sample Kolmogorov-Smirnov Test: Executes a non-parametric two-sample Kolmogorov-Smirnov test using scipy.stats on zero-valued vectors to prove they belong to identical continuous distributions ($p\text{-value} = 1.0$).
  • Zero-Variance Analysis: Computes the second statistical moment (variance) of a zero-filled dataset, proving that there is no variance ($0.0$) or deviation from the mean.

8. Quantum Mechanics & Computing (quantum.py)

  • Quantum Qubit Measurement: Simulates a single qubit state vector initialized in the ground state $|0\rangle$, and measures the state using projection matrices to verify that the collapsed state collapses to zero with a probability of $1.0$.

9. Connectionist Machine Learning (neural.py)

  • Neural Network Convergence: Trains a single-neuron feedforward network using Gradient Descent to learn the mapping $f(x) = 0 \cdot x = 0$. After weights ($w$) and bias ($b$) converge to zero, evaluates the model at $x=0$ to assert output zero within floating point tolerances.

10. Thermodynamics & Special Relativity (physics.py)

  • Third Law of Thermodynamics: Verifies that the residual entropy $S_0$ of a pure crystalline substance at absolute zero temperature $T = 0\text{ K}$ is exactly zero.
  • Special Relativity Time Dilation: Evaluates time dilation and Lorentz factor equations at rest velocity $v = 0$ to prove time dilation difference is identically zero.

11. Network & Blockchain Protocols (network.py)

  • Socket Ephemeral Port Zero: Asserts the TCP/IP wildcard binding where request port 0 triggers dynamic ephemeral port allocation on the OS kernel, proving requested port parameter remains zero.
  • Bitcoin Genesis Block: Fetches the Genesis Block (block #0) from a live public block explorer API (with offline local fallback) to prove block height is exactly zero.

12. Esoteric Languages (esoteric.py)

  • Brainfuck Interpreter: Implements a complete Brainfuck interpreter in Python to execute code that outputs a null byte (value 0), proving identity through esoteric execution.

How to Run

Setup Dependencies

Make sure you have Python 3.8+ installed. Install the package dependencies:

pip install -r requirements.txt
pip install -e .

Run Proof Dashboard (CLI)

Execute the CLI module to trigger all active provers and render the formatted execution tables:

python -m is_zero_zero.cli

Run Unit Tests

Execute the automated test suite with pytest:

python -m pytest tests/

Author


License

This project is licensed under the MIT License. Feel free to use it for learning or simply to kill time.

About

A satirical, highly overengineered Python proof suite verifying the equivalence of 0 ≡ 0 across 20 distinct scientific and mathematical paradigms.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages