NIM paper · interactive edition Interactive edition · paper, explanations and Lean proofs.

Definition A.2Bounded-unrolling recurrence: at most T updates in total from an input-independent initial state

Checked definition or construction Lean contains the definition or construction, with checked properties.

1 Paper text

Definition A.2 (Bounded-unrolling recurrence) Fix a time window T∈NT\in\N. A fixed-scale quantised RNN\RNN consists of:

  • input bits xt∈{0,1}nx_t\in\bits^n at time tt,

  • a hidden state ht∈{0,1}mh_t\in\bits^{m} for some m≤poly(n)m\le \poly(n),

  • an output ot∈{0,1}ko_t\in\bits^{k} for k≤poly(n)k\le \poly(n),

  • fixed-scale quantised parameters (weights/thresholds in QW,D\Qset_{W,D} and optional input negations) shared across time,

such that each update ht+1h_{t+1} and oto_t is computed by a depth-LL fixed-scale quantised threshold network over the current input and earlier states within the window. Each inference starts from an input-independent initial state, and the entire computation producing its output contains at most TT recurrent updates. No boundary state may carry additional input-dependent computation from before that window. Unrolling this bounded computation yields a feedforward computation of depth O(L⋅T)O(L\cdot T). A bound only on the lag between connected states does not imply this bound on total unrolling; the persistent model in Section 5.5 deliberately allows more than TT updates.

Generated from paper_jmlr.tex, lines 1359–1373.

2 Explain this

A recurrent model with a hidden state, updated by a fixed-depth threshold network that reads the current input and earlier states within a window. The crucial restriction: each inference starts from an input-independent initial state and makes at most TT updates in total; no state may smuggle in extra computation from before the window. Unrolled, it is a feedforward network of depth O(LT)O(LT).

Caveat (stated in the definition): bounding only how far back each update looks does not bound the total unrolling; the persistent model of Section 5.5 deliberately makes more than TT updates.

3 How this is formalised

  • Windows.window_ac0: for a valid LL-layer cell reading the input block and the ww most recent states (Windows.winIn; state after tt updates Windows.wState, with an input-independent initial state), the state after TT updates is computed by formulas of depth at most 3LT3LT reading only the TT input blocks.
  • Windows.window_size_closed: a closed polynomial size bound for fixed TT.
  • AC0.rnn_ac0: the one-state version with total unrolling TT.
Coverage record
Paper anchordef:RNN-formal (manuscript label)
Displayed asDefinition A.2
ClaimBounded-unrolling recurrence: at most T updates in total from an input-independent initial state
Coverage categoryChecked definition or construction
Statement sourcepaper_jmlr.tex lines 1359–1373; SHA-256 of the normalised block source 8cf36150201875f2…
Lean declarations
Audited correspondence rowsdef:RNN-formal, app:RNN
Explanationsexplain/def:RNN-formal, formal/def:RNN-formal
Build evidencefresh isolated rebuild, audit report

4 Lean statement and source

Principal declarations

theorem Windows.window_ac0

Module Windows (lean/phase6/Windows.lean, lines 79–133) · file SHA-256 ff59ec8bf0a0de70… Axioms reported by the fresh build: propext, Classical.choice, Quot.sound

WINDOW SIMULATION THEOREM. For a valid L-layer cell with fan-ins/widths ≤ M reading the input block and the w most recent states, the state after T updates is computed by formulas with depth ≤ 3·L·T, size ≤ rnnSize W M L T, reading only the T input blocks.

Statement as elaborated and printed by Lean 4.26.0

