Accepting local views of a proof
Lax323828.LocalTests · concepts/Lax323828/LocalTests.lean · lax-323828
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
Fix a proof with Boolean positions and a set of random choices. A local view is a partial assignment to proof positions. For each random choice, a finite list of accepting local views specifies a test: a proof passes when it extends at least one of those views.
This is the finite combinatorial data extracted from a verifier on a fixed input. A local view records every queried position and its answer, including positions chosen adaptively. No running-time assertion is built into this data. Uniform computation of the lists is a separate obligation.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Data.Fintype.Pi |
| 2 | import Mathlib.Data.Fintype.Option |
| 3 | import Mathlib.Data.Finset.Lattice.Fold |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Accepting local views of a proof |
| 8 | type: definition |
| 9 | --- |
| 10 | Fix a proof with Boolean positions and a set of random choices. |
| 11 | A local view is a partial assignment to proof positions. For each random |
| 12 | choice, a finite list of accepting local views specifies a test: a proof |
| 13 | passes when it extends at least one of those views. |
| 14 | |
| 15 | This is the finite combinatorial data extracted from a verifier on a fixed |
| 16 | input. A local view records every queried position and its answer, including |
| 17 | positions chosen adaptively. No running-time assertion is built into this |
| 18 | data. Uniform computation of the lists is a separate obligation. |
| 19 | -/ |
| 20 | |
| 21 | namespace Lax323828.LocalTests |
| 22 | |
| 23 | open scoped Classical |
| 24 | |
| 25 | /-- A complete Boolean proof with `m` positions. -/ |
| 26 | abbrev Oracle (m : ℕ) := Fin m → Bool |
| 27 | /-- A partial proof; `none` means that the position is not queried. -/ |
| 28 | abbrev View (m : ℕ) := Fin m → Option Bool |
| 29 | |
| 30 | /-- The complete proof agrees with every specified answer in the local view. -/ |
| 31 | def Extends {m : ℕ} (π : Oracle m) (a : View m) : Prop := |
| 32 | ∀ i b, a i = some b → π i = b |
| 33 | |
| 34 | /-- The two partial views agree at all positions where both specify an answer. -/ |
| 35 | def Compatible {m : ℕ} (a b : View m) : Prop := |
| 36 | ∀ i x y, a i = some x → b i = some y → x = y |
| 37 | |
| 38 | /-- For each random choice, the collection of local views that make the verifier accept. -/ |
| 39 | structure System (r m : ℕ) where |
| 40 | /-- The acceptable partial answer patterns for this random choice. -/ |
| 41 | accepting : Fin r → Finset (View m) |
| 42 | |
| 43 | /-- The random choices on which the supplied proof extends an accepting view. -/ |
| 44 | noncomputable def System.acceptedSeeds {r m : ℕ} (C : System r m) |
| 45 | (π : Oracle m) : Finset (Fin r) := |
| 46 | Finset.univ.filter fun seed ↦ ∃ a ∈ C.accepting seed, Extends π a |
| 47 | |
| 48 | /-- The largest number of accepting random choices attained by any single proof. -/ |
| 49 | noncomputable def System.optimum {r m : ℕ} (C : System r m) : ℕ := |
| 50 | Finset.univ.sup fun π : Oracle m ↦ (C.acceptedSeeds π).card |
| 51 | |
| 52 | end Lax323828.LocalTests |
| 53 |
Builds on
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments