Download data/lean/OAI/Geometry/PrescribedPotential/AnalyticSupport.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 112 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PrescribedPotential/AnalyticSupport.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/PrescribedPotential/AnalyticSupport.lean
-
curl -L -o AnalyticSupport.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PrescribedPotential/AnalyticSupport.lean
112 kB
import Mathlib
namespace OAI
/-! Analytic Support. -/
section
noncomputable section
open Set MeasureTheory Filter Complex
open scoped Topology
namespace ProjectiveKaehler
def compactIntegral {K : Type*} [TopologicalSpace K] [CompactSpace K]
[MeasurableSpace K] [OpensMeasurableSpace K] (ΞΌ : Measure K) [IsFiniteMeasure ΞΌ] :
C(K, β) βL[β] β :=
LinearMap.mkContinuous
{ toFun := fun f => β« x, f x βΞΌ
map_add' := by
intro f g
exact integral_add
(f.continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace f))
(g.continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace g))
map_smul' := by
intro c f
exact integral_smul c f }
(ΞΌ.real univ) (by
intro f
change ββ« x, f x βΞΌβ β€ ΞΌ.real univ * βfβ
rw [mul_comm]
exact norm_integral_le_of_norm_le_const
(ΞΌ := ΞΌ) (ae_of_all _ fun x => f.norm_coe_le_norm x))
abbrev Angle := Icc (0 : β) (2 * Real.pi)
def angleMeasure : Measure Angle := Measure.comap Subtype.val volume
instance : IsFiniteMeasure angleMeasure := by
refine β¨?_β©
rw [angleMeasure, Measure.comap_apply Subtype.val Subtype.val_injective
(fun s hs => (MeasurableEmbedding.subtype_coe measurableSet_Icc).measurableSet_image.mpr hs)
volume MeasurableSet.univ]
simpa only [Set.image_univ, Subtype.range_coe_subtype, ofPred_mem_eq] using
(measure_Icc_lt_top (ΞΌ := volume) (a := (0 : β)) (b := 2 * Real.pi))
abbrev Boundary (n : β) := Fin n β Angle
def boundaryCons (n : β) : C(Angle Γ Boundary n, Boundary (n + 1)) where
toFun p := Fin.cons p.1 p.2
continuous_toFun := by
apply continuous_pi
intro i
refine Fin.cases ?_ (fun j => ?_) i
Β· simpa using continuous_fst
Β· exact (continuous_apply j).comp continuous_snd
def integrateFirst {K : Type*} [TopologicalSpace K] [CompactSpace K]
(L : C(K, β) βL[β] β) : C(Angle Γ K, β) βL[β] β :=
LinearMap.mkContinuous
{ toFun := fun f => β« t, L (f.curry t) βangleMeasure
map_add' := by
intro f g
change (β« t, L ((f + g).curry t) βangleMeasure) = _
have h : β t, (f + g).curry t = f.curry t + g.curry t := fun _ => by
ext; rfl
simp_rw [h, map_add]
apply integral_add
Β· exact (L.continuous.comp f.curry.continuous).integrable_of_hasCompactSupport
(HasCompactSupport.of_compactSpace _)
Β· exact (L.continuous.comp g.curry.continuous).integrable_of_hasCompactSupport
(HasCompactSupport.of_compactSpace _)
map_smul' := by
intro c f
have h : β t, (c β’ f).curry t = c β’ f.curry t := fun _ => by
ext; rfl
simp_rw [h, map_smul]
exact integral_smul c _ }
(βLβ * angleMeasure.real univ) (by
intro f
calc
ββ« t, L (f.curry t) βangleMeasureβ β€
(βLβ * βfβ) * angleMeasure.real univ :=
norm_integral_le_of_norm_le_const (ae_of_all _ fun t =>
(L.le_opNorm _).trans (mul_le_mul_of_nonneg_left
(((f.curry t).norm_le (norm_nonneg f)).mpr
(fun y => f.norm_coe_le_norm (t, y))) (norm_nonneg L)))
_ = (βLβ * angleMeasure.real univ) * βfβ := by ring)
def boundaryIntegral : (n : β) β C(Boundary n, β) βL[β] β
| 0 => ContinuousMap.evalCLM β (fun i => Fin.elim0 i)
| n + 1 => (integrateFirst (boundaryIntegral n)).comp
(ContinuousMap.compCLM β β (boundaryCons n))
@[simp] theorem boundaryIntegral_zero (f : C(Boundary 0, β)) :
boundaryIntegral 0 f = f (fun i => Fin.elim0 i) := rfl
@[simp] theorem boundaryIntegral_succ (n : β) (f : C(Boundary (n + 1), β)) :
boundaryIntegral (n + 1) f =
β« t, boundaryIntegral n ((f.comp (boundaryCons n)).curry t) βangleMeasure := rfl
def boundaryPoint {n : β} (c : Fin n β β) (R : β) : C(Boundary n, Fin n β β) where
toFun t i := circleMap (c i) R (t i).val
continuous_toFun := by
apply continuous_pi
intro i
exact (continuous_circleMap _ _).comp (continuous_subtype_val.comp (continuous_apply i))
def denominator {n : β} (c : Fin n β β) (R : β) (i : Fin n)
(z : Fin n β β) : C(Boundary n, β) :=
β¨fun t => circleMap (c i) R (t i).val - z i, by
exact ((continuous_circleMap _ _).comp
(continuous_subtype_val.comp (continuous_apply i))).sub continuous_constβ©
lemma analyticAt_denominator {n : β} (c : Fin n β β) (R : β) (i : Fin n)
(z : Fin n β β) : AnalyticAt β (denominator c R i) z := by
have h : denominator c R i = fun w => denominator c R i 0 -
(ContinuousLinearMap.const β (Boundary n)) (w i) := by
funext w
ext t
simp [denominator]
rw [h]
have hi : AnalyticAt β (fun w : Fin n β β => w i) z :=
(ContinuousLinearMap.proj i : (Fin n β β) βL[β] β).analyticAt z
exact analyticAt_const.sub
(AnalyticAt.comp (f := fun w : Fin n β β => w i)
((ContinuousLinearMap.const β (Boundary n)).analyticAt (z i)) hi)
lemma isUnit_denominator {n : β} {c z : Fin n β β} {R : β} (hR : 0 < R)
(hz : z β Metric.ball c R) (i : Fin n) : IsUnit (denominator c R i z) := by
apply (ContinuousMap.isUnit_iff_forall_ne_zero _).mpr
intro t he
rw [ball_pi c hR] at hz
have hi : z i β Metric.ball (c i) R := hz i (Set.mem_univ i)
have hs := circleMap_mem_sphere (c i) hR.le (t i).val
have he' : circleMap (c i) R (t i).val = z i := sub_eq_zero.mp he
rw [he'] at hs
exact (ne_of_lt hi) hs
lemma analyticAt_inverseDenominator {n : β} {c z : Fin n β β} {R : β}
(hR : 0 < R) (hz : z β Metric.ball c R) (i : Fin n) :
AnalyticAt β (fun w => Ring.inverse (denominator c R i w)) z := by
have h : AnalyticAt β Ring.inverse (denominator c R i z) := by
simpa only [IsUnit.unit_spec] using
(analyticAt_inverse (π := β) (isUnit_denominator hR hz i).unit)
exact h.comp (analyticAt_denominator c R i z)
lemma inverseDenominator_apply {n : β} {c z : Fin n β β} {R : β}
(hR : 0 < R) (hz : z β Metric.ball c R) (i : Fin n) (t : Boundary n) :
Ring.inverse (denominator c R i z) t = (circleMap (c i) R (t i).val - z i)β»ΒΉ := by
have h := congrArg (fun F : C(Boundary n, β) => F t)
(Ring.mul_inverse_cancel (denominator c R i z) (isUnit_denominator hR hz i))
change (circleMap (c i) R (t i).val - z i) * _ = 1 at h
exact eq_inv_of_mul_eq_one_right h
lemma boundaryPoint_mem_closedBall {n : β} (c : Fin n β β) {R : β} (hR : 0 β€ R)
(t : Boundary n) : boundaryPoint c R t β Metric.closedBall c R := by
rw [closedBall_pi c hR]
intro i _
exact circleMap_mem_closedBall (c i) hR (t i).val
def boundaryValue {n : β} {c : Fin n β β} {R : β} (hR : 0 β€ R)
{f : (Fin n β β) β β} (hf : ContinuousOn f (Metric.closedBall c R)) :
C(Boundary n, β) :=
β¨fun t => f (boundaryPoint c R t),
hf.comp_continuous (boundaryPoint c R).continuous (boundaryPoint_mem_closedBall c hR)β©
def boundarySpeed {n : β} (R : β) : C(Boundary n, β) :=
β i : Fin n, β¨fun t => circleMap 0 R (t i).val * I, by
exact ((continuous_circleMap 0 R).comp
(continuous_subtype_val.comp (continuous_apply i))).mul continuous_constβ©
def cauchyTransform {n : β} (c : Fin n β β) (R : β) (F : C(Boundary n, β))
(z : Fin n β β) : β :=
boundaryIntegral n (boundarySpeed R * (β i, Ring.inverse (denominator c R i z)) * F)
lemma analyticAt_cauchyTransform {n : β} {c z : Fin n β β} {R : β}
(hR : 0 < R) (hz : z β Metric.ball c R) (F : C(Boundary n, β)) :
AnalyticAt β (cauchyTransform c R F) z := by
have hp : AnalyticAt β (fun w => β i, Ring.inverse (denominator c R i w)) z :=
Finset.analyticAt_fun_prod Finset.univ (fun i _ => analyticAt_inverseDenominator hR hz i)
have h : AnalyticAt β (fun w => boundarySpeed R *
(β i, Ring.inverse (denominator c R i w)) * F) z :=
(analyticAt_const.mul hp).mul analyticAt_const
exact AnalyticAt.comp (f := fun w => boundarySpeed R *
(β i, Ring.inverse (denominator c R i w)) * F)
((boundaryIntegral n).analyticAt _) h
abbrev circleKernel (c : β) (R : β) (z : β) (t : β) : β :=
(circleMap 0 R t * I) * (circleMap c R t - z)β»ΒΉ
lemma cauchyIntegrand_apply {n : β} {c z : Fin n β β} {R : β}
(hR : 0 < R) (hz : z β Metric.ball c R) (F : C(Boundary n, β)) (t : Boundary n) :
(boundarySpeed (n := n) R * (β i, Ring.inverse (denominator c R i z)) * F) t =
(β i, circleKernel (c i) R (z i) (t i).val) * F t := by
simp only [ContinuousMap.mul_apply, boundarySpeed, ContinuousMap.prod_apply,
ContinuousMap.coe_mk, inverseDenominator_apply hR hz]
rw [β Finset.prod_mul_distrib]
lemma circleCauchy {c z : β} {R : β} {f : β β β}
(hf : DifferentiableOn β f (Metric.closedBall c R)) (hz : z β Metric.ball c R) :
(β« t : Angle, circleKernel c R z t.val * f (circleMap c R t.val) βangleMeasure) =
(2 * Real.pi * I) * f z := by
have h := hf.circleIntegral_sub_inv_smul hz
rw [circleIntegral_def_Icc] at h
rw [angleMeasure, integral_subtype_comap (s := Angle) measurableSet_Icc
(fun t => circleKernel c R z t * f (circleMap c R t))]
simpa only [deriv_circleMap, smul_eq_mul, mul_assoc] using h
lemma differentiable_cons_left {n : β} (y : Fin n β β) :
Differentiable β (fun a : β => (Fin.cons a y : Fin (n + 1) β β)) := by
apply differentiable_pi.mpr
intro i
refine Fin.cases ?_ (fun j => ?_) i
Β· simp
Β· simp
lemma differentiable_cons_right {n : β} (a : β) :
Differentiable β (fun y : Fin n β β => (Fin.cons a y : Fin (n + 1) β β)) := by
apply differentiable_pi.mpr
intro i
refine Fin.cases ?_ (fun j => ?_) i
Β· simp
Β· exact (ContinuousLinearMap.proj j : (Fin n β β) βL[β] β).differentiable
lemma cons_mem_closedBall {n : β} {c : Fin (n + 1) β β} {R : β}
(hR : 0 β€ R) {a : β} {y : Fin n β β}
(ha : a β Metric.closedBall (c 0) R)
(hy : y β Metric.closedBall (Fin.tail c) R) :
Fin.cons a y β Metric.closedBall c R := by
rw [closedBall_pi c hR]
rw [closedBall_pi (Fin.tail c) hR] at hy
intro i _
refine Fin.cases ?_ (fun j => ?_) i
Β· exact ha
Β· exact hy j (Set.mem_univ j)
lemma tail_mem_ball {n : β} {c z : Fin (n + 1) β β} {R : β}
(hR : 0 < R) (hz : z β Metric.ball c R) :
Fin.tail z β Metric.ball (Fin.tail c) R := by
rw [ball_pi c hR] at hz
rw [ball_pi (Fin.tail c) hR]
exact fun i _ => hz i.succ (Set.mem_univ _)
lemma boundaryPoint_cons {n : β} (c : Fin (n + 1) β β) (R : β)
(a : Angle) (t : Boundary n) :
boundaryPoint c R (Fin.cons a t) =
Fin.cons (circleMap (c 0) R a.val) (boundaryPoint (Fin.tail c) R t) := by
ext i
refine Fin.cases ?_ (fun j => ?_) i <;> rfl
lemma boundaryIntegral_cauchy (n : β) {c z : Fin n β β} {R : β}
{f : (Fin n β β) β β} (hR : 0 < R)
(hf : DifferentiableOn β f (Metric.closedBall c R)) (hz : z β Metric.ball c R)
(F : C(Boundary n, β))
(hF : β t, F t = (β i, circleKernel (c i) R (z i) (t i).val) *
f (boundaryPoint c R t)) :
boundaryIntegral n F = (2 * Real.pi * I) ^ n * f z := by
induction n with
| zero =>
rw [boundaryIntegral_zero, hF]
simp only [Finset.univ_eq_empty, Finset.prod_empty, one_mul, pow_zero]
congr 1
exact Subsingleton.elim _ _
| succ n ih =>
have hz0 : z 0 β Metric.ball (c 0) R := by
rw [ball_pi c hR] at hz
exact hz 0 (Set.mem_univ _)
have hzt := tail_mem_ball hR hz
rw [boundaryIntegral_succ]
have inner : β a : Angle,
boundaryIntegral n ((F.comp (boundaryCons n)).curry a) =
(2 * Real.pi * I) ^ n *
(circleKernel (c 0) R (z 0) a.val *
f (Fin.cons (circleMap (c 0) R a.val) (Fin.tail z))) := by
intro a
apply ih (c := Fin.tail c) (z := Fin.tail z)
(f := fun y => circleKernel (c 0) R (z 0) a.val *
f (Fin.cons (circleMap (c 0) R a.val) y))
Β· exact (hf.comp (differentiable_cons_right _).differentiableOn
(fun y hy => cons_mem_closedBall hR.le
(circleMap_mem_closedBall (c 0) hR.le a.val) hy)).const_mul _
Β· exact hzt
Β· intro t
change F (Fin.cons a t) = _
rw [hF, Fin.prod_univ_succ, boundaryPoint_cons]
simp only [Fin.cons_zero, Fin.cons_succ, Fin.tail]
ring
simp_rw [inner]
rw [integral_const_mul]
have hslice : DifferentiableOn β (fun a => f (Fin.cons a (Fin.tail z)))
(Metric.closedBall (c 0) R) :=
hf.comp (differentiable_cons_left _).differentiableOn
(fun a ha => cons_mem_closedBall hR.le ha (Metric.ball_subset_closedBall hzt))
rw [circleCauchy hslice hz0, Fin.cons_self_tail, pow_succ]
ring
lemma cauchyTransform_eq {n : β} {c z : Fin n β β} {R : β}
{f : (Fin n β β) β β} (hR : 0 < R)
(hf : DifferentiableOn β f (Metric.closedBall c R)) (hz : z β Metric.ball c R) :
cauchyTransform c R (boundaryValue hR.le hf.continuousOn) z =
(2 * Real.pi * I) ^ n * f z := by
apply boundaryIntegral_cauchy n hR hf hz
intro t
exact cauchyIntegrand_apply hR hz _ t
lemma analyticAt_of_differentiableOn_closedBall {n : β} {c z : Fin n β β} {R : β}
{f : (Fin n β β) β β} (hR : 0 < R)
(hf : DifferentiableOn β f (Metric.closedBall c R)) (hz : z β Metric.ball c R) :
AnalyticAt β f z := by
have h : AnalyticAt β (fun w => ((2 * Real.pi * I) ^ n)β»ΒΉ *
cauchyTransform c R (boundaryValue hR.le hf.continuousOn) w) z :=
analyticAt_const.mul (analyticAt_cauchyTransform hR hz _)
apply h.congr
filter_upwards [Metric.isOpen_ball.mem_nhds hz] with w hw
rw [cauchyTransform_eq hR hf hw]
rw [β mul_assoc, inv_mul_cancelβ (pow_ne_zero n Complex.two_pi_I_ne_zero), one_mul]
theorem analyticOnNhd_of_differentiableOn {n : β} {s : Set (Fin n β β)}
{f : (Fin n β β) β β} (hs : IsOpen s) (hf : DifferentiableOn β f s) :
AnalyticOnNhd β f s := by
intro z hz
obtain β¨R, hR, hsubβ© := Metric.nhds_basis_closedBall.mem_iff.mp (hs.mem_nhds hz)
exact analyticAt_of_differentiableOn_closedBall hR (hf.mono hsub)
(Metric.mem_ball_self hR)
theorem analyticOnNhd_pi_of_differentiableOn {n m : β} {s : Set (Fin n β β)}
{f : (Fin n β β) β (Fin m β β)} (hs : IsOpen s) (hf : DifferentiableOn β f s) :
AnalyticOnNhd β f s := by
intro z hz
apply analyticAt_pi_iff.mpr
intro i
have hi : DifferentiableOn β (fun w => f w i) s :=
(ContinuousLinearMap.proj i : (Fin m β β) βL[β] β).differentiable.comp_differentiableOn hf
exact analyticOnNhd_of_differentiableOn hs hi z hz
theorem contDiffOn_real_pi_of_differentiableOn {n m : β} {s : Set (Fin n β β)}
{f : (Fin n β β) β (Fin m β β)} (hs : IsOpen s) (hf : DifferentiableOn β f s) :
ContDiffOn β β€ f s := by
intro z hz
exact ((analyticOnNhd_pi_of_differentiableOn hs hf z hz).contDiffAt.restrict_scalars β).contDiffWithinAt
end ProjectiveKaehler
noncomputable section
open Matrix
open scoped ComplexOrder Matrix.Norms.Elementwise
namespace ProjectiveKaehler
variable {m n : β}
def mass (x : Fin m β β) : β := star x β¬α΅₯ x
lemma mass_ne_zero {x : Fin m β β} (hx : x β 0) : mass x β 0 := by
simpa only [mass, ne_eq, dotProduct_star_self_eq_zero] using hx
lemma mass_pos {x : Fin m β β} (hx : x β 0) : 0 < mass x :=
lt_of_le_of_ne (dotProduct_star_self_nonneg x) (Ne.symm (mass_ne_zero hx))
@[simp] lemma star_mass (x : Fin m β β) : star (mass x) = mass x := by
exact (Matrix.star_dotProduct x x).symm
def horizontal (x : Fin m β β) : Matrix (Fin m) (Fin m) β :=
1 - (mass x)β»ΒΉ β’ vecMulVec x (star x)
lemma horizontal_mulVec (x u : Fin m β β) :
horizontal x *α΅₯ u = u - ((mass x)β»ΒΉ * (star x β¬α΅₯ u)) β’ x := by
simp [horizontal, sub_mulVec, smul_mulVec, vecMulVec_mulVec, smul_smul]
lemma horizontal_mulVec_eq_zero_iff (x u : Fin m β β) :
horizontal x *α΅₯ u = 0 β u = ((mass x)β»ΒΉ * (star x β¬α΅₯ u)) β’ x := by
rw [horizontal_mulVec, sub_eq_zero]
lemma horizontal_self {x : Fin m β β} (hx : x β 0) : horizontal x *α΅₯ x = 0 := by
rw [horizontal_mulVec]
change x - ((mass x)β»ΒΉ * mass x) β’ x = 0
rw [inv_mul_cancelβ (mass_ne_zero hx), one_smul, sub_self]
lemma horizontal_eq_conjTranspose (x : Fin m β β) : (horizontal x)α΄΄ = horizontal x := by
simp [horizontal, conjTranspose_sub, conjTranspose_smul, conjTranspose_vecMulVec]
lemma horizontal_idempotent {x : Fin m β β} (hx : x β 0) :
horizontal x * horizontal x = horizontal x := by
have hu : β u, horizontal x *α΅₯ (horizontal x *α΅₯ u) = horizontal x *α΅₯ u := by
intro u
have h := congrArg (horizontal x).mulVec (horizontal_mulVec x u)
simpa only [mulVec_sub, mulVec_smul, horizontal_self hx, smul_zero, sub_zero] using h
apply Matrix.ext_of_mulVec_single
intro j
simpa only [mulVec_mulVec] using hu (Pi.single j 1)
def fsMatrix (x : Fin m β β) (D : Matrix (Fin m) (Fin n) β) :
Matrix (Fin n) (Fin n) β :=
(mass x)β»ΒΉ β’ ((horizontal x * D)α΄΄ * (horizontal x * D))
lemma fsMatrix_posDef {x : Fin m β β} {D : Matrix (Fin m) (Fin n) β}
(hx : x β 0) (hD : Function.Injective (horizontal x * D).mulVec) :
(fsMatrix x D).PosDef := by
exact (Matrix.PosDef.conjTranspose_mul_self _ hD).smul (inv_pos.mpr (mass_pos hx))
lemma fsMatrix_eq {x : Fin m β β} (hx : x β 0) (D : Matrix (Fin m) (Fin n) β) :
fsMatrix x D = (mass x)β»ΒΉ β’ (Dα΄΄ * horizontal x * D) := by
unfold fsMatrix
congr 1
rw [conjTranspose_mul, horizontal_eq_conjTranspose, Matrix.mul_assoc,
β Matrix.mul_assoc (horizontal x) (horizontal x) D, horizontal_idempotent hx,
β Matrix.mul_assoc]
@[simp] lemma mass_smul (a : β) (x : Fin m β β) :
mass (a β’ x) = (star a * a) * mass x := by
simp only [mass, star_smul, smul_dotProduct, dotProduct_smul, smul_eq_mul]
ring
lemma horizontal_smul {a : β} (ha : a β 0) {x : Fin m β β} (_hx : x β 0) :
horizontal (a β’ x) = horizontal x := by
unfold horizontal
rw [mass_smul, star_smul, smul_vecMulVec, vecMulVec_smul, smul_smul, smul_smul]
congr 2
have hs : star a β 0 := star_ne_zero.mpr ha
field_simp
lemma horizontal_gauge {x : Fin m β β} (hx : x β 0) (a : β)
(D : Matrix (Fin m) (Fin n) β) (r : Fin n β β) :
horizontal x * (a β’ D + vecMulVec x r) = a β’ (horizontal x * D) := by
rw [Matrix.mul_add, Matrix.mul_smul, mul_vecMulVec, horizontal_self hx]
simp
lemma fsMatrix_gauge {a : β} (ha : a β 0) {x : Fin m β β} (hx : x β 0)
(D : Matrix (Fin m) (Fin n) β) (r : Fin n β β) :
fsMatrix (a β’ x) (a β’ D + vecMulVec x r) = fsMatrix x D := by
simp only [fsMatrix, mass_smul, horizontal_smul ha hx, horizontal_gauge hx,
conjTranspose_smul, Matrix.smul_mul, Matrix.mul_smul, smul_smul]
congr 1
have hs : star a β 0 := star_ne_zero.mpr ha
field_simp
lemma fsMatrix_comp {k : β} (x : Fin m β β) (D : Matrix (Fin m) (Fin n) β)
(L : Matrix (Fin n) (Fin k) β) :
fsMatrix x (D * L) = Lα΄΄ * fsMatrix x D * L := by
simp only [fsMatrix, β Matrix.mul_assoc (horizontal x) D L, conjTranspose_mul,
Matrix.mul_smul, Matrix.smul_mul]
congr 1
simp only [Matrix.mul_assoc]
lemma fsMatrix_pair {x : Fin m β β} (hx : x β 0) (D : Matrix (Fin m) (Fin n) β)
(u v : Fin n β β) :
star u β¬α΅₯ (fsMatrix x D *α΅₯ v) =
(mass x)β»ΒΉ * (star (D *α΅₯ u) β¬α΅₯ (D *α΅₯ v)) - (mass x)β»ΒΉ ^ 2 *
((star (D *α΅₯ u) β¬α΅₯ x) * (star x β¬α΅₯ (D *α΅₯ v))) := by
rw [fsMatrix_eq hx D, smul_mulVec, dotProduct_smul, smul_eq_mul]
rw [β mulVec_mulVec, β mulVec_mulVec, dotProduct_mulVec, β star_mulVec]
rw [horizontal_mulVec, dotProduct_sub, dotProduct_smul, smul_eq_mul]
ring
def jacobianMatrix (f : (Fin n β β) β (Fin m β β)) (z : Fin n β β) :
Matrix (Fin m) (Fin n) β := LinearMap.toMatrix' (fderiv β f z).toLinearMap
@[simp] lemma jacobianMatrix_mulVec (f : (Fin n β β) β (Fin m β β))
(z v : Fin n β β) : jacobianMatrix f z *α΅₯ v = fderiv β f z v :=
LinearMap.toMatrix'_mulVec _ _
lemma normalized_derivative {f : (Fin n β β) β (Fin m β β)} {z : Fin n β β}
(hf : DifferentiableAt β f z) {a : Fin m} (ha : f z a β 0)
(v : Fin n β β) (b : Fin m) :
fderiv β (fun w j => f w j / f w a) z v b =
(fderiv β f z v b * f z a - f z b * fderiv β f z v a) / (f z a)^2 := by
have hd (i : Fin m) : HasFDerivAt (fun w => f w i)
((ContinuousLinearMap.proj i).comp (fderiv β f z)) z :=
(ContinuousLinearMap.proj i : (Fin m β β) βL[β] β).hasFDerivAt.comp z hf.hasFDerivAt
have hdiv (i : Fin m) := (hd i).mul ((hasDerivAt_inv ha).comp_hasFDerivAt z (hd a))
simp only [Pi.mul_def, Function.comp_def] at hdiv
simp only [div_eq_mul_inv]
rw [fderiv_pi (fun i => (hdiv i).differentiableAt)]
change fderiv β (fun w => f w b * (f w a)β»ΒΉ) z v = _
rw [(hdiv b).fderiv]
simp only [_root_.add_apply, _root_.smul_apply,
ContinuousLinearMap.comp_apply, ContinuousLinearMap.proj_apply,
smul_eq_mul]
field_simp
ring
lemma fsMatrix_posDef_of_immersion {f : (Fin n β β) β (Fin m β β)} {z : Fin n β β}
(hf : DifferentiableAt β f z) (hx : f z β 0)
(hImm : β a, f z a β 0 β§
Function.Injective (fderiv β (fun w b => f w b / f w a) z)) :
(fsMatrix (f z) (jacobianMatrix f z)).PosDef := by
apply fsMatrix_posDef hx
obtain β¨a, ha, hImmβ© := hImm
have hk : β v, (horizontal (f z) * jacobianMatrix f z) *α΅₯ v = 0 β v = 0 := by
intro v hv
rw [β mulVec_mulVec, jacobianMatrix_mulVec, horizontal_mulVec_eq_zero_iff] at hv
have hn : fderiv β (fun w b => f w b / f w a) z v = 0 := by
ext b
rw [normalized_derivative hf ha, hv]
simp only [Pi.smul_apply, smul_eq_mul, Pi.zero_apply]
ring
apply hImm
simpa only [map_zero] using hn
intro u v huv
apply sub_eq_zero.mp
apply hk
rw [mulVec_sub, huv, sub_self]
end ProjectiveKaehler
namespace Anticanonical
abbrev Coordinates (d : β) := Fin d β β
def coordinateOverlap {X : Type*} [TopologicalSpace X] {d : β}
(e e' : OpenPartialHomeomorph X (Coordinates d)) : Set (Coordinates d) :=
e.target β© e.symm β»ΒΉ' e'.source
structure ComplexAtlas (d : β) (X : Type*) [TopologicalSpace X] where
count : β
chart : Fin count β OpenPartialHomeomorph X (Coordinates d)
covers : β x : X, β i, x β (chart i).source
holomorphic : β i j, DifferentiableOn β ((chart j) β (chart i).symm)
(coordinateOverlap (chart i) (chart j))
namespace ComplexAtlas
variable {d : β} {X : Type*} [TopologicalSpace X] (A : ComplexAtlas d X)
def transition (i j : Fin A.count) : Coordinates d β Coordinates d :=
A.chart j β (A.chart i).symm
def jacobian (i j : Fin A.count) (x : X) : β :=
Matrix.det (LinearMap.toMatrix'
(fderiv β (A.transition i j) (A.chart i x)).toLinearMap)
structure ProjectiveEmbedding where
ambientDimension : β
map : X β Projectivization β (Fin (ambientDimension + 1) β β)
injective : Function.Injective map
lift : Fin A.count β Coordinates d β (Fin (ambientDimension + 1) β β)
holomorphic_lift : β i, DifferentiableOn β (lift i) (A.chart i).target
lift_ne_zero : β i z, z β (A.chart i).target β lift i z β 0
represents : β i z (hz : z β (A.chart i).target),
map ((A.chart i).symm z) = Projectivization.mk β (lift i z) (lift_ne_zero i z hz)
immersion : β i z, z β (A.chart i).target β
β a : Fin (ambientDimension + 1), lift i z a β 0 β§
Function.Injective (fderiv β (fun w b β¦ lift i w b / lift i w a) z)
end ComplexAtlas
end Anticanonical
namespace Anticanonical.ComplexAtlas
open Filter Topology
variable {d : β} {X : Type*} [TopologicalSpace X] (A : ComplexAtlas d X)
lemma isOpen_coordinateOverlap (i j : Fin A.count) :
IsOpen (coordinateOverlap (A.chart i) (A.chart j)) :=
((A.chart i).symm.trans (A.chart j)).open_source
lemma coordinate_mem_overlap (i j : Fin A.count) {x : X}
(hi : x β (A.chart i).source) (hj : x β (A.chart j).source) :
A.chart i x β coordinateOverlap (A.chart i) (A.chart j) := by
refine β¨(A.chart i).mapsTo hi, ?_β©
change (A.chart i).symm (A.chart i x) β (A.chart j).source
simpa only [(A.chart i).left_inv hi] using hj
lemma transition_at (i j : Fin A.count) {x : X} (hi : x β (A.chart i).source) :
A.transition i j (A.chart i x) = A.chart j x := by
simp only [transition, Function.comp_apply, (A.chart i).left_inv hi]
lemma differentiableAt_transition (i j : Fin A.count) {x : X}
(hi : x β (A.chart i).source) (hj : x β (A.chart j).source) :
DifferentiableAt β (A.transition i j) (A.chart i x) :=
(A.holomorphic i j).differentiableAt
((A.isOpen_coordinateOverlap i j).mem_nhds (A.coordinate_mem_overlap i j hi hj))
end Anticanonical.ComplexAtlas
namespace Anticanonical.ComplexAtlas
open Matrix
open scoped ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] (A : ComplexAtlas d X)
def derivativeMatrix (i j : Fin A.count) (x : X) : Matrix (Fin d) (Fin d) β :=
LinearMap.toMatrix' (fderiv β (A.transition i j) (A.chart i x)).toLinearMap
def fundamentalForm (g : Matrix (Fin d) (Fin d) β)
(u v : Coordinates d) : β :=
(star u β¬α΅₯ (g *α΅₯ v)).im
structure KaehlerMetric where
matrix : Fin A.count β Coordinates d β Matrix (Fin d) (Fin d) β
smooth : β i, ContDiffOn β β€ (matrix i) (A.chart i).target
positive : β i z, z β (A.chart i).target β (matrix i z).PosDef
compatibility : β i j x, x β (A.chart i).source β x β (A.chart j).source β
matrix i (A.chart i x) =
(A.derivativeMatrix i j x)α΄΄ * matrix j (A.chart j x) * A.derivativeMatrix i j x
closed : β i z, z β (A.chart i).target β β u v w : Coordinates d,
fderiv β (fun y β¦ fundamentalForm (matrix i y) v w) z u +
fderiv β (fun y β¦ fundamentalForm (matrix i y) w u) z v +
fderiv β (fun y β¦ fundamentalForm (matrix i y) u v) z w = 0
end Anticanonical.ComplexAtlas
namespace ProjectiveKaehler
open Set Matrix
open scoped ComplexOrder Matrix.Norms.Elementwise
variable {d m n k : β} {s : Set (Fin d β β)}
lemma smooth_conj {f : (Fin d β β) β β} (hf : ContDiffOn β β€ f s) :
ContDiffOn β β€ (fun z => star (f z)) s :=
Complex.conjCLE.contDiff.comp_contDiffOn hf
lemma smooth_mass {f : (Fin d β β) β (Fin m β β)} (hf : ContDiffOn β β€ f s) :
ContDiffOn β β€ (fun z => mass (f z)) s := by
change ContDiffOn β β€ (fun z => β i, star (f z i) * f z i) s
apply ContDiffOn.sum
intro i _
exact (smooth_conj (contDiffOn_pi.mp hf i)).mul (contDiffOn_pi.mp hf i)
lemma smooth_horizontal {f : (Fin d β β) β (Fin m β β)}
(hf : ContDiffOn β β€ f s) (hne : β z β s, f z β 0) :
ContDiffOn β β€ (fun z => horizontal (f z)) s := by
have hi := (smooth_mass hf).inv fun z hz => mass_ne_zero (hne z hz)
apply contDiffOn_pi.mpr
intro i
apply contDiffOn_pi.mpr
intro j
exact contDiffOn_const.sub (hi.mul ((contDiffOn_pi.mp hf i).mul
(smooth_conj (contDiffOn_pi.mp hf j))))
lemma smooth_matrix_mul {F : (Fin d β β) β Matrix (Fin m) (Fin n) β}
{G : (Fin d β β) β Matrix (Fin n) (Fin k) β}
(hF : ContDiffOn β β€ F s) (hG : ContDiffOn β β€ G s) :
ContDiffOn β β€ (fun z => F z * G z) s := by
apply contDiffOn_pi.mpr
intro i
apply contDiffOn_pi.mpr
intro j
change ContDiffOn β β€ (fun z => β l, F z i l * G z l j) s
apply ContDiffOn.sum
intro l _
exact (contDiffOn_pi.mp (contDiffOn_pi.mp hF i) l).mul
(contDiffOn_pi.mp (contDiffOn_pi.mp hG l) j)
lemma smooth_conjTranspose {F : (Fin d β β) β Matrix (Fin m) (Fin n) β}
(hF : ContDiffOn β β€ F s) : ContDiffOn β β€ (fun z => (F z)α΄΄) s := by
apply contDiffOn_pi.mpr
intro i
apply contDiffOn_pi.mpr
intro j
exact smooth_conj (contDiffOn_pi.mp (contDiffOn_pi.mp hF j) i)
lemma smooth_fsMatrix {f : (Fin d β β) β (Fin m β β)}
{D : (Fin d β β) β Matrix (Fin m) (Fin n) β}
(hf : ContDiffOn β β€ f s) (hD : ContDiffOn β β€ D s) (hne : β z β s, f z β 0) :
ContDiffOn β β€ (fun z => fsMatrix (f z) (D z)) s := by
have hQ := smooth_matrix_mul (smooth_horizontal hf hne) hD
exact ((smooth_mass hf).inv (fun z hz => mass_ne_zero (hne z hz))).smul
(smooth_matrix_mul (smooth_conjTranspose hQ) hQ)
lemma smooth_jacobianMatrix {f : (Fin d β β) β (Fin m β β)}
(hs : IsOpen s) (hf : DifferentiableOn β f s) :
ContDiffOn β β€ (jacobianMatrix f) s := by
have hd : ContDiffOn β β€ (fderiv β f) s :=
(analyticOnNhd_pi_of_differentiableOn hs hf).fderiv.contDiffOn hs.uniqueDiffOn
apply contDiffOn_pi.mpr
intro i
apply contDiffOn_pi.mpr
intro j
have hc : ContDiffOn β β€ (fun z => fderiv β f z (Pi.single j 1)) s :=
hd.clm_apply contDiffOn_const
exact (contDiffOn_pi.mp hc i).restrict_scalars β
end ProjectiveKaehler
namespace Anticanonical.ComplexAtlas
open ProjectiveKaehler
open scoped ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
def ProjectiveEmbedding.backgroundMatrix (P : A.ProjectiveEmbedding) (i : Fin A.count)
(z : Coordinates d) : Matrix (Fin d) (Fin d) β :=
fsMatrix (P.lift i z) (jacobianMatrix (P.lift i) z)
lemma ProjectiveEmbedding.backgroundMatrix_smooth (P : A.ProjectiveEmbedding) (i : Fin A.count) :
ContDiffOn β β€ (P.backgroundMatrix i) (A.chart i).target := by
exact smooth_fsMatrix
(contDiffOn_real_pi_of_differentiableOn (A.chart i).open_target (P.holomorphic_lift i))
(smooth_jacobianMatrix (A.chart i).open_target (P.holomorphic_lift i))
(P.lift_ne_zero i)
lemma ProjectiveEmbedding.backgroundMatrix_positive (P : A.ProjectiveEmbedding)
(i : Fin A.count) {z : Coordinates d} (hz : z β (A.chart i).target) :
(P.backgroundMatrix i z).PosDef := by
exact fsMatrix_posDef_of_immersion
((P.holomorphic_lift i).differentiableAt ((A.chart i).open_target.mem_nhds hz))
(P.lift_ne_zero i z hz) (P.immersion i z hz)
end Anticanonical.ComplexAtlas
namespace ProjectiveKaehler
open Filter Topology Matrix
variable {m n k : β}
lemma jacobianMatrix_comp {f : (Fin n β β) β (Fin m β β)}
{g : (Fin k β β) β (Fin n β β)} {z : Fin k β β}
(hf : DifferentiableAt β f (g z)) (hg : DifferentiableAt β g z) :
jacobianMatrix (f β g) z = jacobianMatrix f (g z) * jacobianMatrix g z := by
unfold jacobianMatrix
rw [fderiv_comp z hf hg]
exact LinearMap.toMatrix'_comp _ _
lemma jacobianMatrix_smul {f : (Fin n β β) β (Fin m β β)}
{c : (Fin n β β) β β} {z : Fin n β β}
(hc : DifferentiableAt β c z) (hf : DifferentiableAt β f z) :
jacobianMatrix (fun w => c w β’ f w) z = c z β’ jacobianMatrix f z +
vecMulVec (f z) (fun j => fderiv β c z (Pi.single j 1)) := by
change LinearMap.toMatrix' (fderiv β (c β’ f) z).toLinearMap = _
rw [fderiv_smul hc hf]
ext i j
simp [LinearMap.toMatrix'_apply, jacobianMatrix, vecMulVec, mul_comm]
lemma fsMatrix_eq_of_eventually_proportional
{f g : (Fin n β β) β (Fin m β β)} {z : Fin n β β}
(hf : DifferentiableAt β f z) (hg : DifferentiableAt β g z)
(hfn : f z β 0) (hgn : g z β 0)
(hp : βαΆ w in π z, β c : β, c β’ g w = f w) :
fsMatrix (f z) (jacobianMatrix f z) = fsMatrix (g z) (jacobianMatrix g z) := by
classical
obtain β¨a, haβ© : β a, g z a β 0 := by
by_contra h
push Not at h
exact hgn (funext h)
let c : (Fin n β β) β β := fun w => f w a / g w a
have hd : DifferentiableAt β c z := by
simpa only [c, div_eq_mul_inv, Pi.mul_def, Pi.inv_def] using
(differentiableAt_pi.mp hf a).mul ((differentiableAt_pi.mp hg a).inv ha)
have he : f =αΆ [π z] (fun w => c w β’ g w) := by
filter_upwards [hp, (differentiableAt_pi.mp hg a).continuousAt.eventually_ne ha] with w hw hwa
obtain β¨b, hbβ© := hw
have hwa' : f w a = b * g w a := by
simpa only [Pi.smul_apply, smul_eq_mul] using (congrFun hb a).symm
have hc : c w = b := by simp [c, hwa', hwa]
rw [hc, hb]
have hc : c z β 0 := by
intro h
apply hfn
simpa only [h, zero_smul] using he.self_of_nhds
have hJ : jacobianMatrix f z = jacobianMatrix (fun w => c w β’ g w) z := by
unfold jacobianMatrix
rw [he.fderiv_eq]
rw [he.self_of_nhds, hJ, jacobianMatrix_smul hd hg]
exact fsMatrix_gauge hc hgn _ _
end ProjectiveKaehler
namespace Anticanonical.ComplexAtlas
open ProjectiveKaehler Filter Topology Matrix
open scoped ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
lemma ProjectiveEmbedding.backgroundMatrix_compatibility (P : A.ProjectiveEmbedding)
(i j : Fin A.count) (x : X) (hi : x β (A.chart i).source)
(hj : x β (A.chart j).source) :
P.backgroundMatrix i (A.chart i x) =
(A.derivativeMatrix i j x)α΄΄ * P.backgroundMatrix j (A.chart j x) *
A.derivativeMatrix i j x := by
let z := A.chart i x
have hzi : z β (A.chart i).target := (A.chart i).mapsTo hi
have hzj : A.transition i j z β (A.chart j).target := by
rw [A.transition_at i j hi]
exact (A.chart j).mapsTo hj
have hdi := (P.holomorphic_lift i).differentiableAt ((A.chart i).open_target.mem_nhds hzi)
have hdj := (P.holomorphic_lift j).differentiableAt ((A.chart j).open_target.mem_nhds hzj)
have hdt := A.differentiableAt_transition i j hi hj
have he := fsMatrix_eq_of_eventually_proportional hdi (hdj.comp z hdt)
(P.lift_ne_zero i z hzi) (P.lift_ne_zero j _ hzj) ?_
Β· change fsMatrix (P.lift i z) (jacobianMatrix (P.lift i) z) = _
rw [he, jacobianMatrix_comp hdj hdt, fsMatrix_comp]
simp only [Function.comp_apply, A.transition_at i j hi, derivativeMatrix,
jacobianMatrix, backgroundMatrix, z]
Β· filter_upwards [(A.isOpen_coordinateOverlap i j).mem_nhds
(A.coordinate_mem_overlap i j hi hj)] with w hw
have hwj : A.transition i j w β (A.chart j).target := (A.chart j).mapsTo hw.2
have heq : (A.chart j).symm (A.transition i j w) = (A.chart i).symm w :=
(A.chart j).left_inv hw.2
have hproj : Projectivization.mk β (P.lift i w) (P.lift_ne_zero i w hw.1) =
Projectivization.mk β (P.lift j (A.transition i j w)) (P.lift_ne_zero j _ hwj) := by
rw [β P.represents i w hw.1, β P.represents j _ hwj, heq]
obtain β¨c, hcβ© := (Projectivization.mk_eq_mk_iff β _ _ _ _).mp hproj
exact β¨(c : β), hcβ©
end Anticanonical.ComplexAtlas
noncomputable section
namespace ProjectiveKaehler.Closedness
open Matrix Filter Topology
open scoped ComplexOrder Matrix.Norms.Elementwise
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
variable {m : β}
def pair (x y : Fin m β β) : β := star x β¬α΅₯ y
@[simp] lemma star_pair (x y : Fin m β β) : star (pair x y) = pair y x := by
simp [pair, dotProduct, star_sum, star_mul, mul_comm]
lemma pair_self_ne_zero {x : Fin m β β} (hx : x β 0) : pair x x β 0 := by
simpa only [pair, ne_eq, dotProduct_star_self_eq_zero] using hx
lemma smooth_pair {f g : E β (Fin m β β)} {z : E}
(hf : ContDiffAt β β€ f z) (hg : ContDiffAt β β€ g z) :
ContDiffAt β β€ (fun y => pair (f y) (g y)) z := by
unfold pair dotProduct
apply ContDiffAt.sum
intro i _
exact (Complex.conjCLE.contDiff.contDiffAt.comp z (contDiffAt_pi.mp hf i)).mul
(contDiffAt_pi.mp hg i)
lemma fderiv_pair_apply {f g : E β (Fin m β β)} {z : E}
(hf : DifferentiableAt β f z) (hg : DifferentiableAt β g z) (u : E) :
fderiv β (fun y => pair (f y) (g y)) z u =
pair (fderiv β f z u) (g z) + pair (f z) (fderiv β g z u) := by
have h (i : Fin m) := (differentiableAt_pi.mp hf i).hasFDerivAt.star.mul
(differentiableAt_pi.mp hg i).hasFDerivAt
have hs := HasFDerivAt.fun_sum (u := Finset.univ) (fun i _ => h i)
simp only [Pi.mul_def] at hs
change fderiv β (fun y => β i, star (f y i) * g y i) z u = _
rw [hs.fderiv]
simp only [_root_.sum_apply, Finset.sum_add_distrib, _root_.add_apply,
_root_.smul_apply, ContinuousLinearMap.comp_apply, smul_eq_mul]
simp only [fderiv_apply hf, fderiv_apply hg]
simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.proj_apply]
change (β i, star (f z i) * fderiv β g z u i) +
(β i, g z i * star (fderiv β f z u i)) = _
simp only [pair, dotProduct, Pi.star_apply]
rw [add_comm]
congr 1
apply Finset.sum_congr rfl
intro i _
exact mul_comm _ _
lemma fderiv_eval_derivative {F : Type*} [NormedAddCommGroup F] [NormedSpace β F]
{f : E β F} {z : E} (hf : ContDiffAt β β€ f z) (u v : E) :
fderiv β (fun y => fderiv β f y v) z u = fderiv β (fderiv β f) z u v := by
rw [fderiv_clm_apply ((hf.fderiv_right (m := β€) (by simp)).differentiableAt (by simp))
(differentiableAt_const v)]
simp
lemma second_derivative_symmetric {F : Type*} [NormedAddCommGroup F] [NormedSpace β F]
{f : E β F} {z : E} (hf : ContDiffAt β β€ f z) (u v : E) :
fderiv β (fun y => fderiv β f y v) z u =
fderiv β (fun y => fderiv β f y u) z v := by
rw [fderiv_eval_derivative hf, fderiv_eval_derivative hf]
exact hf.isSymmSndFDerivAt (by simp) u v
def beta (f : E β (Fin m β β)) (w y : E) : β :=
((pair (f y) (f y))β»ΒΉ * pair (f y) (fderiv β f y w)).im
lemma smooth_beta {f : E β (Fin m β β)} {z : E} (hf : ContDiffAt β β€ f z)
(hne : f z β 0) (w : E) : ContDiffAt β β€ (beta f w) z := by
have hd := (hf.fderiv_right (m := β€) (by simp)).clm_apply (contDiffAt_const (c := w))
exact Complex.imCLM.contDiff.contDiffAt.comp z
(((smooth_pair hf hf).inv (pair_self_ne_zero hne)).mul (smooth_pair hf hd))
lemma fderiv_inv_complex_apply {q : E β β} {z : E}
(hq : DifferentiableAt β q z) (hn : q z β 0) (u : E) :
fderiv β (fun y => (q y)β»ΒΉ) z u = -(q z)β»ΒΉ ^ 2 * fderiv β q z u := by
have h := ((hasDerivAt_inv hn).hasFDerivAt.restrictScalars β).comp z hq.hasFDerivAt
simp only [Function.comp_def] at h
rw [h.fderiv]
simp [ContinuousLinearMap.comp_apply, inv_pow, mul_comm]
lemma fderiv_im_apply {q : E β β} {z : E}
(hq : DifferentiableAt β q z) (u : E) :
fderiv β (fun y => (q y).im) z u = (fderiv β q z u).im := by
have h := Complex.imCLM.hasFDerivAt.comp z hq.hasFDerivAt
exact congrArg (fun l : E βL[β] β => l u) h.fderiv
lemma fderiv_beta {f : E β (Fin m β β)} {z : E} (hf : ContDiffAt β β€ f z)
(hne : f z β 0) (u w : E) :
fderiv β (beta f w) z u =
(-(pair (f z) (f z))β»ΒΉ ^ 2 *
(pair (fderiv β f z u) (f z) + pair (f z) (fderiv β f z u)) *
pair (f z) (fderiv β f z w) +
(pair (f z) (f z))β»ΒΉ *
(pair (fderiv β f z u) (fderiv β f z w) +
pair (f z) (fderiv β (fderiv β f) z u w))).im := by
have hD : ContDiffAt β β€ (fun y => fderiv β f y w) z :=
(hf.fderiv_right (by simp)).clm_apply contDiffAt_const
have hQ := (smooth_pair hf hf).differentiableAt (by simp)
have hR := (smooth_pair hf hD).differentiableAt (by simp)
have hI := hQ.inv (pair_self_ne_zero hne)
unfold beta
have hP : DifferentiableAt β (fun y => (pair (f y) (f y))β»ΒΉ *
pair (f y) (fderiv β f y w)) z := by
simpa only [Pi.mul_def, Pi.inv_def] using hI.mul hR
rw [fderiv_im_apply hP]
have hM := fderiv_mul hI hR
simp only [Pi.mul_def, Pi.inv_def] at hM
rw [hM]
simp only [_root_.add_apply, _root_.smul_apply, smul_eq_mul]
rw [fderiv_inv_complex_apply hQ (pair_self_ne_zero hne)]
rw [fderiv_pair_apply (hf.differentiableAt (by simp)) (hf.differentiableAt (by simp)),
fderiv_pair_apply (hf.differentiableAt (by simp)) (hD.differentiableAt (by simp)),
fderiv_eval_derivative hf]
congr 1
ring
lemma anti_beta_algebra (r a b c t : β) (hr : star r = r) :
(-r ^ 2 * (star a + a) * b + r * (c + t)).im -
(-r ^ 2 * (star b + b) * a + r * (star c + t)).im =
2 * (r * c - r ^ 2 * (star a * b)).im := by
rw [β Complex.sub_im]
have h : (-r ^ 2 * (star a + a) * b + r * (c + t)) -
(-r ^ 2 * (star b + b) * a + r * (star c + t)) =
(r * c - r ^ 2 * (star a * b)) - star (r * c - r ^ 2 * (star a * b)) := by
simp only [star_sub, star_mul, star_pow, star_star, hr]
ring
rw [h]
simp only [Complex.sub_im, Complex.star_def, Complex.conj_im]
ring
def omega (f : E β (Fin m β β)) (v w y : E) : β :=
((pair (f y) (f y))β»ΒΉ * pair (fderiv β f y v) (fderiv β f y w) -
(pair (f y) (f y))β»ΒΉ ^ 2 *
(pair (fderiv β f y v) (f y) * pair (f y) (fderiv β f y w))).im
lemma beta_antisym {f : E β (Fin m β β)} {z : E} (hf : ContDiffAt β β€ f z)
(hne : f z β 0) (v w : E) :
fderiv β (beta f w) z v - fderiv β (beta f v) z w = 2 * omega f v w z := by
rw [fderiv_beta hf hne, fderiv_beta hf hne,
(hf.isSymmSndFDerivAt (by simp) w v)]
unfold omega
rw [β star_pair (f z) (fderiv β f z v),
β star_pair (f z) (fderiv β f z w),
β star_pair (fderiv β f z v) (fderiv β f z w)]
apply anti_beta_algebra
simp
lemma cyclic_antisym_derivative {b : E β E β β} {z : E}
(hb : β v, ContDiffAt β β€ (b v) z) (u v w : E) :
fderiv β (fun y => fderiv β (b w) y v - fderiv β (b v) y w) z u +
fderiv β (fun y => fderiv β (b u) y w - fderiv β (b w) y u) z v +
fderiv β (fun y => fderiv β (b v) y u - fderiv β (b u) y v) z w = 0 := by
have hd (a c : E) : DifferentiableAt β (fun y => fderiv β (b a) y c) z :=
(((hb a).fderiv_right (m := β€) (by simp)).clm_apply contDiffAt_const).differentiableAt
(by simp)
simp only [fderiv_fun_sub (hd _ _) (hd _ _), _root_.sub_apply]
rw [second_derivative_symmetric (hb w) u v, second_derivative_symmetric (hb v) u w,
second_derivative_symmetric (hb u) v w]
ring
lemma smooth_omega {f : E β (Fin m β β)} {z : E} (hf : ContDiffAt β β€ f z)
(hne : f z β 0) (v w : E) : ContDiffAt β β€ (omega f v w) z := by
have hD (a : E) : ContDiffAt β β€ (fun y => fderiv β f y a) z :=
(hf.fderiv_right (by simp)).clm_apply contDiffAt_const
have hI := (smooth_pair hf hf).inv (pair_self_ne_zero hne)
exact Complex.imCLM.contDiff.contDiffAt.comp z
((hI.mul (smooth_pair (hD v) (hD w))).sub
((hI.pow 2).mul ((smooth_pair (hD v) hf).mul (smooth_pair hf (hD w)))))
lemma omega_closed {f : E β (Fin m β β)} {U : Set E} (hU : IsOpen U)
(hf : ContDiffOn β β€ f U) (hne : β y β U, f y β 0)
{z : E} (hz : z β U) (u v w : E) :
fderiv β (omega f v w) z u + fderiv β (omega f w u) z v +
fderiv β (omega f u v) z w = 0 := by
have hfc := hf.contDiffAt (hU.mem_nhds hz)
have hbc (a : E) := smooth_beta hfc (hne z hz) a
have he (a b c : E) :
fderiv β (fun y => fderiv β (beta f b) y a - fderiv β (beta f a) y b) z c =
2 * fderiv β (omega f a b) z c := by
have heq : (fun y => fderiv β (beta f b) y a - fderiv β (beta f a) y b)
=αΆ [π z] (fun y => 2 * omega f a b y) := by
filter_upwards [hU.mem_nhds hz] with y hy
exact beta_antisym (hf.contDiffAt (hU.mem_nhds hy)) (hne y hy) a b
rw [heq.fderiv_eq, fderiv_const_mul
((smooth_omega hfc (hne z hz) a b).differentiableAt (by simp))]
rfl
have hc := cyclic_antisym_derivative hbc u v w
rw [he, he, he] at hc
linarith
end ProjectiveKaehler.Closedness
namespace ProjectiveKaehler
open Anticanonical.ComplexAtlas Matrix
variable {m n : β}
lemma fundamentalForm_fs_eq_omega {f : (Fin n β β) β (Fin m β β)}
{z : Fin n β β} (hf : DifferentiableAt β f z) (hne : f z β 0) (v w : Fin n β β) :
fundamentalForm (fsMatrix (f z) (jacobianMatrix f z)) v w =
Closedness.omega f v w z := by
have hd (a : Fin n β β) : fderiv β f z a = fderiv β f z a := by
rw [(hf.hasFDerivAt.restrictScalars β).fderiv]
rfl
unfold fundamentalForm
rw [fsMatrix_pair hne]
simp only [jacobianMatrix_mulVec, Closedness.omega, Closedness.pair, mass, hd]
end ProjectiveKaehler
namespace Anticanonical.ComplexAtlas
open ProjectiveKaehler Filter Topology Matrix
open scoped ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
lemma ProjectiveEmbedding.backgroundMatrix_closed (P : A.ProjectiveEmbedding)
(i : Fin A.count) {z : Coordinates d} (hz : z β (A.chart i).target)
(u v w : Coordinates d) :
fderiv β (fun y => fundamentalForm (P.backgroundMatrix i y) v w) z u +
fderiv β (fun y => fundamentalForm (P.backgroundMatrix i y) w u) z v +
fderiv β (fun y => fundamentalForm (P.backgroundMatrix i y) u v) z w = 0 := by
have hs := contDiffOn_real_pi_of_differentiableOn (A.chart i).open_target
(P.holomorphic_lift i)
have he (a b : Coordinates d) :
(fun y => fundamentalForm (P.backgroundMatrix i y) a b)
=αΆ [π z] Closedness.omega (P.lift i) a b := by
filter_upwards [(A.chart i).open_target.mem_nhds hz] with y hy
exact fundamentalForm_fs_eq_omega
((P.holomorphic_lift i).differentiableAt ((A.chart i).open_target.mem_nhds hy))
(P.lift_ne_zero i y hy) a b
rw [(he v w).fderiv_eq, (he w u).fderiv_eq, (he u v).fderiv_eq]
exact Closedness.omega_closed (A.chart i).open_target hs (P.lift_ne_zero i) hz u v w
def ProjectiveEmbedding.backgroundKaehlerMetric (P : A.ProjectiveEmbedding) : A.KaehlerMetric where
matrix := P.backgroundMatrix
smooth := P.backgroundMatrix_smooth
positive := fun i _ hz => P.backgroundMatrix_positive i hz
compatibility := P.backgroundMatrix_compatibility
closed := fun i _ hz => P.backgroundMatrix_closed i hz
theorem ProjectiveEmbedding.nonemptyKaehlerMetric (P : A.ProjectiveEmbedding) :
Nonempty A.KaehlerMetric := β¨P.backgroundKaehlerMetricβ©
end Anticanonical.ComplexAtlas
namespace Anticanonical.SourceSmooth
open scoped ContDiff ComplexOrder Matrix.Norms.Elementwise
open Matrix
variable {d : β} {X : Type*} [TopologicalSpace X]
def levi (Ο : Coordinates d β β) (z v : Coordinates d) : β :=
(fderiv β (fderiv β Ο) z v) v +
(fderiv β (fderiv β Ο) z (Complex.I β’ v)) (Complex.I β’ v)
structure SemipositiveAnticanonicalMetric (A : ComplexAtlas d X) where
weight : Fin A.count β Coordinates d β β
smooth : β i, ContDiffOn β β (weight i) (A.chart i).target
compatibility : β i j x, x β (A.chart i).source β x β (A.chart j).source β
weight j (A.chart j x) =
weight i (A.chart i x) + Real.log (βA.jacobian i j xβ ^ 2)
semipositive : β i z, z β (A.chart i).target β
β v : Coordinates d, 0 β€ levi (weight i) z v
structure KaehlerMetric (A : ComplexAtlas d X) where
matrix : Fin A.count β Coordinates d β Matrix (Fin d) (Fin d) β
smooth : β i, ContDiffOn β β (matrix i) (A.chart i).target
positive : β i z, z β (A.chart i).target β (matrix i z).PosDef
compatibility : β i j x, x β (A.chart i).source β x β (A.chart j).source β
matrix i (A.chart i x) =
(A.derivativeMatrix i j x)α΄΄ * matrix j (A.chart j x) * A.derivativeMatrix i j x
closed : β i z, z β (A.chart i).target β β u v w : Coordinates d,
fderiv β (fun y β¦ ComplexAtlas.fundamentalForm (matrix i y) v w) z u +
fderiv β (fun y β¦ ComplexAtlas.fundamentalForm (matrix i y) w u) z v +
fderiv β (fun y β¦ ComplexAtlas.fundamentalForm (matrix i y) u v) z w = 0
namespace KaehlerMetric
variable {A : ComplexAtlas d X}
def volumeCoefficient (g : KaehlerMetric A) (i : Fin A.count) (z : Coordinates d) : β :=
(g.matrix i z).det.re
def ricciPotential (g : KaehlerMetric A) (i : Fin A.count) (z : Coordinates d) : β :=
-Real.log (g.volumeCoefficient i z)
def ricciQuadratic (g : KaehlerMetric A) (i : Fin A.count) (z v : Coordinates d) : β :=
levi (g.ricciPotential i) z v
end KaehlerMetric
def PrescribedRicci : Prop :=
β (d : β) (X : Type) [TopologicalSpace X] [T2Space X]
[CompactSpace X] [ConnectedSpace X] (A : ComplexAtlas d X),
Nonempty A.ProjectiveEmbedding β
β h : SemipositiveAnticanonicalMetric A,
β g : KaehlerMetric A, β i z, z β (A.chart i).target β
β v : Coordinates d, g.ricciQuadratic i z v = levi (h.weight i) z v
end Anticanonical.SourceSmooth
namespace Anticanonical.SourceSmooth
open scoped ContDiff
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
def projectiveBackground (P : A.ProjectiveEmbedding) : KaehlerMetric A where
matrix := P.backgroundMatrix
smooth := fun i => (P.backgroundMatrix_smooth i).of_le (by simp)
positive := fun i _ hz => P.backgroundMatrix_positive i hz
compatibility := P.backgroundMatrix_compatibility
closed := fun i _ hz => P.backgroundMatrix_closed i hz
end Anticanonical.SourceSmooth
noncomputable section
namespace PotentialKaehler
open Matrix
open scoped Matrix.Norms.Elementwise ComplexOrder ContDiff
variable {n : β}
abbrev V (n : β) := Fin n β β
abbrev RealBilinear (n : β) := V n βL[β] V n βL[β] β
def hermitianPart (B : RealBilinear n) (u v : V n) : β :=
β¨(B u v + B (Complex.I β’ u) (Complex.I β’ v)) / 4,
(B (Complex.I β’ u) v - B u (Complex.I β’ v)) / 4β©
lemma complex_smul_decompose (a : β) (v : V n) :
a β’ v = a.re β’ v + a.im β’ (Complex.I β’ v) := by
ext i
change a * v i = a.re β’ v i + a.im β’ (Complex.I * v i)
rw [Complex.real_smul, Complex.real_smul, β mul_assoc, β add_mul, Complex.re_add_im]
lemma hermitianPart_add_left (B : RealBilinear n) (u u' v : V n) :
hermitianPart B (u + u') v = hermitianPart B u v + hermitianPart B u' v := by
apply Complex.ext <;> simp [hermitianPart, smul_add, map_add] <;> ring
lemma hermitianPart_add_right (B : RealBilinear n) (u v v' : V n) :
hermitianPart B u (v + v') = hermitianPart B u v + hermitianPart B u v' := by
apply Complex.ext <;> simp [hermitianPart, smul_add, map_add] <;> ring
lemma hermitianPart_real_smul_left (B : RealBilinear n) (a : β) (u v : V n) :
hermitianPart B (a β’ u) v = a β’ hermitianPart B u v := by
apply Complex.ext <;> simp [hermitianPart, smul_comm Complex.I a, map_smul, smul_eq_mul] <;> ring
lemma hermitianPart_real_smul_right (B : RealBilinear n) (a : β) (u v : V n) :
hermitianPart B u (a β’ v) = a β’ hermitianPart B u v := by
apply Complex.ext <;> simp [hermitianPart, smul_comm Complex.I a, map_smul, smul_eq_mul] <;> ring
lemma hermitianPart_I_left (B : RealBilinear n) (u v : V n) :
hermitianPart B (Complex.I β’ u) v = -Complex.I * hermitianPart B u v := by
apply Complex.ext <;> simp [hermitianPart, smul_smul, Complex.I_mul_I, map_neg] <;> ring
lemma hermitianPart_I_right (B : RealBilinear n) (u v : V n) :
hermitianPart B u (Complex.I β’ v) = Complex.I * hermitianPart B u v := by
apply Complex.ext <;> simp [hermitianPart, smul_smul, Complex.I_mul_I, map_neg] <;> ring
lemma hermitianPart_smul_left (B : RealBilinear n) (a : β) (u v : V n) :
hermitianPart B (a β’ u) v = star a * hermitianPart B u v := by
rw [complex_smul_decompose, hermitianPart_add_left,
hermitianPart_real_smul_left, hermitianPart_real_smul_left, hermitianPart_I_left]
apply Complex.ext <;> simp [Complex.mul_re, Complex.mul_im]
lemma hermitianPart_smul_right (B : RealBilinear n) (a : β) (u v : V n) :
hermitianPart B u (a β’ v) = a * hermitianPart B u v := by
rw [complex_smul_decompose, hermitianPart_add_right,
hermitianPart_real_smul_right, hermitianPart_real_smul_right, hermitianPart_I_right]
apply Complex.ext <;> simp [Complex.mul_re, Complex.mul_im]
ring
def hermitianPartForm (B : RealBilinear n) : V n βββ[β] V n ββ[β] β where
toFun u :=
{ toFun := hermitianPart B u
map_add' := hermitianPart_add_right B u
map_smul' := fun a v => hermitianPart_smul_right B a u v }
map_add' u u' := by
apply LinearMap.ext
intro v
exact hermitianPart_add_left B u u' v
map_smul' a u := by
apply LinearMap.ext
intro v
exact hermitianPart_smul_left B a u v
lemma hermitianPart_star (B : RealBilinear n) (hB : β u v, B u v = B v u) (u v : V n) :
star (hermitianPart B u v) = hermitianPart B v u := by
apply Complex.ext <;> simp [hermitianPart, hB u v, hB (Complex.I β’ u) (Complex.I β’ v),
hB (Complex.I β’ u) v, hB u (Complex.I β’ v)]
ring
def hermitianPartMatrix (B : RealBilinear n) : Matrix (Fin n) (Fin n) β :=
LinearMap.toMatrixβ (Pi.basisFun β (Fin n)) (Pi.basisFun β (Fin n)) (hermitianPartForm B)
lemma hermitianPartMatrix_apply (B : RealBilinear n) (i j : Fin n) :
hermitianPartMatrix B i j = hermitianPart B (Pi.single i 1) (Pi.single j 1) := by
simp [hermitianPartMatrix, LinearMap.toMatrixβ_apply, hermitianPartForm]
lemma hermitianPartMatrix_pair (B : RealBilinear n) (u v : V n) :
star u β¬α΅₯ (hermitianPartMatrix B *α΅₯ v) = hermitianPart B u v := by
simpa [hermitianPartMatrix, hermitianPartForm] using
(star_dotProduct_toMatrixβ_mulVec (B := hermitianPartForm B) (Pi.basisFun β (Fin n)) u v)
lemma hermitianPartMatrix_hermitian (B : RealBilinear n) (hB : β u v, B u v = B v u) :
(hermitianPartMatrix B).IsHermitian := by
apply (LinearMap.isSymm_iff_isHermitian_toMatrix (Pi.basisFun β (Fin n))).mp
exact β¨hermitianPart_star B hBβ©
def potentialMatrix (Ο : V n β β) (z : V n) : Matrix (Fin n) (Fin n) β :=
hermitianPartMatrix (fderiv β (fderiv β Ο) z)
lemma potentialMatrix_hermitian {Ο : V n β β} {z : V n}
(hΟ : ContDiffAt β β Ο z) : (potentialMatrix Ο z).IsHermitian := by
apply hermitianPartMatrix_hermitian
exact hΟ.isSymmSndFDerivAt (by simp only [minSmoothness_of_isRCLikeNormedField]; change ((2 : ββ) : WithTop ββ) β€ ((β€ : ββ) : WithTop ββ); exact WithTop.coe_le_coe.mpr le_top)
lemma smooth_hermitianPart {B : V n β RealBilinear n} {z : V n}
(hB : ContDiffAt β β B z) (u v : V n) :
ContDiffAt β β (fun y => hermitianPart (B y) u v) z := by
have hs (a b : V n) : ContDiffAt β β (fun y => B y a b) z :=
(hB.clm_apply contDiffAt_const).clm_apply contDiffAt_const
have hr := ((hs u v).add (hs (Complex.I β’ u) (Complex.I β’ v))).div_const 4
have hi := ((hs (Complex.I β’ u) v).sub (hs u (Complex.I β’ v))).div_const 4
simpa only [hermitianPart, Complex.mk_eq_add_mul_I, Function.comp_def, Complex.ofRealCLM_apply] using
(Complex.ofRealCLM.contDiff.contDiffAt.comp z hr).add
((Complex.ofRealCLM.contDiff.contDiffAt.comp z hi).mul (contDiffAt_const (c := Complex.I)))
lemma potentialMatrix_smooth {Ο : V n β β} {z : V n}
(hΟ : ContDiffAt β β Ο z) : ContDiffAt β β (potentialMatrix Ο) z := by
apply contDiffAt_pi.mpr
intro i
apply contDiffAt_pi.mpr
intro j
simpa only [potentialMatrix, hermitianPartMatrix_apply] using
smooth_hermitianPart ((hΟ.fderiv_right (m := β) (by simp)).fderiv_right (m := β) (by simp))
(Pi.single i 1) (Pi.single j 1)
section Derivatives
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace β E]
[NormedAddCommGroup F] [NormedSpace β F]
lemma fderiv_eval_derivative {f : E β F} {z : E} (hf : ContDiffAt β β f z) (u v : E) :
fderiv β (fun y => fderiv β f y v) z u = fderiv β (fderiv β f) z u v := by
rw [fderiv_clm_apply ((hf.fderiv_right (m := β) (by simp)).differentiableAt (by simp))
(differentiableAt_const v)]
simp
lemma second_derivative_symmetric {f : E β F} {z : E}
(hf : ContDiffAt β β f z) (u v : E) :
fderiv β (fun y => fderiv β f y v) z u =
fderiv β (fun y => fderiv β f y u) z v := by
rw [fderiv_eval_derivative hf, fderiv_eval_derivative hf]
exact hf.isSymmSndFDerivAt (by simp only [minSmoothness_of_isRCLikeNormedField]; change ((2 : ββ) : WithTop ββ) β€ ((β€ : ββ) : WithTop ββ); exact WithTop.coe_le_coe.mpr le_top) u v
lemma cyclic_antisym_derivative {b : E β E β β} {z : E}
(hb : β v, ContDiffAt β β (b v) z) (u v w : E) :
fderiv β (fun y => fderiv β (b w) y v - fderiv β (b v) y w) z u +
fderiv β (fun y => fderiv β (b u) y w - fderiv β (b w) y u) z v +
fderiv β (fun y => fderiv β (b v) y u - fderiv β (b u) y v) z w = 0 := by
have hd (a c : E) : DifferentiableAt β (fun y => fderiv β (b a) y c) z :=
(((hb a).fderiv_right (m := β) (by simp)).clm_apply contDiffAt_const).differentiableAt
(by simp)
simp only [fderiv_fun_sub (hd _ _) (hd _ _), _root_.sub_apply]
rw [second_derivative_symmetric (hb w) u v, second_derivative_symmetric (hb v) u w,
second_derivative_symmetric (hb u) v w]
ring
end Derivatives
def potentialPrimitive (Ο : V n β β) (v z : V n) : β :=
-(fderiv β Ο z (Complex.I β’ v)) / 4
def potentialForm (Ο : V n β β) (u v z : V n) : β :=
(star u β¬α΅₯ (potentialMatrix Ο z *α΅₯ v)).im
lemma potentialPrimitive_smooth {Ο : V n β β} {z : V n}
(hΟ : ContDiffAt β β Ο z) (v : V n) :
ContDiffAt β β (potentialPrimitive Ο v) z :=
(((hΟ.fderiv_right (by simp)).clm_apply contDiffAt_const).neg).div_const 4
lemma potentialPrimitive_derivative {Ο : V n β β} {z : V n}
(hΟ : ContDiffAt β β Ο z) (u v : V n) :
fderiv β (potentialPrimitive Ο v) z u =
-(fderiv β (fderiv β Ο) z u (Complex.I β’ v)) / 4 := by
have hd := ((hΟ.fderiv_right (m := β) (by simp)).clm_apply
(contDiffAt_const (c := Complex.I β’ v))).differentiableAt (by simp)
unfold potentialPrimitive
simp only [div_eq_mul_inv]
have hm := fderiv_mul_const (hd.neg) (4 : β)β»ΒΉ
simp only [Pi.neg_apply] at hm
rw [hm]
rw [fderiv_neg]
simp only [_root_.smul_apply, _root_.neg_apply, smul_eq_mul,
fderiv_eval_derivative hΟ]
ring
lemma potentialPrimitive_antisym {Ο : V n β β} {z : V n}
(hΟ : ContDiffAt β β Ο z) (u v : V n) :
fderiv β (potentialPrimitive Ο v) z u -
fderiv β (potentialPrimitive Ο u) z v = potentialForm Ο u v z := by
rw [potentialPrimitive_derivative hΟ, potentialPrimitive_derivative hΟ]
simp only [potentialForm, potentialMatrix, hermitianPartMatrix_pair, hermitianPart]
rw [hΟ.isSymmSndFDerivAt (by simp only [minSmoothness_of_isRCLikeNormedField]; change ((2 : ββ) : WithTop ββ) β€ ((β€ : ββ) : WithTop ββ); exact WithTop.coe_le_coe.mpr le_top) v (Complex.I β’ u)]
ring
lemma potentialMatrix_closed {Ο : V n β β} {U : Set (V n)}
(hU : IsOpen U) (hΟ : ContDiffOn β β Ο U) {z : V n} (hz : z β U)
(u v w : V n) :
fderiv β (potentialForm Ο v w) z u + fderiv β (potentialForm Ο w u) z v +
fderiv β (potentialForm Ο u v) z w = 0 := by
have he (a b : V n) :
(fun y => fderiv β (potentialPrimitive Ο b) y a -
fderiv β (potentialPrimitive Ο a) y b) =αΆ [nhds z] potentialForm Ο a b := by
filter_upwards [hU.mem_nhds hz] with y hy
exact potentialPrimitive_antisym (hΟ.contDiffAt (hU.mem_nhds hy)) a b
have hc := cyclic_antisym_derivative
(fun a => potentialPrimitive_smooth (hΟ.contDiffAt (hU.mem_nhds hz)) a) u v w
rwa [(he _ _).fderiv_eq, (he _ _).fderiv_eq, (he _ _).fderiv_eq] at hc
section ChainRule
variable {E F G : Type*} [NormedAddCommGroup E] [NormedSpace β E]
[NormedAddCommGroup F] [NormedSpace β F] [NormedAddCommGroup G] [NormedSpace β G]
omit [NormedSpace β E] [NormedSpace β F] in
lemma eventually_differentiableAt {π : Type*} [NontriviallyNormedField π]
[NormedSpace π E] [NormedSpace π F] {f : E β F} {z : E}
(hf : ContDiffAt π β f z) :
βαΆ y in nhds z, DifferentiableAt π f y := by
have h1 : ContDiffAt π 1 f z := (contDiffAt_infty.mp hf) 1
exact (h1.eventually (by simp)).mono fun y hy => hy.differentiableAt (by simp)
lemma second_derivative_comp {f : E β F} {g : F β G} {z : E}
(hf : ContDiffAt β β f z) (hg : ContDiffAt β β g (f z)) (u v : E) :
fderiv β (fderiv β (g β f)) z u v =
fderiv β (fderiv β g) (f z) (fderiv β f z u) (fderiv β f z v) +
fderiv β g (f z) (fderiv β (fderiv β f) z u v) := by
have hfd := hf.differentiableAt (by simp)
have hgd := hg.differentiableAt (by simp)
have hDf := (hf.fderiv_right (m := β) (by simp)).differentiableAt (by simp)
have hDg := (hg.fderiv_right (m := β) (by simp)).differentiableAt (by simp)
have he : fderiv β (g β f) =αΆ [nhds z] fun y =>
(fderiv β g (f y)).comp (fderiv β f y) := by
filter_upwards [eventually_differentiableAt hf,
hf.continuousAt.tendsto.eventually (eventually_differentiableAt hg)] with y hy hy'
exact fderiv_comp y hy' hy
rw [he.fderiv_eq]
have hm := fderiv_clm_comp (hDg.comp z hfd) hDf
simp only [Function.comp_def] at hm
rw [hm]
have hc := fderiv_comp z hDg hfd
simp only [Function.comp_def] at hc
rw [hc]
simp only [_root_.add_apply, ContinuousLinearMap.comp_apply,
ContinuousLinearMap.compL_apply, ContinuousLinearMap.flip_apply]
exact add_comm _ _
end ChainRule
lemma fderiv_complex_smul {m : β} {f : V n β V m} {z : V n}
(hf : DifferentiableAt β f z) (a : β) (v : V n) :
fderiv β f z (a β’ v) = a β’ fderiv β f z v := by
rw [hf.fderiv_restrictScalars (π := β)]
exact map_smul (fderiv β f z) a v
lemma second_derivative_complex_smul_right {m : β} {f : V n β V m} {z : V n}
(hf : ContDiffAt β β f z) (a : β) (u v : V n) :
fderiv β (fderiv β f) z u (a β’ v) =
a β’ fderiv β (fderiv β f) z u v := by
have hr := hf.restrict_scalars β
have hd := ((hr.fderiv_right (m := β) (by simp)).clm_apply
(contDiffAt_const (c := v))).differentiableAt (by simp)
have he : (fun y => fderiv β f y (a β’ v)) =αΆ [nhds z]
(fun y => a β’ fderiv β f y v) := by
filter_upwards [eventually_differentiableAt hf] with y hy
exact fderiv_complex_smul hy a v
have he' := congrArg (fun l : V n βL[β] V m => l u) he.fderiv_eq
rw [fderiv_eval_derivative hr] at he'
have hs : fderiv β (fun y => a β’ fderiv β f y v) z =
a β’ fderiv β (fun y => fderiv β f y v) z := fderiv_const_smul hd a
rw [hs] at he'
simpa only [_root_.smul_apply, fderiv_eval_derivative hr] using he'
lemma second_derivative_complex_smul_left {m : β} {f : V n β V m} {z : V n}
(hf : ContDiffAt β β f z) (a : β) (u v : V n) :
fderiv β (fderiv β f) z (a β’ u) v =
a β’ fderiv β (fderiv β f) z u v := by
have hs := (hf.restrict_scalars β).isSymmSndFDerivAt
(by simp only [minSmoothness_of_isRCLikeNormedField]
change ((2 : ββ) : WithTop ββ) β€ ((β€ : ββ) : WithTop ββ)
exact WithTop.coe_le_coe.mpr le_top)
rw [hs (a β’ u) v, second_derivative_complex_smul_right hf, hs v u]
lemma hermitianPart_comp {m : β} {f : V n β V m} {Ο : V m β β} {z : V n}
(hf : ContDiffAt β β f z) (hΟ : ContDiffAt β β Ο (f z)) (u v : V n) :
hermitianPart (fderiv β (fderiv β (Ο β f)) z) u v =
hermitianPart (fderiv β (fderiv β Ο) (f z))
(fderiv β f z u) (fderiv β f z v) := by
have hr := hf.restrict_scalars β
have hd := hf.differentiableAt (by simp)
apply Complex.ext <;>
simp only [hermitianPart, second_derivative_comp hr hΟ,
fderiv_complex_smul hd, second_derivative_complex_smul_left hf,
second_derivative_complex_smul_right hf, smul_smul, Complex.I_mul_I,
neg_smul, one_smul, map_neg] <;> ring
lemma matrix_pair_pullback {m : β} (H : Matrix (Fin m) (Fin m) β)
(D : Matrix (Fin m) (Fin n) β) (u v : V n) :
star u β¬α΅₯ ((Dα΄΄ * H * D) *α΅₯ v) = star (D *α΅₯ u) β¬α΅₯ (H *α΅₯ (D *α΅₯ v)) := by
rw [β mulVec_mulVec, β mulVec_mulVec, dotProduct_mulVec, β star_mulVec]
lemma matrix_eq_of_pair (H K : Matrix (Fin n) (Fin n) β)
(h : β u v : V n, star u β¬α΅₯ (H *α΅₯ v) = star u β¬α΅₯ (K *α΅₯ v)) : H = K := by
ext i j
simpa using h (Pi.single i 1) (Pi.single j 1)
lemma potentialMatrix_congr {Ο Ο : V n β β} {z : V n}
(he : Ο =αΆ [nhds z] Ο) : potentialMatrix Ο z = potentialMatrix Ο z := by
unfold potentialMatrix
rw [(he.fderiv (π := β)).fderiv_eq]
lemma potentialMatrix_comp {m : β} {f : V n β V m} {Ο : V m β β} {z : V n}
(hf : ContDiffAt β β f z) (hΟ : ContDiffAt β β Ο (f z)) :
potentialMatrix (Ο β f) z =
(LinearMap.toMatrix' (fderiv β f z).toLinearMap)α΄΄ *
potentialMatrix Ο (f z) * LinearMap.toMatrix' (fderiv β f z).toLinearMap := by
apply matrix_eq_of_pair
intro u v
rw [matrix_pair_pullback]
simp only [potentialMatrix, hermitianPartMatrix_pair, LinearMap.toMatrix'_mulVec]
have he := hermitianPart_comp hf hΟ u v
rw [(hf.differentiableAt (by simp)).fderiv_restrictScalars (π := β)] at he
exact he
end PotentialKaehler
namespace Anticanonical.SourceSmooth
open Matrix Filter
open scoped ContDiff ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
structure SmoothRealFunction (A : ComplexAtlas d X) where
value : X β β
smooth : β i, ContDiffOn β β (value β (A.chart i).symm) (A.chart i).target
namespace SmoothRealFunction
def localExpression (Ο : SmoothRealFunction A) (i : Fin A.count) : Coordinates d β β :=
Ο.value β (A.chart i).symm
def hessian (Ο : SmoothRealFunction A) (i : Fin A.count) (z : Coordinates d) :
Matrix (Fin d) (Fin d) β := PotentialKaehler.potentialMatrix (Ο.localExpression i) z
lemma hessian_smooth (Ο : SmoothRealFunction A) (i : Fin A.count) :
ContDiffOn β β (Ο.hessian i) (A.chart i).target := by
intro z hz
exact (PotentialKaehler.potentialMatrix_smooth
((Ο.smooth i).contDiffAt ((A.chart i).open_target.mem_nhds hz))).contDiffWithinAt
lemma hessian_hermitian (Ο : SmoothRealFunction A) (i : Fin A.count)
{z : Coordinates d} (hz : z β (A.chart i).target) : (Ο.hessian i z).IsHermitian :=
PotentialKaehler.potentialMatrix_hermitian
((Ο.smooth i).contDiffAt ((A.chart i).open_target.mem_nhds hz))
lemma hessian_compatibility (Ο : SmoothRealFunction A) (i j : Fin A.count) {x : X}
(hi : x β (A.chart i).source) (hj : x β (A.chart j).source) :
Ο.hessian i (A.chart i x) =
(A.derivativeMatrix i j x)α΄΄ * Ο.hessian j (A.chart j x) * A.derivativeMatrix i j x := by
have hz := A.coordinate_mem_overlap i j hi hj
have ho := A.isOpen_coordinateOverlap i j
have hf : ContDiffAt β β (A.transition i j) (A.chart i x) :=
(ProjectiveKaehler.analyticOnNhd_pi_of_differentiableOn ho (A.holomorphic i j) _ hz).contDiffAt
have hΟ : ContDiffAt β β (Ο.localExpression j) (A.transition i j (A.chart i x)) := by
rw [A.transition_at i j hi]
exact (Ο.smooth j).contDiffAt ((A.chart j).open_target.mem_nhds ((A.chart j).mapsTo hj))
have he : Ο.localExpression i =αΆ [nhds (A.chart i x)]
Ο.localExpression j β A.transition i j := by
filter_upwards [ho.mem_nhds hz] with y hy
dsimp only [localExpression, ComplexAtlas.transition, Function.comp_apply]
rw [(A.chart j).left_inv hy.2]
unfold hessian
rw [PotentialKaehler.potentialMatrix_congr he,
PotentialKaehler.potentialMatrix_comp hf hΟ, A.transition_at i j hi]
rfl
lemma hessian_closed (Ο : SmoothRealFunction A) (i : Fin A.count) {z : Coordinates d}
(hz : z β (A.chart i).target) (u v w : Coordinates d) :
fderiv β (fun y => ComplexAtlas.fundamentalForm (Ο.hessian i y) v w) z u +
fderiv β (fun y => ComplexAtlas.fundamentalForm (Ο.hessian i y) w u) z v +
fderiv β (fun y => ComplexAtlas.fundamentalForm (Ο.hessian i y) u v) z w = 0 :=
PotentialKaehler.potentialMatrix_closed (A.chart i).open_target (Ο.smooth i) hz u v w
end SmoothRealFunction
lemma fundamentalForm_add (H K : Matrix (Fin d) (Fin d) β) (u v : Coordinates d) :
ComplexAtlas.fundamentalForm (H + K) u v =
ComplexAtlas.fundamentalForm H u v + ComplexAtlas.fundamentalForm K u v := by
simp [ComplexAtlas.fundamentalForm, add_mulVec, dotProduct_add]
lemma fundamentalForm_smooth {g : Coordinates d β Matrix (Fin d) (Fin d) β}
{z : Coordinates d} (hg : ContDiffAt β β g z) (u v : Coordinates d) :
ContDiffAt β β (fun y => ComplexAtlas.fundamentalForm (g y) u v) z := by
apply Complex.imCLM.contDiff.contDiffAt.comp z
apply ContDiffAt.sum
intro i _
apply contDiffAt_const.mul
change ContDiffAt β β (fun y => β j, g y i j * v j) z
apply ContDiffAt.sum
intro j _
exact (contDiffAt_pi.mp (contDiffAt_pi.mp hg i) j).mul contDiffAt_const
namespace KaehlerMetric
def PositivePotential (g : KaehlerMetric A) (Ο : SmoothRealFunction A) : Prop :=
β i z, z β (A.chart i).target β (g.matrix i z + Ο.hessian i z).PosDef
def deform (g : KaehlerMetric A) (Ο : SmoothRealFunction A) (hp : g.PositivePotential Ο) :
KaehlerMetric A where
matrix i z := g.matrix i z + Ο.hessian i z
smooth i := (g.smooth i).add (Ο.hessian_smooth i)
positive := hp
compatibility i j x hi hj := by
rw [g.compatibility i j x hi hj, Ο.hessian_compatibility i j hi hj]
simp only [mul_add, add_mul]
closed i z hz u v w := by
have hg := (g.smooth i).contDiffAt ((A.chart i).open_target.mem_nhds hz)
have hΟ := (Ο.hessian_smooth i).contDiffAt ((A.chart i).open_target.mem_nhds hz)
simp only [fundamentalForm_add]
simp only [fderiv_fun_add
((fundamentalForm_smooth hg _ _).differentiableAt (by simp))
((fundamentalForm_smooth hΟ _ _).differentiableAt (by simp)), _root_.add_apply]
have h1 := g.closed i z hz u v w
have h2 := Ο.hessian_closed i hz u v w
linarith
end KaehlerMetric
end Anticanonical.SourceSmooth
open Matrix Polynomial
open scoped Matrix.Norms.Elementwise
noncomputable section
namespace MongeAmpere
variable {n : Type*} [Fintype n] [DecidableEq n]
lemma hasDerivAt_det_one_add_smul (M : Matrix n n β) :
HasDerivAt (fun t : β => (1 + t β’ M).det) M.trace 0 := by
have hp := (Matrix.det (1 + (Polynomial.X : β[X]) β’ M.map Polynomial.C)).hasDerivAt (0 : β)
rw [Matrix.derivative_det_one_add_X_smul] at hp
simpa [eval_det, β Matrix.smul_eq_mul_diagonal] using hp
lemma hasDerivAt_det_add_smul (H K : Matrix n n β) (hH : IsUnit H.det) :
HasDerivAt (fun t : β => (H + t β’ K).det)
(H.det * (Hβ»ΒΉ * K).trace) 0 := by
have hd := (hasDerivAt_det_one_add_smul (Hβ»ΒΉ * K)).const_mul H.det
apply hd.congr_of_eventuallyEq
filter_upwards [] with t
rw [β Matrix.det_mul]
congr 1
simp [Matrix.mul_add, β Matrix.mul_assoc,
Matrix.mul_nonsing_inv _ hH]
open scoped ComplexOrder
lemma hasDerivAt_logdet_add_smul (H K : Matrix n n β) (hH : H.PosDef) :
HasDerivAt (fun t : β => Real.log ((H + (t : β) β’ K).det.re))
(Hβ»ΒΉ * K).trace.re 0 := by
have hd := (hasDerivAt_det_add_smul H K (isUnit_iff_ne_zero.mpr (ne_of_gt hH.det_pos))).real_of_complex
have hp := Complex.pos_iff.mp hH.det_pos
have hne : (H + ((0 : β) : β) β’ K).det.re β 0 := by
simpa using ne_of_gt hp.1
have hl := hd.log hne
simpa [Complex.mul_re, hp.2.symm, hp.1.ne', mul_div_cancel_leftβ] using hl
lemma linearized_symbol_pos (H : Matrix n n β) (hH : H.PosDef)
(v : n β β) (hv : v β 0) :
0 < (Hβ»ΒΉ * Matrix.vecMulVec v (star v)).trace.re := by
rw [Matrix.mul_vecMulVec, Matrix.trace_vecMulVec, dotProduct_comm]
exact hH.inv.re_dotProduct_pos hv
end MongeAmpere
namespace Anticanonical.SourceSmooth
open Matrix
open scoped ContDiff ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
namespace SmoothRealFunction
def constant (c : β) : SmoothRealFunction A where
value _ := c
smooth _ := contDiffOn_const
def realSMul (c : β) (Ο : SmoothRealFunction A) : SmoothRealFunction A where
value x := c * Ο.value x
smooth i := contDiffOn_const.mul (Ο.smooth i)
lemma hessian_constant (c : β) (i : Fin A.count) (z : Coordinates d) :
(constant (A := A) c).hessian i z = 0 := by
ext a b
apply Complex.ext <;> simp [hessian, localExpression, constant, Function.comp_def, PotentialKaehler.potentialMatrix,
PotentialKaehler.hermitianPartMatrix_apply, PotentialKaehler.hermitianPart]
lemma hessian_realSMul (c : β) (Ο : SmoothRealFunction A)
(i : Fin A.count) (z : Coordinates d) :
(Ο.realSMul c).hessian i z = (c : β) β’ Ο.hessian i z := by
unfold hessian PotentialKaehler.potentialMatrix
have he : (Ο.realSMul c).localExpression i = c β’ Ο.localExpression i := rfl
rw [he, fderiv_const_smul_field (π := β) (f := Ο.localExpression i) c]
rw [fderiv_const_smul_field (π := β) (f := fderiv β (Ο.localExpression i)) c]
ext a b
simp only [PotentialKaehler.hermitianPartMatrix_apply, Matrix.smul_apply]
apply Complex.ext <;>
simp [PotentialKaehler.hermitianPart, Pi.smul_apply, smul_eq_mul,
Complex.mul_re, Complex.mul_im] <;> ring
end SmoothRealFunction
namespace KaehlerMetric
def linearizedMongeAmpere (g : KaehlerMetric A) (Ο : SmoothRealFunction A)
(i : Fin A.count) (z : Coordinates d) : β :=
((g.matrix i z)β»ΒΉ * Ο.hessian i z).trace.re
theorem mongeAmpere_directional_derivative (g : KaehlerMetric A)
(Ο : SmoothRealFunction A) (i : Fin A.count) {z : Coordinates d}
(hz : z β (A.chart i).target) :
HasDerivAt (fun t : β =>
Real.log ((g.matrix i z + (Ο.realSMul t).hessian i z).det.re) -
Real.log (g.volumeCoefficient i z)) (g.linearizedMongeAmpere Ο i z) 0 := by
simp only [SmoothRealFunction.hessian_realSMul]
exact (MongeAmpere.hasDerivAt_logdet_add_smul _ _ (g.positive i z hz)).sub_const _
lemma linearizedMongeAmpere_constant (g : KaehlerMetric A) (c : β) :
g.linearizedMongeAmpere (SmoothRealFunction.constant c) = 0 := by
funext i z
simp [linearizedMongeAmpere, SmoothRealFunction.hessian_constant]
theorem linearizedMongeAmpere_not_injective [Nonempty X] (g : KaehlerMetric A) :
Β¬ Function.Injective g.linearizedMongeAmpere := by
intro h
have hc : SmoothRealFunction.constant (A := A) 0 = SmoothRealFunction.constant 1 :=
h (by rw [linearizedMongeAmpere_constant, linearizedMongeAmpere_constant])
let x : X := Classical.choice inferInstance
have he := congrArg (fun Ο : SmoothRealFunction A => Ο.value x) hc
simp [SmoothRealFunction.constant] at he
end KaehlerMetric
end Anticanonical.SourceSmooth
namespace EllipticKernel
open Filter Set
open scoped ContDiff
lemma second_deriv_nonpos_at_localMax {f : β β β} {x : β}
(hmax : IsLocalMax f x) (hc : ContinuousAt f x) : deriv (deriv f) x β€ 0 := by
by_contra h
have hpos : 0 < deriv (deriv f) x := lt_of_not_ge h
have hmin := isLocalMin_of_deriv_deriv_pos hpos hmax.deriv_eq_zero hc
have he : f =αΆ [nhds x] fun _ => f x := by
filter_upwards [hmax, hmin] with y hy hy'
exact le_antisymm hy hy'
have hd : deriv f =αΆ [nhds x] fun _ => 0 := by
simpa using he.deriv
have hdd : deriv (deriv f) x = 0 := by
simpa using hd.deriv_eq
exact (ne_of_gt hpos) hdd
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
lemma second_fderiv_nonpos_at_localMax {f : E β β} {x : E}
(hf : ContDiffAt β β f x) (hmax : IsLocalMax f x) (v : E) :
fderiv β (fderiv β f) x v v β€ 0 := by
let r : β β E := fun t => x + t β’ v
have hr : ContDiff β β r := contDiff_const.add (contDiff_id.smul contDiff_const)
have hr0 : r 0 = x := by simp [r]
have hfr : ContDiffAt β β (f β r) 0 := (show ContDiffAt β β f (r 0) by simpa only [hr0] using hf).comp 0 hr.contDiffAt
have hmr : IsLocalMax (f β r) 0 :=
(hr0.symm βΈ hmax).comp_continuous hr.continuous.continuousAt
have hle := second_deriv_nonpos_at_localMax hmr hfr.continuousAt
have hd2 : deriv (deriv (f β r)) 0 = fderiv β (fderiv β (f β r)) 0 1 1 :=
PotentialKaehler.fderiv_eval_derivative hfr 1 1
rw [hd2, PotentialKaehler.second_derivative_comp hr.contDiffAt
(by simpa only [hr0] using hf) 1 1] at hle
have hDr : fderiv β r = fun _ => ContinuousLinearMap.smulRight (ContinuousLinearMap.id β β) v := by
funext t
simpa [r] using
((hasFDerivAt_id t).smul_const v).const_add x |>.fderiv
rw [hDr] at hle
simpa [hr0] using hle
end EllipticKernel
namespace EllipticKernel
open Matrix
open scoped MatrixOrder ComplexOrder Matrix.Norms.Elementwise ContDiff
lemma trace_mul_nonneg {n : Type*} [Fintype n] [DecidableEq n]
{A B : Matrix n n β} (hA : A.PosSemidef) (hB : B.PosSemidef) :
0 β€ (A * B).trace.re := by
let S := CFC.sqrt A
have hS : S.PosSemidef := (CFC.sqrt_nonneg A).posSemidef
have hsquare : S * S = A := by simpa [S, pow_two] using CFC.sq_sqrt A hA.nonneg
have htr := Complex.nonneg_iff.mp (hB.mul_mul_conjTranspose_same S).trace_nonneg
have heq : (S * B * Sα΄΄).trace = (A * B).trace := by
rw [hS.isHermitian.eq, Matrix.trace_mul_cycle, hsquare]
rw [heq] at htr
exact htr.1
lemma negative_potentialMatrix_posSemidef_at_localMax {n : β}
{f : PotentialKaehler.V n β β} {x : PotentialKaehler.V n}
(hf : ContDiffAt β β f x) (hmax : IsLocalMax f x) :
(-PotentialKaehler.potentialMatrix f x).PosSemidef := by
refine Matrix.posSemidef_iff_dotProduct_mulVec.mpr
β¨(PotentialKaehler.potentialMatrix_hermitian hf).neg, ?_β©
intro v
rw [neg_mulVec, dotProduct_neg]
rw [PotentialKaehler.potentialMatrix,
PotentialKaehler.hermitianPartMatrix_pair]
apply Complex.nonneg_iff.mpr
constructor
Β· simp only [Complex.neg_re, PotentialKaehler.hermitianPart]
have h1 := second_fderiv_nonpos_at_localMax hf hmax v
have h2 := second_fderiv_nonpos_at_localMax hf hmax (Complex.I β’ v)
linarith
Β· simp only [Complex.neg_im, PotentialKaehler.hermitianPart]
have hs := hf.isSymmSndFDerivAt (by
simp only [minSmoothness_of_isRCLikeNormedField]
change ((2 : ββ) : WithTop ββ) β€ ((β€ : ββ) : WithTop ββ)
exact WithTop.coe_le_coe.mpr le_top) (Complex.I β’ v) v
rw [hs]
ring
lemma trace_potentialMatrix_nonpos_at_localMax {n : β}
{f : PotentialKaehler.V n β β} {x : PotentialKaehler.V n}
(hf : ContDiffAt β β f x) (hmax : IsLocalMax f x)
(H : Matrix (Fin n) (Fin n) β) (hH : H.PosDef) :
(Hβ»ΒΉ * PotentialKaehler.potentialMatrix f x).trace.re β€ 0 := by
have ht := trace_mul_nonneg hH.inv.posSemidef
(negative_potentialMatrix_posSemidef_at_localMax hf hmax)
simpa using ht
end EllipticKernel
noncomputable section
open Filter Set
open scoped ContDiff
namespace EllipticKernel
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E]
abbrev Bilin (E : Type*) [NormedAddCommGroup E] [NormedSpace β E] :=
E βL[β] E βL[β] β
abbrev SecondOrder (E : Type*) [NormedAddCommGroup E] [NormedSpace β E] :=
Bilin E βL[β] β
local instance barrierBilinNormedAddCommGroup : NormedAddCommGroup (Bilin E) := inferInstance
local instance barrierBilinNormedSpace : NormedSpace β (Bilin E) := inferInstance
def realInner : Bilin E := innerSL β (E := E)
lemma realInner_apply (u v : E) : realInner u v = inner β u v := by
exact innerSL_apply_apply β u v
def rankOne (v : E) : Bilin E := (realInner v).smulRight (realInner v)
def barrier (Ξ± : β) (y : E) (z : E) : β := Real.exp (-Ξ± * βz-yβ^2)
lemma barrier_smooth (Ξ± : β) (y : E) : ContDiff β β (barrier Ξ± y) :=
(contDiff_const.mul ((contDiff_id.sub contDiff_const).norm_sq β)).exp
lemma barrier_hasFDerivAt (Ξ± : β) (y z : E) :
HasFDerivAt (barrier Ξ± y)
((Real.exp (-Ξ± * βz-yβ^2) * (-2*Ξ±)) β’ realInner (z-y)) z := by
have h := ((((hasFDerivAt_id z).sub_const y).norm_sq).const_mul (-Ξ±)).exp
change HasFDerivAt (fun x => Real.exp (-Ξ± * βx-yβ^2)) _ z
convert! h using 1
ext v
simp only [_root_.smul_apply, realInner_apply, ContinuousLinearMap.comp_apply,
ContinuousLinearMap.id_apply, id_eq, innerSL_apply_apply, smul_eq_mul]
ring
lemma barrier_fderiv (Ξ± : β) (y : E) :
fderiv β (barrier Ξ± y) = fun z =>
(Real.exp (-Ξ± * βz-yβ^2) * (-2*Ξ±)) β’ realInner (z-y) := by
funext z
exact (barrier_hasFDerivAt Ξ± y z).fderiv
lemma barrier_hessian (Ξ± : β) (y z : E) :
fderiv β (fderiv β (barrier Ξ± y)) z =
Real.exp (-Ξ± * βz-yβ^2) β’
((4*Ξ±^2) β’ rankOne (z-y) - (2*Ξ±) β’ (realInner (E := E))) := by
rw [barrier_fderiv]
have hβ := (barrier_hasFDerivAt Ξ± y z).mul_const (-2*Ξ±)
have hβ := (realInner (E := E)).hasFDerivAt.comp z ((hasFDerivAt_id z).sub_const y)
have hh := hβ.smul hβ
have he := hh.fderiv
simp only [Function.comp_def, id_eq] at he
change fderiv β (fun z => (barrier Ξ± y z * (-2*Ξ±)) β’ realInner (z-y)) z = _
convert! he using 1
ext u v
simp [rankOne, barrier, realInner, ContinuousLinearMap.smulRight_apply]
ring
end EllipticKernel
namespace EllipticKernel
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E]
local instance rankOneBilinNormedAddCommGroup : NormedAddCommGroup (Bilin E) := inferInstance
local instance rankOneBilinNormedSpace : NormedSpace β (Bilin E) := inferInstance
lemma continuous_rankOne : Continuous (rankOne (E := E)) := by
unfold rankOne
exact ((ContinuousLinearMap.smulRightL β E (E βL[β] β)).continuous.comp
(realInner (E := E)).continuous).clm_apply (realInner (E := E)).continuous
lemma exists_positive_barrier {s : Set E} (hs : IsCompact s)
(β : E β SecondOrder E) (hβ : ContinuousOn β s) (y : E)
(hpos : β z β s, 0 < β z (rankOne (z-y))) :
β Ξ± : β, 0 < Ξ± β§ β z β s,
0 < β z (fderiv β (fderiv β (barrier Ξ± y)) z) := by
by_cases hne : s.Nonempty
Β· let a : E β β := fun z => β z (rankOne (z-y))
let b : E β β := fun z => β z (realInner (E := E))
have ha : ContinuousOn a s :=
hβ.clm_apply (continuous_rankOne.comp (continuous_id.sub continuous_const)).continuousOn
have hb : ContinuousOn b s := hβ.clm_apply continuousOn_const
have hq : ContinuousOn (fun z => b z / (2*a z)) s :=
hb.div (continuousOn_const.mul ha) (fun z hz => mul_ne_zero (by norm_num) (ne_of_gt (hpos z hz)))
obtain β¨zβ, hzβ, hmaxβ© := hs.exists_isMaxOn hne hq
let Ξ± := max (b zβ / (2*a zβ)) 0 + 1
have hΞ± : 0 < Ξ± := by dsimp [Ξ±]; positivity
refine β¨Ξ±, hΞ±, ?_β©
intro z hz
have haq : b z / (2*a z) < Ξ± := lt_of_le_of_lt (hmax hz)
(by dsimp [Ξ±]; linarith [le_max_left (b zβ / (2*a zβ)) 0])
have haz : 0 < a z := hpos z hz
have hba : b z < 2*Ξ±*a z := by
have := (div_lt_iffβ (by positivity : 0 < 2*a z)).mp haq
nlinarith
rw [barrier_hessian]
simp only [map_smul, map_sub, smul_eq_mul]
change 0 < Real.exp (-Ξ±*βz-yβ^2) * (4*Ξ±^2 * a z - 2*Ξ± * b z)
apply mul_pos (Real.exp_pos _)
nlinarith [mul_pos hΞ± (sub_pos.mpr hba)]
Β· exact β¨1, by norm_num, fun z hz => False.elim (hne β¨z, hzβ©)β©
end EllipticKernel
namespace EllipticKernel
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
lemma hessian_add {f g : E β β} {z : E}
(hf : ContDiffAt β β f z) (hg : ContDiffAt β β g z) :
fderiv β (fderiv β (f+g)) z =
fderiv β (fderiv β f) z + fderiv β (fderiv β g) z := by
have ef : βαΆ x in nhds z, DifferentiableAt β f x :=
(((contDiffAt_infty.mp hf) 1).eventually (by simp)).mono
(fun _ h => h.differentiableAt (by simp))
have eg : βαΆ x in nhds z, DifferentiableAt β g x :=
(((contDiffAt_infty.mp hg) 1).eventually (by simp)).mono
(fun _ h => h.differentiableAt (by simp))
have he : fderiv β (f+g) =αΆ [nhds z] (fderiv β f + fderiv β g) := by
filter_upwards [ef, eg] with x hx hx'
exact fderiv_add hx hx'
rw [he.fderiv_eq]
exact fderiv_add ((hf.fderiv_right (m := β) (by simp)).differentiableAt (by simp))
((hg.fderiv_right (m := β) (by simp)).differentiableAt (by simp))
lemma hessian_add_smul_sub_const {f g : E β β} {z : E}
(hf : ContDiffAt β β f z) (hg : ContDiffAt β β g z) (Ξ΅ c : β) :
fderiv β (fderiv β (fun z => f z + Ξ΅ * (g z-c))) z =
fderiv β (fderiv β f) z + Ξ΅ β’ fderiv β (fderiv β g) z := by
change fderiv β (fderiv β (f + Ξ΅ β’ (fun z => g z-c))) z = _
rw [hessian_add hf (show ContDiffAt β β (Ξ΅ β’ (fun z => g z-c)) z from
(hg.sub contDiffAt_const).const_smul Ξ΅)]
rw [fderiv_const_smul_field (π := β) (f := fun z => g z-c) Ξ΅]
rw [fderiv_const_smul_field (π := β) (f := fderiv β (fun z => g z-c)) Ξ΅]
have he : fderiv β (fun z => g z-c) = fderiv β g := by
funext x; exact fderiv_sub_const c
rw [he]
rfl
end EllipticKernel
noncomputable section
open Set Filter Metric
namespace EllipticKernel
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [ProperSpace E]
omit [NormedSpace β E] in
lemma annulus_le_of_no_localMax {u : E β β} {y : E} {r M : β}
(hu : ContinuousOn u (closedBall y r \ ball y (r/2)))
(hinner : β z, dist z y = r/2 β u z β€ M)
(houter : β z, dist z y = r β u z β€ M)
(hmax : β z, r/2 < dist z y β dist z y < r β Β¬IsLocalMax u z) :
β z β closedBall y r \ ball y (r/2), u z β€ M := by
intro z hz
have hc : IsCompact (closedBall y r \ ball y (r/2)) :=
(isCompact_closedBall y r).diff isOpen_ball
obtain β¨p, hp, hpmβ© := hc.exists_isMaxOn β¨z, hzβ© hu
have hpβ : dist p y β€ r := hp.1
have hpβ : r/2 β€ dist p y := le_of_not_gt hp.2
have hbound : u p β€ M := by
by_cases hlow : dist p y = r/2
Β· exact hinner p hlow
by_cases hhigh : dist p y = r
Β· exact houter p hhigh
have hlow' : r/2 < dist p y := lt_of_le_of_ne hpβ (Ne.symm hlow)
have hhigh' : dist p y < r := lt_of_le_of_ne hpβ hhigh
have hn : closedBall y r \ ball y (r/2) β nhds p := by
have hβ : {q : E | dist q y < r} β nhds p :=
(isOpen_lt (continuous_id.dist continuous_const) continuous_const).mem_nhds hhigh'
have hβ : {q : E | r/2 < dist q y} β nhds p :=
(isOpen_lt continuous_const (continuous_id.dist continuous_const)).mem_nhds hlow'
filter_upwards [hβ, hβ] with q hqβ hqβ
exact β¨le_of_lt hqβ, not_lt_of_gt hqββ©
exact False.elim (hmax p hlow' hhigh' (hpm.isLocalMax hn))
exact le_trans (hpm hz) hbound
end EllipticKernel
namespace EllipticKernel
open Set Metric Filter
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [ProperSpace E]
omit [NormedSpace β E] in
lemma tangent_ball {f : E β β} {U : Set E} {x y : E} {Ξ΄ M : β}
(hΞ΄ : 0 < Ξ΄) (hU : closedBall x Ξ΄ β U) (hf : ContinuousOn f U)
(hle : β z β U, f z β€ M) (hx : f x = M)
(hy : y β ball x (Ξ΄/4)) (hyf : f y < M) :
β r : β, 0 < r β§ closedBall y r β U β§
(β z β ball y r, f z < M) β§
β p : E, dist p y = r β§ f p = M := by
let S := closedBall x (Ξ΄/2) β© f β»ΒΉ' {M}
have hhalf : closedBall x (Ξ΄/2) β U :=
subset_trans (closedBall_subset_closedBall (by linarith)) hU
have hSclosed : IsClosed S :=
(hf.mono hhalf).preimage_isClosed_of_isClosed isClosed_closedBall isClosed_singleton
have hScompact : IsCompact S := (isCompact_closedBall x (Ξ΄/2)).of_isClosed_subset
hSclosed inter_subset_left
have hxS : x β S := β¨by simp only [mem_closedBall, dist_self]; linarith, hxβ©
obtain β¨p, hp, hminβ© := hScompact.exists_isMinOn β¨x, hxSβ©
(continuous_id.dist continuous_const).continuousOn
let r := dist p y
have hrle : r β€ dist x y := hmin hxS
have hye : dist y x < Ξ΄/4 := hy
have hrsmall : r < Ξ΄/4 := lt_of_le_of_lt hrle (by simpa [dist_comm] using hye)
have hpval : f p = M := hp.2
have hpy : p β y := by intro h; rw [h] at hpval; linarith
have hr : 0 < r := dist_pos.mpr hpy
have hsub : closedBall y r β closedBall x (Ξ΄/2) := by
intro z hz
have hz' : dist z y β€ r := hz
have htri := dist_triangle z y x
show dist z x β€ Ξ΄/2
linarith
refine β¨r, hr, subset_trans hsub hhalf, ?_, p, rfl, hpvalβ©
intro z hz
have hzhalf := hsub (ball_subset_closedBall hz)
have hzU := hhalf hzhalf
refine lt_of_le_of_ne (hle z hzU) ?_
intro heq
have hzS : z β S := β¨hzhalf, heqβ©
have hzd : r β€ dist z y := hmin hzS
exact (not_lt_of_ge hzd) hz
end EllipticKernel
namespace EllipticKernel
open Set Filter Metric
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] [ProperSpace E]
local instance tangentMaxBilinNormedAddCommGroup : NormedAddCommGroup (Bilin E) := inferInstance
local instance tangentMaxBilinNormedSpace : NormedSpace β (Bilin E) := inferInstance
lemma no_tangent_max {f : E β β} {U : Set E} (hU : IsOpen U)
(hf : ContDiffOn β β f U) (β : E β SecondOrder E) (hβ : ContinuousOn β U)
(hell : β z β U, β v : E, v β 0 β 0 < β z (rankOne v))
(htest : β z β U, β u : E β β, ContDiffAt β β u z β IsLocalMax u z β
β z (fderiv β (fderiv β u) z) β€ 0)
(hharm : β z β U, β z (fderiv β (fderiv β f) z) = 0)
{M r : β} {y p : E} (hle : β z β U, f z β€ M)
(hr : 0 < r) (hball : closedBall y r β U)
(hstrict : β z β ball y r, f z < M)
(hp : dist p y = r) (hfp : f p = M) : False := by
let K := closedBall y r \ ball y (r/2)
have hK : IsCompact K := (isCompact_closedBall y r).diff isOpen_ball
have hKU : K β U := fun _ hz => hball hz.1
obtain β¨Ξ±, hΞ±, hbarβ© := exists_positive_barrier hK β (hβ.mono hKU) y (by
intro z hz
apply hell z (hKU hz)
intro he
have hzy : z = y := sub_eq_zero.mp he
have hh : Β¬dist z y < r/2 := hz.2
rw [hzy, dist_self] at hh
linarith)
have hhalf : closedBall y (r/2) β ball y r := closedBall_subset_ball (by linarith)
obtain β¨q, hq, hqmβ© := (isCompact_closedBall y (r/2)).exists_isMaxOn
β¨y, by simp only [mem_closedBall, dist_self]; linarithβ©
(hf.continuousOn.mono (subset_trans hhalf (subset_trans ball_subset_closedBall hball)))
have hqf : f q < M := hstrict q (hhalf hq)
let Ξ΅ := M - f q
have hΞ΅ : 0 < Ξ΅ := sub_pos.mpr hqf
let c := Real.exp (-Ξ±*r^2)
let u : E β β := fun z => f z + Ξ΅*(barrier Ξ± y z-c)
have hus : ContDiffOn β β u U :=
hf.add (contDiffOn_const.mul ((barrier_smooth Ξ± y).contDiffOn.sub contDiffOn_const))
have hble : β z : E, barrier Ξ± y z-c β€ 1 := by
intro z
have he : barrier Ξ± y z β€ 1 := Real.exp_le_one_iff.mpr
(mul_nonpos_of_nonpos_of_nonneg (by linarith) (sq_nonneg _))
have hc : 0 < c := Real.exp_pos _
linarith
have houter : β z : E, dist z y = r β u z β€ M := by
intro z hz
have hzU := hball (show z β closedBall y r from le_of_eq hz)
have hb : barrier Ξ± y z = c := by simp [barrier, β dist_eq_norm, hz, c]
simpa [u, hb] using hle z hzU
have hinner : β z : E, dist z y = r/2 β u z β€ M := by
intro z hz
have hfz : f z β€ f q := hqm (show z β closedBall y (r/2) from le_of_eq hz)
have hh := mul_le_mul_of_nonneg_left (hble z) hΞ΅.le
dsimp [u, Ξ΅] at *
linarith
have hno : β z, r/2 < dist z y β dist z y < r β Β¬IsLocalMax u z := by
intro z hzβ hzβ hm
have hzK : z β K := β¨le_of_lt hzβ, not_lt_of_gt hzββ©
have hzU := hKU hzK
have hleu := htest z hzU u (hus.contDiffAt (hU.mem_nhds hzU)) hm
have he : fderiv β (fderiv β u) z =
fderiv β (fderiv β f) z + Ξ΅ β’ fderiv β (fderiv β (barrier Ξ± y)) z :=
hessian_add_smul_sub_const (hf.contDiffAt (hU.mem_nhds hzU))
(barrier_smooth Ξ± y).contDiffAt Ξ΅ c
rw [he, map_add, map_smul, hharm z hzU, zero_add, smul_eq_mul] at hleu
exact (not_lt_of_ge hleu) (mul_pos hΞ΅ (hbar z hzK))
have huK : β z β K, u z β€ M := annulus_le_of_no_localMax
(hus.continuousOn.mono hKU) hinner houter hno
have hpU := hball (show p β closedBall y r from le_of_eq hp)
have hbp : barrier Ξ± y p = c := by simp [barrier, β dist_eq_norm, hp, c]
have hup : u p = M := by simp [u, hbp, hfp]
have humax : IsLocalMax u p := by
have hn : {z : E | r/2 < dist z y} β nhds p :=
(isOpen_lt continuous_const (continuous_id.dist continuous_const)).mem_nhds
(by change r/2 < dist p y; rw [hp]; linarith)
filter_upwards [hU.mem_nhds hpU, hn] with z hzU hz
rw [hup]
by_cases hd : dist z y β€ r
Β· exact huK z β¨hd, not_lt_of_gt hzβ©
have hd' : r β€ dist z y := le_of_lt (lt_of_not_ge hd)
have hsq : r^2 β€ βz-yβ^2 := by rw [β dist_eq_norm]; nlinarith [dist_nonneg (x := z) (y := y)]
have hb : barrier Ξ± y z β€ c := Real.exp_le_exp.mpr (by nlinarith)
have hfz := hle z hzU
have hh : Ξ΅ * (barrier Ξ± y z-c) β€ 0 := mul_nonpos_of_nonneg_of_nonpos hΞ΅.le (sub_nonpos.mpr hb)
dsimp [u]
linarith
have hfmax : IsLocalMax f p := by
filter_upwards [hU.mem_nhds hpU] with z hz
simpa [hfp] using hle z hz
have hdu := (hf.contDiffAt (hU.mem_nhds hpU)).differentiableAt (by simp) |>.hasFDerivAt
have hdb := ((barrier_hasFDerivAt Ξ± y p).sub_const c).const_mul Ξ΅
have he := (hdu.add hdb).fderiv
change fderiv β u p = _ at he
rw [humax.fderiv_eq_zero, hfmax.fderiv_eq_zero] at he
have hv := congrArg (fun L : E βL[β] β => L (p-y)) he
have hn : βp-yβ^2 > 0 := by rw [β dist_eq_norm, hp]; positivity
have hneg : Ξ΅ * (Real.exp (-Ξ±*βp-yβ^2) * (-2*Ξ±)) * βp-yβ^2 < 0 := by
exact mul_neg_of_neg_of_pos (mul_neg_of_pos_of_neg hΞ΅
(mul_neg_of_pos_of_neg (Real.exp_pos _) (by linarith))) hn
have hv' : 0 = Ξ΅ * (Real.exp (-Ξ±*βp-yβ^2) * (-2*Ξ±)) * βp-yβ^2 := by
simpa only [_root_.smul_apply, _root_.zero_apply, zero_add, _root_.add_apply, realInner_apply,
real_inner_self_eq_norm_sq, smul_eq_mul, mul_assoc] using hv
linarith
end EllipticKernel
namespace EllipticKernel
open Set Filter Metric
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] [ProperSpace E]
local instance harmonicMaxBilinNormedAddCommGroup : NormedAddCommGroup (Bilin E) := inferInstance
local instance harmonicMaxBilinNormedSpace : NormedSpace β (Bilin E) := inferInstance
theorem harmonic_eventually_eq_of_max {f : E β β} {U : Set E} (hU : IsOpen U)
(hf : ContDiffOn β β f U) (β : E β SecondOrder E) (hβ : ContinuousOn β U)
(hell : β z β U, β v : E, v β 0 β 0 < β z (rankOne v))
(htest : β z β U, β u : E β β, ContDiffAt β β u z β IsLocalMax u z β
β z (fderiv β (fderiv β u) z) β€ 0)
(hharm : β z β U, β z (fderiv β (fderiv β f) z) = 0)
{x : E} {M : β} (hx : x β U) (hfx : f x = M) (hle : β z β U, f z β€ M) :
f =αΆ [nhds x] fun _ => M := by
obtain β¨a, ha, hballβ© := Metric.mem_nhds_iff.mp (hU.mem_nhds hx)
let Ξ΄ := a/2
have hΞ΄ : 0 < Ξ΄ := half_pos ha
have hΞ΄U : closedBall x Ξ΄ β U :=
subset_trans (closedBall_subset_ball (by dsimp [Ξ΄]; linarith)) hball
filter_upwards [ball_mem_nhds x (show 0 < Ξ΄/4 by positivity)] with y hy
by_contra hyf
have hyU : y β U := hΞ΄U (mem_closedBall.mpr (by
have h := mem_ball.mp hy
linarith))
have hlt : f y < M := lt_of_le_of_ne (hle y hyU) hyf
obtain β¨r, hr, hrU, hstrict, p, hp, hfpβ© :=
tangent_ball hΞ΄ hΞ΄U hf.continuousOn hle hfx hy hlt
exact no_tangent_max hU hf β hβ hell htest hharm hle hr hrU hstrict hp hfp
end EllipticKernel
namespace EllipticKernel
open Matrix
open scoped ContDiff ComplexOrder Matrix.Norms.Elementwise
abbrev EC (n : β) := EuclideanSpace β (Fin n)
variable {n : β}
local instance coordinateBilinNormedAddCommGroup : NormedAddCommGroup (Bilin (EC n)) := inferInstance
local instance coordinateBilinNormedSpace : NormedSpace β (Bilin (EC n)) := inferInstance
def coordinateEquiv (n : β) : EC n βL[β] PotentialKaehler.V n :=
PiLp.continuousLinearEquiv 2 β (fun _ : Fin n => β)
lemma coordinateEquiv_apply (z : EC n) : coordinateEquiv n z = WithLp.ofLp z := rfl
lemma coordinateEquiv_symm_apply (z : PotentialKaehler.V n) :
(coordinateEquiv n).symm z = WithLp.toLp 2 z := rfl
def pullBilin (B : Bilin (EC n)) : PotentialKaehler.RealBilinear n :=
((B.comp (coordinateEquiv n).symm.toContinuousLinearMap).flip.comp
(coordinateEquiv n).symm.toContinuousLinearMap).flip
lemma pullBilin_apply (B : Bilin (EC n)) (u v : PotentialKaehler.V n) :
pullBilin B u v = B ((coordinateEquiv n).symm u) ((coordinateEquiv n).symm v) := rfl
lemma pullBilin_add (B C : Bilin (EC n)) : pullBilin (B+C) = pullBilin B + pullBilin C := by
ext u v
simp only [pullBilin_apply, _root_.add_apply]
lemma pullBilin_smul (c : β) (B : Bilin (EC n)) : pullBilin (c β’ B) = c β’ pullBilin B := by
ext u v
simp only [pullBilin_apply, _root_.smul_apply]
lemma hermitianPartMatrix_add (B C : PotentialKaehler.RealBilinear n) :
PotentialKaehler.hermitianPartMatrix (B+C) =
PotentialKaehler.hermitianPartMatrix B + PotentialKaehler.hermitianPartMatrix C := by
ext i j
apply Complex.ext <;>
simp [PotentialKaehler.hermitianPartMatrix_apply, PotentialKaehler.hermitianPart]
<;> ring
lemma hermitianPartMatrix_smul (c : β) (B : PotentialKaehler.RealBilinear n) :
PotentialKaehler.hermitianPartMatrix (c β’ B) = c β’ PotentialKaehler.hermitianPartMatrix B := by
ext i j
apply Complex.ext <;>
simp [PotentialKaehler.hermitianPartMatrix_apply, PotentialKaehler.hermitianPart]
<;> ring
def traceBilinLinear (H : Matrix (Fin n) (Fin n) β) : Bilin (EC n) ββ[β] β where
toFun B := (Hβ»ΒΉ * PotentialKaehler.hermitianPartMatrix (pullBilin B)).trace.re
map_add' B C := by rw [pullBilin_add, hermitianPartMatrix_add, mul_add, trace_add, Complex.add_re]
map_smul' c B := by rw [pullBilin_smul, hermitianPartMatrix_smul, Matrix.mul_smul, trace_smul]; simp
def traceBilin (H : Matrix (Fin n) (Fin n) β) : SecondOrder (EC n) :=
(traceBilinLinear H).toContinuousLinearMap
lemma traceBilin_apply (H : Matrix (Fin n) (Fin n) β) (B : Bilin (EC n)) :
traceBilin H B = (Hβ»ΒΉ * PotentialKaehler.hermitianPartMatrix (pullBilin B)).trace.re := rfl
lemma traceBilin_continuousOn {U : Set (EC n)}
(H : EC n β Matrix (Fin n) (Fin n) β) (hH : ContinuousOn H U)
(hpos : β z β U, (H z).PosDef) : ContinuousOn (fun z => traceBilin (H z)) U := by
apply continuousOn_clm_apply.mpr
intro B
change ContinuousOn (fun z => ((H z)β»ΒΉ * PotentialKaehler.hermitianPartMatrix (pullBilin B)).trace.re) U
have hi : ContinuousOn (fun z => (H z)β»ΒΉ) U := by
intro z hz
apply (continuousAt_matrix_inv (H z) ?_).comp_continuousWithinAt (hH z hz)
obtain β¨u, huβ© := isUnit_iff_ne_zero.mpr (ne_of_gt (hpos z hz).det_pos)
rw [β hu]
exact NormedRing.inverse_continuousAt u
apply Complex.continuous_re.comp_continuousOn
unfold Matrix.trace
apply continuousOn_finsetSum
intro i hi'
exact continuousOn_pi.mp (continuousOn_pi.mp (hi.mul continuousOn_const) i) i
lemma pullBilin_hessian {u : EC n β β} {z : EC n} (hu : ContDiffAt β β u z) :
pullBilin (fderiv β (fderiv β u) z) =
fderiv β (fderiv β (u β (coordinateEquiv n).symm)) (coordinateEquiv n z) := by
let s := (coordinateEquiv n).symm
have hu' : ContDiffAt β β u (s (coordinateEquiv n z)) := by simpa [s] using hu
have hd : fderiv β s = fun _ => s.toContinuousLinearMap := by
funext w; exact s.hasFDerivAt.fderiv
ext a b
rw [PotentialKaehler.second_derivative_comp s.contDiff.contDiffAt hu' a b, hd]
simp [pullBilin_apply, s]
lemma traceBilin_localMax (H : Matrix (Fin n) (Fin n) β) (hH : H.PosDef)
{u : EC n β β} {z : EC n} (hu : ContDiffAt β β u z) (hmax : IsLocalMax u z) :
traceBilin H (fderiv β (fderiv β u) z) β€ 0 := by
rw [traceBilin_apply, pullBilin_hessian hu]
let s := (coordinateEquiv n).symm
have hu' : ContDiffAt β β u (s (coordinateEquiv n z)) := by simpa [s] using hu
have hm' : IsLocalMax u (s (coordinateEquiv n z)) := by simpa [s] using hmax
exact trace_potentialMatrix_nonpos_at_localMax
(hu'.comp _ s.contDiff.contDiffAt) (hm'.comp_continuous s.continuous.continuousAt) H hH
end EllipticKernel
namespace EllipticKernel
open Matrix
open scoped ComplexOrder Matrix.Norms.Elementwise ContDiff
variable {n : β}
lemma realInner_coordinate_single (v : EC n) (i : Fin n) (c : β) :
realInner v ((coordinateEquiv n).symm (Pi.single i c)) = (c * star (v i)).re := by
rw [realInner_apply, coordinateEquiv_symm_apply, PiLp.inner_apply]
simp [Pi.single_apply, apply_ite Complex.re, Complex.inner]
lemma pull_rankOne (v : EC n) :
PotentialKaehler.hermitianPartMatrix (pullBilin (rankOne v)) =
(1/4 : β) β’ Matrix.vecMulVec (coordinateEquiv n v) (star (coordinateEquiv n v)) := by
ext i j
apply Complex.ext <;>
simp [PotentialKaehler.hermitianPartMatrix_apply, PotentialKaehler.hermitianPart,
pullBilin_apply, rankOne, ContinuousLinearMap.smulRight_apply,
realInner_coordinate_single, β Pi.single_smul, coordinateEquiv_apply,
Complex.mul_re, Complex.mul_im, Matrix.vecMulVec_apply] <;> ring
lemma traceBilin_symbol (H : Matrix (Fin n) (Fin n) β) (hH : H.PosDef)
(v : EC n) (hv : v β 0) : 0 < traceBilin H (rankOne v) := by
have hve : coordinateEquiv n v β 0 := by
intro h
apply hv
exact (coordinateEquiv n).injective (by simpa using h)
have hp := MongeAmpere.linearized_symbol_pos H hH (coordinateEquiv n v) hve
rw [traceBilin_apply, pull_rankOne, Matrix.mul_smul, trace_smul]
simpa only [Complex.smul_re, smul_eq_mul] using mul_pos (by norm_num : (0 : β) < 1/4) hp
end EllipticKernel
namespace Anticanonical.SourceSmooth
open EllipticKernel Set Filter
open scoped ContDiff ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
lemma SmoothRealFunction.continuous (Ο : SmoothRealFunction A) : Continuous Ο.value := by
apply continuous_iff_continuousAt.mpr
intro x
obtain β¨i, hiβ© := A.covers x
have hci : ContinuousAt (Ο.localExpression i) (A.chart i x) :=
((Ο.smooth i).contDiffAt ((A.chart i).open_target.mem_nhds ((A.chart i).map_source hi))).continuousAt
apply (hci.comp ((A.chart i).continuousAt hi)).congr_of_eventuallyEq
filter_upwards [(A.chart i).eventually_left_inverse hi] with y hy
simp [SmoothRealFunction.localExpression, hy]
lemma SmoothRealFunction.euclidean_smooth (Ο : SmoothRealFunction A) (i : Fin A.count) :
ContDiffOn β β (Ο.localExpression i β coordinateEquiv d)
((coordinateEquiv d) β»ΒΉ' (A.chart i).target) :=
(Ο.smooth i).comp (coordinateEquiv d).contDiff.contDiffOn (fun _ h => h)
lemma KaehlerMetric.traceBilin_localExpression (g : KaehlerMetric A) (Ο : SmoothRealFunction A)
(i : Fin A.count) {z : EC d} (hz : coordinateEquiv d z β (A.chart i).target) :
traceBilin (g.matrix i (coordinateEquiv d z))
(fderiv β (fderiv β (Ο.localExpression i β coordinateEquiv d)) z) =
g.linearizedMongeAmpere Ο i (coordinateEquiv d z) := by
have hu := (Ο.euclidean_smooth i).contDiffAt
(((A.chart i).open_target.preimage (coordinateEquiv d).continuous).mem_nhds hz)
have he : (Ο.localExpression i β coordinateEquiv d) β (coordinateEquiv d).symm =
Ο.localExpression i := by
funext w
simp
rw [traceBilin_apply, pullBilin_hessian hu, he]
rfl
lemma KaehlerMetric.harmonic_eventually_constant (g : KaehlerMetric A)
(Ο : SmoothRealFunction A)
(hΟ : β (i : Fin A.count) (z : Coordinates d), z β (A.chart i).target β
g.linearizedMongeAmpere Ο i z = 0)
{x : X} {M : β} (hx : Ο.value x = M) (hmax : β y : X, Ο.value y β€ M) :
Ο.value =αΆ [nhds x] fun _ => M := by
obtain β¨i, hiβ© := A.covers x
let e := coordinateEquiv d
let U := e β»ΒΉ' (A.chart i).target
let u := Ο.localExpression i β e
let H := fun z => g.matrix i (e z)
have hU : IsOpen U := (A.chart i).open_target.preimage e.continuous
have hu : ContDiffOn β β u U := Ο.euclidean_smooth i
have hH : ContinuousOn H U :=
(g.smooth i).continuousOn.comp e.continuous.continuousOn (fun _ h => h)
have hp : β z β U, (H z).PosDef := fun z hz => g.positive i (e z) hz
have hh : β z β U, traceBilin (H z) (fderiv β (fderiv β u) z) = 0 := by
intro z hz
exact (g.traceBilin_localExpression Ο i hz).trans (hΟ i (e z) hz)
have hz : e.symm (A.chart i x) β U := by
simpa [U] using (A.chart i).map_source hi
have hux : u (e.symm (A.chart i x)) = M := by
simpa [u, SmoothRealFunction.localExpression, (A.chart i).left_inv hi] using hx
have heq := harmonic_eventually_eq_of_max hU hu (fun z => traceBilin (H z))
(traceBilin_continuousOn H hH hp)
(fun z hz v hv => traceBilin_symbol (H z) (hp z hz) v hv)
(fun z hz u hu hm => traceBilin_localMax (H z) (hp z hz) hu hm)
hh hz hux (fun z _ => hmax ((A.chart i).symm (e z)))
have ht : Tendsto (fun y => e.symm (A.chart i y)) (nhds x)
(nhds (e.symm (A.chart i x))) :=
e.symm.continuous.continuousAt.comp ((A.chart i).continuousAt hi)
filter_upwards [ht.eventually heq, (A.chart i).eventually_left_inverse hi] with y hy hiy
simpa [u, SmoothRealFunction.localExpression, hiy] using hy
theorem linearizedMongeAmpere_kernel (d : β) (X : Type*) [TopologicalSpace X]
[T2Space X] [CompactSpace X] [ConnectedSpace X] (A : ComplexAtlas d X)
(g : KaehlerMetric A) (Ο : SmoothRealFunction A)
(hΟ : β (i : Fin A.count) (z : Coordinates d), z β (A.chart i).target β
g.linearizedMongeAmpere Ο i z = 0) :
β c : β, β x : X, Ο.value x = c := by
obtain β¨x, _, hxβ© := isCompact_univ.exists_isMaxOn Set.univ_nonempty Ο.continuous.continuousOn
have hmax : β y, Ο.value y β€ Ο.value x := fun y => hx (mem_univ y)
let S := {y : X | Ο.value y = Ο.value x}
have hs : IsClosed S := isClosed_eq Ο.continuous continuous_const
have ho : IsOpen S := by
rw [isOpen_iff_mem_nhds]
intro y hy
exact g.harmonic_eventually_constant Ο hΟ hy hmax
have hall : S = univ := (show IsClopen S from β¨hs, hoβ©).eq_univ β¨x, rflβ©
exact β¨Ο.value x, fun y => show y β S from hall βΈ mem_univ yβ©
end Anticanonical.SourceSmooth
namespace Anticanonical.SourceSmooth
open Set Filter
open scoped ContDiff ComplexOrder Matrix.Norms.Elementwise
variable {d : β} {X : Type*} [TopologicalSpace X] {A : ComplexAtlas d X}
namespace SmoothRealFunction
def normalizeAt (Ο : SmoothRealFunction A) (xβ : X) : SmoothRealFunction A where
value x := Ο.value x - Ο.value xβ
smooth i := (Ο.smooth i).sub contDiffOn_const
@[simp] lemma normalizeAt_value (Ο : SmoothRealFunction A) (xβ : X) :
(Ο.normalizeAt xβ).value xβ = 0 := sub_self _
lemma hessian_normalizeAt (Ο : SmoothRealFunction A) (xβ : X) :
(Ο.normalizeAt xβ).hessian = Ο.hessian := by
funext i z
have he : (Ο.normalizeAt xβ).localExpression i =
fun w => Ο.localExpression i w - Ο.value xβ := rfl
have hd : fderiv β (fun w => Ο.localExpression i w - Ο.value xβ) =
fderiv β (Ο.localExpression i) := by
funext w; exact fderiv_sub_const _
simp only [hessian, he, PotentialKaehler.potentialMatrix, hd]
end SmoothRealFunction
namespace KaehlerMetric
lemma linearizedMongeAmpere_realSMul (g : KaehlerMetric A)
(Ο : SmoothRealFunction A) (c : β) (i : Fin A.count) (z : Coordinates d) :
g.linearizedMongeAmpere (Ο.realSMul c) i z = c * g.linearizedMongeAmpere Ο i z := by
simp only [linearizedMongeAmpere, SmoothRealFunction.hessian_realSMul,
Matrix.mul_smul, Matrix.trace_smul, smul_eq_mul, Complex.re_ofReal_mul]
lemma linearizedMongeAmpere_normalizeAt (g : KaehlerMetric A)
(Ο : SmoothRealFunction A) (xβ : X) :
g.linearizedMongeAmpere (Ο.normalizeAt xβ) = g.linearizedMongeAmpere Ο := by
funext i z
unfold linearizedMongeAmpere
rw [SmoothRealFunction.hessian_normalizeAt]
lemma linearized_nonpos_at_globalMax (g : KaehlerMetric A)
(Ο : SmoothRealFunction A) {x : X} (hx : β y : X, Ο.value y β€ Ο.value x)
(i : Fin A.count) (hi : x β (A.chart i).source) :
g.linearizedMongeAmpere Ο i (A.chart i x) β€ 0 := by
have hs := (Ο.smooth i).contDiffAt
((A.chart i).open_target.mem_nhds ((A.chart i).map_source hi))
have hm : IsLocalMax (Ο.localExpression i) (A.chart i x) := by
apply Filter.Eventually.of_forall
intro z
simpa [SmoothRealFunction.localExpression, (A.chart i).left_inv hi] using
hx ((A.chart i).symm z)
exact EllipticKernel.trace_potentialMatrix_nonpos_at_localMax hs hm _
(g.positive i _ ((A.chart i).map_source hi))
theorem no_positive_constant_rhs [CompactSpace X] [Nonempty X]
(g : KaehlerMetric A) (Ο : SmoothRealFunction A) {c : β} (hc : 0 < c) :
Β¬ (β i z, z β (A.chart i).target β g.linearizedMongeAmpere Ο i z = c) := by
intro h
obtain β¨x, _, hxβ© := isCompact_univ.exists_isMaxOn univ_nonempty Ο.continuous.continuousOn
obtain β¨i, hiβ© := A.covers x
have hn := g.linearized_nonpos_at_globalMax Ο (fun y => hx (mem_univ y)) i hi
rw [h i _ ((A.chart i).map_source hi)] at hn
exact not_le_of_gt hc hn
lemma constant_rhs_eq_zero [CompactSpace X] [Nonempty X]
(g : KaehlerMetric A) (Ο : SmoothRealFunction A) {c : β}
(hc : β i z, z β (A.chart i).target β g.linearizedMongeAmpere Ο i z = c) : c = 0 := by
have hn : c β€ 0 := le_of_not_gt (fun h => g.no_positive_constant_rhs Ο h hc)
have hp : 0 β€ c := by
by_contra h
have hc' : 0 < -c := by linarith
apply g.no_positive_constant_rhs (Ο.realSMul (-1)) hc'
intro i z hz
rw [linearizedMongeAmpere_realSMul, hc i z hz]
ring
exact le_antisymm hn hp
theorem normalized_augmented_kernel [T2Space X] [CompactSpace X] [ConnectedSpace X]
(g : KaehlerMetric A) (Ο : SmoothRealFunction A) (xβ : X) (c : β)
(hx : Ο.value xβ = 0)
(he : β i z, z β (A.chart i).target β g.linearizedMongeAmpere Ο i z + c = 0) :
c = 0 β§ β x, Ο.value x = 0 := by
have hc : -c = 0 := g.constant_rhs_eq_zero Ο (by
intro i z hz
linarith [he i z hz])
have hcβ : c = 0 := neg_eq_zero.mp hc
obtain β¨k, hkβ© := linearizedMongeAmpere_kernel d X A g Ο (by
intro i z hz
simpa [hcβ] using he i z hz)
refine β¨hcβ, fun x => ?_β©
rw [hk x, β hk xβ, hx]
end KaehlerMetric
def HasNormalizedPoissonSolution {d : β} {X : Type*} [TopologicalSpace X]
{A : ComplexAtlas d X} (g : KaehlerMetric A) (xβ : X)
(f : SmoothRealFunction A) : Prop :=
β (Ο : SmoothRealFunction A) (c : β), Ο.value xβ = 0 β§
β i z, z β (A.chart i).target β
g.linearizedMongeAmpere Ο i z + c = f.localExpression i z
end Anticanonical.SourceSmooth
end
end
end
end
end
end
end
end
end OAI
import Mathlib
namespace OAI
/-! Analytic Support. -/
section
noncomputable section
open Set MeasureTheory Filter Complex
open scoped Topology
namespace ProjectiveKaehler
def compactIntegral {K : Type*} [TopologicalSpace K] [CompactSpace K]
[MeasurableSpace K] [OpensMeasurableSpace K] (ΞΌ : Measure K) [IsFiniteMeasure ΞΌ] :
C(K, β) βL[β] β :=
LinearMap.mkContinuous
{ toFun := fun f => β« x, f x βΞΌ
map_add' := by
intro f g
exact integral_add
(f.continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace f))
(g.continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace g))
map_smul' := by
intro c f
exact integral_smul c f }
(ΞΌ.real univ) (by
intro f
change ββ« x, f x βΞΌβ β€ ΞΌ.real univ * βfβ
rw [mul_comm]
exact norm_integral_le_of_norm_le_const
(ΞΌ := ΞΌ) (ae_of_all _ fun x => f.norm_coe_le_norm x))
abbrev Angle := Icc (0 : β) (2 * Real.pi)
def angleMeasure : Measure Angle := Measure.comap Subtype.val volume
instance : IsFiniteMeasure angleMeasure := by
refine β¨?_β©
rw [angleMeasure, Measure.comap_apply Subtype.val Subtype.val_injective
(fun s hs => (MeasurableEmbedding.subtype_coe measurableSet_Icc).measurableSet_image.mpr hs)
volume MeasurableSet.univ]
simpa only [Set.image_univ, Subtype.range_coe_subtype, ofPred_mem_eq] using
(measure_Icc_lt_top (ΞΌ := volume) (a := (0 : β)) (b := 2 * Real.pi))
abbrev Boundary (n : β) := Fin n β Angle
def boundaryCons (n : β) : C(Angle Γ Boundary n, Boundary (n + 1)) where
toFun p := Fin.cons p.1 p.2
continuous_toFun := by
apply continuous_pi
intro i
refine Fin.cases ?_ (fun j => ?_) i
Β· simpa using continuous_fst
Β· exact (continuous_apply j).comp continuous_snd
def integrateFirst {K : Type*} [TopologicalSpace K] [CompactSpace K]
(L : C(K, β) βL[β] β) : C(Angle Γ K, β) βL[β] β :=
LinearMap.mkContinuous
{ toFun := fun f => β« t, L (f.curry t) βangleMeasure
map_add' := by
intro f g
change (β« t, L ((f + g).curry t) βangleMeasure) = _
have h : β t, (f + g).curry t = f.curry t + g.curry t := fun _ => by
ext; rfl
simp_rw [h, map_add]
apply integral_add
Β· exact (L.continuous.comp f.curry.continuous).integrable_of_hasCompactSupport
(HasCompactSupport.of_compactSpace _)
Β· exact (L.continuous.comp g.curry.continuous).integrable_of_hasCompactSupport
(HasCompactSupport.of_compactSpace _)
map_smul' := by
intro c f
have h : β t, (c β’ f).curry t = c β’ f.curry t := fun _ => by
ext; rfl
simp_rw [h, map_smul]
exact integral_smul c _ }
(βLβ * angleMeasure.real univ) (by
intro f
calc
ββ« t, L (f.curry t) βangleMeasureβ β€
(βLβ * βfβ) * angleMeasure.real univ :=
norm_integral_le_of_norm_le_const (ae_of_all _ fun t =>
(L.le_opNorm _).trans (mul_le_mul_of_nonneg_left
(((f.curry t).norm_le (norm_nonneg f)).mpr
(fun y => f.norm_coe_le_norm (t, y))) (norm_nonneg L)))
_ = (βLβ * angleMeasure.real univ) * βfβ := by ring)
def boundaryIntegral : (n : β) β C(Boundary n, β) βL[β] β
| 0 => ContinuousMap.evalCLM β (fun i => Fin.elim0 i)
| n + 1 => (integrateFirst (boundaryIntegral n)).comp
(ContinuousMap.compCLM β β (boundaryCons n))