Documentation

LeanPool.BooleanMultiplication.N4.NormalizedConstruction

Construction of the rational three-gate prefix #

The normalization is performed by algebraic basis replacement and legal gate commutation. No circuits are enumerated. The only finite calculation below is the three-coordinate proof that the rational place words are independent.

A target coefficient outside a coefficient span remains outside after the span is embedded as target ANFs and affine functions are adjoined.

Every eight-gate circuit for four-bit multiplication can be transformed, without changing its final wire space, so that its first three gates are the three rational-place products.

theorem UnrestrictedBooleanMul.N4.inf_sup_span_eq_left_of_le_of_not_mem (V A : Submodule F₂ (ANF 8)) (g : ANF 8) (hVA : V ≤ A) (hg : g ∉ A) :
(V ⊔ F₂ ∙ g) ⊓ A = V

If a state already lies in the target ambient, adjoining a vector outside that ambient does not change its intersection with the ambient.

theorem UnrestrictedBooleanMul.N4.rational_prefix_seed_not_useful (C : Circuit 8 8) (hC : C.Computes (Mul 4)) (hzero : C.gate 0 = rZeroANF) (hone : C.gate 1 = rOneANF) (hinfinity : C.gate 2 = rInfinityANF) :

In a rationally prefixed multiplier the fourth gate is the unique defect gate: if it were useful, its output would lie in the target ambient, and the low-product bridge would make it redundant.

theorem UnrestrictedBooleanMul.N4.rational_prefix_suffix_useful (C : Circuit 8 8) (hC : C.Computes (Mul 4)) (hzero : C.gate 0 = rZeroANF) (hone : C.gate 1 = rOneANF) (hinfinity : C.gate 2 = rInfinityANF) (hseed : ¬UsefulAt C (mulTarget 4) 3) (j : Fin 8) :
4 ≤ ↑j → UsefulAt C (mulTarget 4) j

Once the rational prefix and its non-useful seed account for the unique defect, the four remaining gates must each buy exactly one target dimension.

Closed normalized-eight-gate construction used by the structural proof.