Point atoms and finite flavor distributions
Lax342547.Atoms · concepts/Lax342547/Atoms.lean · lax-342547
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Definition 5.4 on the concrete cut space. Each atom has a single nonzero moment representative. Generic, shared-only, and pure flavors retain exactly their specified coordinates, and always retain the # and Z blocks. Their parameter law samples all retained bits independently and uniformly.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax342547.ConcreteCut |
| 2 | import Mathlib.Probability.Distributions.Uniform |
| 3 | import Mathlib.Tactic.DeriveFintype |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Point atoms and finite flavor distributions |
| 8 | type: lemma |
| 9 | --- |
| 10 | Definition 5.4 on the concrete cut space. Each atom has a single nonzero |
| 11 | moment representative. Generic, shared-only, and pure flavors retain |
| 12 | exactly their specified coordinates, and always retain the # and Z blocks. |
| 13 | Their parameter law samples all retained bits independently and uniformly. |
| 14 | -/ |
| 15 | |
| 16 | namespace Lax342547.Atoms |
| 17 | |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Lax342547.MomentSpace Lax342547.TagGeometry Lax342547.ConcreteGeometry |
| 21 | open Lax342547.CutProfiles Lax342547.ConcreteCut |
| 22 | |
| 23 | noncomputable def atomRepresentation {k n b degree : ℕ} (l : Tag k) |
| 24 | (s : Fin b → Binary) (z : Base k n → Binary) |
| 25 | (hz : ∀ i, i ∉ allowedBase k n l → z i = 0) : Representation k n b degree := by |
| 26 | classical |
| 27 | refine ⟨Pi.single l (pointMoment selectorEval s z), ?_⟩ |
| 28 | intro t _ |
| 29 | by_cases ht : l = t |
| 30 | · subst t |
| 31 | simp only [Pi.single_eq_same] |
| 32 | exact Submodule.subset_span ⟨s, z, hz, rfl⟩ |
| 33 | · simp [ht] |
| 34 | |
| 35 | noncomputable def atom {k n b degree : ℕ} (l : Tag k) (s : Fin b → Binary) (z : Base k n → Binary) |
| 36 | (hz : ∀ i, i ∉ allowedBase k n l → z i = 0) : Profile k n b degree := |
| 37 | (representationCut k n b degree).rangeRestrict (atomRepresentation l s z hz) |
| 38 | |
| 39 | inductive Flavor (k : ℕ) where |
| 40 | | generic |
| 41 | | sharedOnly |
| 42 | | pure (blocks : Finset (Tag k × Tag k)) |
| 43 | deriving Fintype |
| 44 | |
| 45 | def retained {k n : ℕ} (l : Tag k) (f : Flavor k) : Set (Base k n) |
| 46 | | Sum.inl ((d, t), _) => l ∈ interval k d ∧ match f with |
| 47 | | .generic => True |
| 48 | | .sharedOnly => False |
| 49 | | .pure blocks => (d, t) ∈ blocks |
| 50 | | Sum.inr (q, _) => match f with |
| 51 | | .pure _ => q ≠ 0 |
| 52 | | _ => True |
| 53 | |
| 54 | abbrev Parameters {k : ℕ} (n : ℕ) (l : Tag k) (f : Flavor k) := |
| 55 | {i : Base k n // i ∈ retained l f} → Binary |
| 56 | |
| 57 | noncomputable instance {k n : ℕ} (l : Tag k) (f : Flavor k) : |
| 58 | Fintype {i : Base k n // i ∈ retained l f} := Fintype.ofFinite _ |
| 59 | |
| 60 | noncomputable instance {k n : ℕ} (l : Tag k) (f : Flavor k) : Fintype (Parameters n l f) := by |
| 61 | classical |
| 62 | exact inferInstanceAs (Fintype ({i : Base k n // i ∈ retained l f} → Binary)) |
| 63 | |
| 64 | noncomputable def parameterValue {k n : ℕ} {l : Tag k} {f : Flavor k} (p : Parameters n l f) |
| 65 | (i : Base k n) : Binary := by |
| 66 | classical |
| 67 | exact if hi : i ∈ retained l f then p ⟨i, hi⟩ else 0 |
| 68 | |
| 69 | noncomputable def parameterLaw {k : ℕ} (n : ℕ) (l : Tag k) (f : Flavor k) : |
| 70 | PMF (Parameters n l f) := PMF.uniformOfFintype _ |
| 71 | |
| 72 | def testerSummary {k n b degree r : ℕ} (hr : 2 * r ≤ n) |
| 73 | (s : Fin b → Binary) (z : Base k n → Binary) : Option (Tag k × Tag k) → Binary |
| 74 | | none => blockTester (degree := degree) hr shared (pointMoment selectorEval s z) |
| 75 | | some (d, t) => blockTester (degree := degree) hr (ordinary d t) (pointMoment selectorEval s z) |
| 76 | |
| 77 | axiom atom_component {k n b degree : ℕ} (l : Tag k) (s : Fin b → Binary) (z : Base k n → Binary) |
| 78 | (hz : ∀ i, i ∉ allowedBase k n l → z i = 0) (e : Component (Tag k)) : |
| 79 | (atom (degree := degree) l s z hz).val e = if l ∈ e.val then pointMoment selectorEval s z else 0 |
| 80 | |
| 81 | axiom flavor_coordinates {k n : ℕ} (l : Tag k) (f : Flavor k) : |
| 82 | retained (n := n) l f ⊆ allowedBase k n l ∧ |
| 83 | (∀ i : Fin n, sharp i ∈ retained l f) ∧ (∀ i : Fin n, free i ∈ retained l f) |
| 84 | |
| 85 | axiom parameterLaw_product {k n : ℕ} (l : Tag k) (f : Flavor k) (p : Parameters n l f) : |
| 86 | parameterLaw n l f p = ∏ i : {i : Base k n // i ∈ retained l f}, PMF.uniformOfFintype Binary (p i) |
| 87 | |
| 88 | end Lax342547.Atoms |
| 89 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments