Exact Lean source
YoungPhysicalRoundingLabels
formalization/Cloning/YoungPhysicalRoundingLabels.lean
Source hash: 7686cf90163d120921a576ea808954be6396c5faa619653384ea96ccceabc1b6
Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.
The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.
Declarations in this module
theorem
Cloning.YoungHyperplane.probability_map_injectivetheorem Cloning.YoungHyperplane.affinity_map_injectivetheorem Cloning.YoungHyperplane.complete_injectivedefinition Cloning.YoungHyperplane.tensorYoungIntegerPMFtheorem Cloning.YoungHyperplane.tensorYoungIntegerPMF_eq_complete_headdefinition Cloning.YoungHyperplane.tensorYoungRawOutputdefinition Cloning.YoungHyperplane.tensorYoungFallbackOutputtheorem Cloning.YoungHyperplane.tensorYoungRawOutput_eq_complete_transporttheorem Cloning.YoungHyperplane.tensorYoungRawOutput_affinity1import Cloning.YoungPhysicalRoundingCoordinates
2import Cloning.YoungPhysicalRoundingFallback
3
4/-! Exact full-label PMF identities for the physical randomized Young kernel. -/
5noncomputable section
6open scoped BigOperators Topology Classical
7open Filter
8namespace Cloning.YoungHyperplane
9open Cloning.TensorLie Cloning.YoungGeneral Cloning.YoungCompatibility
10set_option backward.isDefEq.respectTransparency false
11set_option maxHeartbeats 1000000
12
13theorem probability_map_injective {A B : Type*} (f : A → B) (hf : Function.Injective f)
14 (P : PMF A) (a : A) : probability (P.map f) (f a) = probability P a := by
15 unfold probability
16 congr 1
17 rw [PMF.map_apply]
18 simp only [hf.eq_iff]
19 exact (tsum_eq_single a (fun b hb ↦ if_neg (Ne.symm hb))).trans (if_pos rfl)
20
21theorem affinity_map_injective {A B : Type*} (f : A → B) (hf : Function.Injective f)
22 (P Q : PMF A) :
23 CountableScheffe.affinity (probability (P.map f)) (probability (Q.map f)) =
24 CountableScheffe.affinity (probability P) (probability Q) := by
25 unfold CountableScheffe.affinity
26 have hsupport : Function.support (fun b ↦ Real.sqrt (probability (P.map f) b)*
27 Real.sqrt (probability (Q.map f) b)) ⊆ Set.range f := by
28 intro b hb
29 by_contra hn
30 have hz : P.map f b = 0 := by
31 rw [PMF.map_apply]
32 have hzero (a : A) : (if b = f a then P a else 0) = 0 :=
33 if_neg (fun h ↦ hn ⟨a, h.symm⟩)
34 simp only [hzero, tsum_zero]
35 change Real.sqrt (probability (P.map f) b)*Real.sqrt (probability (Q.map f) b) ≠ 0 at hb
36 rw [probability, hz, ENNReal.toReal_zero, Real.sqrt_zero, zero_mul] at hb
37 exact hb rfl
38 rw [← hf.tsum_eq hsupport]
39 simp_rw [probability_map_injective f hf]
40
41theorem complete_injective (d : ℕ) (m : ℤ) :
42 Function.Injective (complete (d := d) m) := by
43 intro x y h
44 funext i
45 simpa only [complete_head] using congrArg (fun z : Fin (d+1) → ℤ ↦ z i.castSucc) h
46
47/-- The exact finite physical target law, retaining every row. -/
48def tensorYoungIntegerPMF (d N : ℕ) (p : Fin (d+1) → ℝ)
49 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : PMF (Fin (d+1) → ℤ) :=
50 (tensorYoungPMF N (d+1) p hp hs).map integerShape
51
52theorem tensorYoungIntegerPMF_eq_complete_head (d N : ℕ) (p : Fin (d+1) → ℝ)
53 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
54 tensorYoungIntegerPMF d N p hp hs = (tensorYoungHeadPMF d N p hp hs).map (complete N) := by
55 rw [tensorYoungIntegerPMF, tensorYoungHeadPMF_eq_map, PMF.map_comp]
56 apply PMF.ext
57 intro z
58 simp only [PMF.map_apply]
59 apply tsum_congr
60 intro μ
61 by_cases hz : tensorYoungPMF N (d+1) p hp hs μ = 0
62 · simp [hz]
63 · have hmass : ∑ i, (μ i).val = N := by
64 by_contra hh
65 exact hz (physicalYoungPMF_eq_zero_of_not_partition _ _ _ _ _ _ μ (Or.inr hh))
66 have he : complete N (fun i : Fin d ↦ ((μ i.castSucc).val : ℤ)) = integerShape μ := by
67 funext i
68 exact shapeLattice_apply d N μ hmass i
69 simp only [Function.comp_apply, he]
70 split_ifs <;> rfl
71
72/-- Raw physical output on the full integer lattice. -/
73def tensorYoungRawOutput (d n m : ℕ) (γ : ℝ) (p : Fin (d+1) → ℝ)
74 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : PMF (Fin (d+1) → ℤ) :=
75 (tensorYoungPMF n (d+1) p hp hs).bind (fun μ ↦ rawKernel γ m (integerShape μ))
76
77def tensorYoungFallbackOutput (d n m : ℕ) (γ : ℝ) (p : Fin (d+1) → ℝ)
78 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : PMF (Fin (d+1) → ℤ) :=
79 (tensorYoungPMF n (d+1) p hp hs).bind (fun μ ↦ fallbackKernel γ n m (integerShape μ))
80
81theorem tensorYoungRawOutput_eq_complete_transport (d n m : ℕ) (γ : ℝ)
82 (p : Fin (d+1) → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
83 tensorYoungRawOutput d n m γ p hp hs =
84 (YoungRounding.transport γ (tensorYoungHeadPMF d n p hp hs)).map (complete m) := by
85 rw [tensorYoungHeadPMF_eq_map, YoungRounding.transport, PMF.bind_map, PMF.map_bind]
86 rfl
87
88theorem tensorYoungRawOutput_affinity (d n m : ℕ) (γ : ℝ)
89 (p : Fin (d+1) → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
90 CountableScheffe.affinity (probability (tensorYoungRawOutput d n m γ p hp hs))
91 (probability (tensorYoungIntegerPMF d m p hp hs)) =
92 CountableScheffe.affinity
93 (probability (YoungRounding.transport γ (tensorYoungHeadPMF d n p hp hs)))
94 (probability (tensorYoungHeadPMF d m p hp hs)) := by
95 rw [tensorYoungRawOutput_eq_complete_transport, tensorYoungIntegerPMF_eq_complete_head,
96 affinity_map_injective _ (complete_injective d m)]
97
98end Cloning.YoungHyperplane