math / data /lean /OAI /Probability /ClassicalON /ComplexWard.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
23.3 kB
import OAI.Probability.ClassicalON.MixedWard
namespace OAI
universe uA uE uK uL uV uΞ©
noncomputable section
open MeasureTheory
open scoped BigOperators InnerProductSpace
noncomputable section
structure ComplexFourForm (A : Type uA) [AddCommMonoid A] [Module β„‚ A] where
toFun : A β†’ A β†’ A β†’ A β†’ β„‚
add_first : βˆ€ u u' v w z, toFun (u+u') v w z = toFun u v w z + toFun u' v w z
add_second : βˆ€ u v v' w z, toFun u (v+v') w z = toFun u v w z + toFun u v' w z
add_third : βˆ€ u v w w' z, toFun u v (w+w') z = toFun u v w z + toFun u v w' z
add_fourth : βˆ€ u v w z z', toFun u v w (z+z') = toFun u v w z + toFun u v w z'
smul_first : βˆ€ r u v w z, toFun (r β€’ u) v w z = r * toFun u v w z
smul_second : βˆ€ r u v w z, toFun u (r β€’ v) w z = r * toFun u v w z
smul_third : βˆ€ r u v w z, toFun u v (r β€’ w) z = r * toFun u v w z
smul_fourth : βˆ€ r u v w z, toFun u v w (r β€’ z) = r * toFun u v w z
instance {A : Type uA} [AddCommMonoid A] [Module β„‚ A] :
CoeFun (ComplexFourForm A) (fun _ => A β†’ A β†’ A β†’ A β†’ β„‚) := ⟨ComplexFourForm.toFun⟩
theorem complex_linear_zero_of_real {V : Type uV} (P : V β†’ Prop)
(L : (V β†’ β„‚) β†’ β„‚)
(ha : βˆ€ u v, L (u+v) = L u + L v)
(hs : βˆ€ r u, L (r β€’ u) = r * L u)
(hr : βˆ€ u : V β†’ ℝ, (βˆ€ x, P x β†’ u x = 0) β†’ L (fun x => (u x : β„‚)) = 0)
(u : V β†’ β„‚) (hu : βˆ€ x, P x β†’ u x = 0) : L u = 0 := by
have hre : βˆ€ x, P x β†’ (u x).re = 0 := by
intro x hx
rw [hu x hx, Complex.zero_re]
have him : βˆ€ x, P x β†’ (u x).im = 0 := by
intro x hx
rw [hu x hx, Complex.zero_im]
have hd : u = (fun x => ((u x).re : β„‚)) + Complex.I β€’ (fun x => ((u x).im : β„‚)) := by
ext x
simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul]
rw [mul_comm]
exact (Complex.re_add_im (u x)).symm
rw [hd, ha, hs, hr _ hre, hr _ him]
simp only [mul_zero, add_zero]
theorem ComplexFourForm.zero_of_real {V : Type uV} (F : ComplexFourForm (V β†’ β„‚))
(P : V β†’ Prop)
(hr : βˆ€ u v w z : V β†’ ℝ,
(βˆ€ x, P x β†’ u x = 0) β†’ (βˆ€ x, P x β†’ v x = 0) β†’
(βˆ€ x, P x β†’ w x = 0) β†’ (βˆ€ x, P x β†’ z x = 0) β†’
F (fun x => (u x : β„‚)) (fun x => (v x : β„‚))
(fun x => (w x : β„‚)) (fun x => (z x : β„‚)) = 0)
(u v w z : V β†’ β„‚)
(hu : βˆ€ x, P x β†’ u x = 0) (hv : βˆ€ x, P x β†’ v x = 0)
(hw : βˆ€ x, P x β†’ w x = 0) (hz : βˆ€ x, P x β†’ z x = 0) :
F u v w z = 0 := by
apply complex_linear_zero_of_real P (fun u => F u v w z)
(fun u u' => F.add_first u u' v w z) (fun r u => F.smul_first r u v w z) ?_ u hu
intro a ha
apply complex_linear_zero_of_real P (fun v => F (fun x => (a x : β„‚)) v w z)
(fun v v' => F.add_second (fun x => (a x : β„‚)) v v' w z)
(fun r v => F.smul_second r (fun x => (a x : β„‚)) v w z) ?_ v hv
intro b hb
apply complex_linear_zero_of_real P
(fun w => F (fun x => (a x : β„‚)) (fun x => (b x : β„‚)) w z)
(fun w w' => F.add_third (fun x => (a x : β„‚)) (fun x => (b x : β„‚)) w w' z)
(fun r w => F.smul_third r (fun x => (a x : β„‚)) (fun x => (b x : β„‚)) w z) ?_ w hw
intro c hc
apply complex_linear_zero_of_real P
(fun z => F (fun x => (a x : β„‚)) (fun x => (b x : β„‚)) (fun x => (c x : β„‚)) z)
(fun z z' => F.add_fourth (fun x => (a x : β„‚)) (fun x => (b x : β„‚)) (fun x => (c x : β„‚)) z z')
(fun r z => F.smul_fourth r (fun x => (a x : β„‚)) (fun x => (b x : β„‚)) (fun x => (c x : β„‚)) z)
?_ z hz
intro d hd
exact hr a b c d ha hb hc hd
namespace MixedAlgebra
variable {E : Type uE} {K : Type uK} {L : Type uL} [Fintype E] [CommRing K] [CommRing L]
def Coeffs.map (Ο† : K β†’+* L) (J : Coeffs E K) : Coeffs E L where
a := Ο† ∘ J.a
b := Ο† ∘ J.b
aa := Ο† ∘ J.aa
ab := Ο† ∘ J.ab
bb := Ο† ∘ J.bb
aab := Ο† ∘ J.aab
abb := Ο† ∘ J.abb
aabb := Ο† ∘ J.aabb
theorem weighted_map (Ο† : K β†’+* L) (J u : E β†’ K) :
weighted (Ο† ∘ J) (Ο† ∘ u) = Ο† (weighted J u) := by
simp [weighted]
theorem four_map (Ο† : K β†’+* L) (J : Coeffs E K) (u v w z : E β†’ K) :
four (J.map Ο†) (Ο† ∘ u) (Ο† ∘ v) (Ο† ∘ w) (Ο† ∘ z) = Ο† (four J u v w z) := by
simp only [four, Coeffs.map, weighted, Function.comp_apply, Pi.mul_apply,
map_add, map_mul, map_sum]
theorem weighted_smul (J u : E β†’ K) (r : K) :
weighted J (r β€’ u) = r * weighted J u := by
exact weighted_const_mul J u r
theorem four_smul_first (J : Coeffs E K) (u v w z : E β†’ K) (r : K) :
four J (r β€’ u) v w z = r * four J u v w z := by
simp only [four, smul_mul_assoc, weighted_smul]
ring
theorem four_smul_second (J : Coeffs E K) (u v w z : E β†’ K) (r : K) :
four J u (r β€’ v) w z = r * four J u v w z := by
simp only [four, mul_smul_comm, smul_mul_assoc, weighted_smul]
ring
theorem four_smul_third (J : Coeffs E K) (u v w z : E β†’ K) (r : K) :
four J u v (r β€’ w) z = r * four J u v w z := by
rw [four_swap_first_third, four_smul_first, four_swap_first_third J w]
theorem four_smul_fourth (J : Coeffs E K) (u v w z : E β†’ K) (r : K) :
four J u v w (r β€’ z) = r * four J u v w z := by
rw [four_swap_second_fourth, four_smul_second, four_swap_second_fourth J u z]
end MixedAlgebra
namespace ClassicalON.SpinSystem
variable {n : β„•} {V : Type uV} {E : Type uE} [Fintype V] [Fintype E]
theorem integrable_complex_integrand [NeZero n] (S : SpinSystem n V E)
{f : (V β†’ Spin n) β†’ β„‚} (hf : Continuous f) :
Integrable (fun Οƒ => f Οƒ * (Real.exp (S.energy (fun _ => 1) Οƒ) : β„‚)) S.reference :=
(hf.mul (Complex.continuous_ofReal.comp (S.continuous_energy _).rexp)).integrable_of_hasCompactSupport
(HasCompactSupport.of_compactSpace _)
def averageComplexLinear [NeZero n] (S : SpinSystem n V E) : C((V β†’ Spin n), β„‚) β†’β‚—[β„‚] β„‚ where
toFun f := (∫ Οƒ, f Οƒ * (Real.exp (S.energy (fun _ => 1) Οƒ) : β„‚) βˆ‚S.reference) /
(S.Z (fun _ => 1) : β„‚)
map_add' f g := by
simp only [ContinuousMap.add_apply, add_mul]
rw [integral_add (S.integrable_complex_integrand f.continuous)
(S.integrable_complex_integrand g.continuous), add_div]
map_smul' c f := by
simp only [ContinuousMap.smul_apply, smul_eq_mul, mul_assoc,
integral_const_mul, RingHom.id_apply, mul_div_assoc]
def ofRealObservable {Ξ© : Type uΞ©} [TopologicalSpace Ξ©] (f : C(Ξ©, ℝ)) : C(Ξ©, β„‚) :=
⟨fun Οƒ => (f Οƒ : β„‚), Complex.continuous_ofReal.comp f.continuous⟩
@[simp] theorem averageComplex_ofReal [NeZero n] (S : SpinSystem n V E)
(f : C((V β†’ Spin n), ℝ)) :
S.averageComplexLinear (ofRealObservable f) = (S.averageLinear f : β„‚) := by
change (∫ Οƒ, (f Οƒ : β„‚) * (Real.exp (S.energy (fun _ => 1) Οƒ) : β„‚) βˆ‚S.reference) /
(S.Z (fun _ => 1) : β„‚) = _
simp only [← Complex.ofReal_mul, integral_complex_ofReal, ← Complex.ofReal_div]
rfl
def complexCoefficients (S : SpinSystem 3 V E) (Οƒ : V β†’ Spin 3) : MixedAlgebra.Coeffs E β„‚ :=
(S.mixedCoefficients Οƒ).map Complex.ofRealHom
omit [Fintype V] in
@[fun_prop] theorem continuous_complexWeighted (S : SpinSystem n V E)
(M : SpinOperator n) (u : E β†’ β„‚) :
Continuous (fun Οƒ => MixedAlgebra.weighted
(fun e => (S.localCoefficient M Οƒ e : β„‚)) u) := by
unfold MixedAlgebra.weighted localCoefficient
fun_prop
omit [Fintype V] in
@[fun_prop] theorem continuous_complexMixedPolynomial (S : SpinSystem 3 V E)
(u v w z : E β†’ β„‚) :
Continuous (fun Οƒ => MixedAlgebra.four (S.complexCoefficients Οƒ) u v w z) := by
simp only [MixedAlgebra.four, complexCoefficients, MixedAlgebra.Coeffs.map,
mixedCoefficients, Function.comp_def, Complex.ofRealHom_eq_coe]
fun_prop
def complexMixedObservable (S : SpinSystem 3 V E) (u v w z : E β†’ β„‚) : C((V β†’ Spin 3), β„‚) :=
⟨_, S.continuous_complexMixedPolynomial u v w z⟩
def complexMixedResponse (S : SpinSystem 3 V E) (u v w z : E β†’ β„‚) : β„‚ :=
S.averageComplexLinear (S.complexMixedObservable u v w z)
theorem complexMixedResponse_ofReal (S : SpinSystem 3 V E) (u v w z : E β†’ ℝ) :
S.complexMixedResponse (fun e => (u e : β„‚)) (fun e => (v e : β„‚))
(fun e => (w e : β„‚)) (fun e => (z e : β„‚)) = (S.mixedResponse u v w z : β„‚) := by
have hc : S.complexMixedObservable (fun e => (u e : β„‚)) (fun e => (v e : β„‚))
(fun e => (w e : β„‚)) (fun e => (z e : β„‚)) = ofRealObservable (S.mixedObservable u v w z) := by
ext Οƒ
exact MixedAlgebra.four_map Complex.ofRealHom (S.mixedCoefficients Οƒ) u v w z
unfold complexMixedResponse
rw [hc, S.averageComplex_ofReal]
rfl
theorem complexMixedResponse_add_first (S : SpinSystem 3 V E) (u v w z u' : E β†’ β„‚) :
S.complexMixedResponse (u+u') v w z = S.complexMixedResponse u v w z + S.complexMixedResponse u' v w z := by
have hp : S.complexMixedObservable (u+u') v w z = S.complexMixedObservable u v w z +
S.complexMixedObservable u' v w z := by
ext Οƒ
exact MixedAlgebra.four_add_first (S.complexCoefficients Οƒ) u u' v w z
unfold complexMixedResponse
rw [hp, map_add]
theorem complexMixedResponse_smul_first (S : SpinSystem 3 V E) (u v w z : E β†’ β„‚) (r : β„‚) :
S.complexMixedResponse (r β€’ u) v w z = r * S.complexMixedResponse u v w z := by
have hp : S.complexMixedObservable (r β€’ u) v w z = r β€’ S.complexMixedObservable u v w z := by
ext Οƒ
exact MixedAlgebra.four_smul_first (S.complexCoefficients Οƒ) u v w z r
unfold complexMixedResponse
rw [hp, map_smul, smul_eq_mul]
theorem complexMixedResponse_add_second (S : SpinSystem 3 V E) (u v w z v' : E β†’ β„‚) :
S.complexMixedResponse u (v+v') w z = S.complexMixedResponse u v w z + S.complexMixedResponse u v' w z := by
have hp : S.complexMixedObservable u (v+v') w z = S.complexMixedObservable u v w z +
S.complexMixedObservable u v' w z := by
ext Οƒ
exact MixedAlgebra.four_add_second (S.complexCoefficients Οƒ) u v v' w z
unfold complexMixedResponse
rw [hp, map_add]
theorem complexMixedResponse_smul_second (S : SpinSystem 3 V E) (u v w z : E β†’ β„‚) (r : β„‚) :
S.complexMixedResponse u (r β€’ v) w z = r * S.complexMixedResponse u v w z := by
have hp : S.complexMixedObservable u (r β€’ v) w z = r β€’ S.complexMixedObservable u v w z := by
ext Οƒ
exact MixedAlgebra.four_smul_second (S.complexCoefficients Οƒ) u v w z r
unfold complexMixedResponse
rw [hp, map_smul, smul_eq_mul]
theorem complexMixedResponse_add_third (S : SpinSystem 3 V E) (u v w z w' : E β†’ β„‚) :
S.complexMixedResponse u v (w+w') z = S.complexMixedResponse u v w z + S.complexMixedResponse u v w' z := by
have hp : S.complexMixedObservable u v (w+w') z = S.complexMixedObservable u v w z +
S.complexMixedObservable u v w' z := by
ext Οƒ
exact MixedAlgebra.four_add_third (S.complexCoefficients Οƒ) u v w w' z
unfold complexMixedResponse
rw [hp, map_add]
theorem complexMixedResponse_smul_third (S : SpinSystem 3 V E) (u v w z : E β†’ β„‚) (r : β„‚) :
S.complexMixedResponse u v (r β€’ w) z = r * S.complexMixedResponse u v w z := by
have hp : S.complexMixedObservable u v (r β€’ w) z = r β€’ S.complexMixedObservable u v w z := by
ext Οƒ
exact MixedAlgebra.four_smul_third (S.complexCoefficients Οƒ) u v w z r
unfold complexMixedResponse
rw [hp, map_smul, smul_eq_mul]
theorem complexMixedResponse_add_fourth (S : SpinSystem 3 V E) (u v w z z' : E β†’ β„‚) :
S.complexMixedResponse u v w (z+z') = S.complexMixedResponse u v w z + S.complexMixedResponse u v w z' := by
have hp : S.complexMixedObservable u v w (z+z') = S.complexMixedObservable u v w z +
S.complexMixedObservable u v w z' := by
ext Οƒ
exact MixedAlgebra.four_add_fourth (S.complexCoefficients Οƒ) u v w z z'
unfold complexMixedResponse
rw [hp, map_add]
theorem complexMixedResponse_smul_fourth (S : SpinSystem 3 V E) (u v w z : E β†’ β„‚) (r : β„‚) :
S.complexMixedResponse u v w (r β€’ z) = r * S.complexMixedResponse u v w z := by
have hp : S.complexMixedObservable u v w (r β€’ z) = r β€’ S.complexMixedObservable u v w z := by
ext Οƒ
exact MixedAlgebra.four_smul_fourth (S.complexCoefficients Οƒ) u v w z r
unfold complexMixedResponse
rw [hp, map_smul, smul_eq_mul]
def complexEnergy (S : SpinSystem n V E) (M : SpinOperator n) (u : E β†’ β„‚)
(Οƒ : V β†’ Spin n) : β„‚ := MixedAlgebra.weighted
(fun e => (S.localCoefficient M Οƒ e : β„‚)) u
omit [Fintype V] in
@[fun_prop] theorem continuous_complexEnergy (S : SpinSystem n V E)
(M : SpinOperator n) (u : E β†’ β„‚) : Continuous (S.complexEnergy M u) :=
S.continuous_complexWeighted M u
omit [Fintype V] in
theorem complexEnergy_ofReal (S : SpinSystem n V E) (M : SpinOperator n)
(u : E β†’ ℝ) (Οƒ : V β†’ Spin n) :
S.complexEnergy M (fun e => (u e : β„‚)) Οƒ =
(S.energy (fun e => u e β€’ M) Οƒ : β„‚) := by
rw [S.energy_weighted]
exact MixedAlgebra.weighted_map Complex.ofRealHom (S.localCoefficient M Οƒ) u
omit [Fintype V] in
@[simp] theorem complexEnergy_add (S : SpinSystem n V E) (M : SpinOperator n)
(u v : E β†’ β„‚) (Οƒ : V β†’ Spin n) :
S.complexEnergy M (u+v) Οƒ = S.complexEnergy M u Οƒ + S.complexEnergy M v Οƒ :=
MixedAlgebra.weighted_add _ u v
omit [Fintype V] in
@[simp] theorem complexEnergy_smul (S : SpinSystem n V E) (M : SpinOperator n)
(u : E β†’ β„‚) (r : β„‚) (Οƒ : V β†’ Spin n) :
S.complexEnergy M (r β€’ u) Οƒ = r * S.complexEnergy M u Οƒ :=
MixedAlgebra.weighted_smul _ u r
omit [Fintype V] in
@[fun_prop] theorem continuous_complexSecondPolynomial (S : SpinSystem 3 V E)
(u v : E β†’ β„‚) : Continuous (fun Οƒ => S.complexEnergy (axisC^2) (u*v) Οƒ +
S.complexEnergy axisC u Οƒ * S.complexEnergy axisC v Οƒ) := by
fun_prop
def complexSecondObservable (S : SpinSystem 3 V E) (u v : E β†’ β„‚) : C((V β†’ Spin 3), β„‚) :=
⟨_, S.continuous_complexSecondPolynomial u v⟩
def complexSecondResponse (S : SpinSystem 3 V E) (u v : E β†’ β„‚) : β„‚ :=
S.averageComplexLinear (S.complexSecondObservable u v)
theorem complexSecondResponse_ofReal (S : SpinSystem 3 V E) (u v : E β†’ ℝ) :
S.complexSecondResponse (fun e => (u e : β„‚)) (fun e => (v e : β„‚)) =
(S.secondAxisResponse u v : β„‚) := by
have hp : S.complexSecondObservable (fun e => (u e : β„‚)) (fun e => (v e : β„‚)) =
ofRealObservable (S.secondObservable u v) := by
ext Οƒ
change S.complexEnergy (axisC^2) ((fun e => (u e : β„‚)) * (fun e => (v e : β„‚))) Οƒ +
S.complexEnergy axisC (fun e => (u e : β„‚)) Οƒ *
S.complexEnergy axisC (fun e => (v e : β„‚)) Οƒ = _
rw [show ((fun e => (u e : β„‚)) * (fun e => (v e : β„‚))) =
(fun e => ((u e*v e : ℝ) : β„‚)) from by ext; simp]
simp only [complexEnergy_ofReal, ← Complex.ofReal_add, ← Complex.ofReal_mul]
rfl
unfold complexSecondResponse
rw [hp, S.averageComplex_ofReal, S.secondObservable_average]
theorem complexSecondResponse_add_left (S : SpinSystem 3 V E) (u v w : E β†’ β„‚) :
S.complexSecondResponse (u+v) w = S.complexSecondResponse u w + S.complexSecondResponse v w := by
have hp : S.complexSecondObservable (u+v) w =
S.complexSecondObservable u w + S.complexSecondObservable v w := by
ext Οƒ
change S.complexEnergy (axisC^2) ((u+v)*w) Οƒ +
S.complexEnergy axisC (u+v) Οƒ * S.complexEnergy axisC w Οƒ =
(S.complexEnergy (axisC^2) (u*w) Οƒ +
S.complexEnergy axisC u Οƒ * S.complexEnergy axisC w Οƒ) +
(S.complexEnergy (axisC^2) (v*w) Οƒ +
S.complexEnergy axisC v Οƒ * S.complexEnergy axisC w Οƒ)
rw [add_mul, complexEnergy_add, complexEnergy_add]
ring
unfold complexSecondResponse
rw [hp, map_add]
theorem complexSecondResponse_symm (S : SpinSystem 3 V E) (u v : E β†’ β„‚) :
S.complexSecondResponse u v = S.complexSecondResponse v u := by
have hp : S.complexSecondObservable u v = S.complexSecondObservable v u := by
ext Οƒ
change S.complexEnergy (axisC^2) (u*v) Οƒ +
S.complexEnergy axisC u Οƒ * S.complexEnergy axisC v Οƒ =
S.complexEnergy (axisC^2) (v*u) Οƒ +
S.complexEnergy axisC v Οƒ * S.complexEnergy axisC u Οƒ
rw [mul_comm u v, mul_comm (S.complexEnergy axisC u Οƒ)]
exact congrArg S.averageComplexLinear hp
theorem complexSecondResponse_add_right (S : SpinSystem 3 V E) (u v w : E β†’ β„‚) :
S.complexSecondResponse u (v+w) = S.complexSecondResponse u v + S.complexSecondResponse u w := by
rw [S.complexSecondResponse_symm, S.complexSecondResponse_add_left,
S.complexSecondResponse_symm v, S.complexSecondResponse_symm w]
theorem complexSecondResponse_smul_left (S : SpinSystem 3 V E) (u v : E β†’ β„‚) (r : β„‚) :
S.complexSecondResponse (r β€’ u) v = r * S.complexSecondResponse u v := by
have hp : S.complexSecondObservable (r β€’ u) v = r β€’ S.complexSecondObservable u v := by
ext Οƒ
change S.complexEnergy (axisC^2) ((r β€’ u)*v) Οƒ +
S.complexEnergy axisC (r β€’ u) Οƒ * S.complexEnergy axisC v Οƒ =
r * (S.complexEnergy (axisC^2) (u*v) Οƒ +
S.complexEnergy axisC u Οƒ * S.complexEnergy axisC v Οƒ)
rw [smul_mul_assoc, complexEnergy_smul, complexEnergy_smul]
ring
unfold complexSecondResponse
rw [hp, map_smul, smul_eq_mul]
theorem complexSecondResponse_smul_right (S : SpinSystem 3 V E) (u v : E β†’ β„‚) (r : β„‚) :
S.complexSecondResponse u (r β€’ v) = r * S.complexSecondResponse u v := by
rw [S.complexSecondResponse_symm, S.complexSecondResponse_smul_left,
S.complexSecondResponse_symm v]
omit [Fintype V] [Fintype E] in
def complexCross (S : SpinSystem 3 V E) (f g : V β†’ β„‚) : E β†’ β„‚ :=
fun e => f (S.left e)*g (S.right e) - g (S.left e)*f (S.right e)
omit [Fintype V] [Fintype E] in
theorem complexCross_ofReal (S : SpinSystem 3 V E) (f g : V β†’ ℝ) :
S.complexCross (fun x => (f x : β„‚)) (fun x => (g x : β„‚)) =
fun e => (S.crossForm f g e : β„‚) := by
ext e
simp [complexCross, crossForm]
omit [Fintype V] [Fintype E] in
theorem differential_ofReal (S : SpinSystem n V E) (f : V β†’ ℝ) :
S.differential (fun x => (f x : β„‚)) = fun e => (S.differential (K := ℝ) f e : β„‚) := by
ext e
simp [differential]
omit [Fintype V] [Fintype E] in
theorem complexCross_add_left (S : SpinSystem 3 V E) (f g h : V β†’ β„‚) :
S.complexCross (f+h) g = S.complexCross f g + S.complexCross h g := by
ext e
simp only [complexCross, Pi.add_apply]
ring
omit [Fintype V] [Fintype E] in
theorem complexCross_smul_left (S : SpinSystem 3 V E) (f g : V β†’ β„‚) (r : β„‚) :
S.complexCross (r β€’ f) g = r β€’ S.complexCross f g := by
ext e
simp only [complexCross, Pi.smul_apply, smul_eq_mul]
ring
omit [Fintype V] [Fintype E] in
theorem complexCross_add_right (S : SpinSystem 3 V E) (f g h : V β†’ β„‚) :
S.complexCross f (g+h) = S.complexCross f g + S.complexCross f h := by
ext e
simp only [complexCross, Pi.add_apply]
ring
omit [Fintype V] [Fintype E] in
theorem complexCross_smul_right (S : SpinSystem 3 V E) (f g : V β†’ β„‚) (r : β„‚) :
S.complexCross f (r β€’ g) = r β€’ S.complexCross f g := by
ext e
simp only [complexCross, Pi.smul_apply, smul_eq_mul]
ring
omit [Fintype V] [Fintype E] in
theorem complexDifferential_add (S : SpinSystem n V E) (f g : V β†’ β„‚) :
S.differential (f+g) = S.differential f + S.differential g := by
ext e
simp only [differential, Pi.add_apply]
ring
omit [Fintype V] [Fintype E] in
theorem complexDifferential_smul (S : SpinSystem n V E) (f : V β†’ β„‚) (r : β„‚) :
S.differential (r β€’ f) = r β€’ S.differential f := by
ext e
simp only [differential, Pi.smul_apply, smul_eq_mul]
ring
def complexWardDefect (S : SpinSystem 3 V E) : ComplexFourForm (V β†’ β„‚) where
toFun f g h k := 4 * S.complexMixedResponse (S.differential f) (S.differential g)
(S.differential h) (S.differential k) -
(S.complexSecondResponse (S.complexCross f g) (S.complexCross h k) +
S.complexSecondResponse (S.complexCross f k) (S.complexCross h g))
add_first := by
intro f f' g h k
simp only [complexDifferential_add, complexMixedResponse_add_first,
complexCross_add_left, complexSecondResponse_add_left]
ring
add_second := by
intro f g g' h k
simp only [complexDifferential_add, complexMixedResponse_add_second,
complexCross_add_right, complexSecondResponse_add_left, complexSecondResponse_add_right]
ring
add_third := by
intro f g h h' k
simp only [complexDifferential_add, complexMixedResponse_add_third,
complexCross_add_left, complexSecondResponse_add_right]
ring
add_fourth := by
intro f g h k k'
simp only [complexDifferential_add, complexMixedResponse_add_fourth,
complexCross_add_right, complexSecondResponse_add_left, complexSecondResponse_add_right]
ring
smul_first := by
intro r f g h k
simp only [complexDifferential_smul, complexMixedResponse_smul_first,
complexCross_smul_left, complexSecondResponse_smul_left]
ring
smul_second := by
intro r f g h k
simp only [complexDifferential_smul, complexMixedResponse_smul_second,
complexCross_smul_right, complexSecondResponse_smul_left, complexSecondResponse_smul_right]
ring
smul_third := by
intro r f g h k
simp only [complexDifferential_smul, complexMixedResponse_smul_third,
complexCross_smul_left, complexSecondResponse_smul_right]
ring
smul_fourth := by
intro r f g h k
simp only [complexDifferential_smul, complexMixedResponse_smul_fourth,
complexCross_smul_right, complexSecondResponse_smul_left, complexSecondResponse_smul_right]
ring
theorem complexWardDefect_real (S : SpinSystem 3 V E) (f g h k : V β†’ ℝ)
(hf : βˆ€ x s, S.pin x = some s β†’ f x = 0)
(hg : βˆ€ x s, S.pin x = some s β†’ g x = 0)
(hh : βˆ€ x s, S.pin x = some s β†’ h x = 0)
(hk : βˆ€ x s, S.pin x = some s β†’ k x = 0) :
S.complexWardDefect (fun x => (f x : β„‚)) (fun x => (g x : β„‚))
(fun x => (h x : β„‚)) (fun x => (k x : β„‚)) = 0 := by
change _ - _ = 0
apply sub_eq_zero.mpr
simp only [differential_ofReal, complexCross_ofReal, complexMixedResponse_ofReal,
complexSecondResponse_ofReal]
exact_mod_cast S.mixedResponse_ward f g h k hf hg hh hk
theorem complexMixedResponse_ward (S : SpinSystem 3 V E) (f g h k : V β†’ β„‚)
(hf : βˆ€ x s, S.pin x = some s β†’ f x = 0)
(hg : βˆ€ x s, S.pin x = some s β†’ g x = 0)
(hh : βˆ€ x s, S.pin x = some s β†’ h x = 0)
(hk : βˆ€ x s, S.pin x = some s β†’ k x = 0) :
4 * S.complexMixedResponse (S.differential f) (S.differential g)
(S.differential h) (S.differential k) =
S.complexSecondResponse (S.complexCross f g) (S.complexCross h k) +
S.complexSecondResponse (S.complexCross f k) (S.complexCross h g) := by
apply sub_eq_zero.mp
change S.complexWardDefect f g h k = 0
refine S.complexWardDefect.zero_of_real (fun x => βˆƒ s, S.pin x = some s) ?_ f g h k ?_ ?_ ?_ ?_
Β· intro a b c d ha hb hc hd
exact S.complexWardDefect_real a b c d
(fun x s hs => ha x ⟨s, hs⟩) (fun x s hs => hb x ⟨s, hs⟩)
(fun x s hs => hc x ⟨s, hs⟩) (fun x s hs => hd x ⟨s, hs⟩)
· rintro x ⟨s, hs⟩; exact hf x s hs
· rintro x ⟨s, hs⟩; exact hg x s hs
· rintro x ⟨s, hs⟩; exact hh x s hs
· rintro x ⟨s, hs⟩; exact hk x s hs
end ClassicalON.SpinSystem
end
end
end OAI