The FAF verifier as a finite local-test system
Lax253009.FAFLocalTests · concepts/Lax253009/FAFLocalTests.lean · lax-253009
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Number all coordinates of all reference and larger tables to form a single Boolean proof. For each random choice, convert the enumerated FAF transcripts into partial assignments. Filter out inconsistent assignments to repeated coordinates and merge the remainder.
The resulting system accepts exactly when the original FAF verifier does, and has at most accepting views per choice. Thus the finite FAF soundness theorem applies directly to the graph reduction. Numbering and enumeration here are finite mathematical constructions; their efficient machine implementations are separate obligations.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax253009.FAFComposition |
| 2 | import Lax253009.TestRepetition |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: The FAF verifier as a finite local-test system |
| 7 | type: theorem |
| 8 | --- |
| 9 | Number all coordinates of all reference and larger tables to form a |
| 10 | single Boolean proof. For each random choice, convert the enumerated FAF |
| 11 | transcripts into partial assignments. Filter out inconsistent assignments |
| 12 | to repeated coordinates and merge the remainder. |
| 13 | |
| 14 | The resulting system accepts exactly when the original FAF verifier does, |
| 15 | and has at most accepting views per choice. Thus the finite FAF |
| 16 | soundness theorem applies directly to the graph reduction. Numbering and |
| 17 | enumeration here are finite mathematical constructions; their efficient |
| 18 | machine implementations are separate obligations. |
| 19 | -/ |
| 20 | |
| 21 | namespace Lax253009.FAFLocalTests |
| 22 | |
| 23 | open LongCode LocalTests LongCodePatterns TestRepetition TestSampling |
| 24 | |
| 25 | abbrev Index (U W : Type) (u w : ℕ) := (U × Coordinate u) ⊕ (W × Coordinate w) |
| 26 | |
| 27 | abbrev Randomness (U Ω : Type) (u w n s q : ℕ) := |
| 28 | U × FAFStrategyExtraction.Seed Ω u w n s q |
| 29 | |
| 30 | noncomputable def indexEquiv (U W : Type) [Fintype U] [Fintype W] (u w : ℕ) : |
| 31 | Index U W u w ≃ Fin (Fintype.card (Index U W u w)) := Fintype.equivFin _ |
| 32 | |
| 33 | noncomputable def randomEquiv (U Ω : Type) [Fintype U] [Fintype Ω] (u w n s q : ℕ) : |
| 34 | Randomness U Ω u w n s q ≃ Fin (Fintype.card (Randomness U Ω u w n s q)) := |
| 35 | Fintype.equivFin _ |
| 36 | |
| 37 | noncomputable def reference {U W : Type} [Fintype U] [Fintype W] {u w : ℕ} |
| 38 | (π : Oracle (Fintype.card (Index U W u w))) (v : U) : Table u := |
| 39 | fun g ↦ π (indexEquiv U W u w (Sum.inl (v, g))) |
| 40 | |
| 41 | noncomputable def larger {U W : Type} [Fintype U] [Fintype W] {u w : ℕ} |
| 42 | (π : Oracle (Fintype.card (Index U W u w))) (v : W) : Table w := |
| 43 | fun g ↦ π (indexEquiv U W u w (Sum.inr (v, g))) |
| 44 | |
| 45 | noncomputable def parts {U Ω W : Type} [Fintype U] [Fintype W] {u w n s q : ℕ} |
| 46 | (question : U → Ω → W) (z : Randomness U Ω u w n s q) |
| 47 | (p : LongCode.Word q × (Fin n → Pattern w)) : |
| 48 | Fin (q + n) → View (Fintype.card (Index U W u w)) := by |
| 49 | classical |
| 50 | exact Fin.addCases |
| 51 | (fun j x ↦ if x = indexEquiv U W u w (Sum.inl (z.1, z.2.1.2 j)) then some (p.1 j) else none) |
| 52 | (fun i x ↦ match (indexEquiv U W u w).symm x with |
| 53 | | .inl _ => none |
| 54 | | .inr (v, g) => if v = question z.1 (z.2.1.1 i) then p.2 i g else none) |
| 55 | |
| 56 | noncomputable def system {U Ω W : Type} [Fintype U] [Fintype Ω] [Fintype W] |
| 57 | {u w n s q : ℕ} (question : U → Ω → W) |
| 58 | (ρ : U → Ω → LongCode.Word w → LongCode.Word u) (valid : U → Ω → Coordinate w) : |
| 59 | System (Fintype.card (Randomness U Ω u w n s q)) (Fintype.card (Index U W u w)) := by |
| 60 | classical |
| 61 | exact ⟨fun seed ↦ |
| 62 | let z := (randomEquiv U Ω u w n s q).symm seed |
| 63 | ((FAFPatterns.patterns (ρ z.1) (valid z.1) z.2.1.1 z.2.1.2 z.2.2).filter |
| 64 | (fun p ↦ Coherent (parts question z p))).image (fun p ↦ merge (parts question z p))⟩ |
| 65 | |
| 66 | axiom passes_iff {U Ω W : Type} [Fintype U] [Fintype Ω] [Fintype W] |
| 67 | {u w n s q : ℕ} (question : U → Ω → W) |
| 68 | (ρ : U → Ω → LongCode.Word w → LongCode.Word u) (valid : U → Ω → Coordinate w) |
| 69 | (π : Oracle (Fintype.card (Index U W u w))) |
| 70 | (z : Randomness U Ω u w n s q) : |
| 71 | Passes (system (n := n) (s := s) (q := q) question ρ valid) π (randomEquiv U Ω u w n s q z) ↔ |
| 72 | FAFStrategyExtraction.Accepts question ρ valid (reference π) (larger π) z |
| 73 | |
| 74 | axiom free_bits {U Ω W : Type} [Fintype U] [Fintype Ω] [Fintype W] |
| 75 | {u w n s q : ℕ} (question : U → Ω → W) |
| 76 | (ρ : U → Ω → LongCode.Word w → LongCode.Word u) (valid : U → Ω → Coordinate w) : |
| 77 | ∀ seed, ((system (n := n) (s := s) (q := q) question ρ valid).accepting seed).card ≤ 2 ^ (q + n * s) |
| 78 | |
| 79 | axiom acceptance_probability {U Ω W : Type} [Fintype U] [Fintype Ω] [Fintype W] |
| 80 | {u w n s q : ℕ} (question : U → Ω → W) |
| 81 | (ρ : U → Ω → LongCode.Word w → LongCode.Word u) (valid : U → Ω → Coordinate w) |
| 82 | (π : Oracle (Fintype.card (Index U W u w))) : |
| 83 | FiniteProbability.probability (Passes (system (n := n) (s := s) (q := q) question ρ valid) π) = |
| 84 | FiniteProbability.probability |
| 85 | (FAFStrategyExtraction.Accepts (n := n) (s := s) (q := q) question ρ valid (reference π) (larger π)) |
| 86 | |
| 87 | axiom perfect_completeness {U Ω W : Type} [Fintype U] [Fintype Ω] [Fintype W] |
| 88 | {u w n s q : ℕ} (question : U → Ω → W) |
| 89 | (ρ : U → Ω → LongCode.Word w → LongCode.Word u) (valid : U → Ω → Coordinate w) |
| 90 | (P : W → LongCode.Word w) (Q : U → LongCode.Word u) |
| 91 | (hvalid : ∀ v ω, valid v ω (P (question v ω)) = true) |
| 92 | (hproject : ∀ v ω, ρ v ω (P (question v ω)) = Q v) : |
| 93 | Complete (system (n := n) (s := s) (q := q) question ρ valid) |
| 94 | |
| 95 | axiom soundness (l : ℕ) (hl : 0 < l) : |
| 96 | ∃ s₀ : ℕ, ∀ s : ℕ, s₀ ≤ s → ∃ w₀ : ℕ, ∀ w : ℕ, w₀ ≤ w → |
| 97 | ∀ {U Ω W : Type} [Fintype U] [Nonempty U] [Fintype Ω] [Nonempty Ω] |
| 98 | [Fintype W] [DecidableEq W], |
| 99 | ∀ u : ℕ, ∀ (question : U → Ω → W) |
| 100 | (ρ : U → Ω → LongCode.Word w → LongCode.Word u) (valid : U → Ω → Coordinate w), |
| 101 | (∀ (P : W → Option (LongCode.Word w)) (Q : U → Option (LongCode.Word u)), |
| 102 | FiniteProbability.probability (DecodedStrategies.Wins question |
| 103 | (FAFStrategyExtraction.Relation ρ valid) P Q) < FAFComposition.gameThreshold l s) → |
| 104 | Sound (system (n := 10 * l) (s := s) (q := 10 * l * s) question ρ valid) |
| 105 | ((1 / 2 : ℝ) ^ (20 * l * l * s)) |
| 106 | |
| 107 | axiom proof_length (U W : Type) [Fintype U] [Fintype W] (u w : ℕ) : |
| 108 | Fintype.card (Index U W u w) = Fintype.card U * 2 ^ (2 ^ u) + Fintype.card W * 2 ^ (2 ^ w) |
| 109 | |
| 110 | axiom random_choices (U Ω : Type) [Fintype U] [Fintype Ω] (u w n s q : ℕ) : |
| 111 | Fintype.card (Randomness U Ω u w n s q) = |
| 112 | Fintype.card U * (Fintype.card Ω ^ n * (2 ^ (2 ^ u)) ^ q * ((2 ^ (2 ^ w)) ^ s) ^ n) |
| 113 | |
| 114 | end Lax253009.FAFLocalTests |
| 115 |
Used by
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments