math / data /lean /OAI /Geometry /BallPacking /Forms /CubicFubiniStudy.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
26.6 kB
import Mathlib
import OAI.Geometry.BallPacking.Surfaces.QuadricAnnulusDomain
import OAI.Geometry.BallPacking.Forms.ManifoldMapDifferential
namespace OAI
noncomputable section
namespace PackingSufficiencySupport.CubicModel
open scoped ContDiff Manifold Topology
open Set Function Manifold
open DiagonalQuadrics DiagonalQuadrics.Explicit Hamiltonian
def planeAffine : PlaneBase β†’L[β„‚] Affine 1 :=
(ContinuousLinearMap.fst β„‚ β„‚ β„‚).prod
(ContinuousLinearMap.pi fun _ : Fin 1 => ContinuousLinearMap.snd β„‚ β„‚ β„‚)
theorem planeAffine_injective : Injective planeAffine := by
intro z w h
exact Prod.ext (congrArg (fun q : Affine 1 => q.1) h)
(congrArg (fun q : Affine 1 => q.2 0) h)
def projectiveInclusion (x : BaseCurve) : Affine 1 := planeAffine (inclusion x)
def phaseInclusion (x : BaseCurve) : PlanePhase (Option (Fin 1)) :=
affinePhase 1 (projectiveInclusion x)
theorem phaseInclusion_smooth :
ContMDiff π“˜(ℝ,RealModel) π“˜(ℝ,PlanePhase (Option (Fin 1))) ∞ phaseInclusion :=
(affinePhase 1).contDiff.contMDiff.comp
((planeAffine.restrictScalars ℝ).contDiff.contMDiff.comp
((projection_contDiff.restrict_scalars ℝ).contMDiff.comp
(real_inclusion_contMDiff (parameters 0))))
def curveFSPrimitive (c : ℝ) : ManifoldOneForm RealModel BaseCurve :=
manifoldPullbackOneForm (fun _ => affineFSPrimitive c) phaseInclusion 0
def curveFSForm (c : ℝ) : ManifoldTwoForm RealModel BaseCurve :=
manifoldPullbackTwoForm (fun _ => affineFSForm c) phaseInclusion 0
theorem curveFSPrimitive_smooth (c : ℝ) :
SmoothOneFormFamily (fun _ : ℝ => curveFSPrimitive c) := by
have hΞ± : SmoothOneFormFamily (fun _ : ℝ =>
(affineFSPrimitive c : PlanePhase (Option (Fin 1)) β†’ _)) :=
vector_oneForm_smooth (affineFSPrimitive_smooth c)
intro b
exact manifoldPullbackOneForm_smooth (Ξ± := fun _ : ℝ =>
(affineFSPrimitive c : PlanePhase (Option (Fin 1)) β†’ _)) phaseInclusion_smooth hΞ± b
theorem curveFSForm_smooth (c : ℝ) : SmoothTwoForm (curveFSForm c) := by
have hΞ© : SmoothTwoForm (affineFSForm c : PlanePhase (Option (Fin 1)) β†’ _) :=
vector_twoForm_smooth (affineFSForm_smooth c)
have hΞ©f : SmoothTwoFormFamily (fun _ : ℝ =>
(affineFSForm c : PlanePhase (Option (Fin 1)) β†’ _)) := SmoothTwoFormFamily.const hΞ©
have hs : SmoothTwoFormFamily (fun t : ℝ =>
manifoldPullbackTwoForm (fun _ => (affineFSForm c : PlanePhase (Option (Fin 1)) β†’ _))
phaseInclusion t) :=
manifoldPullbackTwoForm_smooth (Ξ© := fun _ =>
(affineFSForm c : PlanePhase (Option (Fin 1)) β†’ _)) phaseInclusion_smooth hΞ©f
exact hs.eval 0
theorem curveFSPrimitive_exterior (c : ℝ) :
manifoldExteriorOneForm (curveFSPrimitive c)=curveFSForm c := by
have hΞ± : βˆ€ z : PlanePhase (Option (Fin 1)),ContDiffOn ℝ ∞
(chartOneForm (affineFSPrimitive c) z) (extChartAt π“˜(ℝ,PlanePhase (Option (Fin 1))) z).target := by
intro z
rw [show chartOneForm (affineFSPrimitive c) z=affineFSPrimitive c from
funext (vector_chartOneForm (affineFSPrimitive c) z)]
exact (affineFSPrimitive_smooth c).contDiffOn
funext x
change manifoldExteriorOneForm (manifoldPullbackOneForm
(fun _ => (affineFSPrimitive c : PlanePhase (Option (Fin 1)) β†’ _)) phaseInclusion 0) x=_
rw [manifold_pullback_exterior hΞ± phaseInclusion_smooth x]
rw [vector_exteriorOneForm,← affineFSForm_eq_exterior]
rfl
theorem curveFSForm_skew (c : ℝ) (x : BaseCurve) (v w : RealModel) :
curveFSForm c x v w= -curveFSForm c x w v := affineFSForm_skew c _ _ _
def cubicChart (b : BaseCurve) : β„‚ β†’ Affine 1 :=
planeAffine ∘ projection ∘ (normalChartAt (parameters 0) b).inclusionChart b
theorem cubicChart_smooth (b : BaseCurve) : ContDiffOn β„‚ ∞ (cubicChart b)
((normalChartAt (parameters 0) b).sliceChart b).target :=
planeAffine.contDiff.comp_contDiffOn (projection_contDiff.comp_contDiffOn
((normalChartAt (parameters 0) b).inclusionChart_smooth b))
theorem cubicChart_derivative_one_ne (b : BaseCurve) {y : β„‚}
(hy : y∈((normalChartAt (parameters 0) b).sliceChart b).target) :
fderiv β„‚ (cubicChart b) y 1β‰ 0 := by
let e := normalChartAt (parameters 0) b
let f := e.inclusionChart b
have hf : DifferentiableAt β„‚ f y :=
((e.inclusionChart_smooth b).contDiffAt ((e.sliceChart b).open_target.mem_nhds hy)).differentiableAt (by simp)
have hp : DifferentiableAt β„‚ (projection ∘ f) y := (projection_contDiff.differentiable (by simp) (f y)).comp y hf
have hne : (projection (f y)).1β‰ 0 := inclusion_fst_ne_zero ((e.sliceChart b).symm y)
have hr : DifferentiableAt β„‚ recovery (projection (f y)) :=
(recovery_contDiffOn.contDiffAt ((isOpen_ne_fun continuous_fst continuous_const).mem_nhds hne)).differentiableAt (by simp)
have heq : recovery ∘ (projection ∘ f)=f := by
funext z
exact recovery_inclusion ((e.sliceChart b).symm z)
have hd : (fderiv β„‚ recovery (projection (f y))).comp (fderiv β„‚ (projection ∘ f) y)=fderiv β„‚ f y := by
calc
_=fderiv β„‚ (recovery ∘ (projection ∘ f)) y := by
simpa only [Function.comp_apply] using (fderiv_comp y hr hp).symm
_=_ := congrArg (fun g => fderiv β„‚ g y) heq
intro hz
have hz' : planeAffine (fderiv β„‚ (projection ∘ f) y 1)=0 := by
change (fderiv β„‚ (planeAffine ∘ (projection ∘ f)) y) 1=0 at hz
rw [fderiv_comp y planeAffine.differentiableAt hp,ContinuousLinearMap.fderiv] at hz
exact hz
have hp0 : fderiv β„‚ (projection ∘ f) y 1=0 :=
planeAffine_injective (by simpa only [map_zero] using hz')
apply e.inclusionChart_derivative_one_ne b hy
have hx := congrArg (fun L : β„‚β†’L[β„‚] Affine 2 => L 1) hd
simpa only [ContinuousLinearMap.comp_apply,hp0,map_zero] using hx.symm
theorem phase_chart_function (b : BaseCurve) :
(phaseInclusion ∘ (extChartAt π“˜(ℝ,RealModel) b).symm)=
affinePhase 1 ∘ cubicChart b ∘ Complex.equivRealProdCLM.symm := by
funext y
have he : chartAt RealModel b=realChart (parameters 0) b := rfl
simp only [mfld_simps,he,realChart,Function.comp_apply,phaseInclusion,
projectiveInclusion,cubicChart,inclusion,NormalChart.inclusionChart]
rfl
theorem phase_chart_derivative (b : BaseCurve) {y : RealModel}
(hy : y∈(extChartAt π“˜(ℝ,RealModel) b).target) :
manifoldMapDifferential (E := PlanePhase (Option (Fin 1))) (F := RealModel)
(phaseInclusion ∘ (extChartAt π“˜(ℝ,RealModel) b).symm) y=
realPhaseDerivative (fderiv β„‚ (cubicChart b) (Complex.equivRealProdCLM.symm y)) := by
change mfderiv π“˜(ℝ,RealModel) π“˜(ℝ,PlanePhase (Option (Fin 1))) _ y=_
rw [mfderiv_eq_fderiv,phase_chart_function]
have hdf := ((cubicChart_smooth b).contDiffAt
(((normalChartAt (parameters 0) b).sliceChart b).open_target.mem_nhds
(realChart_complex_target (parameters 0) b hy))).differentiableAt (by simp)
exact ((affinePhase 1).hasFDerivAt.comp y
((hdf.hasFDerivAt.restrictScalars ℝ).comp y Complex.equivRealProdCLM.symm.hasFDerivAt)).fderiv
theorem curveFSForm_positive {c : ℝ} (hc : 0<c) (b : BaseCurve) {y : RealModel}
(hy : y∈(extChartAt π“˜(ℝ,RealModel) b).target) :
0<chartTwoForm (curveFSForm c) b y (1,0) (0,1) := by
rw [curveFSForm,chartTwoForm_manifoldPullback phaseInclusion_smooth (p := (0,y)) hy]
change 0<affineFSForm c _
(manifoldMapDifferential (E := PlanePhase (Option (Fin 1))) (F := RealModel)
(phaseInclusion ∘ (extChartAt π“˜(ℝ,RealModel) b).symm) y (1,0))
(manifoldMapDifferential (E := PlanePhase (Option (Fin 1))) (F := RealModel)
(phaseInclusion ∘ (extChartAt π“˜(ℝ,RealModel) b).symm) y (0,1))
rw [phase_chart_derivative b hy]
apply affineFSForm_holomorphic_positive hc
exact cubicChart_derivative_one_ne b (realChart_complex_target (parameters 0) b hy)
def weightedProjection (D m : β„•) (z : PlaneBase) : Affine 3 :=
(z.1^(D-m),![z.2^(D-m),z.1^(D-m)*z.2^m,z.1^m*z.2^(D-m)])
def weightedHomogeneous (D m : β„•) (u v w : β„‚) : Fin 5 β†’ β„‚ :=
![u^D,u^m*v^(D-m),u^m*w^(D-m),v^(D-m)*w^m,v^m*w^(D-m)]
theorem weightedProjection_contDiff (D m : β„•) : ContDiff β„‚ ∞ (weightedProjection D m) := by
apply ContDiff.prodMk (contDiff_fst.pow (D-m))
apply contDiff_pi.mpr
intro j
fin_cases j
Β· exact contDiff_snd.pow (D-m)
Β· exact (contDiff_fst.pow (D-m)).mul (contDiff_snd.pow m)
Β· exact (contDiff_fst.pow m).mul (contDiff_snd.pow (D-m))
theorem weightedHomogeneous_homogeneous (D m : β„•) (hm : m≀D) (ΞΆ u v w : β„‚) :
weightedHomogeneous D m (ΞΆ*u) (ΞΆ*v) (ΞΆ*w)=ΞΆ^D β€’ weightedHomogeneous D m u v w := by
have hD : m+(D-m)=D := Nat.add_sub_of_le hm
have hD' : (D-m)+m=D := Nat.sub_add_cancel hm
funext j
fin_cases j
Β· change (ΞΆ*u)^D=ΞΆ^D*u^D
exact mul_pow ΞΆ u D
Β· change (ΞΆ*u)^m*(ΞΆ*v)^(D-m)=ΞΆ^D*(u^m*v^(D-m))
calc
_=(ΞΆ^m*ΞΆ^(D-m))*(u^m*v^(D-m)) := by simp only [mul_pow]; ring
_=_ := by rw [←pow_add,hD]
Β· change (ΞΆ*u)^m*(ΞΆ*w)^(D-m)=ΞΆ^D*(u^m*w^(D-m))
calc
_=(ΞΆ^m*ΞΆ^(D-m))*(u^m*w^(D-m)) := by simp only [mul_pow]; ring
_=_ := by rw [←pow_add,hD]
Β· change (ΞΆ*v)^(D-m)*(ΞΆ*w)^m=ΞΆ^D*(v^(D-m)*w^m)
calc
_=(ΞΆ^(D-m)*ΞΆ^m)*(v^(D-m)*w^m) := by simp only [mul_pow]; ring
_=_ := by rw [←pow_add,hD']
Β· change (ΞΆ*v)^m*(ΞΆ*w)^(D-m)=ΞΆ^D*(v^m*w^(D-m))
calc
_=(ΞΆ^m*ΞΆ^(D-m))*(v^m*w^(D-m)) := by simp only [mul_pow]; ring
_=_ := by rw [←pow_add,hD]
theorem weightedProjection_fderiv_fst (D m : β„•) (z v : PlaneBase) :
(fderiv β„‚ (weightedProjection D m) z v).1=(D-m:β„•)*z.1^(D-m-1)*v.1 := by
have h := ((hasFDerivAt_fst (π•œ := β„‚) (p := z)).pow (D-m))
have hc := (ContinuousLinearMap.fst β„‚ β„‚ (Fin 3β†’β„‚)).hasFDerivAt.comp z
((weightedProjection_contDiff D m).differentiable (by simp) z).hasFDerivAt
have he : (ContinuousLinearMap.fst β„‚ β„‚ (Fin 3β†’β„‚)) ∘ weightedProjection D m=
fun z : PlaneBase => z.1^(D-m) := rfl
rw [he] at hc
have hd := hc.unique h
have hh := congrArg (fun A : PlaneBase→L[ℂ] ℂ => A v) hd
simpa only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.coe_fst',
smul_apply,nsmul_eq_mul,smul_eq_mul] using hh
theorem weightedProjection_fderiv_snd (D m : β„•) (z v : PlaneBase) :
(fderiv β„‚ (weightedProjection D m) z v).2 0=(D-m:β„•)*z.2^(D-m-1)*v.2 := by
let P : Affine 3β†’L[β„‚] β„‚ := (ContinuousLinearMap.proj 0).comp (ContinuousLinearMap.snd β„‚ β„‚ (Fin 3β†’β„‚))
have h := ((hasFDerivAt_snd (π•œ := β„‚) (p := z)).pow (D-m))
have hc := P.hasFDerivAt.comp z
((weightedProjection_contDiff D m).differentiable (by simp) z).hasFDerivAt
have he : P ∘ weightedProjection D m=fun z : PlaneBase => z.2^(D-m) := rfl
rw [he] at hc
have hd := hc.unique h
have hh := congrArg (fun A : PlaneBase→L[ℂ] ℂ => A v) hd
simpa only [P,ContinuousLinearMap.comp_apply,ContinuousLinearMap.coe_snd',
ContinuousLinearMap.proj_apply,smul_apply,nsmul_eq_mul,smul_eq_mul] using hh
theorem weightedProjection_fderiv_kernel {D m : β„•} (hm : m<D) {z : PlaneBase}
(hzv : z.1β‰ 0) (hzw : z.2β‰ 0) {v : PlaneBase}
(hv : fderiv β„‚ (weightedProjection D m) z v=0) : v=0 := by
have hL : (D-m:β„•)β‰ 0 := (Nat.sub_pos_of_lt hm).ne'
have hLc : ((D-m:β„•):β„‚)β‰ 0 := by exact_mod_cast hL
have hv0 := weightedProjection_fderiv_fst D m z v
have hw0 := weightedProjection_fderiv_snd D m z v
rw [hv] at hv0 hw0
apply Prod.ext
Β· exact (mul_eq_zero.mp hv0.symm).resolve_left (mul_ne_zero hLc (pow_ne_zero _ hzv))
Β· exact (mul_eq_zero.mp hw0.symm).resolve_left (mul_ne_zero hLc (pow_ne_zero _ hzw))
def weightedInclusion (D m : β„•) (x : BaseCurve) : Affine 3 :=
weightedProjection D m (inclusion x)
theorem weightedInclusion_smooth (D m : β„•) :
ContMDiff π“˜(β„‚,β„‚) π“˜(β„‚,Affine 3) ∞ (weightedInclusion D m) :=
(weightedProjection_contDiff D m).contMDiff.comp inclusion_contMDiff
def weightedChart (D m : β„•) (b : BaseCurve) : β„‚ β†’ Affine 3 :=
weightedProjection D m ∘ projection ∘ (normalChartAt (parameters 0) b).inclusionChart b
theorem weightedChart_smooth (D m : β„•) (b : BaseCurve) :
ContDiffOn β„‚ ∞ (weightedChart D m b) ((normalChartAt (parameters 0) b).sliceChart b).target :=
(weightedProjection_contDiff D m).comp_contDiffOn
(projection_contDiff.comp_contDiffOn ((normalChartAt (parameters 0) b).inclusionChart_smooth b))
theorem weightedChart_derivative_one_ne {D m : β„•} (hm : m<D) (b : BaseCurve) {y : β„‚}
(hy : y∈((normalChartAt (parameters 0) b).sliceChart b).target) :
fderiv β„‚ (weightedChart D m b) y 1β‰ 0 := by
let e := normalChartAt (parameters 0) b
let f := projection ∘ e.inclusionChart b
have hf : DifferentiableAt β„‚ f y :=
((projection_contDiff.comp_contDiffOn (e.inclusionChart_smooth b)).contDiffAt
((e.sliceChart b).open_target.mem_nhds hy)).differentiableAt (by simp)
intro hz
change fderiv β„‚ (weightedProjection D m ∘ f) y 1=0 at hz
rw [fderiv_comp y ((weightedProjection_contDiff D m).differentiable (by simp) _) hf] at hz
have hz' : fderiv β„‚ f y 1=0 := weightedProjection_fderiv_kernel hm
(inclusion_fst_ne_zero ((e.sliceChart b).symm y))
(inclusion_snd_ne_zero ((e.sliceChart b).symm y)) hz
apply cubicChart_derivative_one_ne b hy
change fderiv β„‚ (planeAffine ∘ f) y 1=0
rw [fderiv_comp y planeAffine.differentiableAt hf,ContinuousLinearMap.fderiv,
ContinuousLinearMap.comp_apply,hz',map_zero]
def weightedPhaseInclusion (D m : β„•) (x : BaseCurve) : PlanePhase (Option (Fin 3)) :=
affinePhase 3 (weightedInclusion D m x)
theorem weightedPhaseInclusion_smooth (D m : β„•) :
ContMDiff π“˜(ℝ,RealModel) π“˜(ℝ,PlanePhase (Option (Fin 3))) ∞ (weightedPhaseInclusion D m) :=
(affinePhase 3).contDiff.contMDiff.comp
(((weightedProjection_contDiff D m).restrict_scalars ℝ).contMDiff.comp
((projection_contDiff.restrict_scalars ℝ).contMDiff.comp
(real_inclusion_contMDiff (parameters 0))))
def weightedFSPrimitive (D m : β„•) (c : ℝ) : ManifoldOneForm RealModel BaseCurve :=
manifoldPullbackOneForm (fun _ => affineFSPrimitive c) (weightedPhaseInclusion D m) 0
def weightedFSForm (D m : β„•) (c : ℝ) : ManifoldTwoForm RealModel BaseCurve :=
manifoldPullbackTwoForm (fun _ => affineFSForm c) (weightedPhaseInclusion D m) 0
theorem weightedFSPrimitive_smooth (D m : β„•) (c : ℝ) :
SmoothOneFormFamily (fun _ : ℝ => weightedFSPrimitive D m c) := by
have hΞ± : SmoothOneFormFamily (fun _ : ℝ =>
(affineFSPrimitive c : PlanePhase (Option (Fin 3)) β†’ _)) :=
vector_oneForm_smooth (affineFSPrimitive_smooth c)
intro b
exact manifoldPullbackOneForm_smooth (Ξ± := fun _ : ℝ =>
(affineFSPrimitive c : PlanePhase (Option (Fin 3)) β†’ _)) (weightedPhaseInclusion_smooth D m) hΞ± b
theorem weightedFSForm_smooth (D m : β„•) (c : ℝ) : SmoothTwoForm (weightedFSForm D m c) := by
have hΞ© : SmoothTwoForm (affineFSForm c : PlanePhase (Option (Fin 3)) β†’ _) :=
vector_twoForm_smooth (affineFSForm_smooth c)
have hΞ©f : SmoothTwoFormFamily (fun _ : ℝ =>
(affineFSForm c : PlanePhase (Option (Fin 3)) β†’ _)) := SmoothTwoFormFamily.const hΞ©
have hs : SmoothTwoFormFamily (fun t : ℝ =>
manifoldPullbackTwoForm (fun _ => (affineFSForm c : PlanePhase (Option (Fin 3)) β†’ _))
(weightedPhaseInclusion D m) t) :=
manifoldPullbackTwoForm_smooth (Ξ© := fun _ =>
(affineFSForm c : PlanePhase (Option (Fin 3)) β†’ _)) (weightedPhaseInclusion_smooth D m) hΞ©f
exact hs.eval 0
theorem weightedFSPrimitive_exterior (D m : β„•) (c : ℝ) :
manifoldExteriorOneForm (weightedFSPrimitive D m c)=weightedFSForm D m c := by
have hΞ± : βˆ€ z : PlanePhase (Option (Fin 3)),ContDiffOn ℝ ∞
(chartOneForm (affineFSPrimitive c) z) (extChartAt π“˜(ℝ,PlanePhase (Option (Fin 3))) z).target := by
intro z
rw [show chartOneForm (affineFSPrimitive c) z=affineFSPrimitive c from
funext (vector_chartOneForm (affineFSPrimitive c) z)]
exact (affineFSPrimitive_smooth c).contDiffOn
funext x
change manifoldExteriorOneForm (manifoldPullbackOneForm
(fun _ => (affineFSPrimitive c : PlanePhase (Option (Fin 3)) β†’ _)) (weightedPhaseInclusion D m) 0) x=_
rw [manifold_pullback_exterior hΞ± (weightedPhaseInclusion_smooth D m) x]
rw [vector_exteriorOneForm,← affineFSForm_eq_exterior]
rfl
theorem weightedFSForm_skew (D m : β„•) (c : ℝ) (x : BaseCurve) (v w : RealModel) :
weightedFSForm D m c x v w= -weightedFSForm D m c x w v := affineFSForm_skew c _ _ _
theorem weighted_phase_chart_function (D m : β„•) (b : BaseCurve) :
(weightedPhaseInclusion D m ∘ (extChartAt π“˜(ℝ,RealModel) b).symm)=
affinePhase 3 ∘ weightedChart D m b ∘ Complex.equivRealProdCLM.symm := by
funext y
have he : chartAt RealModel b=realChart (parameters 0) b := rfl
simp only [mfld_simps,he,realChart,Function.comp_apply,weightedPhaseInclusion,
weightedInclusion,weightedChart,inclusion,NormalChart.inclusionChart]
rfl
theorem weighted_phase_chart_derivative (D m : β„•) (b : BaseCurve) {y : RealModel}
(hy : y∈(extChartAt π“˜(ℝ,RealModel) b).target) :
manifoldMapDifferential (E := PlanePhase (Option (Fin 3))) (F := RealModel)
(weightedPhaseInclusion D m ∘ (extChartAt π“˜(ℝ,RealModel) b).symm) y=
realPhaseDerivative (fderiv β„‚ (weightedChart D m b) (Complex.equivRealProdCLM.symm y)) := by
change mfderiv π“˜(ℝ,RealModel) π“˜(ℝ,PlanePhase (Option (Fin 3))) _ y=_
rw [mfderiv_eq_fderiv,weighted_phase_chart_function]
have hdf := ((weightedChart_smooth D m b).contDiffAt
(((normalChartAt (parameters 0) b).sliceChart b).open_target.mem_nhds
(realChart_complex_target (parameters 0) b hy))).differentiableAt (by simp)
exact ((affinePhase 3).hasFDerivAt.comp y
((hdf.hasFDerivAt.restrictScalars ℝ).comp y Complex.equivRealProdCLM.symm.hasFDerivAt)).fderiv
theorem weightedFSForm_positive {D m : β„•} (hm : m<D) {c : ℝ} (hc : 0<c) (b : BaseCurve) {y : RealModel}
(hy : y∈(extChartAt π“˜(ℝ,RealModel) b).target) :
0<chartTwoForm (weightedFSForm D m c) b y (1,0) (0,1) := by
rw [weightedFSForm,chartTwoForm_manifoldPullback (weightedPhaseInclusion_smooth D m) (p := (0,y)) hy]
change 0<affineFSForm c _
(manifoldMapDifferential (E := PlanePhase (Option (Fin 3))) (F := RealModel)
(weightedPhaseInclusion D m ∘ (extChartAt π“˜(ℝ,RealModel) b).symm) y (1,0))
(manifoldMapDifferential (E := PlanePhase (Option (Fin 3))) (F := RealModel)
(weightedPhaseInclusion D m ∘ (extChartAt π“˜(ℝ,RealModel) b).symm) y (0,1))
rw [weighted_phase_chart_derivative D m b hy]
apply affineFSForm_holomorphic_positive hc
exact weightedChart_derivative_one_ne hm b (realChart_complex_target (parameters 0) b hy)
end PackingSufficiencySupport.CubicModel
namespace PackingSufficiencySupport.DiagonalQuadrics
open scoped ContDiff Topology
open Set Function
open Hamiltonian
open scoped BigOperators ComplexConjugate
section
variable {m : β„•} (a : Fin m β†’ β„‚) (Ξ΅ : Fin m β†’ Bool)
def infinityRegularPoint (s : β„‚) : Affine m := (s,infinityRoot a Ξ΅ s)
theorem infinityRegularPoint_contDiffAt {s : β„‚} (hs : s∈infinityRegion a) :
ContDiffAt β„‚ ∞ (infinityRegularPoint a Ξ΅) s :=
contDiffAt_id.prodMk (infinityRoot_contDiffAt a Ξ΅ hs)
theorem infinityRegularPoint_fderiv {s : β„‚} (hs : s∈infinityRegion a) (u : β„‚) :
fderiv β„‚ (infinityRegularPoint a Ξ΅) s u=(u,fderiv β„‚ (infinityRoot a Ξ΅) s u) := by
have hr := ((infinityRoot_contDiffAt a Ξ΅ hs).differentiableAt (by simp)).hasFDerivAt
have H := (hasFDerivAt_id s).prodMk hr
change HasFDerivAt (infinityRegularPoint a Ξ΅) _ s at H
rw [H.fderiv]
rfl
theorem infinityPoint_fderiv {s : β„‚} (hs : s∈infinityDomain a) (u : β„‚) :
fderiv β„‚ (infinityPoint a Ξ΅) s u=
(-u/s^2,fun j => (fderiv β„‚ (infinityRoot a Ξ΅) s u j)/s-
(infinityRoot a Ξ΅ s j/s)*(u/s)) := by
have hi := (hasDerivAt_inv hs.1).hasFDerivAt
have hr := ((infinityRoot_contDiffAt a Ξ΅ hs.2).differentiableAt (by simp)).hasFDerivAt
have H := hi.prodMk (hi.smul hr)
change HasFDerivAt (infinityPoint a Ξ΅) _ s at H
rw [H.fderiv]
apply Prod.ext
· change u * (-(s^2)⁻¹)= -u/s^2
ring
Β· funext j
change s⁻¹ * (fderiv β„‚ (infinityRoot a Ξ΅) s u j)+
(u * (-(s^2)⁻¹))*infinityRoot a Ρ s j=_
ring
theorem realPhaseDerivative_fderiv {f : β„‚ β†’ Affine m} {s : β„‚}
(hf : DifferentiableAt β„‚ f s) :
fderiv ℝ (fun y : Plane => affinePhase m (f (Complex.equivRealProdCLM.symm y)))
(Complex.equivRealProdCLM s)=realPhaseDerivative (fderiv β„‚ f s) := by
have hd := (affinePhase m).hasFDerivAt.comp (Complex.equivRealProdCLM s)
((hf.hasFDerivAt.restrictScalars ℝ).comp (Complex.equivRealProdCLM s)
Complex.equivRealProdCLM.symm.hasFDerivAt)
simpa only [ContinuousLinearEquiv.symm_apply_apply,Function.comp_def,realPhaseDerivative] using hd.fderiv
end
def complexArea (z v : β„‚) : ℝ := (conj z*v).im
theorem complexArea_apply (z v : β„‚) : complexArea z v=z.re*v.im-z.im*v.re := by
simp only [complexArea,Complex.mul_im,Complex.conj_re,Complex.conj_im]
ring
theorem complexArea_sub (z v w : β„‚) : complexArea z (v-w)=complexArea z v-complexArea z w := by
simp only [complexArea,mul_sub,Complex.sub_im]
theorem complexArea_mul (s z v : β„‚) : complexArea (s*z) (s*v)=Complex.normSq s*complexArea z v := by
unfold complexArea
rw [map_mul]
have he : conj s*conj z*(s*v)=(Complex.normSq s : β„‚)*(conj z*v) := by
rw [Complex.normSq_eq_conj_mul_self]
ring
rw [he]
simp only [Complex.mul_im,Complex.ofReal_re,Complex.ofReal_im,zero_mul,add_zero]
theorem complexArea_self_mul (z u : β„‚) : complexArea z (z*u)=Complex.normSq z*u.im := by
unfold complexArea
rw [← mul_assoc,← Complex.normSq_eq_conj_mul_self]
simp only [Complex.mul_im,Complex.ofReal_re,Complex.ofReal_im,zero_mul,add_zero]
theorem complex_div_im (s u : β„‚) : (u/s).im=complexArea s u/Complex.normSq s := by
rw [Complex.div_im,complexArea_apply]
ring
theorem complexArea_div_derivative (s w u v : β„‚) :
complexArea (w/s) (v/s-(w/s)*(u/s))=
complexArea w v/Complex.normSq s - Complex.normSq w/(Complex.normSq s)^2*complexArea s u := by
rw [complexArea_sub,complexArea_self_mul,Complex.normSq_div,complex_div_im]
have h : complexArea (w/s) (v/s)=complexArea w v/Complex.normSq s := by
rw [div_eq_mul_inv,div_eq_mul_inv,mul_comm w,mul_comm v,complexArea_mul,Complex.normSq_inv]
ring
rw [h]
ring
theorem phaseSq_affinePhase {m : β„•} (z : Affine m) :
phaseSq (affinePhase m z)=Complex.normSq z.1+βˆ‘ j,Complex.normSq (z.2 j) := by
simp only [phaseSq,phaseDot_apply,Fintype.sum_option,affinePhase_none,affinePhase_some]
rfl
theorem phaseArea_affinePhase {m : β„•} (z v : Affine m) :
phaseArea (affinePhase m z) (affinePhase m v)=complexArea z.1 v.1+βˆ‘ j,complexArea (z.2 j) (v.2 j) := by
simp only [phaseArea_apply,Fintype.sum_option,affinePhase_none,affinePhase_some,complexArea_apply]
theorem affineFSPrimitive_complex {m : β„•} (c : ℝ) (z v : Affine m) :
affineFSPrimitive c (affinePhase m z) (affinePhase m v)=
c/(2*(1+Complex.normSq z.1+βˆ‘ j,Complex.normSq (z.2 j)))*
(complexArea z.1 v.1+βˆ‘ j,complexArea (z.2 j) (v.2 j)) := by
change c/(2*(1+phaseSq (affinePhase m z)))*phaseArea (affinePhase m z) (affinePhase m v)=_
rw [phaseSq_affinePhase,phaseArea_affinePhase]
rw [add_assoc]
theorem affineFSPrimitive_projective_swap {m : β„•} (c : ℝ) {s : β„‚} (hs : sβ‰ 0)
(w : Fin m β†’ β„‚) (u : β„‚) (v : Fin m β†’ β„‚) :
affineFSPrimitive c (affinePhase m (s⁻¹,fun j => w j/s))
(affinePhase m (-u/s^2,fun j => v j/s-(w j/s)*(u/s)))=
affineFSPrimitive c (affinePhase m (s,w)) (affinePhase m (u,v))-
c/(2*Complex.normSq s)*complexArea s u := by
have hq : Complex.normSq s≠0 := mt Complex.normSq_eq_zero.mp hs
have hden : 0<1+Complex.normSq s+βˆ‘ j,Complex.normSq (w j) := by
have hw : 0β‰€βˆ‘ j,Complex.normSq (w j) := Finset.sum_nonneg fun j _ => Complex.normSq_nonneg _
linarith [Complex.normSq_nonneg s]
have hbase : complexArea (s⁻¹) (-u/s^2)= -(complexArea s u)/(Complex.normSq s)^2 := by
have h := complexArea_div_derivative s 1 u 0
have he : (0 : β„‚)/s-(1/s)*(u/s)= -u/s^2 := by ring
rw [he] at h
simp only [one_div,complexArea_apply,Complex.one_re,Complex.one_im,Complex.zero_re,
Complex.zero_im,mul_zero,sub_zero,Complex.normSq_one,zero_div,zero_sub] at h ⊒
exact h.trans (by ring)
rw [affineFSPrimitive_complex,affineFSPrimitive_complex,hbase,Complex.normSq_inv]
simp only [Complex.normSq_div,complexArea_div_derivative,Finset.sum_sub_distrib,
← Finset.sum_div,← Finset.sum_mul]
have hd : 1+Complex.normSq s+βˆ‘ j,Complex.normSq (w j)β‰ 0 := ne_of_gt hden
field_simp [hq,hd]
ring_nf
field_simp [hd]
ring
end PackingSufficiencySupport.DiagonalQuadrics
namespace PackingSufficiencySupport.Hamiltonian
open scoped Manifold ContDiff
variable {E F G : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G]
{M N P : Type*} [TopologicalSpace M] [ChartedSpace E M]
[TopologicalSpace N] [ChartedSpace F N] [TopologicalSpace P] [ChartedSpace G P]
theorem manifoldMapDifferential_comp {g : N β†’ M} {f : P β†’ N} {x : P}
(hg : MDifferentiableAt π“˜(ℝ,F) π“˜(ℝ,E) g (f x))
(hf : MDifferentiableAt π“˜(ℝ,G) π“˜(ℝ,F) f x) :
manifoldMapDifferential (E := E) (F := G) (g ∘ f) x=
(manifoldMapDifferential (E := E) (F := F) g (f x)).comp (manifoldMapDifferential (E := F) (F := G) f x) :=
(hg.hasMFDerivAt.comp x hf.hasMFDerivAt).mfderiv
theorem euclideanPullbackOneForm_comp {g : N β†’ M} {f : G β†’ N} {x : G}
(hg : MDifferentiableAt π“˜(ℝ,F) π“˜(ℝ,E) g (f x))
(hf : MDifferentiableAt π“˜(ℝ,G) π“˜(ℝ,F) f x)
(Ξ± : ManifoldOneForm E M) :
euclideanPullbackOneForm (E := F) (F := G) (fun _ => manifoldPullbackOneForm (E := E) (F := F) (fun _ => Ξ±) g 0) f (0,x)=
euclideanPullbackOneForm (E := E) (F := G) (fun _ => α) (g ∘ f) (0,x) := by
change (Ξ± (g (f x))).comp
((manifoldMapDifferential (E := E) (F := F) g (f x)).comp
(manifoldMapDifferential (E := F) (F := G) f x))=
(α (g (f x))).comp (manifoldMapDifferential (E := E) (F := G) (g ∘ f) x)
rw [manifoldMapDifferential_comp hg hf]
end PackingSufficiencySupport.Hamiltonian
end
end OAI