Download data/lean/OAI/Probability/CriticalPercolation/Entropy/EndpointKernel.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.15 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Entropy/EndpointKernel.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Entropy/EndpointKernel.lean
-
curl -L -o EndpointKernel.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Entropy/EndpointKernel.lean
4.15 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| section | |
| open Set MeasureTheory ProbabilityTheory | |
| open Real | |
| open Set Real | |
| open scoped Topology | |
| open scoped BigOperators | |
| open Set | |
| open Set MeasureTheory | |
| open scoped Classical | |
| open Set MeasureTheory Real | |
| open scoped Interval | |
| namespace CriticalPercolation.FiniteEntropy | |
| lemma integral_polynomial_sum (n : β) (c : β β β) : | |
| (β« t in (0:β)..1, β i β Finset.range n, c i * t^i) = | |
| β i β Finset.range n, c i / ((i:β)+1) := by | |
| rw [intervalIntegral.integral_finsetSum] | |
| Β· apply Finset.sum_congr rfl | |
| intro i hi | |
| rw [intervalIntegral.integral_const_mul, integral_pow] | |
| simp [div_eq_mul_inv] | |
| Β· intro i hi | |
| exact (by fun_prop : Continuous (fun t : β => c i * t^i)).intervalIntegrable 0 1 | |
| lemma integral_cubic_square (a b c d : β) : | |
| (β« t in (0:β)..1, (a + b*t + c*t^2 + d*t^3)^2) = | |
| a^2 + a*b + (b^2+2*a*c)/3 + (2*a*d+2*b*c)/4 + | |
| (c^2+2*b*d)/5 + (2*c*d)/6 + d^2/7 := by | |
| have hpoly (t : β) : (a+b*t+c*t^2+d*t^3)^2 = | |
| β i β Finset.range 7, (![a^2, 2*a*b, b^2+2*a*c, 2*a*d+2*b*c, | |
| c^2+2*b*d, 2*c*d, d^2] : Fin 7 β β) β¨i % 7, Nat.mod_lt _ (by norm_num)β© * t^i := by | |
| simp [Finset.sum_range_succ] | |
| ring | |
| simp_rw [hpoly] | |
| rw [integral_polynomial_sum] | |
| simp [Finset.sum_range_succ] | |
| ring | |
| theorem cubic_endpoint (a b c d : β) : | |
| a^2 β€ 16 * β« t in (0:β)..1, (a+b*t+c*t^2+d*t^3)^2 := by | |
| rw [integral_cubic_square] | |
| let zβ := a+b/2+c/3+d/4 | |
| let zβ := -(b/2+c/2+9*d/20)/3 | |
| let zβ := (c/6+d/4)/5 | |
| let zβ := -(d/20)/7 | |
| have hid : 16*(a^2+a*b+(b^2+2*a*c)/3+(2*a*d+2*b*c)/4+ | |
| (c^2+2*b*d)/5+(2*c*d)/6+d^2/7)-a^2 = | |
| 3*(zβ-zβ)^2+5*(zβ-zβ)^2+7*(zβ-zβ)^2+ | |
| 15*(zβ-zβ)^2+21*(zβ-zβ)^2+35*(zβ-zβ)^2 := by | |
| dsimp [zβ, zβ, zβ, zβ] | |
| ring | |
| have : 0 β€ 16*(a^2+a*b+(b^2+2*a*c)/3+(2*a*d+2*b*c)/4+ | |
| (c^2+2*b*d)/5+(2*c*d)/6+d^2/7)-a^2 := by | |
| rw [hid] | |
| positivity | |
| linarith | |
| end CriticalPercolation.FiniteEntropy | |
| namespace CriticalPercolation.FiniteEntropy | |
| def endpointKernel (t : β) : β := 16 - 120*t + 240*t^2 - 140*t^3 | |
| lemma continuous_endpointKernel : Continuous endpointKernel := by | |
| unfold endpointKernel | |
| fun_prop | |
| lemma integral_endpointKernel_sq : | |
| (β« t in (0:β)..1, (endpointKernel t)^2) = 16 := by | |
| have he (t : β) : endpointKernel t = 16 + (-120)*t + 240*t^2 + (-140)*t^3 := by | |
| unfold endpointKernel; ring | |
| simp_rw [he] | |
| rw [integral_cubic_square] | |
| norm_num | |
| lemma integral_endpointKernel_power {k : β} (hk : k β€ 3) : | |
| (β« t in (0:β)..1, endpointKernel t * (1-t)^k) = 1 := by | |
| interval_cases k | |
| Β· let c : Fin 7 β β := ![16, -120, 240, -140, 0, 0, 0] | |
| have ht (t : β) : endpointKernel t * (1-t)^0 = | |
| β j β Finset.range 7, c β¨j % 7, Nat.mod_lt _ (by norm_num)β© * t^j := by | |
| simp [c, endpointKernel, Finset.sum_range_succ] | |
| ring | |
| simp_rw [ht] | |
| rw [integral_polynomial_sum] | |
| norm_num [c, Finset.sum_range_succ] | |
| Β· let c : Fin 7 β β := ![16, -136, 360, -380, 140, 0, 0] | |
| have ht (t : β) : endpointKernel t * (1-t)^1 = | |
| β j β Finset.range 7, c β¨j % 7, Nat.mod_lt _ (by norm_num)β© * t^j := by | |
| simp [c, endpointKernel, Finset.sum_range_succ] | |
| ring | |
| simp_rw [ht] | |
| rw [integral_polynomial_sum] | |
| norm_num [c, Finset.sum_range_succ] | |
| Β· let c : Fin 7 β β := ![16, -152, 496, -740, 520, -140, 0] | |
| have ht (t : β) : endpointKernel t * (1-t)^2 = | |
| β j β Finset.range 7, c β¨j % 7, Nat.mod_lt _ (by norm_num)β© * t^j := by | |
| simp [c, endpointKernel, Finset.sum_range_succ] | |
| ring | |
| simp_rw [ht] | |
| rw [integral_polynomial_sum] | |
| norm_num [c, Finset.sum_range_succ] | |
| Β· let c : Fin 7 β β := ![16, -168, 648, -1236, 1260, -660, 140] | |
| have ht (t : β) : endpointKernel t * (1-t)^3 = | |
| β j β Finset.range 7, c β¨j % 7, Nat.mod_lt _ (by norm_num)β© * t^j := by | |
| simp [c, endpointKernel, Finset.sum_range_succ] | |
| ring | |
| simp_rw [ht] | |
| rw [integral_polynomial_sum] | |
| norm_num [c, Finset.sum_range_succ] | |
| end CriticalPercolation.FiniteEntropy | |
| end | |
| end | |
| end OAI | |