Imports
/-
Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tomas Skrivan, Joseph Tooby-Smith
-/
module
public import Mathlib.Analysis.Calculus.Deriv.Polynomial
public import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series
public import Mathlib.Tactic.CasesPhysicists Hermite Polynomial
This file may eventually be upstreamed to Mathlib.
@[expose] public sectionlemma physHermite_succ (n : ℕ) :
physHermite (n + 1) = 2 • X * physHermite n - derivative (physHermite n) := n:ℕ⊢ physHermite (n + 1) = 2 • X * physHermite n - derivative (physHermite n)
All goals completed! 🐙lemma physHermite_eq_iterate (n : ℕ) :
physHermite n = (fun p => 2 * X * p - derivative p)^[n] 1 := n:ℕ⊢ physHermite n = (fun p => 2 * X * p - derivative p)^[n] 1
induction n with
⊢ physHermite 0 = (fun p => 2 * X * p - derivative p)^[0] 1 All goals completed! 🐙
n:ℕih:physHermite n = (fun p => 2 * X * p - derivative p)^[n] 1⊢ physHermite (n + 1) = (fun p => 2 * X * p - derivative p)^[n + 1] 1 All goals completed! 🐙@[simp]
lemma physHermite_zero : physHermite 0 = C 1 := rfllemma physHermite_one : physHermite 1 = 2 * X := ⊢ physHermite 1 = 2 * X All goals completed! 🐙n:ℕ⊢ derivative (2 • X * physHermite (n + 1) - derivative (physHermite (n + 1))) = 2 * (n + 1 + 1) • physHermite (n + 1)
simp only [derivative_physHermite_succ n, nsmul_eq_mul, Nat.cast_ofNat, Nat.cast_add,
Nat.cast_one, derivative_sub, derivative_mul, derivative_ofNat, zero_mul, derivative_X,
mul_one, zero_add, derivative_add, derivative_natCast, derivative_one, add_zero] n:ℕ⊢ 2 * physHermite (n + 1) + 2 * X * (2 * ((↑n + 1) * physHermite n)) - 2 * ((↑n + 1) * derivative (physHermite n)) =
2 * ((↑n + 1 + 1) * physHermite (n + 1))
simp only [physHermite_succ, nsmul_eq_mul] n:ℕ⊢ 2 * (↑2 * X * physHermite n - derivative (physHermite n)) + 2 * X * (2 * ((↑n + 1) * physHermite n)) -
2 * ((↑n + 1) * derivative (physHermite n)) =
2 * ((↑n + 1 + 1) * (↑2 * X * physHermite n - derivative (physHermite n)))
ring All goals completed! 🐙lemma derivative_physHermite : (n : ℕ) →
derivative (physHermite n) = 2 * n • physHermite (n - 1)
| 0 => ⊢ derivative (physHermite 0) = 2 * 0 • physHermite (0 - 1) by ⊢ derivative (physHermite 0) = 2 * 0 • physHermite (0 - 1) simp All goals completed! 🐙
| n + 1 => n:ℕ⊢ derivative (physHermite (n + 1)) = 2 * (n + 1) • physHermite (n + 1 - 1) by n:ℕ⊢ derivative (physHermite (n + 1)) = 2 * (n + 1) • physHermite (n + 1 - 1) simp [derivative_physHermite_succ] All goals completed! 🐙
lemma physHermite_succ' (n : ℕ) :
physHermite (n + 1) = 2 • X * physHermite n - 2 * n • physHermite (n - 1) := by n:ℕ⊢ physHermite (n + 1) = 2 • X * physHermite n - 2 * n • physHermite (n - 1)
rw [physHermite_succ, n:ℕ⊢ 2 • X * physHermite n - derivative (physHermite n) = 2 • X * physHermite n - 2 * n • physHermite (n - 1) All goals completed! 🐙 derivative_physHermite n:ℕ⊢ 2 • X * physHermite n - 2 * n • physHermite (n - 1) = 2 • X * physHermite n - 2 * n • physHermite (n - 1) All goals completed! 🐙] All goals completed! 🐙lemma coeff_physHhermite_succ_zero (n : ℕ) :
coeff (physHermite (n + 1)) 0 = - coeff (physHermite n) 1 := by n:ℕ⊢ (physHermite (n + 1)).coeff 0 = -(physHermite n).coeff 1
simp [physHermite_succ, coeff_derivative] All goals completed! 🐙
lemma coeff_physHermite_succ_succ (n k : ℕ) : coeff (physHermite (n + 1)) (k + 1) =
2 * coeff (physHermite n) k - (k + 2) * coeff (physHermite n) (k + 2) := by n:ℕk:ℕ⊢ (physHermite (n + 1)).coeff (k + 1) = 2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2)
rw [physHermite_succ, n:ℕk:ℕ⊢ (2 • X * physHermite n - derivative (physHermite n)).coeff (k + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) coeff_sub, n:ℕk:ℕ⊢ (2 • X * physHermite n).coeff (k + 1) - (derivative (physHermite n)).coeff (k + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) smul_mul_assoc, n:ℕk:ℕ⊢ (2 • (X * physHermite n)).coeff (k + 1) - (derivative (physHermite n)).coeff (k + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) coeff_smul, n:ℕk:ℕ⊢ 2 • (X * physHermite n).coeff (k + 1) - (derivative (physHermite n)).coeff (k + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) coeff_X_mul, n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (derivative (physHermite n)).coeff (k + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) coeff_derivative, n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (physHermite n).coeff (k + 1 + 1) * (↑(k + 1) + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2)
mul_comm n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2) n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2)] n:ℕk:ℕ⊢ 2 • (physHermite n).coeff k - (↑(k + 1) + 1) * (physHermite n).coeff (k + 1 + 1) =
2 * (physHermite n).coeff k - (↑k + 2) * (physHermite n).coeff (k + 2)
norm_cast All goals completed! 🐙
lemma coeff_physHermite_of_lt {n k : ℕ} (hnk : n < k) : coeff (physHermite n) k = 0 := by n:ℕk:ℕhnk:n < k⊢ (physHermite n).coeff k = 0
obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_lt hnk n:ℕk:ℕhnk:n < n + k + 1⊢ (physHermite n).coeff (n + k + 1) = 0
clear hnk n:ℕk:ℕ⊢ (physHermite n).coeff (n + k + 1) = 0
induction n generalizing k with
| zero => zero k:ℕ⊢ (physHermite 0).coeff (0 + k + 1) = 0 exact coeff_C All goals completed! 🐙
| succ n ih => succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ (physHermite (n + 1)).coeff (n + 1 + k + 1) = 0
rw [coeff_physHermite_succ_succ, succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * (physHermite n).coeff (n + 1 + k) - (↑(n + 1 + k) + 2) * (physHermite n).coeff (n + 1 + k + 2) = 0 succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0 add_right_comm, succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * (physHermite n).coeff (n + k + 1) - (↑(n + k + 1) + 2) * (physHermite n).coeff (n + k + 1 + 2) = 0 succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0 show n + k + 1 + 2 = n + (k + 2) + 1 by n:ℕk:ℕhnk:n < k⊢ (physHermite n).coeff k = 0succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0 ring All goals completed! 🐙succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0,
ih k, succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * (physHermite n).coeff (n + (k + 2) + 1) = 0succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0 ih (k + 2) succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0]succ n:ℕih:∀ (k : ℕ), (physHermite n).coeff (n + k + 1) = 0k:ℕ⊢ 2 * 0 - (↑(n + k + 1) + 2) * 0 = 0
simp All goals completed! 🐙
@[simp]
lemma coeff_physHermite_self_succ (n : ℕ) : coeff (physHermite n) n = 2 ^ n := by n:ℕ⊢ (physHermite n).coeff n = 2 ^ n
induction n with
| zero => zero ⊢ (physHermite 0).coeff 0 = 2 ^ 0 exact coeff_C All goals completed! 🐙
| succ n ih => succ n:ℕih:(physHermite n).coeff n = 2 ^ n⊢ (physHermite (n + 1)).coeff (n + 1) = 2 ^ (n + 1)
rw [coeff_physHermite_succ_succ, succ n:ℕih:(physHermite n).coeff n = 2 ^ n⊢ 2 * (physHermite n).coeff n - (↑n + 2) * (physHermite n).coeff (n + 2) = 2 ^ (n + 1) All goals completed! 🐙 ih, succ n:ℕih:(physHermite n).coeff n = 2 ^ n⊢ 2 * 2 ^ n - (↑n + 2) * (physHermite n).coeff (n + 2) = 2 ^ (n + 1) All goals completed! 🐙 coeff_physHermite_of_lt (by n:ℕih:(physHermite n).coeff n = 2 ^ n⊢ n < n + 2 All goals completed! 🐙 omega All goals completed! 🐙 All goals completed! 🐙), mul_zero, succ n:ℕih:(physHermite n).coeff n = 2 ^ n⊢ 2 * 2 ^ n - 0 = 2 ^ (n + 1) All goals completed! 🐙 sub_zero, succ n:ℕih:(physHermite n).coeff n = 2 ^ n⊢ 2 * 2 ^ n = 2 ^ (n + 1) All goals completed! 🐙
← Int.pow_succ' succ n:ℕih:(physHermite n).coeff n = 2 ^ n⊢ 2 ^ (n + 1) = 2 ^ (n + 1) All goals completed! 🐙] All goals completed! 🐙@[simp]
lemma degree_physHermite (n : ℕ) : degree (physHermite n) = n := by n:ℕ⊢ (physHermite n).degree = ↑n
refine degree_eq_of_le_of_coeff_ne_zero ?_ (by n:ℕ⊢ (physHermite n).coeff n ≠ 0 simp All goals completed! 🐙)
simp_rw [ n:ℕ⊢ (physHermite n).degree ≤ ↑ndegree_le_iff_coeff_zero, n:ℕ⊢ ∀ (m : ℕ), ↑n < ↑m → (physHermite n).coeff m = 0 Nat.cast_lt n:ℕ⊢ ∀ (m : ℕ), n < m → (physHermite n).coeff m = 0]
exact fun _ => coeff_physHermite_of_lt All goals completed! 🐙@[simp]
lemma natDegree_physHermite {n : ℕ} : (physHermite n).natDegree = n :=
natDegree_eq_of_degree_eq_some (degree_physHermite n)lemma iterate_derivative_physHermite_of_gt {n m : ℕ} (h : n < m) :
derivative^[m] (physHermite n) = 0 :=
iterate_derivative_eq_zero (by n:ℕm:ℕh:n < m⊢ (physHermite n).natDegree < m simpa using h All goals completed! 🐙)
@[simp]
lemma iterate_derivative_physHermite_self {n : ℕ} :
derivative^[n] (physHermite n) = C ((n ! : ℤ) * 2 ^ n) := by n:ℕ⊢ (⇑derivative)^[n] (physHermite n) = C (↑n ! * 2 ^ n)
ext m n:ℕm:ℕ⊢ ((⇑derivative)^[n] (physHermite n)).coeff m = (C (↑n ! * 2 ^ n)).coeff m
rw [Polynomial.coeff_iterate_derivative n:ℕm:ℕ⊢ (m + n).descFactorial n • (physHermite n).coeff (m + n) = (C (↑n ! * 2 ^ n)).coeff m n:ℕm:ℕ⊢ (m + n).descFactorial n • (physHermite n).coeff (m + n) = (C (↑n ! * 2 ^ n)).coeff m] n:ℕm:ℕ⊢ (m + n).descFactorial n • (physHermite n).coeff (m + n) = (C (↑n ! * 2 ^ n)).coeff m
match m with
| 0 => n:ℕm:ℕ⊢ (0 + n).descFactorial n • (physHermite n).coeff (0 + n) = (C (↑n ! * 2 ^ n)).coeff 0
rw [Polynomial.coeff_C_zero n:ℕm:ℕ⊢ (0 + n).descFactorial n • (physHermite n).coeff (0 + n) = ↑n ! * 2 ^ n n:ℕm:ℕ⊢ (0 + n).descFactorial n • (physHermite n).coeff (0 + n) = ↑n ! * 2 ^ n] n:ℕm:ℕ⊢ (0 + n).descFactorial n • (physHermite n).coeff (0 + n) = ↑n ! * 2 ^ n
simp [Nat.descFactorial_self] All goals completed! 🐙
| m + 1 => n:ℕm✝:ℕm:ℕ⊢ (m + 1 + n).descFactorial n • (physHermite n).coeff (m + 1 + n) = (C (↑n ! * 2 ^ n)).coeff (m + 1)
rw [coeff_physHermite_of_lt (by n:ℕm✝:ℕm:ℕ⊢ n < m + 1 + n n:ℕm✝:ℕm:ℕ⊢ (m + 1 + n).descFactorial n • 0 = 0 omega All goals completed! 🐙 n:ℕm✝:ℕm:ℕ⊢ (m + 1 + n).descFactorial n • 0 = 0), Polynomial.coeff_C_of_ne_zero (by n:ℕm✝:ℕm:ℕ⊢ m + 1 ≠ 0 n:ℕm✝:ℕm:ℕ⊢ (m + 1 + n).descFactorial n • 0 = 0 omega All goals completed! 🐙 n:ℕm✝:ℕm:ℕ⊢ (m + 1 + n).descFactorial n • 0 = 0)] n:ℕm✝:ℕm:ℕ⊢ (m + 1 + n).descFactorial n • 0 = 0
rfl All goals completed! 🐙@[simp]
lemma physHermite_leadingCoeff {n : ℕ} : (physHermite n).leadingCoeff = 2 ^ n := by n:ℕ⊢ (physHermite n).leadingCoeff = 2 ^ n
simp [leadingCoeff] All goals completed! 🐙@[simp]
lemma physHermite_ne_zero {n : ℕ} : physHermite n ≠ 0 :=
leadingCoeff_ne_zero.mp (by n:ℕ⊢ (physHermite n).leadingCoeff ≠ 0 simp All goals completed! 🐙)lemma physHermite_eq_aeval (n : ℕ) (x : ℝ) :
physHermite n x = (physHermite n).aeval x := rfllemma physHermite_zero_apply (x : ℝ) : physHermite 0 x = 1 := by x:ℝ⊢ (fun x => (aeval x) (physHermite 0)) x = 1 simp All goals completed! 🐙lemma physHermite_pow (n m : ℕ) (x : ℝ) : physHermite n x ^ m = aeval x (physHermite n ^ m) := by n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x ^ m = (aeval x) (physHermite n ^ m)
simp All goals completed! 🐙lemma physHermite_succ_fun (n : ℕ) :
(physHermite (n + 1) : ℝ → ℝ) = 2 • (fun x => x) *
(physHermite n : ℝ → ℝ)- (2 * n : ℝ) • (physHermite (n - 1) : ℝ → ℝ) := by n:ℕ⊢ (fun x => (aeval x) (physHermite (n + 1))) =
((2 • fun x => x) * fun x => (aeval x) (physHermite n)) - (2 * ↑n) • fun x => (aeval x) (physHermite (n - 1))
ext x n:ℕx:ℝ⊢ (aeval x) (physHermite (n + 1)) =
(((2 • fun x => x) * fun x => (aeval x) (physHermite n)) - (2 * ↑n) • fun x => (aeval x) (physHermite (n - 1))) x
simp [physHermite_succ', mul_assoc, map_ofNat] All goals completed! 🐙
lemma physHermite_succ_fun' (n : ℕ) :
(physHermite (n + 1) : ℝ → ℝ) = fun x => 2 • x *
physHermite n x -
(2 * n : ℝ) • physHermite (n - 1) x := by n:ℕ⊢ (fun x => (aeval x) (physHermite (n + 1))) = fun x =>
2 • x * (fun x => (aeval x) (physHermite n)) x - (2 * ↑n) • (fun x => (aeval x) (physHermite (n - 1))) x
rw [physHermite_succ_fun n:ℕ⊢ (((2 • fun x => x) * fun x => (aeval x) (physHermite n)) - (2 * ↑n) • fun x => (aeval x) (physHermite (n - 1))) =
fun x => 2 • x * (fun x => (aeval x) (physHermite n)) x - (2 * ↑n) • (fun x => (aeval x) (physHermite (n - 1))) x n:ℕ⊢ (((2 • fun x => x) * fun x => (aeval x) (physHermite n)) - (2 * ↑n) • fun x => (aeval x) (physHermite (n - 1))) =
fun x => 2 • x * (fun x => (aeval x) (physHermite n)) x - (2 * ↑n) • (fun x => (aeval x) (physHermite (n - 1))) x] n:ℕ⊢ (((2 • fun x => x) * fun x => (aeval x) (physHermite n)) - (2 * ↑n) • fun x => (aeval x) (physHermite (n - 1))) =
fun x => 2 • x * (fun x => (aeval x) (physHermite n)) x - (2 * ↑n) • (fun x => (aeval x) (physHermite (n - 1))) x
rfl All goals completed! 🐙
lemma iterated_deriv_physHermite_eq_aeval (n : ℕ) : (m : ℕ) →
deriv^[m] (physHermite n) = fun x => (derivative^[m] (physHermite n)).aeval x
| 0 => n:ℕ⊢ (deriv^[0] fun x => (aeval x) (physHermite n)) = fun x => (aeval x) ((⇑derivative)^[0] (physHermite n)) by n:ℕ⊢ (deriv^[0] fun x => (aeval x) (physHermite n)) = fun x => (aeval x) ((⇑derivative)^[0] (physHermite n)) simp All goals completed! 🐙
| m + 1 => n:ℕm:ℕ⊢ (deriv^[m + 1] fun x => (aeval x) (physHermite n)) = fun x => (aeval x) ((⇑derivative)^[m + 1] (physHermite n)) by n:ℕm:ℕ⊢ (deriv^[m + 1] fun x => (aeval x) (physHermite n)) = fun x => (aeval x) ((⇑derivative)^[m + 1] (physHermite n))
simp only [Function.iterate_succ_apply', iterated_deriv_physHermite_eq_aeval n m] n:ℕm:ℕ⊢ (deriv fun x => (aeval x) ((⇑derivative)^[m] (physHermite n))) = fun x =>
(aeval x) (derivative ((⇑derivative)^[m] (physHermite n)))
funext x n:ℕm:ℕx:ℝ⊢ deriv (fun x => (aeval x) ((⇑derivative)^[m] (physHermite n))) x =
(aeval x) (derivative ((⇑derivative)^[m] (physHermite n)))
rw [Polynomial.deriv_aeval n:ℕm:ℕx:ℝ⊢ (aeval x) (derivative ((⇑derivative)^[m] (physHermite n))) = (aeval x) (derivative ((⇑derivative)^[m] (physHermite n))) All goals completed! 🐙] All goals completed! 🐙@[fun_prop]
lemma physHermite_differentiableAt (n : ℕ) (x : ℝ) :
DifferentiableAt ℝ (physHermite n) x := Polynomial.differentiableAt_aeval (physHermite n)@[fun_prop]
lemma deriv_physHermite_differentiableAt (n m : ℕ) (x : ℝ) :
DifferentiableAt ℝ (deriv^[m] (physHermite n)) x :=
iterated_deriv_physHermite_eq_aeval n m ▸ Polynomial.differentiableAt_aeval _
lemma deriv_physHermite (n : ℕ) :
deriv (physHermite n) = 2 * n * (physHermite (n - 1)) := by n:ℕ⊢ (deriv fun x => (aeval x) (physHermite n)) = 2 * ↑n * fun x => (aeval x) (physHermite (n - 1))
ext x n:ℕx:ℝ⊢ deriv (fun x => (aeval x) (physHermite n)) x = (2 * ↑n * fun x => (aeval x) (physHermite (n - 1))) x
rw [Polynomial.deriv_aeval (physHermite n), n:ℕx:ℝ⊢ (aeval x) (derivative (physHermite n)) = (2 * ↑n * fun x => (aeval x) (physHermite (n - 1))) x n:ℕx:ℝ⊢ (aeval x) (2 * n • physHermite (n - 1)) = (2 * ↑n * fun x => (aeval x) (physHermite (n - 1))) x derivative_physHermite n:ℕx:ℝ⊢ (aeval x) (2 * n • physHermite (n - 1)) = (2 * ↑n * fun x => (aeval x) (physHermite (n - 1))) x n:ℕx:ℝ⊢ (aeval x) (2 * n • physHermite (n - 1)) = (2 * ↑n * fun x => (aeval x) (physHermite (n - 1))) x] n:ℕx:ℝ⊢ (aeval x) (2 * n • physHermite (n - 1)) = (2 * ↑n * fun x => (aeval x) (physHermite (n - 1))) x
simp [mul_assoc, map_ofNat] All goals completed! 🐙
lemma fderiv_physHermite
{E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] (x : E)
(f : E → ℝ) (hf : DifferentiableAt ℝ f x) (n : ℕ) :
fderiv ℝ (fun x => physHermite n (f x)) x
= (2 * n * physHermite (n - 1) (f x)) • fderiv ℝ f x := by E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ fderiv ℝ (fun x => (fun x => (aeval x) (physHermite n)) (f x)) x =
(2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x
rw [show (fun x => physHermite n (f x)) = physHermite n ∘ f from rfl, E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ fderiv ℝ ((fun x => (aeval x) (physHermite n)) ∘ f) x =
(2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ fderiv ℝ (fun x => (aeval x) (physHermite n)) (f x) ∘SL fderiv ℝ f x =
(2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x
fderiv_comp x (by E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) (f x) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ fderiv ℝ (fun x => (aeval x) (physHermite n)) (f x) ∘SL fderiv ℝ f x =
(2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x fun_prop All goals completed! 🐙 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ fderiv ℝ (fun x => (aeval x) (physHermite n)) (f x) ∘SL fderiv ℝ f x =
(2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x) hf] E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ fderiv ℝ (fun x => (aeval x) (physHermite n)) (f x) ∘SL fderiv ℝ f x =
(2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x
ext dx E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕdx:E⊢ (fderiv ℝ (fun x => (aeval x) (physHermite n)) (f x) ∘SL fderiv ℝ f x) dx =
((2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x) dx
simp only [Polynomial.fderiv_aeval, derivative_physHermite, nsmul_eq_mul, map_mul, map_natCast,
ContinuousLinearMap.coe_comp, Function.comp_apply, ContinuousLinearMap.smulRight_apply,
one_apply_eq_self, smul_eq_mul, FunLike.coe_smul, Pi.smul_apply, map_ofNat] E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace ℝ Ex:Ef:E → ℝhf:DifferentiableAt ℝ f xn:ℕdx:E⊢ (fderiv ℝ f x) dx * (2 * (↑n * (aeval (f x)) (physHermite (n - 1)))) =
2 * ↑n * (aeval (f x)) (physHermite (n - 1)) * (fderiv ℝ f x) dx
ring All goals completed! 🐙
@[simp]
lemma deriv_physHermite' (x : ℝ)
(f : ℝ → ℝ) (hf : DifferentiableAt ℝ f x) (n : ℕ) :
deriv (fun x => physHermite n (f x)) x
= (2 * n * physHermite (n - 1) (f x)) * deriv f x := by x:ℝf:ℝ → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ deriv (fun x => (fun x => (aeval x) (physHermite n)) (f x)) x =
2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x) * deriv f x
unfold deriv x:ℝf:ℝ → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ (fderiv ℝ (fun x => (fun x => (aeval x) (physHermite n)) (f x)) x) 1 =
2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x) * (fderiv ℝ f x) 1
rw [fderiv_physHermite (hf := hf) x:ℝf:ℝ → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ ((2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x) 1 =
2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x) * (fderiv ℝ f x) 1 x:ℝf:ℝ → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ ((2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x) 1 =
2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x) * (fderiv ℝ f x) 1] x:ℝf:ℝ → ℝhf:DifferentiableAt ℝ f xn:ℕ⊢ ((2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x)) • fderiv ℝ f x) 1 =
2 * ↑n * (fun x => (aeval x) (physHermite (n - 1))) (f x) * (fderiv ℝ f x) 1
rfl All goals completed! 🐙
lemma physHermite_parity: (n : ℕ) → (x : ℝ) →
physHermite n (-x) = (-1)^n * physHermite n x
| 0, x => x:ℝ⊢ (fun x => (aeval x) (physHermite 0)) (-x) = (-1) ^ 0 * (fun x => (aeval x) (physHermite 0)) x by x:ℝ⊢ (fun x => (aeval x) (physHermite 0)) (-x) = (-1) ^ 0 * (fun x => (aeval x) (physHermite 0)) x simp All goals completed! 🐙
| 1, x => x:ℝ⊢ (fun x => (aeval x) (physHermite 1)) (-x) = (-1) ^ 1 * (fun x => (aeval x) (physHermite 1)) x by x:ℝ⊢ (fun x => (aeval x) (physHermite 1)) (-x) = (-1) ^ 1 * (fun x => (aeval x) (physHermite 1)) x simp [physHermite_one, map_ofNat] All goals completed! 🐙
| n + 2, x => n:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite (n + 2))) (-x) = (-1) ^ (n + 2) * (fun x => (aeval x) (physHermite (n + 2))) x by n:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite (n + 2))) (-x) = (-1) ^ (n + 2) * (fun x => (aeval x) (physHermite (n + 2))) x
rw [physHermite_succ_fun' n:ℕx:ℝ⊢ (fun x =>
2 • x * (fun x => (aeval x) (physHermite (n + 1))) x -
(2 * ↑(n + 1)) • (fun x => (aeval x) (physHermite (n + 1 - 1))) x)
(-x) =
(-1) ^ (n + 2) *
(fun x =>
2 • x * (fun x => (aeval x) (physHermite (n + 1))) x -
(2 * ↑(n + 1)) • (fun x => (aeval x) (physHermite (n + 1 - 1))) x)
x n:ℕx:ℝ⊢ (fun x =>
2 • x * (fun x => (aeval x) (physHermite (n + 1))) x -
(2 * ↑(n + 1)) • (fun x => (aeval x) (physHermite (n + 1 - 1))) x)
(-x) =
(-1) ^ (n + 2) *
(fun x =>
2 • x * (fun x => (aeval x) (physHermite (n + 1))) x -
(2 * ↑(n + 1)) • (fun x => (aeval x) (physHermite (n + 1 - 1))) x)
x] n:ℕx:ℝ⊢ (fun x =>
2 • x * (fun x => (aeval x) (physHermite (n + 1))) x -
(2 * ↑(n + 1)) • (fun x => (aeval x) (physHermite (n + 1 - 1))) x)
(-x) =
(-1) ^ (n + 2) *
(fun x =>
2 • x * (fun x => (aeval x) (physHermite (n + 1))) x -
(2 * ↑(n + 1)) • (fun x => (aeval x) (physHermite (n + 1 - 1))) x)
x
simp only [smul_neg, nsmul_eq_mul, cast_ofNat, physHermite_parity (n + 1) x, neg_mul, cast_add,
cast_one, add_tsub_cancel_right, physHermite_parity n x, smul_eq_mul] n:ℕx:ℝ⊢ -(2 * x * ((-1) ^ (n + 1) * (aeval x) (physHermite (n + 1)))) - 2 * (↑n + 1) * ((-1) ^ n * (aeval x) (physHermite n)) =
(-1) ^ (n + 2) * (2 * x * (aeval x) (physHermite (n + 1)) - 2 * (↑n + 1) * (aeval x) (physHermite n))
ring All goals completed! 🐙Relationship to Gaussians
lemma deriv_gaussian_eq_physHermite_mul_gaussian (n : ℕ) (x : ℝ) :
deriv^[n] (fun y => Real.exp (- y ^ 2)) x =
(-1 : ℝ) ^ n * physHermite n x * Real.exp (- x ^ 2) := by n:ℕx:ℝ⊢ deriv^[n] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ n * (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2)
rw [mul_assoc n:ℕx:ℝ⊢ deriv^[n] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2)) n:ℕx:ℝ⊢ deriv^[n] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))] n:ℕx:ℝ⊢ deriv^[n] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))
induction' n with n ih generalizing x zero x:ℝ⊢ deriv^[0] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ 0 * ((fun x => (aeval x) (physHermite 0)) x * Real.exp (-x ^ 2))succ n:ℕih:∀ (x : ℝ),
deriv^[n] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))x:ℝ⊢ deriv^[n + 1] (fun y => Real.exp (-y ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))
· zero x:ℝ⊢ deriv^[0] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ 0 * ((fun x => (aeval x) (physHermite 0)) x * Real.exp (-x ^ 2)) simp All goals completed! 🐙
· succ n:ℕih:∀ (x : ℝ),
deriv^[n] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))x:ℝ⊢ deriv^[n + 1] (fun y => Real.exp (-y ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2)) replace ih : deriv^[n] _ = _ := _root_.funext ih succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))⊢ deriv^[n + 1] (fun y => Real.exp (-y ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))
have deriv_gaussian :
deriv (fun y => Real.exp (-(y ^ 2))) x = -2 * x * Real.exp (-(x ^ 2)) := by n:ℕx:ℝ⊢ deriv^[n] (fun y => Real.exp (-y ^ 2)) x = (-1) ^ n * (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ deriv^[n + 1] (fun y => Real.exp (-y ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))
simp [mul_comm]succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ deriv^[n + 1] (fun y => Real.exp (-y ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ deriv^[n + 1] (fun y => Real.exp (-y ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))
rw [Function.iterate_succ_apply', succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ deriv (deriv^[n] fun y => Real.exp (-y ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2)) succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x ih, succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ deriv (fun x => (-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x deriv_const_mul_field, succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n * deriv (fun x => (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2)) x =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x deriv_fun_mul, succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * deriv (fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (n + 1) * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) xsucc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x pow_succ (-1 : ℝ), succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * deriv (fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ n * -1 * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) xsucc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x
deriv_gaussian, succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (physHermite (n + 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) xsucc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x physHermite_succ, succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - derivative (physHermite n))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) xsucc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x derivative_physHermite succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) xsucc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x]succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2))succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) xsucc.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x
· succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(deriv (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 * ((fun x => (aeval x) (2 • X * physHermite n - 2 * n • physHermite (n - 1))) x * Real.exp (-x ^ 2)) simp only [Polynomial.deriv_aeval, derivative_physHermite, nsmul_eq_mul, map_mul,
map_natCast, map_sub, aeval_X, map_ofNat] succ n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ (-1) ^ n *
(2 * (↑n * (aeval x) (physHermite (n - 1))) * Real.exp (-x ^ 2) +
(aeval x) (physHermite n) * (-2 * x * Real.exp (-x ^ 2))) =
(-1) ^ n * -1 *
((↑2 * x * (aeval x) (physHermite n) - 2 * (↑n * (aeval x) (physHermite (n - 1)))) * Real.exp (-x ^ 2))
ring All goals completed! 🐙
· succ.hc n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => (aeval x) (physHermite n)) x fun_prop All goals completed! 🐙
· succ.hd n:ℕx:ℝih:(deriv^[n] fun y => Real.exp (-y ^ 2)) = fun x =>
(-1) ^ n * ((fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2))deriv_gaussian:deriv (fun y => Real.exp (-y ^ 2)) x = -2 * x * Real.exp (-x ^ 2)⊢ DifferentiableAt ℝ (fun x => Real.exp (-x ^ 2)) x fun_prop All goals completed! 🐙
lemma physHermite_eq_deriv_gaussian (n : ℕ) (x : ℝ) :
physHermite n x = (-1 : ℝ) ^ n * deriv^[n]
(fun y => Real.exp (- y ^ 2)) x / Real.exp (- x ^ 2) := by n:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x = (-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x / Real.exp (-x ^ 2)
rw [deriv_gaussian_eq_physHermite_mul_gaussian n:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x =
(-1) ^ n * ((-1) ^ n * (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2)) / Real.exp (-x ^ 2) n:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x =
(-1) ^ n * ((-1) ^ n * (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2)) / Real.exp (-x ^ 2)] n:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x =
(-1) ^ n * ((-1) ^ n * (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2)) / Real.exp (-x ^ 2)
simp [← mul_assoc, ← mul_pow, Real.exp_ne_zero] All goals completed! 🐙
lemma physHermite_eq_deriv_gaussian' (n : ℕ) (x : ℝ) :
physHermite n x = (-1 : ℝ) ^ n * deriv^[n] (fun y => Real.exp (- y ^ 2)) x *
Real.exp (x ^ 2) := by n:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x = (-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2)
rw [physHermite_eq_deriv_gaussian, n:ℕx:ℝ⊢ (-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x / Real.exp (-x ^ 2) =
(-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2) n:ℕx:ℝ⊢ (-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x / (Real.exp (x ^ 2))⁻¹ =
(-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2) Real.exp_neg n:ℕx:ℝ⊢ (-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x / (Real.exp (x ^ 2))⁻¹ =
(-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2) n:ℕx:ℝ⊢ (-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x / (Real.exp (x ^ 2))⁻¹ =
(-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2)] n:ℕx:ℝ⊢ (-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x / (Real.exp (x ^ 2))⁻¹ =
(-1) ^ n * deriv^[n] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2)
field_simp [Real.exp_ne_zero] All goals completed! 🐙
@[fun_prop]
lemma guassian_integrable_polynomial_cons {b c : ℝ} (hb : 0 < b) (P : Polynomial ℤ) :
MeasureTheory.Integrable fun x : ℝ => (P.aeval (c * x)) * Real.exp (-b * x ^ 2) := by b:ℝc:ℝhb:0 < bP:ℤ[X]⊢ MeasureTheory.Integrable (fun x => (aeval (c * x)) P * Real.exp (-b * x ^ 2)) MeasureTheory.volume
simp_rw [ b:ℝc:ℝhb:0 < bP:ℤ[X]⊢ MeasureTheory.Integrable (fun x => (aeval (c * x)) P * Real.exp (-b * x ^ 2)) MeasureTheory.volumePolynomial.aeval_eq_sum_range, b:ℝc:ℝhb:0 < bP:ℤ[X]⊢ MeasureTheory.Integrable
(fun x => (∑ i ∈ Finset.range (P.natDegree + 1), P.coeff i • (c * x) ^ i) * Real.exp (-b * x ^ 2))
MeasureTheory.volume Finset.sum_mul b:ℝc:ℝhb:0 < bP:ℤ[X]⊢ MeasureTheory.Integrable
(fun x => ∑ i ∈ Finset.range (P.natDegree + 1), P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2)) MeasureTheory.volume]
refine MeasureTheory.integrable_finsetSum _ fun i _ => ?_ b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)⊢ MeasureTheory.Integrable (fun x => P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2)) MeasureTheory.volume
have h2 : (fun a => P.coeff i • (c * a) ^ i * Real.exp (-b * a ^ 2)) =
(c ^ i * P.coeff i : ℝ) • (fun x => (x ^ (i : ℝ) * Real.exp (-b * x ^ 2))) := by b:ℝc:ℝhb:0 < bP:ℤ[X]⊢ MeasureTheory.Integrable (fun x => (aeval (c * x)) P * Real.exp (-b * x ^ 2)) MeasureTheory.volume b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)h2:(fun a => P.coeff i • (c * a) ^ i * Real.exp (-b * a ^ 2)) =
(c ^ i * ↑(P.coeff i)) • fun x => x ^ ↑i * Real.exp (-b * x ^ 2)⊢ MeasureTheory.Integrable (fun x => P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2)) MeasureTheory.volume
funext x b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)x:ℝ⊢ P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2) = ((c ^ i * ↑(P.coeff i)) • fun x => x ^ ↑i * Real.exp (-b * x ^ 2)) x b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)h2:(fun a => P.coeff i • (c * a) ^ i * Real.exp (-b * a ^ 2)) =
(c ^ i * ↑(P.coeff i)) • fun x => x ^ ↑i * Real.exp (-b * x ^ 2)⊢ MeasureTheory.Integrable (fun x => P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2)) MeasureTheory.volume
simp only [neg_mul, mul_assoc, Real.rpow_natCast, Pi.smul_apply, smul_eq_mul] b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)x:ℝ⊢ P.coeff i • (c * x) ^ i * Real.exp (-(b * x ^ 2)) = c ^ i * (↑(P.coeff i) * (x ^ i * Real.exp (-(b * x ^ 2)))) b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)h2:(fun a => P.coeff i • (c * a) ^ i * Real.exp (-b * a ^ 2)) =
(c ^ i * ↑(P.coeff i)) • fun x => x ^ ↑i * Real.exp (-b * x ^ 2)⊢ MeasureTheory.Integrable (fun x => P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2)) MeasureTheory.volume
ring b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)h2:(fun a => P.coeff i • (c * a) ^ i * Real.exp (-b * a ^ 2)) =
(c ^ i * ↑(P.coeff i)) • fun x => x ^ ↑i * Real.exp (-b * x ^ 2)⊢ MeasureTheory.Integrable (fun x => P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2)) MeasureTheory.volume b:ℝc:ℝhb:0 < bP:ℤ[X]i:ℕx✝:i ∈ Finset.range (P.natDegree + 1)h2:(fun a => P.coeff i • (c * a) ^ i * Real.exp (-b * a ^ 2)) =
(c ^ i * ↑(P.coeff i)) • fun x => x ^ ↑i * Real.exp (-b * x ^ 2)⊢ MeasureTheory.Integrable (fun x => P.coeff i • (c * x) ^ i * Real.exp (-b * x ^ 2)) MeasureTheory.volume
exact h2 ▸ MeasureTheory.Integrable.smul (c ^ i * P.coeff i : ℝ)
(integrable_rpow_mul_exp_neg_mul_sq hb (neg_one_lt_zero.trans_le (Nat.cast_nonneg' i))) All goals completed! 🐙@[fun_prop]
lemma guassian_integrable_polynomial {b : ℝ} (hb : 0 < b) (P : Polynomial ℤ) :
MeasureTheory.Integrable fun x : ℝ => (P.aeval x) * Real.exp (-b * x ^ 2) := by b:ℝhb:0 < bP:ℤ[X]⊢ MeasureTheory.Integrable (fun x => (aeval x) P * Real.exp (-b * x ^ 2)) MeasureTheory.volume
simpa using guassian_integrable_polynomial_cons (c := 1) hb P All goals completed! 🐙
@[fun_prop]
lemma physHermite_gaussian_integrable (n p m : ℕ) :
MeasureTheory.Integrable (deriv^[m] (physHermite p) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume := by n:ℕp:ℕm:ℕ⊢ MeasureTheory.Integrable ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume
have prod_eq_smul_aeval_mul_gaussian :
(deriv^[m] (physHermite p) * deriv^[n] fun x => Real.exp (-x ^ 2)) =
(-1 : ℝ) ^ n • fun x => (derivative^[m] (physHermite p) * physHermite n).aeval x *
Real.exp (-1 * x ^ 2) := by
funext x n:ℕp:ℕm:ℕx:ℝ⊢ ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2)) x =
((-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)) x n:ℕp:ℕm:ℕprod_eq_smul_aeval_mul_gaussian:((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2)) =
(-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)⊢ MeasureTheory.Integrable ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume
rw [iterated_deriv_physHermite_eq_aeval n:ℕp:ℕm:ℕx:ℝ⊢ ((fun x => (aeval x) ((⇑derivative)^[m] (physHermite p))) * deriv^[n] fun x => Real.exp (-x ^ 2)) x =
((-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)) x n:ℕp:ℕm:ℕx:ℝ⊢ ((fun x => (aeval x) ((⇑derivative)^[m] (physHermite p))) * deriv^[n] fun x => Real.exp (-x ^ 2)) x =
((-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)) x n:ℕp:ℕm:ℕprod_eq_smul_aeval_mul_gaussian:((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2)) =
(-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)⊢ MeasureTheory.Integrable ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume] n:ℕp:ℕm:ℕx:ℝ⊢ ((fun x => (aeval x) ((⇑derivative)^[m] (physHermite p))) * deriv^[n] fun x => Real.exp (-x ^ 2)) x =
((-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)) x n:ℕp:ℕm:ℕprod_eq_smul_aeval_mul_gaussian:((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2)) =
(-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)⊢ MeasureTheory.Integrable ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume
simp only [Pi.mul_apply, deriv_gaussian_eq_physHermite_mul_gaussian, map_mul, Pi.smul_apply,
smul_eq_mul, neg_one_mul] n:ℕp:ℕm:ℕx:ℝ⊢ (aeval x) ((⇑derivative)^[m] (physHermite p)) * ((-1) ^ n * (aeval x) (physHermite n) * Real.exp (-x ^ 2)) =
(-1) ^ n * ((aeval x) ((⇑derivative)^[m] (physHermite p)) * (aeval x) (physHermite n) * Real.exp (-x ^ 2)) n:ℕp:ℕm:ℕprod_eq_smul_aeval_mul_gaussian:((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2)) =
(-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)⊢ MeasureTheory.Integrable ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume
ring n:ℕp:ℕm:ℕprod_eq_smul_aeval_mul_gaussian:((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2)) =
(-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)⊢ MeasureTheory.Integrable ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume n:ℕp:ℕm:ℕprod_eq_smul_aeval_mul_gaussian:((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2)) =
(-1) ^ n • fun x => (aeval x) ((⇑derivative)^[m] (physHermite p) * physHermite n) * Real.exp (-1 * x ^ 2)⊢ MeasureTheory.Integrable ((deriv^[m] fun x => (aeval x) (physHermite p)) * deriv^[n] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume
exact prod_eq_smul_aeval_mul_gaussian ▸
MeasureTheory.Integrable.smul _ (guassian_integrable_polynomial Real.zero_lt_one _) All goals completed! 🐙
lemma integral_physHermite_mul_physHermite_eq_integral_deriv_exp (n m : ℕ) :
∫ x : ℝ, (physHermite n x * physHermite m x) * Real.exp (-x ^ 2) =
(-1 : ℝ) ^ m * ∫ x : ℝ, (physHermite n x * (deriv^[m] fun x => Real.exp (-x ^ 2)) x) := by n:ℕm:ℕ⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x
have h1 (x : ℝ) : (physHermite n x * physHermite m x) * Real.exp (-x ^ 2)
= (-1 : ℝ) ^ m * (physHermite n x * (deriv^[m] fun x => Real.exp (-x ^ 2)) x) := by
rw [physHermite_eq_deriv_gaussian' m x, n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2)) *
Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x mul_assoc, n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x *
((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2) * Real.exp (-x ^ 2)) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x mul_assoc, n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x *
((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x * (Real.exp (x ^ 2) * Real.exp (-x ^ 2))) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x ← Real.exp_add, n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x *
((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x * Real.exp (x ^ 2 + -x ^ 2)) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x add_neg_cancel, n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x * Real.exp 0) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x
Real.exp_zero, n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x * 1) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x mul_one n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x] n:ℕm:ℕx:ℝ⊢ (fun x => (aeval x) (physHermite n)) x * ((-1) ^ m * deriv^[m] (fun y => Real.exp (-y ^ 2)) x) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x) n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x
ring n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x n:ℕm:ℕh1:∀ (x : ℝ),
(fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ((fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x)⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ m * ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * deriv^[m] (fun x => Real.exp (-x ^ 2)) x
simp only [h1, MeasureTheory.integral_const_mul] All goals completed! 🐙
lemma integral_physHermite_mul_physHermite_eq_integral_deriv_inductive (n m : ℕ) :
(p : ℕ) → (hpm : p ≤ m) →
∫ x : ℝ, (physHermite n x * physHermite m x) * Real.exp (- x ^ 2) =
(-1 : ℝ) ^ (m - p) * ∫ x : ℝ, (deriv^[p] (physHermite n) x *
(deriv^[m - p] fun x => Real.exp (-x ^ 2)) x)
| 0, h => integral_physHermite_mul_physHermite_eq_integral_deriv_exp n m
| p + 1, h => n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ), deriv^[p + 1] (fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x by n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ), deriv^[p + 1] (fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
rw [integral_physHermite_mul_physHermite_eq_integral_deriv_inductive n m p (by n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ p ≤ m n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x omega All goals completed! 🐙 n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x),
show m - p = m - (p + 1) + 1 by n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ), deriv^[p + 1] (fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x omega All goals completed! 🐙 n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x, Function.iterate_succ_apply', n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1) + 1) *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ), deriv^[p + 1] (fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x pow_succ, n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) * -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ), deriv^[p + 1] (fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x mul_assoc, n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ), deriv^[p + 1] (fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
Function.iterate_succ_apply' n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x] n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ (-1) ^ (m - (p + 1)) *
(-1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
congr e_a n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
have hl : ∫ (x : ℝ), deriv^[p] (physHermite n) x *
deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
- ∫ (x : ℝ), deriv (deriv^[p] (physHermite n)) x *
deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x := by n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
(-1) ^ (m - (p + 1)) *
∫ (x : ℝ), deriv^[p + 1] (fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x e_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
apply MeasureTheory.integral_mul_deriv_eq_deriv_mul_of_integrable hu n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∀ x ∈ tsupport (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)),
HasDerivAt (deriv^[p] fun x => (aeval x) (physHermite n)) (deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x) xhv n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∀ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)),
HasDerivAt (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) (deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x)
xhuv' n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p] fun x => (aeval x) (physHermite n)) * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)))
MeasureTheory.volumehu'v n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
(deriv (deriv^[p] fun x => (aeval x) (physHermite n)) * deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2))
MeasureTheory.volumehuv n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p] fun x => (aeval x) (physHermite n)) * deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
· hu n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∀ x ∈ tsupport (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)),
HasDerivAt (deriv^[p] fun x => (aeval x) (physHermite n)) (deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x) xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x exact fun _ _ ↦ DifferentiableAt.hasDerivAt (deriv_physHermite_differentiableAt n p _) All goals completed! 🐙e_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
· hv n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ ∀ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)),
HasDerivAt (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) (deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x)
xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x intro x hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝ⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
HasDerivAt (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) (deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x)
xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
rw [hasDerivAt_deriv_iff hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝ⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
DifferentiableAt ℝ (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝ⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
DifferentiableAt ℝ (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x]hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝ⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
DifferentiableAt ℝ (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
have h1 : (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) =
fun x => (-1 : ℝ) ^ (m - (p + 1)) * physHermite (m - (p + 1)) x *
Real.exp (- x ^ 2) := funext fun x =>
deriv_gaussian_eq_physHermite_mul_gaussian (m - (p + 1)) x hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝh1:(deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) = fun x =>
(-1) ^ (m - (p + 1)) * (fun x => (aeval x) (physHermite (m - (p + 1)))) x * Real.exp (-x ^ 2)⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
DifferentiableAt ℝ (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
rw [h1 hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝh1:(deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) = fun x =>
(-1) ^ (m - (p + 1)) * (fun x => (aeval x) (physHermite (m - (p + 1)))) x * Real.exp (-x ^ 2)⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
DifferentiableAt ℝ
(fun x => (-1) ^ (m - (p + 1)) * (fun x => (aeval x) (physHermite (m - (p + 1)))) x * Real.exp (-x ^ 2)) x hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝh1:(deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) = fun x =>
(-1) ^ (m - (p + 1)) * (fun x => (aeval x) (physHermite (m - (p + 1)))) x * Real.exp (-x ^ 2)⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
DifferentiableAt ℝ
(fun x => (-1) ^ (m - (p + 1)) * (fun x => (aeval x) (physHermite (m - (p + 1)))) x * Real.exp (-x ^ 2)) xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x]hv n:ℕm:ℕp:ℕh:p + 1 ≤ mx:ℝh1:(deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) = fun x =>
(-1) ^ (m - (p + 1)) * (fun x => (aeval x) (physHermite (m - (p + 1)))) x * Real.exp (-x ^ 2)⊢ x ∈ tsupport (deriv^[p] fun x => (aeval x) (physHermite n)) →
DifferentiableAt ℝ
(fun x => (-1) ^ (m - (p + 1)) * (fun x => (aeval x) (physHermite (m - (p + 1)))) x * Real.exp (-x ^ 2)) xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
fun_prop All goals completed! 🐙e_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
· huv' n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p] fun x => (aeval x) (physHermite n)) * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)))
MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x rw [← Function.iterate_succ_apply' deriv huv' n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p] fun x => (aeval x) (physHermite n)) * deriv^[(m - (p + 1)).succ] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume huv' n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p] fun x => (aeval x) (physHermite n)) * deriv^[(m - (p + 1)).succ] fun x => Real.exp (-x ^ 2))
MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x]huv' n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p] fun x => (aeval x) (physHermite n)) * deriv^[(m - (p + 1)).succ] fun x => Real.exp (-x ^ 2))
MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
exact physHermite_gaussian_integrable .. All goals completed! 🐙e_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
· hu'v n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
(deriv (deriv^[p] fun x => (aeval x) (physHermite n)) * deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2))
MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x rw [← Function.iterate_succ_apply' deriv hu'v n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p.succ] fun x => (aeval x) (physHermite n)) * deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2))
MeasureTheory.volume hu'v n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p.succ] fun x => (aeval x) (physHermite n)) * deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2))
MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x]hu'v n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p.succ] fun x => (aeval x) (physHermite n)) * deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2))
MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
exact physHermite_gaussian_integrable .. All goals completed! 🐙e_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
· huv n:ℕm:ℕp:ℕh:p + 1 ≤ m⊢ MeasureTheory.Integrable
((deriv^[p] fun x => (aeval x) (physHermite n)) * deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) MeasureTheory.volumee_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x fun_prope_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) xe_a n:ℕm:ℕp:ℕh:p + 1 ≤ mhl:∫ (x : ℝ), deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
-∫ (x : ℝ),
deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x⊢ -1 *
∫ (x : ℝ),
deriv^[p] (fun x => (aeval x) (physHermite n)) x * deriv (deriv^[m - (p + 1)] fun x => Real.exp (-x ^ 2)) x =
∫ (x : ℝ), deriv (deriv^[p] fun x => (aeval x) (physHermite n)) x * deriv^[m - (p + 1)] (fun x => Real.exp (-x ^ 2)) x
simp [hl] All goals completed! 🐙lemma integral_physHermite_mul_physHermite_eq_integral_deriv (n m : ℕ) :
∫ x : ℝ, (physHermite n x * physHermite m x) * Real.exp (- x ^ 2) =
∫ x : ℝ, (deriv^[m] (physHermite n) x * (Real.exp (-x ^ 2))) := by n:ℕm:ℕ⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) =
∫ (x : ℝ), deriv^[m] (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2)
simp [integral_physHermite_mul_physHermite_eq_integral_deriv_inductive n m m le_rfl] All goals completed! 🐙
lemma physHermite_orthogonal_lt {n m : ℕ} (hnm : n < m) :
∫ x : ℝ, (physHermite n x * physHermite m x) * Real.exp (- x ^ 2) = 0 := by n:ℕm:ℕhnm:n < m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) = 0
rw [integral_physHermite_mul_physHermite_eq_integral_deriv n:ℕm:ℕhnm:n < m⊢ ∫ (x : ℝ), deriv^[m] (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) = 0 n:ℕm:ℕhnm:n < m⊢ ∫ (x : ℝ), deriv^[m] (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) = 0] n:ℕm:ℕhnm:n < m⊢ ∫ (x : ℝ), deriv^[m] (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) = 0
simp [iterated_deriv_physHermite_eq_aeval, iterate_derivative_physHermite_of_gt hnm] All goals completed! 🐙theorem physHermite_orthogonal {n m : ℕ} (hnm : n ≠ m) :
∫ x : ℝ, (physHermite n x * physHermite m x) * Real.exp (- x ^ 2) = 0 := by n:ℕm:ℕhnm:n ≠ m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) = 0
obtain h | h := hnm.lt_or_gt inl n:ℕm:ℕhnm:n ≠ mh:n < m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) = 0inr n:ℕm:ℕhnm:n ≠ mh:m < n⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) = 0
· inl n:ℕm:ℕhnm:n ≠ mh:n < m⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) = 0 exact physHermite_orthogonal_lt h All goals completed! 🐙
· inr n:ℕm:ℕhnm:n ≠ mh:m < n⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite m)) x * Real.exp (-x ^ 2) = 0 simpa [mul_comm] using physHermite_orthogonal_lt h All goals completed! 🐙
lemma physHermite_orthogonal_cons {n m : ℕ} (hnm : n ≠ m) (c : ℝ) :
∫ x : ℝ, (physHermite n (c * x) * physHermite m (c * x)) *
Real.exp (- c ^ 2 * x ^ 2) = 0 := by n:ℕm:ℕhnm:n ≠ mc:ℝ⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
0
have h := MeasureTheory.Measure.integral_comp_mul_left
(fun x => physHermite n x * physHermite m x * Real.exp (-x ^ 2)) c n:ℕm:ℕhnm:n ≠ mc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-(c * x) ^ 2) =
|c⁻¹| • ∫ (y : ℝ), (fun x => (aeval x) (physHermite n)) y * (fun x => (aeval x) (physHermite m)) y * Real.exp (-y ^ 2)⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
0
rw [physHermite_orthogonal hnm, n:ℕm:ℕhnm:n ≠ mc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-(c * x) ^ 2) =
|c⁻¹| • 0⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
0 n:ℕm:ℕhnm:n ≠ mc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-(c * x) ^ 2) =
0⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
0 smul_zero n:ℕm:ℕhnm:n ≠ mc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-(c * x) ^ 2) =
0⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
0 n:ℕm:ℕhnm:n ≠ mc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-(c * x) ^ 2) =
0⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
0] at h n:ℕm:ℕhnm:n ≠ mc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-(c * x) ^ 2) =
0⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite m)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
0
simpa [mul_pow, neg_mul] using h All goals completed! 🐙
theorem physHermite_norm (n : ℕ) :
∫ x : ℝ, (physHermite n x * physHermite n x) * Real.exp (- x ^ 2) =
↑n ! * 2 ^ n * √Real.pi := by n:ℕ⊢ ∫ (x : ℝ), (fun x => (aeval x) (physHermite n)) x * (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) =
↑n ! * 2 ^ n * √Real.pi
rw [integral_physHermite_mul_physHermite_eq_integral_deriv, n:ℕ⊢ ∫ (x : ℝ), deriv^[n] (fun x => (aeval x) (physHermite n)) x * Real.exp (-x ^ 2) = ↑n ! * 2 ^ n * √Real.pi n:ℕ⊢ ∫ (x : ℝ), (fun x => (aeval x) ((⇑derivative)^[n] (physHermite n))) x * Real.exp (-x ^ 2) = ↑n ! * 2 ^ n * √Real.pi iterated_deriv_physHermite_eq_aeval n:ℕ⊢ ∫ (x : ℝ), (fun x => (aeval x) ((⇑derivative)^[n] (physHermite n))) x * Real.exp (-x ^ 2) = ↑n ! * 2 ^ n * √Real.pi n:ℕ⊢ ∫ (x : ℝ), (fun x => (aeval x) ((⇑derivative)^[n] (physHermite n))) x * Real.exp (-x ^ 2) = ↑n ! * 2 ^ n * √Real.pi] n:ℕ⊢ ∫ (x : ℝ), (fun x => (aeval x) ((⇑derivative)^[n] (physHermite n))) x * Real.exp (-x ^ 2) = ↑n ! * 2 ^ n * √Real.pi
simp [MeasureTheory.integral_const_mul, map_ofNat,
show (∫ x : ℝ, Real.exp (-x ^ 2)) = √Real.pi by simpa using integral_gaussian 1] All goals completed! 🐙
lemma physHermite_norm_cons (n : ℕ) (c : ℝ) :
∫ x : ℝ, (physHermite n (c * x) * physHermite n (c * x)) * Real.exp (- c ^ 2 * x ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi) := by n:ℕc:ℝ⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi)
have h := MeasureTheory.Measure.integral_comp_mul_left
(fun x => physHermite n x * physHermite n x * Real.exp (-x ^ 2)) c n:ℕc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-(c * x) ^ 2) =
|c⁻¹| • ∫ (y : ℝ), (fun x => (aeval x) (physHermite n)) y * (fun x => (aeval x) (physHermite n)) y * Real.exp (-y ^ 2)⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi)
rw [physHermite_norm n:ℕc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-(c * x) ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi)⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi) n:ℕc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-(c * x) ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi)⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi)] at h n:ℕc:ℝh:∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-(c * x) ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi)⊢ ∫ (x : ℝ),
(fun x => (aeval x) (physHermite n)) (c * x) * (fun x => (aeval x) (physHermite n)) (c * x) *
Real.exp (-c ^ 2 * x ^ 2) =
|c⁻¹| • (↑n ! * 2 ^ n * √Real.pi)
simpa [mul_pow, neg_mul] using h All goals completed! 🐙
set_option backward.isDefEq.respectTransparency false in
lemma polynomial_mem_physHermite_span_induction (P : Polynomial ℤ) : (n : ℕ) →
(hn : P.natDegree = n) →
(P : ℝ → ℝ) ∈ Submodule.span ℝ (Set.range (fun n => (physHermite n : ℝ → ℝ)))
| 0, h => P:ℤ[X]h:P.natDegree = 0⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) by P:ℤ[X]h:P.natDegree = 0⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
obtain ⟨x, rfl⟩ := natDegree_eq_zero.mp h x:ℤh:(C x).natDegree = 0⊢ (fun x_1 => (aeval x_1) (C x)) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
refine Finsupp.mem_span_range_iff_exists_finsupp.mpr ⟨Finsupp.single 0 x, ?_⟩ x:ℤh:(C x).natDegree = 0⊢ ((Finsupp.single 0 ↑x).sum fun i a => a • fun x => (aeval x) (physHermite i)) = fun x_1 => (aeval x_1) (C x)
funext y x:ℤh:(C x).natDegree = 0y:ℝ⊢ (Finsupp.single 0 ↑x).sum (fun i a => a • fun x => (aeval x) (physHermite i)) y = (aeval y) (C x)
simp All goals completed! 🐙
| n + 1, h => P:ℤ[X]n:ℕh:P.natDegree = n + 1⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) by P:ℤ[X]n:ℕh:P.natDegree = n + 1⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
by_cases hP0 : P = 0 pos P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:P = 0⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
· pos P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:P = 0⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) simp [hP0, ← Pi.zero_def] All goals completed! 🐙
let P' := ((coeff (physHermite (n + 1)) (n + 1)) • P -
(coeff P (n + 1)) • physHermite (n + 1)) neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
have hP'mem : (fun x => P'.aeval x) ∈ Submodule.span ℝ
(Set.range (fun n => (physHermite n : ℝ → ℝ))) := by
by_cases hP' : P' = 0 pos P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':P' = 0⊢ (fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ (fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
· pos P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':P' = 0⊢ (fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) simp [hP', ← Pi.zero_def] All goals completed! 🐙neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
· neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ (fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) exact polynomial_mem_physHermite_span_induction P' P'.natDegree rflneg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P') ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
simp only [P'] at hP'mem neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
have hl : (fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P -
P.coeff (n + 1) • physHermite (n + 1)))
= (2 ^ (n + 1) : ℝ) • (fun (x : ℝ) => (aeval x) P) - ↑(P.coeff (n + 1) : ℝ) •
(fun (x : ℝ)=> (aeval x) (physHermite (n + 1))) := by
funext x P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))x:ℝ⊢ (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)) =
((2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) x neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
simp [coeff_physHermite_self_succ, map_ofNat]neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
rw [hl, neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:((2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(2 ^ (n + 1) • fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg.hy P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:((2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) Submodule.sub_mem_iff_left neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(2 ^ (n + 1) • fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg.hy P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:((2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(2 ^ (n + 1) • fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg.hy P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:((2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))] at hP'memneg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(2 ^ (n + 1) • fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg.hy P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:((2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))
· neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(2 ^ (n + 1) • fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) rwa [Submodule.smul_mem_iff neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg.s0 P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(2 ^ (n + 1) • fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ 2 ^ (n + 1) ≠ 0] neg P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))neg.s0 P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:(2 ^ (n + 1) • fun x => (aeval x) P) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ 2 ^ (n + 1) ≠ 0 at hP'mem
simp All goals completed! 🐙
· neg.hy P:ℤ[X]n:ℕh:P.natDegree = n + 1hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP'mem:((2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hl:(fun x => (aeval x) ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1))) =
(2 ^ (n + 1) • fun x => (aeval x) P) - ↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))⊢ (↑(P.coeff (n + 1)) • fun x => (aeval x) (physHermite (n + 1))) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) exact Submodule.smul_mem _ _ (Submodule.subset_span ⟨n + 1, rfl⟩) All goals completed! 🐙
decreasing_by
rw [Polynomial.natDegree_lt_iff_degree_lt P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)).degree < ↑n.succP:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1) ≠ 0 P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)).degree < ↑n.succP:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1) ≠ 0] P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)).degree < ↑n.succP:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1) ≠ 0
· P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)).degree < ↑n.succ apply (Polynomial.degree_lt_iff_coeff_zero _ _).mpr P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ ∀ (m : ℕ), n.succ ≤ m → ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)).coeff m = 0
intro m hm' P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n.succ ≤ m⊢ ((physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)).coeff m = 0
simp only [coeff_physHermite_self_succ, coeff_sub] P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n.succ ≤ m⊢ (2 ^ (n + 1) • P).coeff m - (P.coeff (n + 1) • physHermite (n + 1)).coeff m = 0
change n + 1 ≤ m at hm' P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ m⊢ (2 ^ (n + 1) • P).coeff m - (P.coeff (n + 1) • physHermite (n + 1)).coeff m = 0
rw [coeff_smul, P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ m⊢ 2 ^ (n + 1) • P.coeff m - (P.coeff (n + 1) • physHermite (n + 1)).coeff m = 0 P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ m⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0 coeff_smul P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ m⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0 P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ m⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0] P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ m⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0
by_cases hm : m = n + 1 pos P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:m = n + 1⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0neg P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0
· pos P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:m = n + 1⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0 subst hm pos P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0hm':n + 1 ≤ n + 1⊢ 2 ^ (n + 1) • P.coeff (n + 1) - P.coeff (n + 1) • (physHermite (n + 1)).coeff (n + 1) = 0
simp only [smul_eq_mul, coeff_physHermite_self_succ] pos P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0hm':n + 1 ≤ n + 1⊢ 2 ^ (n + 1) * P.coeff (n + 1) - P.coeff (n + 1) * 2 ^ (n + 1) = 0
ring All goals completed! 🐙
· neg P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ 2 ^ (n + 1) • P.coeff m - P.coeff (n + 1) • (physHermite (n + 1)).coeff m = 0 rw [coeff_eq_zero_of_natDegree_lt (by P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ P.natDegree < m neg P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ 2 ^ (n + 1) • 0 - P.coeff (n + 1) • 0 = 0 omega All goals completed! 🐙neg P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ 2 ^ (n + 1) • 0 - P.coeff (n + 1) • 0 = 0), coeff_physHermite_of_lt (by P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ n + 1 < mneg P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ 2 ^ (n + 1) • 0 - P.coeff (n + 1) • 0 = 0 omega All goals completed! 🐙neg P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ 2 ^ (n + 1) • 0 - P.coeff (n + 1) • 0 = 0)]neg P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0m:ℕhm':n + 1 ≤ mhm:¬m = n + 1⊢ 2 ^ (n + 1) • 0 - P.coeff (n + 1) • 0 = 0
simp All goals completed! 🐙
· P:ℤ[X]n✝¹:(x : ℕ) ×' P.natDegree = xa✝¹:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y ⟨P, n✝¹⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n✝:ℕhn:P.natDegree = n✝a✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n✝, hn⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))n:ℕh:P.natDegree = n + 1x✝:∀ (y : (P : ℤ[X]) ×' (n : ℕ) ×' P.natDegree = n),
InvImage (fun x1 x2 => x1 < x2) (fun x => PSigma.casesOn x fun P n => PSigma.casesOn n fun n hn => n) y
⟨P, ⟨n.succ, h⟩⟩ →
(fun x => (aeval x) y.1) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))hP0:¬P = 0P':ℤ[X] := (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1)hP':¬P' = 0⊢ (physHermite (n + 1)).coeff (n + 1) • P - P.coeff (n + 1) • physHermite (n + 1) ≠ 0 exact hP' All goals completed! 🐙lemma polynomial_mem_physHermite_span (P : Polynomial ℤ) :
(P : ℝ → ℝ) ∈ Submodule.span ℝ (Set.range (fun n => (physHermite n : ℝ → ℝ))) :=
polynomial_mem_physHermite_span_induction P P.natDegree rfl
lemma cos_mem_physHermite_span_topologicalClosure (c : ℝ) :
(fun (x : ℝ) => Real.cos (c * x)) ∈
(Submodule.span ℝ (Set.range (fun n => (physHermite n : ℝ → ℝ)))).topologicalClosure := by c:ℝ⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
have h1 : Filter.Tendsto
(fun s => fun y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ((2 * x)! : ℝ))
Filter.atTop (nhds (fun x => Real.cos (c * x))) :=
tendsto_pi_nhds.mpr fun x => Real.hasSum_cos (c * x) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
have h2 (z : Finset ℕ) : (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
↑(Submodule.span ℝ (Set.range (fun n => (physHermite n : ℝ → ℝ)))) := by
have h0 : (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, (((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun (y : ℝ) => (y) ^ (2 * x)) := by c:ℝ⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
funext y c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕy:ℝ⊢ ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)! =
(∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)) y c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
simp only [Finset.sum_apply, Pi.smul_apply, smul_eq_mul] c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕy:ℝ⊢ ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)! = ∑ x ∈ z, (-1) ^ x * c ^ (2 * x) / ↑(2 * x)! * y ^ (2 * x) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
exact Finset.sum_congr rfl fun i _ => by c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕy:ℝi:ℕx✝:i ∈ z⊢ (-1) ^ i * (c * y) ^ (2 * i) / ↑(2 * i)! = (-1) ^ i * c ^ (2 * i) / ↑(2 * i)! * y ^ (2 * i) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure ring c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
rw [h0 c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure] c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)⊢ (∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
refine Submodule.sum_mem _ fun l _ => Submodule.smul_mem _ _ ?_ c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)l:ℕx✝:l ∈ z⊢ (fun y => y ^ (2 * l)) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
have hy : (fun (y : ℝ) => y ^ (2 * l)) = fun y => ((X ^ (2 * l) : Polynomial ℤ)).aeval y :=
funext fun y => by c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)l:ℕx✝:l ∈ zy:ℝ⊢ y ^ (2 * l) = (aeval y) (X ^ (2 * l)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)l:ℕx✝:l ∈ zhy:(fun y => y ^ (2 * l)) = fun y => (aeval y) (X ^ (2 * l))⊢ (fun y => y ^ (2 * l)) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure simp c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)l:ℕx✝:l ∈ zhy:(fun y => y ^ (2 * l)) = fun y => (aeval y) (X ^ (2 * l))⊢ (fun y => y ^ (2 * l)) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))z:Finset ℕh0:(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) =
∑ x ∈ z, ((-1) ^ x * c ^ (2 * x) / ↑(2 * x)!) • fun y => y ^ (2 * x)l:ℕx✝:l ∈ zhy:(fun y => y ^ (2 * l)) = fun y => (aeval y) (X ^ (2 * l))⊢ (fun y => y ^ (2 * l)) ∈ Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n)) c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
exact hy ▸ polynomial_mem_physHermite_span _ c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure c:ℝh1:Filter.Tendsto (fun s y => ∑ x ∈ s, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) Filter.atTop
(nhds fun x => Real.cos (c * x))h2:∀ (z : Finset ℕ),
(fun y => ∑ x ∈ z, (-1) ^ x * (c * y) ^ (2 * x) / ↑(2 * x)!) ∈
Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))⊢ (fun x => Real.cos (c * x)) ∈ (Submodule.span ℝ (Set.range fun n x => (aeval x) (physHermite n))).topologicalClosure
exact mem_closure_of_tendsto h1 (Filter.Eventually.of_forall h2) All goals completed! 🐙