∀ {W M : ℕ} (cell : List NimAudit.AC0.Layer),
  NimAudit.AC0.NetValid W cell →
    NimAudit.AC0.NetBounded M cell →
      ∀ (n m w : ℕ) (h0 : ℕ → Bool) (T i : ℕ),
        (∀ (x : ℕ → Bool),
            NimAudit.AC0.Circ.eval x (NimAudit.Windows.wCirc W cell n m w h0 T i) =
              NimAudit.Windows.wState cell n m w h0 x T i) ∧
          (NimAudit.Windows.wCirc W cell n m w h0 T i).size ≤
              NimAudit.AC0.rnnSize W M cell.length T ∧
            (NimAudit.Windows.wCirc W cell n m w h0 T i).depth ≤ 3 * cell.length * T ∧
              (NimAudit.Windows.wCirc W cell n m w h0 T i).maxInput ≤ T * n
Exact source text, lines 79–133
79/-- WINDOW SIMULATION THEOREM.  For a valid L-layer cell with fan-ins/widths ≤ M reading80    the input block and the w most recent states, the state after T updates is computed by81    formulas with depth ≤ 3·L·T, size ≤ rnnSize W M L T, reading only the T input blocks. -/82theorem window_ac0 {W M : Nat} (cell : List Layer) (hv : NetValid W cell) (hb : NetBounded M cell)83    (n m w : Nat) (h0 : Nat → Bool) : ∀ T i,84    (∀ x : Nat → Bool, eval x (wCirc W cell n m w h0 T i) = wState cell n m w h0 x T i) ∧85    size (wCirc W cell n m w h0 T i) ≤ rnnSize W M cell.length T ∧86    depth (wCirc W cell n m w h0 T i) ≤ 3 * cell.length * T ∧87    maxInput (wCirc W cell n m w h0 T i) ≤ T * n := by88  intro T89  induction T using Nat.strongRecOn with90  | ind T ih =>91    intro i92    cases T with93    | zero => simp [wCirc.eq_1, wState.eq_1, rnnSize]94    | succ t =>95      -- the leaves of the last update96      let prev : Nat → Circ := fun j => if j < n then input (t * n + j) else if j < n + w * m then97        (if (j - n) / m ≤ t then wCirc W cell n m w h0 (t - (j - n) / m) ((j - n) % m) else const (h0 ((j - n) % m)))98        else const false99      have hprev : ∀ j, size (prev j) ≤ rnnSize W M cell.length t ∧ depth (prev j) ≤ 3 * cell.length * t ∧100          maxInput (prev j) ≤ (t + 1) * n := by101        intro j102        simp only [prev]103        split104        · simp; refine ⟨rnnSize_pos _ _ _ _, ?_⟩; rw [Nat.succ_mul]; omega105        · split106          · split107            · next hδ =>108              have hlt : t - (j - n) / m < t + 1 := Nat.lt_succ_of_le (Nat.sub_le _ _)109              have hle : t - (j - n) / m ≤ t := Nat.sub_le _ _110              obtain ⟨_, h2, h3, h4⟩ := ih (t - (j - n) / m) hlt ((j - n) % m)111              refine ⟨Nat.le_trans h2 (rnnSize_mono W M _ hle), Nat.le_trans h3 (Nat.mul_le_mul_left _ hle),112                Nat.le_trans h4 ?_⟩113              rw [Nat.succ_mul]; exact Nat.le_trans (Nat.mul_le_mul_right n hle) (Nat.le_add_right _ _)114            · simp; exact rnnSize_pos _ _ _ _115          · simp; exact rnnSize_pos _ _ _ _116      have hsd := compileNet_sd (W := W) cell hb prev (rnnSize W M cell.length t) (3 * cell.length * t)117        (fun j => (hprev j).1) (fun j => (hprev j).2.1) i118      have hmx := compileNet_max (W := W) cell prev ((t + 1) * n) (fun j => (hprev j).2.2) i119      refine ⟨fun x => ?_, ?_, ?_, ?_⟩120      · rw [wCirc_succ, wState_succ, eval_compileNet cell hv]121        congr 1122        funext j123        unfold winIn124        split125        · simp126        · split127          · split128            · next hδ => simp only [if_pos hδ]; exact (ih (t - (j - n) / m) (Nat.lt_succ_of_le (Nat.sub_le _ _)) ((j - n) % m)).1 x129            · next hδ => simp [hδ]130          · simp131      · rw [wCirc_succ]; simp only [rnnSize]; exact hsd.1132      · rw [wCirc_succ]; have := hsd.2; rw [Nat.mul_succ]; omega133      · rw [wCirc_succ]; exact hmx

