pith. machine review for the scientific record. sign in
structure definition def or abbrev

BooleanCircuit

show as:
view Lean formalization →

No prose has been written for this declaration yet. The Lean source and graph data below render without it.

generate prose now

formal statement (Lean)

  96structure BooleanCircuit (n : ℕ) where
  97  /-- Total number of gates (inputs + internal + output) -/
  98  gate_count : ℕ
  99  /-- The gates in topological order -/
 100  gates : Fin gate_count → Gate gate_count
 101  /-- Input gates each reference one variable in {0,..,n-1} -/
 102  input_var : ∀ i : Fin gate_count,
 103    (gates i).gtype = GateType.Input → ∃ _v : Fin n, True
 104  /-- At least one output gate exists -/
 105  has_output : ∃ i : Fin gate_count, (gates i).gtype = GateType.Output
 106
 107/-- The size of a circuit is its gate count. -/
 108def BooleanCircuit.size {n : ℕ} (c : BooleanCircuit n) : ℕ := c.gate_count

proof body

Definition body.

 109
 110/-- A Boolean circuit computes a specific Boolean function determined by its
 111    gate structure and input wiring. We model this as a bundled function field
 112    rather than implementing gate-by-gate evaluation (which would require
 113    enriching BooleanCircuit with explicit input wiring). -/

used by (17)

From the project-wide theorem graph. These declarations reference this one in their body.

depends on (21)

Lean names referenced from this declaration's body.