_____ ______ ______
|_ _| |___ / |___ /
| | ___ ______ ___ / / ___ _ __ ___ ______ / / ___ _ __ ___
| | / __|______/ _ \/ / / _ \ '__/ _ \______/ / / _ \ '__/ _ \
_| |_\__ \ | __/ /_| __/ | | (_) | / /_| __/ | | (_) |
|_____|___/ \___\___/\___|_| \___/ /_____\___|_| \___/
"The definitive, multi-disciplinary, and highly overengineered proof suite verifying the mathematical, logical, and structural equivalence of
$0 \equiv 0$ ."
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 (
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:
-
Additive Inverse Subtraction: Asserts the fundamental identity properties of fields, verifying
$x - x = 0$ when$x = 0$ . -
Symbolic Limit Continuity: Utilizes
sympyto 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 usingnumpylinear 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.
-
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
Falsebehaves as a subclass ofintequivalent to0, 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.
-
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 theisoperator. -
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 return0consistently.
-
Negative Zero Equivalence: In accordance with the IEEE-754 specification, floating-point numbers have distinct binary representations for
+0.0(sign bit0) and-0.0(sign bit1). 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$ ).
- CPython Compiler Behavior: Disassembles CPython bytecode using
disto inspect whether the compiler performs compile-time optimization (constant folding) on0 == 0, or resolves it at runtime via aCOMPARE_OPinstruction. - Abstract Syntax Tree (AST) Parsing: Parses the expression
"0 == 0"into syntax nodes usingastto ensure the parser grammar recognizes the expression as a structurally valid comparison of constant literals.
-
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.
-
Two-Sample Kolmogorov-Smirnov Test: Executes a non-parametric two-sample Kolmogorov-Smirnov test using
scipy.statson 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.
-
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$ .
-
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.
-
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.
- Socket Ephemeral Port Zero: Asserts the TCP/IP wildcard binding where request port
0triggers 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.
- Brainfuck Interpreter: Implements a complete Brainfuck interpreter in Python to execute code that outputs a null byte (value
0), proving identity through esoteric execution.
Make sure you have Python 3.8+ installed. Install the package dependencies:
pip install -r requirements.txt
pip install -e .Execute the CLI module to trigger all active provers and render the formatted execution tables:
python -m is_zero_zero.cliExecute the automated test suite with pytest:
python -m pytest tests/- fa33az - GitHub Profile
This project is licensed under the MIT License. Feel free to use it for learning or simply to kill time.