Project declarations in the statement: AC0.Circ.depth, AC0.Circ.eval, AC0.Circ.maxInput, AC0.Circ.size, AC0.Layer, AC0.NetBounded, AC0.NetValid, AC0.rnnSize, Windows.wCirc, Windows.wState

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.const, AC0.Circ.depth, AC0.Circ.depth_const, AC0.Circ.depth_input, AC0.Circ.eval, AC0.Circ.eval_const, AC0.Circ.eval_input, AC0.Circ.input, AC0.Circ.maxInput, AC0.Circ.maxInput_const, AC0.Circ.maxInput_input, AC0.Circ.size, AC0.Circ.size_const, AC0.Circ.size_input, AC0.Layer, AC0.NetBounded, AC0.NetValid, AC0.compileNet, AC0.compileNet_max, AC0.compileNet_sd, AC0.evalNet, AC0.eval_compileNet, AC0.rnnSize, AC0.rnnSize_pos, AC0.sizeBound, Windows.rnnSize_mono, Windows.wCirc, Windows.wCirc_succ, Windows.wState, Windows.wState_succ, Windows.winIn

theorem Windows.window_size_closed

Module Windows (lean/phase6/Windows.lean, lines 135–137) · file SHA-256 ff59ec8bf0a0de70… Axioms reported by the fresh build: propext, Classical.choice, Quot.sound

Closed polynomial size bound for a fixed number T of updates.

Statement as elaborated and printed by Lean 4.26.0

∀ (W M L T : ℕ), NimAudit.AC0.rnnSize W M L T + 1 ≤ 2 * ((2 * W + 3) ^ L * (M + 1) ^ (W * L)) ^ T
Exact source text, lines 135–137
135/-- Closed polynomial size bound for a fixed number T of updates. -/136theorem window_size_closed (W M L T : Nat) :137    rnnSize W M L T + 1 ≤ 2 * ((2 * W + 3) ^ L * (M + 1) ^ (W * L)) ^ T := rnnSize_closed W M L T

Project declarations in the statement: AC0.rnnSize

Project declarations used by the proof or definition body

AC0.rnnSize_closed

theorem AC0.rnn_ac0

Module Circuit (lean/phase3/Circuit.lean, lines 1006–1040) · file SHA-256 af97cc0eec7d8464… Axioms reported by the fresh build: propext, Classical.choice, Quot.sound

BOUNDED-UNROLLING RECURRENCE (paper Definition RNN-formal with total unrolling T): the state after T updates of a valid L-layer cell with fan-ins/widths ≤ M is computed by formulas of depth ≤ 3 L T and size ≤ rnnSize W M L T, reading only the inputs of the T blocks (indices < T n).

Statement as elaborated and printed by Lean 4.26.0

∀ {W M : ℕ} (cell : List NimAudit.AC0.Layer),
  NimAudit.AC0.NetValid W cell →
    NimAudit.AC0.NetBounded M cell →
      ∀ (n : ℕ) (h0 : ℕ → Bool) (T i : ℕ),
        (∀ (x : ℕ → Bool),
            NimAudit.AC0.Circ.eval x (NimAudit.AC0.rnnCirc W cell n h0 T i) =
              NimAudit.AC0.rnnState cell n h0 x T i) ∧
          (NimAudit.AC0.rnnCirc W cell n h0 T i).size ≤ NimAudit.AC0.rnnSize W M cell.length T ∧
            (NimAudit.AC0.rnnCirc W cell n h0 T i).depth ≤ 3 * cell.length * T ∧
              (NimAudit.AC0.rnnCirc W cell n h0 T i).maxInput ≤ T * n
