Composing the powered tests on a uniform incidence pattern
Lax956329.TestComposition · concepts/Lax956329/TestComposition.lean · lax-956329
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Each variable in a binary test has a fixed type and belongs to the owner reached by a fixed port word. The number of tests per powered edge is constant. Soundness loses a factor independent of the powered alphabet.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
Lean source view on GitHub
| 1 | import Lax956329.UniversalTester |
| 2 | import Lax956329.QueryCircuit |
| 3 | import Lax956329.WalkPower |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Composing the powered tests on a uniform incidence pattern |
| 8 | type: lemma |
| 9 | --- |
| 10 | Each variable in a binary test has a fixed type and belongs to the owner |
| 11 | reached by a fixed port word. The number of tests per powered edge is |
| 12 | constant. Soundness loses a factor independent of the powered alphabet. |
| 13 | -/ |
| 14 | |
| 15 | namespace Lax956329.TestComposition |
| 16 | |
| 17 | open Hierarchy OccurrenceLayout |
| 18 | |
| 19 | structure Network where |
| 20 | Var : Type |
| 21 | Edge : Type |
| 22 | vars : Fintype Var |
| 23 | edges : Fintype Edge |
| 24 | positive : Nonempty Edge |
| 25 | var : Edge → Bool → Var |
| 26 | route : Edge → Bool → List Port |
| 27 | |
| 28 | attribute [instance] Network.vars Network.edges Network.positive |
| 29 | |
| 30 | def Network.read {b : ℕ} (N : Network) (S : System b) (τ : N.Var → Owner S.m → Label) |
| 31 | (e : N.Edge) (k : Bool) (x : Owner S.m) := τ (N.var e k) (walk S (N.route e k) x) |
| 32 | |
| 33 | def Network.failed {b : ℕ} (N : Network) (S : System b) (test : N.Edge → Owner S.m → Label → Label → Bool) |
| 34 | (τ : N.Var → Owner S.m → Label) := ∑ x : Owner S.m, ∑ e : N.Edge, |
| 35 | if test e x (N.read S τ e false x) (N.read S τ e true x) = false then 1 else 0 |
| 36 | |
| 37 | /-- There are two checks for every pair of a 22-bit pattern and a read position. -/ |
| 38 | abbrev CheckIndex := QueryCircuit.Gate × Bool |
| 39 | |
| 40 | noncomputable def cost := Fintype.card CheckIndex |
| 41 | |
| 42 | axiom reduction {a d : ℕ} (ha : 0<a) (hd : 0<d) (word : Fin d → List Port) : |
| 43 | ∃ N : Network, ∃ coins : ℕ, 0 < coins ∧ Fintype.card N.Edge = d*coins*cost ∧ |
| 44 | ∀ {b : ℕ} (S : System b) (p : Fin d → Owner S.m → Fin a → Fin a → Bool), |
| 45 | ∃ test : N.Edge → Owner S.m → Label → Label → Bool, |
| 46 | ((∃ σ : Owner S.m → Fin a, ∀ i x, p i x (σ x) (σ (walk S (word i) x))=true) → |
| 47 | ∃ τ, ∀ e x, test e x (N.read S τ e false x) (N.read S τ e true x)=true) ∧ |
| 48 | ∀ τ, ∃ σ, coins*WalkPower.bad S word p σ ≤ 32*N.failed S test τ |
| 49 | |
| 50 | end Lax956329.TestComposition |
| 51 |
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments