math / data /lean /OAI /MathematicalPhysics /DefocusingNLS /Profile /ProfileStateInterpretation.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.72 kB
import OAI.MathematicalPhysics.DefocusingNLS.Profile.ProfileTaylorStep
namespace OAI
/-! Interpretation of every field in the exact profile-certificate recurrence. -/
open Matrix
namespace DefocusingNLS.ProfileCertificate
@[simp] theorem complexMatrix_add (A B : QMatrix) :
complexMatrix (Matrix2.add A B) = complexMatrix A+complexMatrix B := by
ext i j
simp only [complexMatrix, Matrix2.toMatrix_add, Matrix.map_apply, Matrix.add_apply, map_add]
@[simp] theorem rationalMatrix_add (E F : RMatrix) :
rationalMatrix (Matrix2.add E F) = rationalMatrix E+rationalMatrix F := by
ext i j
simp only [rationalMatrix, Matrix2.toMatrix_add, Matrix.map_apply, Matrix.add_apply, map_add]
@[simp] theorem rationalMatrix_mul (E F : RMatrix) :
rationalMatrix (Matrix2.mul E F) = rationalMatrix E*rationalMatrix F := by
simp only [rationalMatrix, Matrix2.toMatrix_mul, Matrix.map_mul]
@[simp] theorem rationalMatrix_scale (r : β„š) (E : RMatrix) :
rationalMatrix (Matrix2.scale r E) = (r : ℝ) β€’ rationalMatrix E := by
simp only [rationalMatrix, Matrix2.toMatrix_scale]
exact Matrix.map_smul' _ _ _ (Rat.castHom ℝ).map_mul
@[simp] theorem complexMatrix_scale_real (r : β„š) (A : QMatrix) :
complexMatrix (Matrix2.scale (⟨r,0⟩ : RationalComplex) A) = (r : ℝ) β€’ complexMatrix A := by
rw [complexMatrix_scale]
have he : RationalComplex.toComplex (⟨r,0⟩ : RationalComplex) = ((r : ℝ) : β„‚) := by
apply Complex.ext <;> simp [RationalComplex.toComplex]
rw [he]
ext i j
exact (Complex.real_smul).symm
theorem state_value_step (n : β„•) (s : State) :
complexMatrix (step n s).value = ((n : ℝ)+1)⁻¹ β€’
(complexMatrix (factor n)*complexMatrix s.value) := by
simp only [step, complexMatrix_scale_real, complexMatrix_mul]
simp only [Rat.cast_inv, Rat.cast_add, Rat.cast_natCast, Rat.cast_one]
theorem state_derivB_step (n : β„•) (s : State) :
complexMatrix (step n s).derivB = ((n : ℝ)+1)⁻¹ β€’
(complexMatrix parameterB*complexMatrix s.value+
complexMatrix (factor n)*complexMatrix s.derivB) := by
simp only [step, complexMatrix_scale_real, complexMatrix_add, complexMatrix_mul]
simp only [Rat.cast_inv, Rat.cast_add, Rat.cast_natCast, Rat.cast_one]
theorem state_derivZ_step (n : β„•) (s : State) :
complexMatrix (step n s).derivZ = ((n : ℝ)+1)⁻¹ β€’
(complexMatrix parameterZ*complexMatrix s.value+
complexMatrix (factor n)*complexMatrix s.derivZ) := by
simp only [step, complexMatrix_scale_real, complexMatrix_add, complexMatrix_mul]
simp only [Rat.cast_inv, Rat.cast_add, Rat.cast_natCast, Rat.cast_one]
theorem state_error_step (n : β„•) (s : State) :
rationalMatrix (step n s).error = ((n : ℝ)+1)⁻¹ β€’
((absoluteMatrix (factor n)+(radius : ℝ) β€’
(absoluteMatrix parameterB+absoluteMatrix parameterZ))*rationalMatrix s.error+
(absoluteMatrix parameterB+absoluteMatrix parameterZ)*
(absoluteMatrix s.derivB+absoluteMatrix s.derivZ)) := by
simp only [step, rationalMatrix_scale, rationalMatrix_add, rationalMatrix_mul,
majorant, absoluteMatrix]
simp only [Rat.cast_inv, Rat.cast_add, Rat.cast_natCast, Rat.cast_one]
theorem profileFactor_affine (n : β„•) (b z : ℝ) :
profileFactor ((centerB : ℝ)+b) ((centerZ : ℝ)+z) n = ((n : ℝ)+1)⁻¹ β€’
(complexMatrix (factor n)+b β€’ complexMatrix parameterB+z β€’ complexMatrix parameterZ) := by
ext i j
fin_cases i <;> fin_cases j <;>
simp [profileFactor, complexMatrix, factor, parameterB, parameterZ,
Matrix2.toMatrix, backwardMatrix, RationalComplex.toComplex, Complex.real_smul,
Complex.ext_iff] <;> ring
end DefocusingNLS.ProfileCertificate
end OAI