Exact source text, lines 1006–1040
1006/-- BOUNDED-UNROLLING RECURRENCE (paper Definition RNN-formal with total unrolling T):1007    the state after T updates of a valid L-layer cell with fan-ins/widths ≤ M is1008    computed by formulas of depth ≤ 3 L T and size ≤ rnnSize W M L T, reading only1009    the inputs of the T blocks (indices < T n). -/1010theorem rnn_ac0 {W M : Nat} (cell : List Layer) (hv : NetValid W cell) (hb : NetBounded M cell)1011    (n : Nat) (h0 : Nat → Bool) : ∀ T i,1012    (∀ x : Nat → Bool, eval x (rnnCirc W cell n h0 T i) = rnnState cell n h0 x T i) ∧1013    size (rnnCirc W cell n h0 T i) ≤ rnnSize W M cell.length T ∧1014    depth (rnnCirc W cell n h0 T i) ≤ 3 * cell.length * T ∧1015    maxInput (rnnCirc W cell n h0 T i) ≤ T * n1016  | 0, i => ⟨fun x => eval_rnnCirc cell hv n h0 x 0 i, by simp [rnnCirc, rnnSize],1017      by simp [rnnCirc], by simp [rnnCirc]⟩1018  | T + 1, i => by1019    have ih := fun j => rnn_ac0 cell hv hb n h0 T j1020    have hp_size : ∀ j, size ((fun j => if j < n then input (T * n + j)1021        else rnnCirc W cell n h0 T (j - n)) j) ≤ rnnSize W M cell.length T := by1022      intro j; simp only; split1023      · simp; exact rnnSize_pos W M cell.length T1024      · exact (ih (j - n)).2.11025    have hp_depth : ∀ j, depth ((fun j => if j < n then input (T * n + j)1026        else rnnCirc W cell n h0 T (j - n)) j) ≤ 3 * cell.length * T := by1027      intro j; simp only; split1028      · simp1029      · exact (ih (j - n)).2.2.11030    have hp_max : ∀ j, maxInput ((fun j => if j < n then input (T * n + j)1031        else rnnCirc W cell n h0 T (j - n)) j) ≤ (T + 1) * n := by1032      intro j; simp only; split1033      · simp; rw [Nat.succ_mul]; omega1034      · have := (ih (j - n)).2.2.2; rw [Nat.succ_mul]; omega1035    have hb' := compileNet_sd (W := W) cell hb _ _ _ hp_size hp_depth i1036    have hm' := compileNet_max (W := W) cell _ _ hp_max i1037    refine ⟨fun x => eval_rnnCirc cell hv n h0 x (T + 1) i, ?_, ?_, ?_⟩1038    · simp only [rnnCirc, rnnSize]; exact hb'.11039    · simp only [rnnCirc]; have := hb'.2; rw [Nat.mul_succ]; omega1040    · simp only [rnnCirc]; exact hm'

Project declarations in the statement: AC0.Circ.depth, AC0.Circ.eval, AC0.Circ.maxInput, AC0.Circ.size, AC0.Layer, AC0.NetBounded, AC0.NetValid, AC0.rnnCirc, AC0.rnnSize, AC0.rnnState

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.const, AC0.Circ.depth, AC0.Circ.depth_const, AC0.Circ.depth_input, AC0.Circ.eval, AC0.Circ.input, AC0.Circ.maxInput, AC0.Circ.maxInput_const, AC0.Circ.maxInput_input, AC0.Circ.size, AC0.Circ.size_const, AC0.Circ.size_input, AC0.Layer, AC0.NetBounded, AC0.NetValid, AC0.compileNet, AC0.compileNet_max, AC0.compileNet_sd, AC0.eval_rnnCirc, AC0.rnnCirc, AC0.rnnSize, AC0.rnnSize_pos, AC0.rnnState, AC0.sizeBound

