Long codes and the complete nonadaptive test
Lax253009.LongCode · concepts/Lax253009/LongCode.lean · lax-253009
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
The long code of a Boolean word is its evaluation table: at the coordinate indexed by a Boolean function , it stores . A purported long code is an arbitrary table of the same shape.
The complete nonadaptive test chooses Boolean functions . After reading their table entries , it checks for every Boolean predicate of bits. Only the initial answers are free: they determine every checked answer. These are the long code of Section 3 and the CNA test of Section 4 of Håstad's paper, written with Boolean values instead of signs.
With a side condition , the test additionally checks that each queried answer is unchanged when its function is replaced by any function agreeing with it on the set where is true. This is step (3) of the test preceding Theorem 4.17. The definitions below describe a fixed choice of the functions; the probabilistic soundness estimates are separate statements.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Data.Fintype.Pi |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Long codes and the complete nonadaptive test |
| 6 | type: definition |
| 7 | --- |
| 8 | The long code of a Boolean word is its evaluation table: |
| 9 | at the coordinate indexed by a Boolean function , it stores . |
| 10 | A purported long code is an arbitrary table of the same shape. |
| 11 | |
| 12 | The complete nonadaptive test chooses Boolean functions . After |
| 13 | reading their table entries , it checks |
| 14 | for every Boolean predicate of bits. |
| 15 | Only the initial answers are free: they determine every checked answer. |
| 16 | These are the long code of Section 3 and the CNA test of Section 4 of |
| 17 | Håstad's paper, written with Boolean values instead of signs. |
| 18 | |
| 19 | With a side condition , the test additionally checks that each queried |
| 20 | answer is unchanged when its function is replaced by any function agreeing |
| 21 | with it on the set where is true. This is step (3) of the test preceding |
| 22 | Theorem 4.17. The definitions below describe a fixed choice of the functions; |
| 23 | the probabilistic soundness estimates are separate statements. |
| 24 | -/ |
| 25 | |
| 26 | namespace Lax253009.LongCode |
| 27 | |
| 28 | abbrev Word (w : ℕ) := Fin w → Bool |
| 29 | abbrev Coordinate (w : ℕ) := Word w → Bool |
| 30 | abbrev Table (w : ℕ) := Coordinate w → Bool |
| 31 | |
| 32 | def evaluation {w : ℕ} (x : Word w) : Table w := fun g ↦ g x |
| 33 | |
| 34 | def compose {w s : ℕ} (f : Fin s → Coordinate w) (B : Word s → Bool) : Coordinate w := |
| 35 | fun x ↦ B (fun i ↦ f i x) |
| 36 | |
| 37 | def Accepts {w s : ℕ} (A : Table w) (f : Fin s → Coordinate w) : Prop := |
| 38 | ∀ B : Word s → Bool, A (compose f B) = B (fun i ↦ A (f i)) |
| 39 | |
| 40 | def LooksLike {w s : ℕ} (A : Table w) (f : Fin s → Coordinate w) (x : Word w) : Prop := |
| 41 | (∀ i, A (f i) = f i x) ∧ |
| 42 | (∀ B : Word s → Bool, A (compose f B) = compose f B x) |
| 43 | |
| 44 | def AgreesOn {w : ℕ} (h g g' : Coordinate w) : Prop := |
| 45 | ∀ x, h x = true → g x = g' x |
| 46 | |
| 47 | def Queried {w s : ℕ} (f : Fin s → Coordinate w) (g : Coordinate w) : Prop := |
| 48 | (∃ i, g = f i) ∨ ∃ B : Word s → Bool, g = compose f B |
| 49 | |
| 50 | def AcceptsWithCondition {w s : ℕ} (A : Table w) (f : Fin s → Coordinate w) |
| 51 | (h : Coordinate w) : Prop := |
| 52 | Accepts A f ∧ ∀ g, Queried f g → ∀ g', AgreesOn h g g' → A g = A g' |
| 53 | |
| 54 | end Lax253009.LongCode |
| 55 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments