Download data/lean/OAI/Probability/BinarySweep/Conditional/MainEasyCases.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.01 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/BinarySweep/Conditional/MainEasyCases.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/BinarySweep/Conditional/MainEasyCases.lean
-
curl -L -o MainEasyCases.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/BinarySweep/Conditional/MainEasyCases.lean
4.01 kB
| import Mathlib | |
| import OAI.Probability.BinarySweep.FiniteLaws.MomentBounds | |
| import OAI.Probability.BinarySweep.Trajectories.PathExtension | |
| namespace OAI | |
| noncomputable section | |
| open scoped BigOperators | |
| namespace BinaryCoordinateSweeps | |
| lemma grid_log_lower {b r : β} {bits : Fin b β β} (hd : β j, r β€ bits j) : | |
| (b : β) * ((r : β) * Real.log 2) β€ Real.log (gridSize bits) := by | |
| calc | |
| _ = β _j : Fin b, (r : β) * Real.log 2 := by simp | |
| _ β€ β j : Fin b, (bits j : β) * Real.log 2 := by | |
| apply Finset.sum_le_sum | |
| intro j _ | |
| apply mul_le_mul_of_nonneg_right (by exact_mod_cast hd j) | |
| exact (Real.log_pos (by norm_num : (1 : β) < 2)).le | |
| _ = _ := by | |
| rw [log_gridSize] | |
| simp only [Nat.cast_pow, Nat.cast_ofNat, Real.log_pow] | |
| lemma grid_parameter_allowance {b h r : β} {bits : Fin b β β} | |
| (hb : 1 β€ b) (hd : β j, r β€ bits j) | |
| (hr : (400000000 : β) β€ (r : β) * Real.log 2) (H : PathFamily bits h) : | |
| cExponent (gridSize bits) β€ 2*c0 β§ | |
| e0/2 β€ eExponent (gridSize bits) β§ | |
| (e0/4) * h * Real.log (gridSize bits) β€ | |
| eExponent (gridSize bits) * h * Real.log (gridSize bits) - pathCost H := by | |
| have hlogb := grid_log_lower hd | |
| have hbc : (1 : β) β€ b := by exact_mod_cast hb | |
| have hbn : (0 : β) β€ b := by positivity | |
| have hm := mul_le_mul_of_nonneg_left hr hbn | |
| have hbl : (400000000 : β) * b β€ Real.log (gridSize bits) := by nlinarith | |
| have hl : (400000000 : β) β€ Real.log (gridSize bits) := by nlinarith | |
| have hs : (20000 : β) β€ Real.sqrt (Real.log (gridSize bits)) := by | |
| apply Real.le_sqrt_of_sq_le | |
| norm_num | |
| exact hl | |
| have hs' : 1 / Real.sqrt (Real.log (gridSize bits)) β€ (1 / 20000 : β) := | |
| one_div_le_one_div_of_le (by norm_num) hs | |
| have hc : cExponent (gridSize bits) β€ 2*c0 := by | |
| unfold cExponent c0 | |
| linarith | |
| have he : e0/2 β€ eExponent (gridSize bits) := by | |
| unfold eExponent e0 | |
| linarith | |
| refine β¨hc, he, ?_β© | |
| have hh : (0 : β) β€ h := by positivity | |
| have hl0 : 0 β€ Real.log (gridSize bits) := by linarith | |
| have he' := mul_le_mul_of_nonneg_right he (mul_nonneg hh hl0) | |
| have hbb : (b : β) β€ (e0/4) * Real.log (gridSize bits) := by | |
| unfold e0 | |
| nlinarith | |
| have hcost := (pathCost_le H).trans (mul_le_mul_of_nonneg_right hbb hh) | |
| nlinarith | |
| lemma exists_main_scale : β r : β, 0 < r β§ (400000000 : β) β€ (r : β) * Real.log 2 := by | |
| have hl : 0 < Real.log 2 := Real.log_pos (by norm_num) | |
| obtain β¨r, hrβ© := exists_nat_gt ((400000000 : β) / Real.log 2) | |
| have hr' : (400000000 : β) < (r : β) * Real.log 2 := (div_lt_iffβ hl).mp hr | |
| refine β¨r, ?_, hr'.leβ© | |
| have hp : (0 : β) < r := by nlinarith | |
| exact_mod_cast hp | |
| theorem conditional_moment_one_dimensional : | |
| β r : β, 0 < r β§ β zStar : β, 0 < zStar β§ | |
| β b : β, 1 β€ b β β bits : Fin b β β, (β j, r β€ bits j β§ bits j β€ 2*r) β | |
| β h : β, β H : PathFamily bits h, β z : β, 0 β€ z β z β€ zStar β | |
| β q : β, β Ο : Representation β (Equiv.Perm (FreeSlot H 0)) (RepSpace 1), | |
| IsUnitaryRep Ο β | |
| logMoment (traceMoment q (conditionalOperator H z Ο)) β€ | |
| ((-cExponent (gridSize bits) * Real.log (1 : β) + | |
| eExponent (gridSize bits) * h * Real.log (gridSize bits) - pathCost H : β) : EReal) := by | |
| obtain β¨r, hr0, hrβ© := exists_main_scale | |
| refine β¨r, hr0, 1/2, by norm_num, ?_β© | |
| intro b hb bits hd h H z hz hzr q Ο hΟ | |
| have hz1 : z < 1 := by linarith | |
| apply conditional_moment_of_automatic_regime H hz hz1 q Ο hΟ | |
| have ha := (grid_parameter_allowance hb (fun j => (hd j).1) hr H).2.2 | |
| have hl0 : 0 β€ Real.log (gridSize bits) := Real.log_nonneg (by | |
| exact_mod_cast gridSize_pos bits) | |
| have hn : 0 β€ (e0/4) * h * Real.log (gridSize bits) := by | |
| unfold e0 | |
| positivity | |
| simpa only [Nat.cast_one, Real.log_one, mul_zero] using hn.trans ha | |
| end BinaryCoordinateSweeps | |
| end | |
| end OAI | |