Definitions these statements use

def Windows.wState

Module Windows (lean/phase6/Windows.lean, lines 34–40) · file SHA-256 ff59ec8bf0a0de70…

State after t updates (h0 before time 0 and as the initial state).

Statement as elaborated and printed by Lean 4.26.0

List NimAudit.AC0.Layer → ℕ → ℕ → ℕ → (ℕ → Bool) → (ℕ → Bool) → ℕ → ℕ → Bool
Exact source text, lines 34–40
34/-- State after t updates (h0 before time 0 and as the initial state). -/35def wState (cell : List Layer) (n m w : Nat) (h0 : Nat → Bool) (x : Nat → Bool) : Nat → Nat → Bool36  | 0 => h037  | t + 1 => evalNet cell (winIn n m w (fun j => x (t * n + j))38      (fun δ => if δ ≤ t then wState cell n m w h0 x (t - δ) else h0))39termination_by t => t40decreasing_by exact Nat.lt_succ_of_le (Nat.sub_le _ _)

Project declarations in the statement: AC0.Layer

Project declarations used by the proof or definition body

AC0.Layer, AC0.evalNet, Windows.winIn

def Windows.winIn

Module Windows (lean/phase6/Windows.lean, lines 29–32) · file SHA-256 ff59ec8bf0a0de70…

Update input layout: the current block (n bits), then the w most recent states (m bits each, most recent first); zero elsewhere.

Statement as elaborated and printed by Lean 4.26.0

ℕ → ℕ → ℕ → (ℕ → Bool) → (ℕ → ℕ → Bool) → ℕ → Bool
Exact source text, lines 29–32
29/-- Update input layout: the current block (n bits), then the w most recent states30    (m bits each, most recent first); zero elsewhere. -/31def winIn (n m w : Nat) (x : Nat → Bool) (hs : Nat → Nat → Bool) : Nat → Bool := fun j =>32  if j < n then x j else if j < n + w * m then hs ((j - n) / m) ((j - n) % m) else false

Project declarations in the statement: none

Project declarations used by the proof or definition body

none

def AC0.Circ.depth

Module Circuit (lean/phase3/Circuit.lean, lines 61–66) · file SHA-256 af97cc0eec7d8464…

Statement as elaborated and printed by Lean 4.26.0

NimAudit.AC0.Circ → ℕ
Exact source text, lines 61–66
61def depth : Circ → Nat62  | input _ => 063  | const _ => 064  | not c => depth c + 165  | and cs => listMax (cs.attach.map (fun ⟨c, _⟩ => depth c)) + 166  | or cs => listMax (cs.attach.map (fun ⟨c, _⟩ => depth c)) + 1

Project declarations in the statement: AC0.Circ

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.and, AC0.Circ.casesOn, AC0.Circ.const, AC0.Circ.input, AC0.Circ.listMax, AC0.Circ.not, AC0.Circ.or, AC0.Circ.rec, AC0.Circ.rec_1

def AC0.Circ.eval

Module Circuit (lean/phase3/Circuit.lean, lines 44–49) · file SHA-256 af97cc0eec7d8464…

Statement as elaborated and printed by Lean 4.26.0

(ℕ → Bool) → NimAudit.AC0.Circ → Bool
Exact source text, lines 44–49
44def eval (x : Nat → Bool) : Circ → Bool45  | input i => x i46  | const b => b47  | not c => !(eval x c)48  | and cs => cs.attach.all (fun ⟨c, _⟩ => eval x c)49  | or cs => cs.attach.any (fun ⟨c, _⟩ => eval x c)

Project declarations in the statement: AC0.Circ

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.and, AC0.Circ.casesOn, AC0.Circ.const, AC0.Circ.input, AC0.Circ.not, AC0.Circ.or, AC0.Circ.rec, AC0.Circ.rec_1

