Download data/lean/OAI/MeasureTheory/DyadicAvoidance/RandomSetDensity.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.63 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MeasureTheory/DyadicAvoidance/RandomSetDensity.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/MeasureTheory/DyadicAvoidance/RandomSetDensity.lean
-
curl -L -o RandomSetDensity.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MeasureTheory/DyadicAvoidance/RandomSetDensity.lean
4.63 kB
| import OAI.MeasureTheory.DyadicAvoidance.ExceptionalExpectation | |
| namespace OAI | |
| universe u_A u_K | |
| noncomputable section | |
| open MeasureTheory | |
| namespace Problem310.RandomSetDensity | |
| /-- A selector outcome chooses the terminal address read at each point. -/ | |
| def selectedSet {A : Type u_A} {K : Type u_K} (addr : A β β β K) (z : A Γ (K β Bool)) : Set β := | |
| {x | z.2 (addr z.1 x) = true} | |
| /-- Finite terminal tables preserve spatial measurability of the address map. -/ | |
| theorem measurableSet_selectedSet | |
| {A : Type u_A} {K : Type u_K} [Fintype K] [MeasurableSpace K] [MeasurableSingletonClass K] | |
| (addr : A β β β K) (haddr : β a, Measurable (addr a)) | |
| (z : A Γ (K β Bool)) : MeasurableSet (selectedSet addr z) := by | |
| exact ((measurable_of_countable z.2).comp (haddr z.1)) (measurableSet_singleton true) | |
| /-- Periodicity of terminal addresses gives periodicity of every realization. -/ | |
| theorem periodic_selectedSet | |
| {A : Type u_A} {K : Type u_K} (addr : A β β β K) | |
| (haddr : β a x, addr a (x + 1) = addr a x) (z : A Γ (K β Bool)) : | |
| β x : β, x + 1 β selectedSet addr z β x β selectedSet addr z := by | |
| intro x | |
| simp only [selectedSet, Set.mem_ofPred_eq, haddr] | |
| /-- Independence of terminal labels from selectors gives the same membership | |
| probability at every spatial point, even with adaptively selected addresses. -/ | |
| theorem pointwise_probability_selectedSet | |
| {A : Type u_A} {K : Type u_K} [Fintype A] [MeasurableSpace A] [MeasurableSingletonClass A] | |
| [Fintype K] (P : Measure A) [IsProbabilityMeasure P] | |
| (Ξ½ : Measure Bool) [IsProbabilityMeasure Ξ½] | |
| (addr : A β β β K) (x : β) : | |
| (P.prod (Measure.pi (fun _ : K => Ξ½))) {z | x β selectedSet addr z} = | |
| Ξ½ {true} := by | |
| classical | |
| have hmeas : MeasurableSet {z : A Γ (K β Bool) | x β selectedSet addr z} := | |
| (Set.toFinite _).measurableSet | |
| rw [Measure.prod_apply hmeas] | |
| have hsection (a : A) : | |
| (Measure.pi (fun _ : K => Ξ½)) {Ο : K β Bool | Ο (addr a x) = true} = Ξ½ {true} := by | |
| exact (measurePreserving_eval (fun _ : K => Ξ½) (addr a x)).measure_preimage | |
| (measurableSet_singleton true).nullMeasurableSet | |
| change (β«β» a, (Measure.pi (fun _ : K => Ξ½)) | |
| {Ο : K β Bool | Ο (addr a x) = true} βP) = Ξ½ {true} | |
| simp only [hsection] | |
| simp | |
| /-- Exact first-moment density identity for the random routed set. -/ | |
| theorem expected_density_selectedSet | |
| {A : Type u_A} {K : Type u_K} [Fintype A] [MeasurableSpace A] [MeasurableSingletonClass A] | |
| [Fintype K] [MeasurableSpace K] [MeasurableSingletonClass K] | |
| (P : Measure A) [IsProbabilityMeasure P] | |
| (Ξ½ : Measure Bool) [IsProbabilityMeasure Ξ½] | |
| (addr : A β β β K) (haddr : β a, Measurable (addr a)) : | |
| (β«β» z, volume (selectedSet addr z β© Set.Icc (0 : β) 1) | |
| β(P.prod (Measure.pi (fun _ : K => Ξ½)))) = Ξ½ {true} := by | |
| classical | |
| rw [Problem310.Auxiliary.expected_density_eq_pointwise_probability | |
| (P.prod (Measure.pi (fun _ : K => Ξ½))) (selectedSet addr) | |
| (measurableSet_selectedSet addr haddr)] | |
| simp only [pointwise_probability_selectedSet P Ξ½ addr] | |
| simp | |
| /-- The standard Boolean Bernoulli law has the expected real-parameter masses. -/ | |
| theorem bernoulli_true_mass (p : unitInterval) : | |
| ProbabilityTheory.bernoulliMeasure true false p {true} = | |
| ENNReal.ofReal (p : β) := by | |
| rw [ProbabilityTheory.bernoulliMeasure_apply_of_mem_of_notMem p | |
| (measurableSet_singleton true) (by simp) (by simp)] | |
| exact (ENNReal.ofReal_eq_coe_nnreal p.property.1).symm | |
| theorem bernoulli_false_mass (p : unitInterval) : | |
| ProbabilityTheory.bernoulliMeasure true false p {false} = | |
| ENNReal.ofReal (1 - (p : β)) := by | |
| rw [ProbabilityTheory.bernoulliMeasure_apply_of_notMem_of_mem p | |
| (measurableSet_singleton false) (by simp) (by simp)] | |
| exact (ENNReal.ofReal_eq_coe_nnreal (sub_nonneg.mpr p.property.2)).symm | |
| /-- Bernoulli specialization with exactly the `ofReal p` density budget. -/ | |
| theorem expected_density_bernoulli | |
| {A : Type u_A} {K : Type u_K} [Fintype A] [MeasurableSpace A] [MeasurableSingletonClass A] | |
| [Fintype K] [MeasurableSpace K] [MeasurableSingletonClass K] | |
| (P : Measure A) [IsProbabilityMeasure P] (p : unitInterval) | |
| (addr : A β β β K) (haddr : β a, Measurable (addr a)) : | |
| (β«β» z, volume (selectedSet addr z β© Set.Icc (0 : β) 1) | |
| β(P.prod (Measure.pi (fun _ : K => | |
| ProbabilityTheory.bernoulliMeasure true false p)))) = ENNReal.ofReal (p : β) := by | |
| rw [expected_density_selectedSet P _ addr haddr, bernoulli_true_mass] | |
| end Problem310.RandomSetDensity | |
| end | |
| end OAI | |