OAI/Computability/QuantumFactoring/BooleanNetwork.lean
25 declarations, 0 contain sorry, 0 declared as axioms
- inductive
OAI.ExactQuantumFactoring.BoolNodeline 12Source documentation
A bounded-fan-in Boolean node, with no hidden arithmetic operation.
inductive BoolNode (n : ℕ) where …
- def
OAI.ExactQuantumFactoring.BoolNode.evalline 20 - def
OAI.ExactQuantumFactoring.BoolNode.mapline 26 - lemma
OAI.ExactQuantumFactoring.BoolNode.eval_mapline 32 - def
OAI.ExactQuantumFactoring.BoolNode.compileOpline 36Source documentation
The new wire is distinct from every preexisting wire.
def compileOp {n q : ℕ} (h : n + 1 ≤ q) (o : BoolNode n) : BooleanOp q ⟨n, by omega⟩ := …Mentions: OAI.ExactQuantumFactoring.BoolNode, OAI.ExactQuantumFactoring.BooleanOp
- lemma
OAI.ExactQuantumFactoring.BoolNode.compileOp_valueline 46 - inductive
OAI.ExactQuantumFactoring.BoolNetline 54Source documentation
Straight-line Boolean computation retaining its whole trace. Width increases by exactly one per node, so there is no truth-table synthesis overhead.
inductive BoolNet (n : ℕ) : ℕ → Type | input : BoolNet n n | add {k : ℕ} (p : BoolNet n k) (o : BoolNode k) : BoolNet n (k+1) namespace BoolNetMentions: OAI.ExactQuantumFactoring.BoolNode
- def
OAI.ExactQuantumFactoring.BoolNet.countline 60 - lemma
OAI.ExactQuantumFactoring.BoolNet.width_eqline 64 - lemma
OAI.ExactQuantumFactoring.BoolNet.input_leline 69 - def
OAI.ExactQuantumFactoring.BoolNet.evalline 71 - lemma
OAI.ExactQuantumFactoring.BoolNet.eval_add_castSuccline 75 - lemma
OAI.ExactQuantumFactoring.BoolNet.eval_add_lastline 79 - lemma
OAI.ExactQuantumFactoring.BoolNet.eval_inputline 83 - def
OAI.ExactQuantumFactoring.BoolNet.programline 91 - lemma
OAI.ExactQuantumFactoring.BoolNet.program_lengthline 96 - lemma
OAI.ExactQuantumFactoring.BoolNet.compile_lengthline 102 - def
OAI.ExactQuantumFactoring.BoolNet.attachline 108Source documentation
Append a network whose inputs are arbitrary already-computed wires. Repeated input sources are permitted and do not cause duplicated computation.
def attach {n k m l : ℕ} (a : BoolNet n k) (ρ : Fin m → Fin k) (b : BoolNet m l) : (j : ℕ) × BoolNet n j × (Fin l → Fin j) := …Mentions: OAI.ExactQuantumFactoring.BoolNet
- lemma
OAI.ExactQuantumFactoring.BoolNet.attach_countline 116 - lemma
OAI.ExactQuantumFactoring.BoolNet.attach_evalline 122 - lemma
OAI.ExactQuantumFactoring.BoolNet.attach_widthline 135 - lemma
OAI.ExactQuantumFactoring.BoolNet.attach_leline 141 - lemma
OAI.ExactQuantumFactoring.BoolNet.attach_preserveline 144 - lemma
OAI.ExactQuantumFactoring.BoolNet.program_evalline 156Source documentation
On fresh ancillas the compiled program realizes the network exactly, including preservation of all unused wires.
lemma program_eval {n k q : ℕ} (p : BoolNet n k) (h : k ≤ q) (x : Basis q) (hfresh : ∀ i : Fin q, n ≤ i.val → x i = false) : (∀ i : Fin k, (BooleanProgram.eval (p.program h) x) (i.castLE h) = p.eval (fun j => x (j.castLE (p.input_le.trans h))) i) ∧ (∀ i : Fin q, k ≤ i.val → (BooleanProgram.eval (p.program h) x) i = false) := by …Mentions: OAI.ExactQuantumFactoring.BoolNet, OAI.ExactQuantumFactoring.Basis, OAI.ExactQuantumFactoring.BooleanProgram.eval
- structure
OAI.ExactQuantumFactoring.BooleanNetworkline 197Source documentation
Typed interfaces for network composition, with explicitly retained workspace.
structure BooleanNetwork (n m : ℕ) where …