Imports
/- Copyright (c) 2025 Afiq Hatta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Afiq Hatta -/ module public import Mathlib.Topology.Algebra.Polynomial public import Mathlib.Analysis.Calculus.Deriv.Polynomial public import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp public import Mathlib.Analysis.Distribution.TemperateGrowth

Properties of Tanh

We want to prove that the reflectionless potential is a Schwartz map. This means proving that pointwise multiplication of a Schwartz map with tanh is a Schwartz map. This means we need to prove that all derivatives of tanh are bounded and continuous, so that the nth derivative of a function multiplied by tanh decays faster than any polynomial.

TODO

    Add these to mathlib eventually

    Fill in the proofs for the properties of tanh

@[expose] public section

The derivative of tanh(x) is 1 - tanh(x)^2

h:deriv (sinh / cosh) = fun x => 1 - tanh x ^ 2h':tanh = sinh / cosh⊢ deriv tanh = fun x => 1 - tanh x ^ 2 h:deriv (sinh / cosh) = fun x => 1 - tanh x ^ 2h':tanh = sinh / cosh⊢ deriv (sinh / cosh) = fun x => 1 - tanh x ^ 2 All goals completed! 🐙

Tanh(x) is n times continuously differentiable for all n

n:ℕhdiv:ContDiff ℝ ↑n fun x => sinh x / cosh x⊢ ContDiff ℝ (↑n) tanh n:ℕhdiv:ContDiff ℝ ↑n fun x => sinh x / cosh x| ContDiff ℝ (↑n) tanh n:ℕhdiv:ContDiff ℝ ↑n fun x => sinh x / cosh xx:ℝ| tanh x n:ℕhdiv:ContDiff ℝ ↑n fun x => sinh x / cosh xx:ℝ| sinh x / cosh x All goals completed! 🐙

The nth derivative of Tanh(x) is a polynomial of Tanh(x)

n:ℕP:Polynomial ℝh'✝:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝh':tanh = sinh / cosh⊢ DifferentiableAt ℝ (sinh / cosh) x n:ℕP:Polynomial ℝh'✝:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝh':tanh = sinh / cosh⊢ DifferentiableAt ℝ sinh xn:ℕP:Polynomial ℝh'✝:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝh':tanh = sinh / cosh⊢ DifferentiableAt ℝ cosh xn:ℕP:Polynomial ℝh'✝:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝh':tanh = sinh / cosh⊢ cosh x ≠ 0 n:ℕP:Polynomial ℝh'✝:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝh':tanh = sinh / cosh⊢ DifferentiableAt ℝ sinh x All goals completed! 🐙 n:ℕP:Polynomial ℝh'✝:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝh':tanh = sinh / cosh⊢ DifferentiableAt ℝ cosh x All goals completed! 🐙 n:ℕP:Polynomial ℝh'✝:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝh':tanh = sinh / cosh⊢ cosh x ≠ 0 All goals completed! 🐙 case h.hh₂ n:ℕP:Polynomial ℝh':∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) Ph'':iteratedDeriv n tanh = fun x => Polynomial.eval (tanh x) Ph_comp:(fun x => Polynomial.eval (tanh x) P) = (fun t => Polynomial.eval t P) ∘ tanhx:ℝ⊢ DifferentiableAt ℝ (fun t => Polynomial.eval t P) (tanh x) All goals completed! 🐙

For a polynomial P, show it's bounded on any bounded interval

lemma polynomial_bounded_on_interval (P : Polynomial ℝ) (a b : ℝ) : ∃ M : ℝ, ∀ x : ℝ, x ∈ Set.Icc a b → |P.eval x| ≤ M := P:Polynomial ℝa:ℝb:ℝ⊢ ∃ M, ∀ x ∈ Set.Icc a b, |Polynomial.eval x P| ≤ M -- Polynomials are continuous P:Polynomial ℝa:ℝb:ℝhcont:Continuous fun x => Polynomial.eval x P⊢ ∃ M, ∀ x ∈ Set.Icc a b, |Polynomial.eval x P| ≤ M -- Closed bounded intervals are compact P:Polynomial ℝa:ℝb:ℝhcont:Continuous fun x => Polynomial.eval x Phcompact:IsCompact (Set.Icc a b)⊢ ∃ M, ∀ x ∈ Set.Icc a b, |Polynomial.eval x P| ≤ M -- Continuous functions on compact sets are bounded P:Polynomial ℝa:ℝb:ℝhcont:Continuous fun x => Polynomial.eval x Phcompact:IsCompact (Set.Icc a b)M:ℝhM:∀ x ∈ Set.Icc a b, ‖Polynomial.eval x P‖ ≤ M⊢ ∃ M, ∀ x ∈ Set.Icc a b, |Polynomial.eval x P| ≤ M P:Polynomial ℝa:ℝb:ℝhcont:Continuous fun x => Polynomial.eval x Phcompact:IsCompact (Set.Icc a b)M:ℝhM:∀ x ∈ Set.Icc a b, ‖Polynomial.eval x P‖ ≤ M⊢ ∀ x ∈ Set.Icc a b, |Polynomial.eval x P| ≤ M All goals completed! 🐙

For a polynomial P, show that P (tanh x) is bounded on the real line

