Binary constraints for a 22-query verdict
Lax956329.QueryCircuit · concepts/Lax956329/QueryCircuit.lean · lax-956329
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Use the same variables and binary edges for every Boolean verdict on 22 reads. Each gate stores its read bit and a partial disjunction. If the actual read vector is rejected, some edge in its copy fails.
Concept map
Lean source view on GitHub
| 1 | import Lax956329.Hierarchy |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Binary constraints for a 22-query verdict |
| 6 | type: lemma |
| 7 | --- |
| 8 | Use the same variables and binary edges for every Boolean verdict on 22 |
| 9 | reads. Each gate stores its read bit and a partial disjunction. If the |
| 10 | actual read vector is rejected, some edge in its copy fails. |
| 11 | -/ |
| 12 | |
| 13 | namespace Lax956329.QueryCircuit |
| 14 | |
| 15 | open Hierarchy |
| 16 | abbrev Pos := Fin 22 |
| 17 | abbrev Vector := Pos → Bool |
| 18 | abbrev Gate := Vector × Pos |
| 19 | |
| 20 | def readBit (v : Label) := decide (v.val%2 = 1) |
| 21 | def flag (v : Label) := decide (v.val/2%2 = 1) |
| 22 | def nextPos (j : Pos) : Pos := ⟨(j.val+1)%22,Nat.mod_lt _ (by decide)⟩ |
| 23 | |
| 24 | def compareBit (u : Label) (x : Bool) : Bool := decide (readBit u=x) |
| 25 | |
| 26 | def chain (verdict : Vector → Bool) (m : Vector) (j : Pos) (u v : Label) : Bool := |
| 27 | let next := flag u || decide (readBit u ≠ m j) |
| 28 | decide ((j.val=0 → flag u=false) ∧ |
| 29 | (j.val+1<22 → flag v=next) ∧ (j.val+1=22 → verdict m=true ∨ next=true)) |
| 30 | |
| 31 | axiom realization (verdict : Vector → Bool) (x : Vector) : |
| 32 | (∃ h : Gate → Label, ∀ m j, compareBit (h (m,j)) (x j) = true ∧ |
| 33 | chain verdict m j (h (m,j)) (h (m,nextPos j)) = true) ↔ verdict x = true |
| 34 | |
| 35 | end Lax956329.QueryCircuit |
| 36 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments