Accepting local views of a proof
Lax253009.LocalTests · concepts/Lax253009/LocalTests.lean · lax-253009
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 Lax253009.LocalTests |
| 22 | |
| 23 | abbrev Oracle (m : ℕ) := Fin m → Bool |
| 24 | abbrev View (m : ℕ) := Fin m → Option Bool |
| 25 | |
| 26 | def Extends {m : ℕ} (π : Oracle m) (a : View m) : Prop := |
| 27 | ∀ i b, a i = some b → π i = b |
| 28 | |
| 29 | def Compatible {m : ℕ} (a b : View m) : Prop := |
| 30 | ∀ i x y, a i = some x → b i = some y → x = y |
| 31 | |
| 32 | structure System (r m : ℕ) where |
| 33 | accepting : Fin r → Finset (View m) |
| 34 | |
| 35 | noncomputable def System.acceptedSeeds {r m : ℕ} (C : System r m) |
| 36 | (π : Oracle m) : Finset (Fin r) := by |
| 37 | classical |
| 38 | exact Finset.univ.filter fun seed ↦ ∃ a ∈ C.accepting seed, Extends π a |
| 39 | |
| 40 | noncomputable def System.optimum {r m : ℕ} (C : System r m) : ℕ := |
| 41 | Finset.univ.sup fun π : Oracle m ↦ (C.acceptedSeeds π).card |
| 42 | |
| 43 | end Lax253009.LocalTests |
| 44 |
Builds on
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments