Principal declarations
def AC0.Gate.Valid
Module Circuit
(lean/phase3/Circuit.lean, lines 348–349) · file SHA-256 af97cc0eec7d8464…
Fixed-scale validity: threshold and coefficients in 0..W.
Statement as elaborated and printed by Lean 4.26.0
ℕ → NimAudit.AC0.Gate → Prop
Exact source text, lines 348–349
348/-- Fixed-scale validity: threshold and coefficients in 0..W. -/349def Valid (W : Nat) (g : Gate) : Prop := g.thr ≤ W ∧ ∀ a ∈ g.coeffs, a ≤ W
Project declarations in the statement: AC0.Gate
Project declarations used by the proof or definition body
AC0.Gate, AC0.Gate.coeffs, AC0.Gate.thr
theorem AC0.gate_rat_iff
Module Circuit
(lean/phase3/Circuit.lean, lines 367–405) · file SHA-256 af97cc0eec7d8464… Axioms reported by the fresh build: propext, Classical.choice, Quot.sound
CLEARING DENOMINATORS: for D > 0 the rational gate fires iff the integer gate does.
Statement as elaborated and printed by Lean 4.26.0
∀ (g : NimAudit.AC0.Gate) {D : ℕ},
0 < D → ∀ (z : ℕ → Bool), NimAudit.AC0.ratFires g D z ↔ g.eval z = true
Exact source text, lines 367–405
367/-- CLEARING DENOMINATORS: for D > 0 the rational gate fires iff the integer gate does. -/368theorem gate_rat_iff (g : Gate) {D : Nat} (hD : 0 < D) (z : Nat → Bool) :369 ratFires g D z ↔ g.eval z = true := by370 have hDr : (0 : Rat) < (D : Rat) := Rat.natCast_pos.mpr hD371 have hD' : (D : Rat) ≠ 0 := Rat.ne_of_gt hDr372 have e : rsum (List.range g.fanin)373 (fun j => ((g.coeff j : Nat) : Rat) / (D : Rat) * (if g.lit z j then 1 else 0)) =374 ((g.wsum z : Nat) : Rat) / (D : Rat) := by375 have e1 : rsum (List.range g.fanin)376 (fun j => ((g.coeff j : Nat) : Rat) / (D : Rat) * (if g.lit z j then 1 else 0)) =377 rsum (List.range g.fanin)378 (fun j => (1 / (D : Rat)) * (((g.coeff j * (if g.lit z j then 1 else 0) : Nat)) : Rat)) := by379 apply rsum_congr; intro j _380 by_cases hl : g.lit z j = true <;> simp [hl] <;> grind381 rw [e1, rsum_mul_left, rsum_natCast]382 unfold Gate.wsum Gate.psum383 grind384 unfold ratFires Gate.eval385 rw [e, decide_eq_true_iff]386 generalize g.wsum z = s387 generalize g.thr = b388 constructor389 · intro h390 have h' : ((b : Nat) : Rat) / (D : Rat) ≤ ((s : Nat) : Rat) / (D : Rat) := by grind391 have := Rat.mul_le_mul_of_nonneg_right h' (Rat.le_of_lt hDr)392 have e2 : ((b : Nat) : Rat) / (D : Rat) * (D : Rat) = b := by grind393 have e3 : ((s : Nat) : Rat) / (D : Rat) * (D : Rat) = s := by grind394 rw [e2, e3] at this395 exact Rat.natCast_le_natCast.mp this396 · intro h397 have h1 : ((b : Nat) : Rat) ≤ (s : Rat) := Rat.natCast_le_natCast.mpr h398 have hinv : (0 : Rat) ≤ 1 / (D : Rat) := by399 have := Rat.mul_le_mul_of_nonneg_right (Rat.le_of_lt hDr) (Rat.le_of_lt hDr)400 have h2 : (0 : Rat) < 1 / (D : Rat) := by401 have := (Rat.mul_pos_iff_of_pos_left hDr).mp (by grind : (0 : Rat) < (D : Rat) * (1 / (D : Rat)))402 exact this403 exact Rat.le_of_lt h2404 have := Rat.mul_le_mul_of_nonneg_right h1 hinv405 grind
Project declarations in the statement: AC0.Gate, AC0.Gate.eval, AC0.ratFires
Project declarations used by the proof or definition body
AC0.Gate, AC0.Gate.coeff, AC0.Gate.eval, AC0.Gate.fanin, AC0.Gate.lit, AC0.Gate.psum, AC0.Gate.thr, AC0.Gate.wsum, AC0.ratFires, AC0.rsum_natCast, Prob.rsum, Prob.rsum_congr, Prob.rsum_mul_left
theorem Windows.literal_shift
Module Windows
(lean/phase6/Windows.lean, lines 238–240) · file SHA-256 ff59ec8bf0a0de70… Axioms reported by the fresh build: propext, Classical.choice, Quot.sound
The literal-representation remark: replacing −a·x by a·(1 − x) adds a to the threshold.
Statement as elaborated and printed by Lean 4.26.0
∀ (s a x θ : ℤ), θ ≤ s - a * x ↔ θ + a ≤ s + a * (1 - x)
Exact source text, lines 238–240
238/-- The literal-representation remark: replacing −a·x by a·(1 − x) adds a to the threshold. -/239theorem literal_shift (s a x θ : Int) : (θ ≤ s - a * x) ↔ (θ + a ≤ s + a * (1 - x)) := by240 rw [Int.mul_sub, Int.mul_one]; omega
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
Definitions these statements use
inductive AC0.Gate
Module Circuit
(lean/phase3/Circuit.lean, lines 326–331) · file SHA-256 af97cc0eec7d8464…
A literal-threshold gate after clearing denominators: coefficients a_j,
negation bits eta_j, threshold b. Its fan-in is `coeffs.length`.
Statement as elaborated and printed by Lean 4.26.0
Type
Exact source text, lines 326–331
326/-- A literal-threshold gate after clearing denominators: coefficients a_j,327 negation bits eta_j, threshold b. Its fan-in is `coeffs.length`. -/328structure Gate where329 coeffs : List Nat330 negs : List Bool331 thr : Nat
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
def AC0.ratFires
Module Circuit
(lean/phase3/Circuit.lean, lines 355–359) · file SHA-256 af97cc0eec7d8464…
Paper's form: weights a_j/D, threshold b/D, Heaviside(Σ w_j lit_j − θ).
Statement as elaborated and printed by Lean 4.26.0
NimAudit.AC0.Gate → ℕ → (ℕ → Bool) → Prop
Exact source text, lines 355–359
355/-- Paper's form: weights a_j/D, threshold b/D, Heaviside(Σ w_j lit_j − θ). -/356def ratFires (g : Gate) (D : Nat) (z : Nat → Bool) : Prop :=357 0 ≤ rsum (List.range g.fanin)358 (fun j => ((g.coeff j : Nat) : Rat) / (D : Rat) * (if g.lit z j then 1 else 0)) -359 ((g.thr : Nat) : Rat) / (D : Rat)
Project declarations in the statement: AC0.Gate
Project declarations used by the proof or definition body
AC0.Gate, AC0.Gate.coeff, AC0.Gate.fanin, AC0.Gate.lit, AC0.Gate.thr, Prob.rsum
def AC0.Gate.eval
Module Circuit
(lean/phase3/Circuit.lean, lines 345–346) · file SHA-256 af97cc0eec7d8464…
The gate fires iff b ≤ Σ_j a_j [z_j XOR eta_j].
Statement as elaborated and printed by Lean 4.26.0
NimAudit.AC0.Gate → (ℕ → Bool) → Bool
Exact source text, lines 345–346
345/-- The gate fires iff b ≤ Σ_j a_j [z_j XOR eta_j]. -/346def eval (g : Gate) (z : Nat → Bool) : Bool := decide (g.thr ≤ g.wsum z)
Project declarations in the statement: AC0.Gate
Project declarations used by the proof or definition body
AC0.Gate, AC0.Gate.thr, AC0.Gate.wsum
Full modules
Build evidence: fresh isolated rebuild of all 38 bundled modules with Lean (version 4.26.0, started 2026-10-10T15:21:56Z, finished 2026-10-10T15:27:00Z: 38/38 modules compiled, 1588 axiom reports, no errors. See Build for the commands and the independent audit of 2026-10-10 (dated evidence).