Download data/lean/OAI/Combinatorics/BalancedRyser/Probability/FiniteExposureTower.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.2 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/BalancedRyser/Probability/FiniteExposureTower.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/BalancedRyser/Probability/FiniteExposureTower.lean
-
curl -L -o FiniteExposureTower.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/BalancedRyser/Probability/FiniteExposureTower.lean
3.2 kB
| import OAI.Combinatorics.BalancedRyser.Probability.FiniteFixedLaw | |
| import OAI.Combinatorics.BalancedRyser.Probability.PatternMomentModel | |
| namespace OAI | |
| namespace Balanced.ConditionalRestriction | |
| noncomputable section | |
| open scoped Classical | |
| open MeasureTheory | |
| universe u | |
| variable {D A : Type u} [Fintype D] [Fintype A] [DecidableEq D] [Nonempty A] | |
| [MeasurableSpace A] [MeasurableSingletonClass A] | |
| private def uniformArrayModel : PatternModel.{u} where | |
| Color := D | |
| Value := fun _ => A | |
| law := fun _ => (PMF.uniformOfFintype A).toMeasure | |
| Label := PUnit | |
| support := fun _ => β | |
| event := fun _ => β | |
| eventMeasurable := fun _ => MeasurableSet.empty | |
| dependsOn := by intros; rfl | |
| theorem filtered_integral_mul_le (old extra : Finset D) (a : D β A) | |
| (f z : (D β A) β β) (C Bf Bz : β) (hC : 0 β€ C) | |
| (hfn : β Ο, 0 β€ f Ο) (hzn : β Ο, 0 β€ z Ο) | |
| (hfb : β Ο, f Ο β€ Bf) (hzb : β Ο, z Ο β€ Bz) | |
| (hdepends : β Ο Ο', (β d β old βͺ extra, Ο d = Ο' d) β f Ο = f Ο') | |
| (hbound : β y : D β A, | |
| (β« Ο, z Ο β((PMF.uniformOfFintype (D β A)).filter | |
| {Ο | β d, d β old βͺ extra β Ο d = y d} | |
| (fixed_supported (fun d => d β old βͺ extra) y)).toMeasure) β€ C) : | |
| (β« Ο, f Ο * z Ο β((PMF.uniformOfFintype (D β A)).filter | |
| {Ο | β d, d β old β Ο d = a d} | |
| (fixed_supported (fun d => d β old) a)).toMeasure) β€ | |
| C * β« Ο, f Ο β((PMF.uniformOfFintype (D β A)).filter | |
| {Ο | β d, d β old β Ο d = a d} | |
| (fixed_supported (fun d => d β old) a)).toMeasure := by | |
| let P : PatternModel := uniformArrayModel (D := D) (A := A) | |
| have hconvert (J : Finset D) (y : D β A) (G : (D β A) β β) : | |
| P.fixedExpectation J y G = | |
| β« Ο, G Ο β((PMF.uniformOfFintype (D β A)).filter | |
| {Ο | β d, d β J β Ο d = y d} | |
| (fixed_supported (fun d => d β J) y)).toMeasure := by | |
| rw [β integral_fixArray_eq_filtered (fun d => d β J) y G] | |
| apply integral_congr_ae | |
| filter_upwards [] with Ο | |
| congr 1 | |
| funext d | |
| dsimp [P, uniformArrayModel, PatternModel.fixCoordinates, fixArray] | |
| exact @ite_cond_congr A (d β J) (d β J) | |
| (Finset.decidableMem d J) (Classical.propDecidable _) (y d) (Ο d) rfl | |
| rw [β hconvert old a (fun Ο => f Ο * z Ο), β hconvert old a f] | |
| apply P.fixedExpectation_mul_le_of_fixedBounds old extra a f z C Bf Bz hC | |
| (show Measurable f from measurable_of_countable f) | |
| (show Measurable z from measurable_of_countable z) hfn hzn hfb hzb hdepends | |
| intro y | |
| exact (hconvert (old βͺ extra) y z).trans_le (hbound y) | |
| theorem integral_eq_of_eq_on_support {Ξ© : Type*} [Fintype Ξ©] | |
| [MeasurableSpace Ξ©] [MeasurableSingletonClass Ξ©] | |
| (p : PMF Ξ©) (f g : Ξ© β β) (h : β Ο β p.support, f Ο = g Ο) : | |
| (β« Ο, f Ο βp.toMeasure) = β« Ο, g Ο βp.toMeasure := by | |
| simp only [PMF.integral_eq_sum, smul_eq_mul] | |
| apply Finset.sum_congr rfl | |
| intro Ο _ | |
| by_cases hΟ : Ο β p.support | |
| Β· rw [h Ο hΟ] | |
| Β· have hp : p Ο = 0 := by simpa [PMF.mem_support_iff] using hΟ | |
| simp [hp] | |
| end | |
| end Balanced.ConditionalRestriction | |
| end OAI | |