def AC0.Circ.maxInput

Module Circuit (lean/phase3/Circuit.lean, lines 68–74) · file SHA-256 af97cc0eec7d8464…

One more than the largest input index used (0 if none).

Statement as elaborated and printed by Lean 4.26.0

NimAudit.AC0.Circ → ℕ
Exact source text, lines 68–74
68/-- One more than the largest input index used (0 if none). -/69def maxInput : Circ → Nat70  | input i => i + 171  | const _ => 072  | not c => maxInput c73  | and cs => listMax (cs.attach.map (fun ⟨c, _⟩ => maxInput c))74  | or cs => listMax (cs.attach.map (fun ⟨c, _⟩ => maxInput c))

Project declarations in the statement: AC0.Circ

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.and, AC0.Circ.casesOn, AC0.Circ.const, AC0.Circ.input, AC0.Circ.listMax, AC0.Circ.not, AC0.Circ.or, AC0.Circ.rec, AC0.Circ.rec_1

def AC0.Circ.size

Module Circuit (lean/phase3/Circuit.lean, lines 51–56) · file SHA-256 af97cc0eec7d8464…

Statement as elaborated and printed by Lean 4.26.0

NimAudit.AC0.Circ → ℕ
Exact source text, lines 51–56
51def size : Circ → Nat52  | input _ => 153  | const _ => 154  | not c => size c + 155  | and cs => (cs.attach.map (fun ⟨c, _⟩ => size c)).sum + 156  | or cs => (cs.attach.map (fun ⟨c, _⟩ => size c)).sum + 1

Project declarations in the statement: AC0.Circ

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.and, AC0.Circ.casesOn, AC0.Circ.const, AC0.Circ.input, AC0.Circ.not, AC0.Circ.or, AC0.Circ.rec, AC0.Circ.rec_1

def AC0.Layer

Module Circuit (lean/phase3/Circuit.lean, lines 743–744) · file SHA-256 af97cc0eec7d8464…

A layer: a list of gates reading the previous layer's outputs (indexed by Nat).

Statement as elaborated and printed by Lean 4.26.0

Type
Exact source text, lines 743–744
743/-- A layer: a list of gates reading the previous layer's outputs (indexed by Nat). -/744abbrev Layer := List Gate

Project declarations in the statement: none

Project declarations used by the proof or definition body

AC0.Gate

def AC0.NetBounded

Module Circuit (lean/phase3/Circuit.lean, lines 768–769) · file SHA-256 af97cc0eec7d8464…

Fan-in and width bounded by M.

Statement as elaborated and printed by Lean 4.26.0

ℕ → List NimAudit.AC0.Layer → Prop
Exact source text, lines 768–769
768/-- Fan-in and width bounded by M. -/769def NetBounded (M : Nat) (ls : List Layer) : Prop := ∀ l ∈ ls, l.length ≤ M ∧ ∀ g ∈ l, g.fanin ≤ M

Project declarations in the statement: AC0.Layer

Project declarations used by the proof or definition body

AC0.Gate, AC0.Gate.fanin, AC0.Layer

def AC0.NetValid

Module Circuit (lean/phase3/Circuit.lean, lines 765–766) · file SHA-256 af97cc0eec7d8464…

All gates valid for W.

Statement as elaborated and printed by Lean 4.26.0

ℕ → List NimAudit.AC0.Layer → Prop
Exact source text, lines 765–766
765/-- All gates valid for W. -/766def NetValid (W : Nat) (ls : List Layer) : Prop := ∀ l ∈ ls, ∀ g ∈ l, Gate.Valid W g

Project declarations in the statement: AC0.Layer

Project declarations used by the proof or definition body

AC0.Gate, AC0.Gate.Valid, AC0.Layer

def AC0.rnnSize

