Offline · exact source
Exact Lean source

YoungFlatCouplingPhysical

formalization/Cloning/YoungFlatCouplingPhysical.lean

Source hash: 7dc657bd367da3a2a11fc077c0a9dd494570560c94bcde792be0a4a87c615012

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.

In the dependency map: Projector optimum

Declarations in this module
1import Cloning.YoungFlatCouplingQuantizer
2import Cloning.YoungFlatCouplingConvergence
3import Cloning.YoungFlatLimit
4import Cloning.YoungFlatSupport
5import Cloning.YoungFlatCompatibility
6import Cloning.YoungFlatFidelity
7 
8/-! An actual exact-marginal coupling of two physical flat Young laws. -/
9noncomputable section
10open scoped BigOperators Topology Classical ENNReal
11open MeasureTheory Filter
12namespace Cloning.YoungFlatCoupling
13open Cloning.YoungHyperplane Cloning.YoungGeneral Cloning.TensorLie Cloning.YoungFlat
14set_option backward.isDefEq.respectTransparency false
15set_option maxHeartbeats 1000000
16 
17def independentPMF {I J : Type*} [Fintype I] [Fintype J] (p : PMF I) (q : PMF J) : PMF (I×J) :=
18  completionPMF (fun i => (p i).toReal) (fun j => (q j).toReal) (fun _ _ => 0)
19    (by simpa only [tsum_fintype, YoungCompatibility.probability] using
20      (YoungCompatibility.hasSum_probability p).tsum_eq)
21    (by simpa only [tsum_fintype, YoungCompatibility.probability] using
22      (YoungCompatibility.hasSum_probability q).tsum_eq)
23    (fun _ _ => le_rfl) (fun _ => by simp) (fun _ => by simp)
24 
25theorem independentPMF_map_fst {I J : Type*} [Fintype I] [Fintype J] (p : PMF I) (q : PMF J) :
26    (independentPMF p q).map Prod.fst = p := by
27  ext i
28  exact (completionPMF_map_fst _ _ _ _ _ _ _ _ i).trans (ENNReal.ofReal_toReal (p.apply_ne_top i))
29 
30theorem independentPMF_map_snd {I J : Type*} [Fintype I] [Fintype J] (p : PMF I) (q : PMF J) :
31    (independentPMF p q).map Prod.snd = q := by
32  ext j
33  exact (completionPMF_map_snd _ _ _ _ _ _ _ _ j).trans (ENNReal.ofReal_toReal (q.apply_ne_top j))
34 
35def positiveFlatCoupling (d N M : ℕ) (hN : 0<N) (hM : 0<M) :
36    PMF (Shape (d+1) N × Shape (d+1) M) :=
37  densityCoupling volume (sampleShape d N (flatSpectrum (d+1)))
38    (sampleShape d M (flatSpectrum (d+1))) (flatDensity d N) (flatDensity d M)
39    (measurable_sampleShape d N _) (measurable_sampleShape d M _)
40    (integrable_flatDensity d N hN) (integrable_flatDensity d M hM)
41    (flatDensity_nonneg d N) (flatDensity_nonneg d M)
42    (integral_flatDensity d N hN) (integral_flatDensity d M hM)
43 
44theorem positiveFlatCoupling_map_fst (d N M : ℕ) (hN : 0<N) (hM : 0<M) :
45    (positiveFlatCoupling d N M hN hM).map Prod.fst = tensorFlatYoungPMF N (d+1) (by omega) := by
46  ext s
47  exact (densityCoupling_map_fst _ _ _ _ _ _ _ _ _ _ _ _ _ s).trans
48    (congrArg ENNReal.ofReal (densityBin_sampleShape d N hN (flatSpectrum (d+1))
49      (fun _ => by unfold flatSpectrum; positivity) (flatSpectrum_sum _ (by omega)) s) |>.trans
50      (ENNReal.ofReal_toReal (PMF.apply_ne_top _ s)))
51 
52theorem positiveFlatCoupling_map_snd (d N M : ℕ) (hN : 0<N) (hM : 0<M) :
53    (positiveFlatCoupling d N M hN hM).map Prod.snd = tensorFlatYoungPMF M (d+1) (by omega) := by
54  ext s
55  exact (densityCoupling_map_snd _ _ _ _ _ _ _ _ _ _ _ _ _ s).trans
56    (congrArg ENNReal.ofReal (densityBin_sampleShape d M hM (flatSpectrum (d+1))
57      (fun _ => by unfold flatSpectrum; positivity) (flatSpectrum_sum _ (by omega)) s) |>.trans
58      (ENNReal.ofReal_toReal (PMF.apply_ne_top _ s)))
59 
60/-- Exact physical coupling, with an independent completion at zero sample size. -/
61def flatCoupling (d N M : ℕ) : PMF (Shape (d+1) N × Shape (d+1) M) :=
62  if h : 0<N ∧ 0<M then positiveFlatCoupling d N M h.1 h.2
63  else independentPMF (tensorFlatYoungPMF N (d+1) (by omega)) (tensorFlatYoungPMF M (d+1) (by omega))
64 
65theorem flatCoupling_eq_positive (d N M : ℕ) (hN : 0<N) (hM : 0<M) :
66    flatCoupling d N M = positiveFlatCoupling d N M hN hM := by
67  simp only [flatCoupling, dif_pos (And.intro hN hM)]
68 
69theorem flatCoupling_map_fst (d N M : ℕ) :
70    (flatCoupling d N M).map Prod.fst = tensorFlatYoungPMF N (d+1) (by omega) := by
71  unfold flatCoupling
72  split_ifs with h
73  · exact positiveFlatCoupling_map_fst d N M h.1 h.2
74  · exact independentPMF_map_fst _ _
75 
76theorem flatCoupling_map_snd (d N M : ℕ) :
77    (flatCoupling d N M).map Prod.snd = tensorFlatYoungPMF M (d+1) (by omega) := by
78  unfold flatCoupling
79  split_ifs with h
80  · exact positiveFlatCoupling_map_snd d N M h.1 h.2
81  · exact independentPMF_map_snd _ _
82 
83end Cloning.YoungFlatCoupling