low_half_mul3_six_and_circuit
The function taking vector v : Fin 6 → ZMod 2 and index k : Fin 3 and returning an element of ZMod 2 computed from six AND gates over ZMod 2: g0 = v 0 * v 3, g1 = v 0 * v 4, g2 = v 1 * v 3, g3 = v 0 * v 5, g4 = v 2 * v 3, and g5 = (g1 + v 1) * (g2 + v 4), returning g0 for k = 0, g1 + g2 for k = 1, and g5 + g1 + g2 + g3 + g4 for k = 2.
Statement
def low_half_mul3_six_and_circuit (v : Fin 6 → ZMod 2) (k : Fin 3) : ZMod 2- Defined in
- arXiv:2611.15992 Section 3
- Verified
- 16 Nov 2026
- Axioms
- none listed
- Used by 1
- low_half_mul3_six_and_upper_boundFor every input vector v : Fin 6 → ZMod 2 and index k : Fin 3, the k-th output of the explicit six-AND circuit…
Read back from the Lean
The function low_half_mul3_six_and_circuit takes a vector v : Fin 6 → ZMod 2 and an index k : Fin 3, and computes an element of ZMod 2 defined in terms of intermediate values:
- $g_0 = v(0) \cdot v(3)$
- $g_1 = v(0) \cdot v(4)$
- $g_2 = v(1) \cdot v(3)$
- $g_3 = v(0) \cdot v(5)$
- $g_4 = v(2) \cdot v(3)$
- $g_5 = (g_1 + v(1)) \cdot (g_2 + v(4))$
and returns:
- for $k = 0$: $g_0$
- for $k = 1$: $g_1 + g_2$
- for $k = 2$: $g_5 + g_1 + g_2 + g_3 + g_4$
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The six-AND circuit for 3-bit low-half multiplication from arXiv:2611.15992 Section 3. -/ def low_half_mul3_six_and_circuit (v : Fin 6 → ZMod 2) (k : Fin 3) : ZMod 2 := let g0 := v 0 * v 3 let g1 := v 0 * v 4 let g2 := v 1 * v 3 let g3 := v 0 * v 5 let g4 := v 2 * v 3 let g5 := (g1 + v 1) * (g2 + v 4) match k with | 0 => g0 | 1 => g1 + g2 | 2 => g5 + g1 + g2 + g3 + g4