P:Polynomial ℝh_range:∀ (x : ℝ), tanh x ∈ Set.Icc (-1) 1⊢ ∃ C, ∀ (x : ℝ), |Polynomial.eval (tanh x) P| ≤ C -- Apply polynomial boundedness on [-1, 1] P:Polynomial ℝh_range:∀ (x : ℝ), tanh x ∈ Set.Icc (-1) 1M:ℝhM:∀ x ∈ Set.Icc (-1) 1, |Polynomial.eval x P| ≤ M⊢ ∃ C, ∀ (x : ℝ), |Polynomial.eval (tanh x) P| ≤ C P:Polynomial ℝh_range:∀ (x : ℝ), tanh x ∈ Set.Icc (-1) 1M:ℝhM:∀ x ∈ Set.Icc (-1) 1, |Polynomial.eval x P| ≤ M⊢ ∀ (x : ℝ), |Polynomial.eval (tanh x) P| ≤ M P:Polynomial ℝh_range:∀ (x : ℝ), tanh x ∈ Set.Icc (-1) 1M:ℝhM:∀ x ∈ Set.Icc (-1) 1, |Polynomial.eval x P| ≤ Mx:ℝ⊢ |Polynomial.eval (tanh x) P| ≤ M All goals completed! 🐙

The nth derivative of tanh is bounded on the real line

n:ℕP:Polynomial ℝhP:∀ (x : ℝ), iteratedDeriv n tanh x = Polynomial.eval (tanh x) PC:ℝhC:∀ (x : ℝ), |Polynomial.eval (tanh x) P| ≤ Cx:ℝ⊢ |Polynomial.eval (tanh x) P| ≤ C All goals completed! 🐙

tanh is infinitely differentiable

⊢ ∀ (n : ℕ), ContDiff ℝ (↑n) tanh All goals completed! 🐙

tanh has temperate growth

n:ℕC:ℝhC:∀ (x : ℝ), |iteratedDeriv n tanh x| ≤ Cx:ℝh_equiv:‖iteratedFDeriv ℝ n tanh x‖ = |iteratedDeriv n tanh x|⊢ |iteratedDeriv n tanh x| ≤ C * (1 + ‖x‖) ^ 0 n:ℕC:ℝhC:∀ (x : ℝ), |iteratedDeriv n tanh x| ≤ Cx:ℝh_equiv:‖iteratedFDeriv ℝ n tanh x‖ = |iteratedDeriv n tanh x|⊢ |iteratedDeriv n tanh x| ≤ C All goals completed! 🐙

Iterated derivative for scaled tanh is differentiable

n:ℕh:ContDiff ℝ (↑n + 1) tanhh':n < n + 1⊢ ↑n < ↑n + 1 All goals completed! 🐙

Norm of Iterated derivative for scaled tanh is equal to the norm of its Fderiv

All goals completed! 🐙

Iterated derivative for scaled tanh

κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝh''':(deriv fun x => κ * x) = fun x => κ⊢ κ ^ n * (iteratedDeriv (n + 1) tanh (κ * x) * (fun x => κ) x) = κ ^ (n + 1) * iteratedDeriv (n + 1) tanh (κ * x)κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝ⊢ DifferentiableAt ℝ (iteratedDeriv n tanh) (κ * x)κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝ⊢ DifferentiableAt ℝ (fun x => κ * x) x κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝh''':(deriv fun x => κ * x) = fun x => κ⊢ κ ^ n * κ * iteratedDeriv (n + 1) tanh (κ * x) = iteratedDeriv (n + 1) tanh (κ * x) * κ ^ (n + 1)κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝ⊢ DifferentiableAt ℝ (iteratedDeriv n tanh) (κ * x)κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝ⊢ DifferentiableAt ℝ (fun x => κ * x) x κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝ⊢ DifferentiableAt ℝ (iteratedDeriv n tanh) (κ * x)κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝ⊢ DifferentiableAt ℝ (fun x => κ * x) x κ:ℝn:ℕih:∀ (x : ℝ), iteratedDeriv n (fun y => tanh (κ * y)) x = κ ^ n * iteratedDeriv n tanh (κ * x)h':(iteratedDeriv n fun y => tanh (κ * y)) = fun x => κ ^ n * iteratedDeriv n tanh (κ * x)h'':(fun x => iteratedDeriv n tanh (κ * x)) = iteratedDeriv n tanh ∘ fun x => κ * xx:ℝ⊢ DifferentiableAt ℝ (fun x => κ * x) x All goals completed! 🐙

tanh(κx) has temperate growth

κ:ℝn:ℕD:ℝhD:∀ (x : ℝ), |iteratedDeriv n tanh x| ≤ Dx:ℝ⊢ |κ| ^ n * |iteratedDeriv n tanh (κ * x)| ≤ |κ| ^ n * D κ:ℝn:ℕD:ℝhD:∀ (x : ℝ), |iteratedDeriv n tanh x| ≤ Dx:ℝ⊢ |iteratedDeriv n tanh (κ * x)| ≤ Dκ:ℝn:ℕD:ℝhD:∀ (x : ℝ), |iteratedDeriv n tanh x| ≤ Dx:ℝ⊢ 0 ≤ |κ| ^ n κ:ℝn:ℕD:ℝhD:∀ (x : ℝ), |iteratedDeriv n tanh x| ≤ Dx:ℝ⊢ 0 ≤ |κ| ^ n All goals completed! 🐙