Download data/lean/OAI/Probability/FreeIsing/Spectral/RealChebyshevBound.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.89 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Spectral/RealChebyshevBound.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FreeIsing/Spectral/RealChebyshevBound.lean
-
curl -L -o RealChebyshevBound.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Spectral/RealChebyshevBound.lean
4.89 kB
| import Mathlib | |
| namespace OAI | |
| open Polynomial | |
| namespace Problem367 | |
| lemma chebyshev_pell (n : β) : | |
| Chebyshev.T β ((n : β€) + 1) ^ 2 + | |
| (1 - (X : β[X]) ^ 2) * Chebyshev.U β (n : β€) ^ 2 = 1 := by | |
| induction n with | |
| | zero => simp | |
| | succ n ih => | |
| simp only [Nat.cast_succ] | |
| rw [show (n : β€) + 1 + 1 = (n : β€) + 2 by ring, | |
| Chebyshev.T_eq_X_mul_T_sub_pol_U, Chebyshev.U_eq_X_mul_U_add_T] | |
| calc | |
| _ = Chebyshev.T β ((n : β€) + 1) ^ 2 + | |
| (1 - (X : β[X]) ^ 2) * Chebyshev.U β (n : β€) ^ 2 := by ring | |
| _ = 1 := ih | |
| end Problem367 | |
| namespace Problem367 | |
| section | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] [CompleteSpace E] | |
| lemma isSelfAdjoint_aeval_real (B : E βL[β] E) (hB : IsSelfAdjoint B) (p : β[X]) : | |
| IsSelfAdjoint (aeval B p) := by | |
| induction p using Polynomial.induction_on with | |
| | C r => | |
| simpa using (show IsSelfAdjoint r from rfl).algebraMap (E βL[β] E) | |
| | add p q hp hq => simpa using hp.add hq | |
| | monomial n r ih => | |
| simp only [map_mul, map_pow, aeval_C, aeval_X] | |
| rw [β Algebra.smul_def] | |
| exact (show IsSelfAdjoint r from rfl).smul (hB.pow _) | |
| omit [CompleteSpace E] in | |
| lemma commute_aeval_self (B : E βL[β] E) (p : β[X]) : Commute B (aeval B p) := by | |
| simpa using (Commute.all (X : β[X]) p).map (aeval B) | |
| end | |
| end Problem367 | |
| namespace Problem367 | |
| section | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] [CompleteSpace E] | |
| lemma selfAdjoint_inner_square (P : E βL[β] E) (hP : IsSelfAdjoint P) (x : E) : | |
| inner β x ((P ^ 2) x) = βP xβ ^ 2 := by | |
| rw [pow_two, mul_apply_eq_comp] | |
| exact ((hP.isSymmetric x (P x)).symm).trans (real_inner_self_eq_norm_sq _) | |
| lemma norm_le_one_of_pell (B P Q : E βL[β] E) | |
| (hB : IsSelfAdjoint B) (hP : IsSelfAdjoint P) (hQ : IsSelfAdjoint Q) | |
| (hBQ : Commute B Q) (hBnorm : βBβ β€ 1) | |
| (hidentity : P ^ 2 + (1 - B ^ 2) * Q ^ 2 = 1) : βPβ β€ 1 := by | |
| have hBQsa : IsSelfAdjoint (B * Q) := (hB.commute_iff hQ).mp hBQ | |
| have hid : P ^ 2 + Q ^ 2 - (B * Q) ^ 2 = 1 := by | |
| rw [hBQ.mul_pow] | |
| calc | |
| P ^ 2 + Q ^ 2 - B ^ 2 * Q ^ 2 = P ^ 2 + (1 - B ^ 2) * Q ^ 2 := by noncomm_ring | |
| _ = 1 := hidentity | |
| refine P.opNorm_le_bound (by norm_num) fun x => ?_ | |
| have heq := congrArg (fun A : E βL[β] E => inner β x (A x)) hid | |
| simp only [sub_apply, add_apply, | |
| one_apply_eq_self, inner_sub_right, inner_add_right, | |
| selfAdjoint_inner_square P hP x, selfAdjoint_inner_square Q hQ x, | |
| selfAdjoint_inner_square (B * Q) hBQsa x, real_inner_self_eq_norm_sq, | |
| mul_apply_eq_comp] at heq | |
| have hb : βB (Q x)β β€ βQ xβ := by | |
| calc | |
| βB (Q x)β β€ βBβ * βQ xβ := B.le_opNorm _ | |
| _ β€ 1 * βQ xβ := mul_le_mul_of_nonneg_right hBnorm (norm_nonneg _) | |
| _ = βQ xβ := one_mul _ | |
| have hb2 : βB (Q x)β ^ 2 β€ βQ xβ ^ 2 := | |
| pow_le_pow_leftβ (norm_nonneg _) hb 2 | |
| simp only [one_mul] | |
| apply (sq_le_sqβ (norm_nonneg _) (norm_nonneg _)).mp | |
| linarith | |
| end | |
| end Problem367 | |
| namespace Problem367 | |
| section | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] [CompleteSpace E] | |
| lemma norm_aeval_chebyshev_T_le_real (B : E βL[β] E) | |
| (hB : IsSelfAdjoint B) (hBnorm : βBβ β€ 1) (n : β) : | |
| βaeval B (Chebyshev.T β (n : β€))β β€ 1 := by | |
| cases n with | |
| | zero => | |
| simp only [Nat.cast_zero, Chebyshev.T_zero, map_one] | |
| exact ContinuousLinearMap.norm_id_le | |
| | succ n => | |
| simp only [Nat.cast_succ] | |
| apply norm_le_one_of_pell B _ (aeval B (Chebyshev.U β (n : β€))) hB | |
| (isSelfAdjoint_aeval_real B hB _) (isSelfAdjoint_aeval_real B hB _) | |
| (commute_aeval_self B _) hBnorm | |
| have h := congrArg (aeval B) (chebyshev_pell n) | |
| simpa only [map_add, map_mul, map_sub, map_pow, map_one, aeval_X] using h | |
| lemma norm_aeval_chebyshev_U_le_real (B : E βL[β] E) | |
| (hB : IsSelfAdjoint B) (hBnorm : βBβ β€ 1) (n : β) : | |
| βaeval B (Chebyshev.U β (n : β€))β β€ (n : β) + 1 := by | |
| induction n using Nat.twoStepInduction with | |
| | zero => | |
| simp only [Nat.cast_zero, Chebyshev.U_zero, map_one, zero_add] | |
| exact ContinuousLinearMap.norm_id_le | |
| | one => | |
| simpa [Chebyshev.U_one, map_ofNat, two_mul] using | |
| (norm_add_le B B).trans (add_le_add hBnorm hBnorm) | |
| | more n ih0 ih1 => | |
| simp only [Nat.cast_add, Nat.cast_ofNat, Chebyshev.U_eq_two_mul_T_add_U, | |
| map_add, two_mul] | |
| have hT := norm_aeval_chebyshev_T_le_real B hB hBnorm (n + 2) | |
| simp only [Nat.cast_add, Nat.cast_ofNat] at hT | |
| calc | |
| _ β€ (βaeval B (Chebyshev.T β ((n : β€) + 2))β + | |
| βaeval B (Chebyshev.T β ((n : β€) + 2))β) + | |
| βaeval B (Chebyshev.U β (n : β€))β := | |
| (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) | |
| _ β€ (n : β) + 2 + 1 := by linarith | |
| end | |
| end Problem367 | |
| end OAI | |