Module Circuit (lean/phase3/Circuit.lean, lines 996–999) · file SHA-256 af97cc0eec7d8464…

Size bound after t updates.

Statement as elaborated and printed by Lean 4.26.0

ℕ → ℕ → ℕ → ℕ → ℕ
Exact source text, lines 996–999
996/-- Size bound after t updates. -/997def rnnSize (W M L : Nat) : Nat → Nat998  | 0 => 1999  | t + 1 => sizeBound W M (rnnSize W M L t) L

Project declarations in the statement: none

Project declarations used by the proof or definition body

AC0.sizeBound

def Windows.wCirc

Module Windows (lean/phase6/Windows.lean, lines 42–49) · file SHA-256 ff59ec8bf0a0de70…

The unrolled formulas.

Statement as elaborated and printed by Lean 4.26.0

ℕ → List NimAudit.AC0.Layer → ℕ → ℕ → ℕ → (ℕ → Bool) → ℕ → ℕ → NimAudit.AC0.Circ
Exact source text, lines 42–49
42/-- The unrolled formulas. -/43def wCirc (W : Nat) (cell : List Layer) (n m w : Nat) (h0 : Nat → Bool) : Nat → Nat → Circ44  | 0 => fun i => const (h0 i)45  | t + 1 => compileNet W cell (fun j => if j < n then input (t * n + j) else if j < n + w * m then46      (if (j - n) / m ≤ t then wCirc W cell n m w h0 (t - (j - n) / m) ((j - n) % m) else const (h0 ((j - n) % m)))47      else const false)48termination_by t => t49decreasing_by exact Nat.lt_succ_of_le (Nat.sub_le _ _)

Project declarations in the statement: AC0.Circ, AC0.Layer

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.const, AC0.Circ.input, AC0.Layer, AC0.compileNet

def AC0.rnnCirc

Module Circuit (lean/phase3/Circuit.lean, lines 978–981) · file SHA-256 af97cc0eec7d8464…

Statement as elaborated and printed by Lean 4.26.0

ℕ → List NimAudit.AC0.Layer → ℕ → (ℕ → Bool) → ℕ → ℕ → NimAudit.AC0.Circ
Exact source text, lines 978–981
978def rnnCirc (W : Nat) (cell : List Layer) (n : Nat) (h0 : Nat → Bool) : Nat → Nat → Circ979  | 0 => fun i => const (h0 i)980  | t + 1 => compileNet W cell981      (fun j => if j < n then input (t * n + j) else rnnCirc W cell n h0 t (j - n))

Project declarations in the statement: AC0.Circ, AC0.Layer

Project declarations used by the proof or definition body

AC0.Circ, AC0.Circ.const, AC0.Circ.input, AC0.Layer, AC0.compileNet

def AC0.rnnState

Module Circuit (lean/phase3/Circuit.lean, lines 972–976) · file SHA-256 af97cc0eec7d8464…

State after t updates from the input-independent initial state h0; the input of update t is the global input block x (t*n + j).

Statement as elaborated and printed by Lean 4.26.0

List NimAudit.AC0.Layer → ℕ → (ℕ → Bool) → (ℕ → Bool) → ℕ → ℕ → Bool
Exact source text, lines 972–976
972/-- State after t updates from the input-independent initial state h0; the input of973    update t is the global input block x (t*n + j). -/974def rnnState (cell : List Layer) (n : Nat) (h0 : Nat → Bool) (x : Nat → Bool) : Nat → Nat → Bool975  | 0 => h0976  | t + 1 => evalNet cell (cellInput n (fun j => x (t * n + j)) (rnnState cell n h0 x t))

Project declarations in the statement: AC0.Layer

Project declarations used by the proof or definition body

AC0.Layer, AC0.cellInput, AC0.evalNet

Full modules

ModuleFileLinesImports
Circuitlean/phase3/Circuit.lean1151NimProbability
Windowslean/phase6/Windows.lean261Bypass

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).