Encoding finite projection-game answers as binary words
Lax323828.ProjectionEncoding · concepts/Lax323828/ProjectionEncoding.lean · lax-323828
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Inject finite answer alphabets into fixed-length Boolean words, reject invalid first-prover encodings, and project valid answers through the encoding of the second alphabet. This preserves perfect completeness and cannot increase soundness, including for partial prover strategies. The first answer width can be enlarged arbitrarily without changing either property, as required by the FAF composition's minimum-width condition.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax323828.FAFStrategyExtraction |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Encoding finite projection-game answers as binary words |
| 6 | type: theorem |
| 7 | --- |
| 8 | Inject finite answer alphabets into fixed-length Boolean words, reject |
| 9 | invalid first-prover encodings, and project valid answers through the |
| 10 | encoding of the second alphabet. This preserves perfect completeness and |
| 11 | cannot increase soundness, including for partial prover strategies. |
| 12 | The first answer width can be enlarged arbitrarily without changing either |
| 13 | property, as required by the FAF composition's minimum-width condition. |
| 14 | -/ |
| 15 | |
| 16 | namespace Lax323828.ProjectionEncoding |
| 17 | |
| 18 | open scoped Classical |
| 19 | |
| 20 | open LongCode FiniteProbability |
| 21 | |
| 22 | /-- Recover the unique encoded letter if `b` lies in the image of `e`; otherwise return no letter. -/ |
| 23 | noncomputable def decode {A B : Type} (e : A ↪ B) (b : B) : Option A := |
| 24 | if h : ∃ a, e a = b then some h.choose else none |
| 25 | |
| 26 | /-- Accept precisely the encodings of letters that satisfy the original validity test. -/ |
| 27 | noncomputable def valid {U Ω Y : Type} {w : ℕ} |
| 28 | (ey : Y ↪ Word w) (v : U → Ω → Y → Bool) (u : U) (ω : Ω) (b : Word w) : Bool := |
| 29 | match decode ey b with |
| 30 | | some y => v u ω y |
| 31 | | none => false |
| 32 | |
| 33 | /-- Decode the first answer, apply the projection, and encode the second answer; invalid words map to the zero word. -/ |
| 34 | noncomputable def project {U Ω X Y : Type} {u w : ℕ} |
| 35 | (ex : X ↪ Word u) (ey : Y ↪ Word w) (ρ : U → Ω → Y → X) |
| 36 | (v : U) (ω : Ω) (b : Word w) : Word u := |
| 37 | match decode ey b with |
| 38 | | some y => ex (ρ v ω y) |
| 39 | | none => fun _ ↦ false |
| 40 | |
| 41 | axiom encoding_exists {A : Type} [Fintype A] (w : ℕ) (h : Fintype.card A ≤ w) : |
| 42 | Nonempty (A ↪ Word w) |
| 43 | |
| 44 | axiom completeness {U Ω W X Y : Type} {u w : ℕ} |
| 45 | (ex : X ↪ Word u) (ey : Y ↪ Word w) (question : U → Ω → W) |
| 46 | (v : U → Ω → Y → Bool) (ρ : U → Ω → Y → X) |
| 47 | (P : W → Y) (Q : U → X) |
| 48 | (hv : ∀ a ω, v a ω (P (question a ω)) = true) |
| 49 | (hρ : ∀ a ω, ρ a ω (P (question a ω)) = Q a) : |
| 50 | (∀ a ω, valid ey v a ω (ey (P (question a ω))) = true) ∧ |
| 51 | (∀ a ω, project ex ey ρ a ω (ey (P (question a ω))) = ex (Q a)) |
| 52 | |
| 53 | axiom soundness {U Ω W X Y : Type} [Fintype U] [Fintype Ω] |
| 54 | [Nonempty X] [Nonempty Y] {u w : ℕ} |
| 55 | (ex : X ↪ Word u) (ey : Y ↪ Word w) (question : U → Ω → W) |
| 56 | (v : U → Ω → Y → Bool) (ρ : U → Ω → Y → X) (s : ℝ) |
| 57 | (h : ∀ (P : W → Y) (Q : U → X), |
| 58 | probability (fun z : U × Ω ↦ v z.1 z.2 (P (question z.1 z.2)) = true ∧ |
| 59 | ρ z.1 z.2 (P (question z.1 z.2)) = Q z.1) ≤ s) |
| 60 | (P : W → Option (Word w)) (Q : U → Option (Word u)) : |
| 61 | probability (DecodedStrategies.Wins question |
| 62 | (FAFStrategyExtraction.Relation (project ex ey ρ) (valid ey v)) P Q) ≤ s |
| 63 | |
| 64 | end Lax323828.ProjectionEncoding |
| 65 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments