File size: 4,616 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | import Mathlib
import OAI.Probability.SKGap.Localization.ScalarParametersJoined
namespace OAI
section
noncomputable section
namespace SKGap
open Matrix Real Set MeasureTheory ProbabilityTheory
open scoped BigOperators Matrix.Norms.Frobenius
def plantedInteraction {n : β} (j : β) (W : Matrix (Fin n) (Fin n) β) : Matrix (Fin n) (Fin n) β :=
W+(j/(n:β)) β’ vecMulVec (fun _=>1) (fun _=>1)
def badFieldSet (n : β) (j A Ξ΅ c : β) : Set (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) :=
{p | β a : Fin n β β, (β i,a i β Icc 0 A) β§
(β i,(a i-spinVariance p.2 i)^2) β€ Ξ΅^2*(n:β) β§
β x : EuclideanSpace β (Fin n), βxβ=1 β§
quadraticForm (fieldHessian j (plantedInteraction j p.1) p.2 a) x.ofLp β€ c}
lemma continuous_fieldHessian {n : β} (j : β) :
Continuous (fun p : (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) Γ (Fin n β β)=>
fieldHessian j p.1.1 p.1.2 p.2) := by
unfold fieldHessian hessianCore onsager overlap magnetization
fun_prop
lemma isClosed_badFieldSet (n : β) (j A Ξ΅ c : β) : IsClosed (badFieldSet n j A Ξ΅ c) := by
let X := β₯(Set.Icc (0 : Fin n β β) (fun _=>A)) Γ β₯(Metric.sphere (0 : EuclideanSpace β (Fin n)) 1)
let : CompactSpace β₯(Set.Icc (0 : Fin n β β) (fun _=>A)) :=
isCompact_iff_compactSpace.mp isCompact_Icc
let : CompactSpace β₯(Metric.sphere (0 : EuclideanSpace β (Fin n)) 1) :=
isCompact_iff_compactSpace.mp (isCompact_sphere 0 1)
let S : Set (X Γ (Matrix (Fin n) (Fin n) β Γ (Fin n β β))) :=
{p | (β i,((p.1.1:Fin n β β) i-spinVariance p.2.2 i)^2) β€ Ξ΅^2*(n:β) β§
quadraticForm (fieldHessian j (plantedInteraction j p.2.1) p.2.2 p.1.1) (p.1.2:EuclideanSpace β (Fin n)).ofLp β€ c}
have ha (i : Fin n) : Continuous (fun p : X Γ (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) =>
(p.1.1:Fin n β β) i) :=
(continuous_apply i).comp (continuous_subtype_val.comp (continuous_fst.comp continuous_fst))
have hx (i : Fin n) : Continuous (fun p : X Γ (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) =>
(p.1.2:EuclideanSpace β (Fin n)).ofLp i) :=
(continuous_apply i).comp ((PiLp.continuous_ofLp 2 (fun _ : Fin n=>β)).comp
(continuous_subtype_val.comp (continuous_snd.comp continuous_fst)))
have hy (i : Fin n) : Continuous (fun p : X Γ (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) =>
tanh (p.2.2 i)) := continuous_tanh.comp ((continuous_apply i).comp (continuous_snd.comp continuous_snd))
have hS : IsClosed S := by
apply IsClosed.inter
Β· exact isClosed_le (f := fun p : X Γ (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) =>
β i,((p.1.1:Fin n β β) i-spinVariance p.2.2 i)^2)
(g := fun _ => Ξ΅^2*(n:β)) (by
apply continuous_finsetSum
intro i _
exact ((ha i).sub (continuous_const.sub ((hy i).pow 2))).pow 2) continuous_const
Β· exact isClosed_le (f := fun p : X Γ (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) =>
quadraticForm (fieldHessian j (plantedInteraction j p.2.1) p.2.2 p.1.1)
(p.1.2:EuclideanSpace β (Fin n)).ofLp) (g := fun _=>c) (by
dsimp [X,quadraticForm,fieldHessian,hessianCore,plantedInteraction,onsager,overlap,magnetization]
apply continuous_finsetSum; intro i _
apply continuous_finsetSum; intro k _
apply Continuous.mul _ (hx k)
apply Continuous.mul (hx i)
apply Continuous.add continuous_const
apply Continuous.mul _ (Real.continuous_sqrt.comp (ha k))
apply Continuous.mul (Real.continuous_sqrt.comp (ha i))
exact (((continuous_const.mul (continuous_const.sub
((continuous_finsetSum _ (fun l _ => (hy l).pow 2)).div_const _))).mul continuous_const).sub
((by fun_prop : Continuous (fun p : X Γ (Matrix (Fin n) (Fin n) β Γ (Fin n β β)) => p.2.1 i k)).add continuous_const)).sub
(((continuous_const.mul (hy i))).mul (hy k))) continuous_const
have hproj := isClosedMap_snd_of_compactSpace S hS
convert hproj using 1
ext p
constructor
Β· rintro β¨a,ha,hclose,x,hx,hquadβ©
have ha' : a β Icc (0 : Fin n β β) (fun _=>A) := β¨fun i=>(ha i).1,fun i=>(ha i).2β©
have hx' : x β Metric.sphere (0 : EuclideanSpace β (Fin n)) 1 := by simpa only [Metric.mem_sphere,dist_zero_right] using hx
exact β¨((β¨a,ha'β©,β¨x,hx'β©),p),β¨hclose,hquadβ©,rflβ©
Β· rintro β¨β¨β¨a,xβ©,p'β©,hS,rflβ©
exact β¨a,fun i=>β¨a.2.1 i,a.2.2 iβ©,hS.1,x,by simpa only [Metric.mem_sphere,dist_zero_right] using x.2,hS.2β©
end SKGap
end
end
end OAI
|