Download data/lean/OAI/NumberTheory/Ostmann/Characters/BinaryExposureTree.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.36 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Ostmann/Characters/BinaryExposureTree.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/Ostmann/Characters/BinaryExposureTree.lean
-
curl -L -o BinaryExposureTree.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Ostmann/Characters/BinaryExposureTree.lean
2.36 kB
| import OAI.NumberTheory.Ostmann.Characters.BinaryExposure | |
| namespace OAI | |
| noncomputable section | |
| namespace Ostmann.Characters.BinaryExposure | |
| Classical.propDecidable | |
| def Budget : β β Type | |
| | 0 => PUnit | |
| | k+1 => NNReal Γ (Budget k Γ Budget k) | |
| def Budget.value : {k:β} β Budget k β NNReal | |
| | 0,_ => 1 | |
| | _k+1,b => b.1 * b.2.1.value * b.2.2.value | |
| variable {G H:Type*} [Group G] [Fintype G] | |
| def Controlled (c:ββHβGβGβProp) (left right:ββHβGβGβH) : | |
| (k:β) β H β G β Budget k β Prop | |
| | 0,_,_,_ => True | |
| | k+1,h,t,b => | |
| (Nat.card {x:G // c k h t x}:β) / Nat.card G β€ b.1 β§ | |
| β x:G, Controlled c left right k (left k h t x) x b.2.1 β§ | |
| Controlled c left right k (right k h t x) (xβ»ΒΉ*t) b.2.2 | |
| theorem probability_le_tree (c:ββHβGβGβProp) | |
| (left right:ββHβGβGβH) (k:β) (h:H) (t:G) (b:Budget k) | |
| (hc:Controlled c left right k h t b) : | |
| probability c left right k h t β€ (b.value:β) := by | |
| induction k generalizing h t with | |
| | zero => exact le_rfl | |
| | succ k ih => | |
| change avg (fun x:G=>(if c k h t x then 1 else 0)* | |
| probability c left right k (left k h t x) x * | |
| probability c left right k (right k h t x) (xβ»ΒΉ*t)) β€ _ | |
| apply le_trans (avg_mono _ (fun x:G=>(if c k h t x then 1 else 0)* | |
| ((b.2.1.value:β)*(b.2.2.value:β))) ?_) | |
| Β· rw [avg_mul_const,avg_indicator] | |
| change _ β€ (b.1:β)*(b.2.1.value:β)*(b.2.2.value:β) | |
| rw [mul_assoc] | |
| exact mul_le_mul_of_nonneg_right hc.1 (mul_nonneg b.2.1.value.property b.2.2.value.property) | |
| Β· intro x | |
| by_cases hx:c k h t x | |
| Β· simp only [hx,ite_true,one_mul] | |
| exact mul_le_mul (ih _ _ b.2.1 (hc.2 x).1) | |
| (ih _ _ b.2.2 (hc.2 x).2) | |
| (probability_nonneg c left right k _ _) b.2.1.value.property | |
| Β· simp only [hx,ite_false,zero_mul,le_refl] | |
| theorem count_le_tree (c:ββHβGβGβProp) | |
| (left right:ββHβGβGβH) (k:β) (h:H) (t:G) (b:Budget k) | |
| (hc:Controlled c left right k h t b) : | |
| (Nat.card {z:BinaryHaar.Splits G k // admissible c left right k h t z}:β)/ | |
| Nat.card (BinaryHaar.Splits G k) β€ (b.value:β) := by | |
| rw [β probability_eq_count] | |
| exact probability_le_tree c left right k h t b hc | |
| end Ostmann.Characters.BinaryExposure | |
| end | |
| end OAI | |