Buckets:
import Mathlib
import OAI.Geometry.SmoothYau.Estimates.ExistsPreparationCovector
import OAI.Geometry.SmoothYau.Estimates.RadialSpeedPositiveAnnulus
import OAI.Geometry.SmoothYau.Geometry.MetricGradient
import OAI.Geometry.SmoothYau.Limits.CoordinateForm
namespace OAI
noncomputable section
namespace YauCounterexamples
section
open Set Filter Manifold Bundle MeasureTheory
open scoped Topology ContDiff ENNReal
open Set Filter Manifold Bundle
open scoped Topology ContDiff
open Set Filter Manifold Bundle
open scoped Topology ContDiff
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace โ E]
[FiniteDimensional โ E] {M : Type*} [TopologicalSpace M] [ChartedSpace E M]
[IsManifold ๐(โ,E) โ M]
def localMetricFlat (g : SmoothMetric E M) (p x : M) : E โL[โ] E โL[โ] โ :=
ContinuousLinearMap.inCoordinates E (TangentSpace ๐(โ,E)) (E โL[โ] โ)
(fun x => TangentSpace ๐(โ,E) x โL[โ] โ) p x p x (g.inner x)
omit [FiniteDimensional โ E] in
lemma localMetricFlat_pairing (g : SmoothMetric E M) (p x : M)
(hx : x โ (trivializationAt E (TangentSpace ๐(โ,E)) p).baseSet) (v w : E) :
localMetricFlat g p x v w = g.inner x
((trivializationAt E (TangentSpace ๐(โ,E)) p).symm x v)
((trivializationAt E (TangentSpace ๐(โ,E)) p).symm x w) := by
unfold localMetricFlat
rw [inCoordinates_apply_eqโ hx hx (by simp)]
simp
lemma localMetricFlat_invertible (g : SmoothMetric E M) (p x : M)
(hx : x โ (trivializationAt E (TangentSpace ๐(โ,E)) p).baseSet) :
(localMetricFlat g p x).IsInvertible := by
let e := (trivializationAt E (TangentSpace ๐(โ,E)) p).continuousLinearEquivAt โ x hx
have hi : Function.Injective (localMetricFlat g p x) := by
apply (localMetricFlat g p x).ker_eq_bot.mp
rw [LinearMap.ker_eq_bot']
intro v hv
by_contra hn
have he : e.symm v โ 0 := by simpa only [ne_eq,EmbeddingLike.map_eq_zero_iff] using hn
have hp := g.pos x (e.symm v) he
have hz := congrArg (fun f : E โL[โ] โ => f v) hv
change localMetricFlat g p x v v = 0 at hz
rw [localMetricFlat_pairing g p x hx] at hz
change g.inner x (e.symm v) (e.symm v) = 0 at hz
linarith
have hdim : Module.finrank โ E = Module.finrank โ (E โL[โ] โ) :=
(InnerProductSpace.toDual โ E).toLinearEquiv.finrank_eq
have hs := (LinearMap.injective_iff_surjective_of_finrank_eq_finrank hdim).mp hi
exact โจ(LinearEquiv.ofBijective (localMetricFlat g p x).toLinearMap โจhi,hsโฉ).toContinuousLinearEquiv,rflโฉ
omit [FiniteDimensional โ E] in
lemma contMDiffAt_localMetricFlat (g : SmoothMetric E M) (p : M) :
ContMDiffAt ๐(โ,E) ๐(โ,E โL[โ] E โL[โ] โ) โ (localMetricFlat g p) p := by
have hg := g.contMDiff p
rw [contMDiffAt_section p] at hg
simp only [hom_trivializationAt_apply] at hg
convert! hg using 1
lemma local_metricGradient (g : SmoothMetric E M) (u : M โ โ) (p x : M)
(hx : x โ (trivializationAt E (TangentSpace ๐(โ,E)) p).baseSet) :
(trivializationAt E (TangentSpace ๐(โ,E)) p โจx,metricGradient g u xโฉ).2 =
(localMetricFlat g p x).inverse
(inTangentCoordinates ๐(โ,E) ๐(โ,โ) id u
(mfderiv ๐(โ,E) ๐(โ,โ) u) p x) := by
symm
apply (localMetricFlat_invertible g p x hx).inverse_apply_eq.mpr
ext w
rw [localMetricFlat_pairing g p x hx,Trivialization.symm_apply_apply_mk _ hx,
metricGradient_pairing]
unfold inTangentCoordinates
simp only [id_eq]
have he := ContinuousLinearMap.inCoordinates_eq (ฯ := mfderiv ๐(โ,E) ๐(โ,โ) u x) hx
(show u x โ (trivializationAt โ (TangentSpace ๐(โ,โ)) (u p)).baseSet by
simp [TangentBundle.trivializationAt_baseSet, chartAt_self_eq])
have hew := congrArg (fun L : E โL[โ] โ => L w) he
exact hew.trans (by
simp [Trivialization.continuousLinearEquivAt_apply,
Trivialization.continuousLinearEquivAt_symm_apply]
rfl)
theorem contMDiff_metricGradient (g : SmoothMetric E M) {u : M โ โ}
(hu : ContMDiff ๐(โ,E) ๐(โ,โ) โ u) :
ContMDiff ๐(โ,E) (๐(โ,E).prod ๐(โ,E)) โ
(fun x => TotalSpace.mk' E x (metricGradient g u x)) := by
intro p
rw [contMDiffAt_section p]
have hg := contMDiffAt_localMetricFlat g p
have hi := (localMetricFlat_invertible g p p (mem_baseSet_trivializationAt E _ p)).contDiffAt_map_inverse (n := โ)
have hs := (hi.comp_contMDiffAt hg).clm_apply ((hu p).mfderiv_const (m := โ) (by simp))
apply hs.congr_of_eventuallyEq
filter_upwards [(trivializationAt E (TangentSpace ๐(โ,E)) p).open_baseSet.mem_nhds
(mem_baseSet_trivializationAt E _ p)] with x hx
exact local_metricGradient g u p x hx
end
section
open Set Filter Manifold Bundle MeasureTheory
open scoped Topology ContDiff ENNReal
open Set Filter Manifold Bundle
open scoped Topology ContDiff
open Set Filter Manifold Bundle
open scoped Topology ContDiff
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace โ E]
[FiniteDimensional โ E]
local instance metricDualNorm : NormedAddCommGroup (E โL[โ] โ) := inferInstance
local instance metricDualSpace : NormedSpace โ (E โL[โ] โ) := inferInstance
local instance metricFormNorm : NormedAddCommGroup (E โL[โ] E โL[โ] โ) := inferInstance
local instance metricFormSpace : NormedSpace โ (E โL[โ] E โL[โ] โ) := inferInstance
local instance metricTriNorm : NormedAddCommGroup (E โL[โ] E โL[โ] E โL[โ] โ) := inferInstance
local instance metricTriSpace : NormedSpace โ (E โL[โ] E โL[โ] E โL[โ] โ) := inferInstance
def selfMetricFlat (g : SmoothMetric E E) (x : E) : E โL[โ] E โL[โ] โ :=
(g.inner x).bilinearComp (NormedSpace.fromTangentSpace (๐:=โ) x).symm.toContinuousLinearMap
(NormedSpace.fromTangentSpace (๐:=โ) x).symm.toContinuousLinearMap
omit [FiniteDimensional โ E] in
lemma selfMetricFlat_apply (g : SmoothMetric E E) (x v w : E) :
selfMetricFlat g x v w = g.inner x v w := rfl
omit [FiniteDimensional โ E] in
lemma localMetricFlat_self (g : SmoothMetric E E) (p x : E) :
localMetricFlat g p x = selfMetricFlat g x := by
ext v w
rw [localMetricFlat_pairing g p x (by simp [TangentBundle.trivializationAt_baseSet, chartAt_self_eq])]
have hv (v : E) : (trivializationAt E (TangentSpace ๐(โ,E)) p).symm x v = v := by
rw [โTrivialization.symmL_apply (R := โ) _ (by simp [TangentBundle.trivializationAt_baseSet, chartAt_self_eq]) v,
TangentBundle.symmL_model_space]
rfl
rw [hv,hv]
rfl
omit [FiniteDimensional โ E] in
lemma contDiff_selfMetricFlat (g : SmoothMetric E E) : ContDiff โ โ (selfMetricFlat g) := by
rw [contDiff_iff_contDiffAt]
intro x
have h := contMDiffAt_localMetricFlat g x
rw [contMDiffAt_iff_contDiffAt] at h
have heq : localMetricFlat g x = selfMetricFlat g := funext (localMetricFlat_self g x)
rwa [heq] at h
omit [FiniteDimensional โ E] in
lemma selfMetricFlat_symm (g : SmoothMetric E E) (x v w : E) :
selfMetricFlat g x v w = selfMetricFlat g x w v := g.symm x v w
omit [FiniteDimensional โ E] in
lemma selfMetricFlat_pos (g : SmoothMetric E E) (x : E) {v : E} (hv : v โ 0) :
0 < selfMetricFlat g x v v := g.pos x v hv
lemma selfMetricFlat_invertible (g : SmoothMetric E E) (x : E) :
(selfMetricFlat g x).IsInvertible := by
rw [โlocalMetricFlat_self g x x]
exact localMetricFlat_invertible g x x (mem_baseSet_trivializationAt E _ x)
def coordinateKoszul (D : E โL[โ] E โL[โ] E โL[โ] โ) : E โL[โ] E โL[โ] E โL[โ] โ :=
(1/2 : โ) โข (D+D.flip-(ContinuousLinearMap.flipโแตข โ E E โ).toContinuousLinearMap.comp D.flip)
lemma coordinateKoszul_apply (D : E โL[โ] E โL[โ] E โL[โ] โ) (v w z : E) :
coordinateKoszul D v w z = (D v w z+D w v z-D z v w)/2 := by
change (1/2 : โ) * (D v w z+D w v z-D z v w) = _
ring
def metricChristoffel (g : SmoothMetric E E) (x : E) : E โL[โ] E โL[โ] E :=
((ContinuousLinearMap.compL โ E (E โL[โ] โ) E) (selfMetricFlat g x).inverse).comp
(coordinateKoszul (fderiv โ (selfMetricFlat g) x))
lemma metricChristoffel_pairing (g : SmoothMetric E E) (x v w z : E) :
selfMetricFlat g x (metricChristoffel g x v w) z =
(fderiv โ (selfMetricFlat g) x v w z+fderiv โ (selfMetricFlat g) x w v z-
fderiv โ (selfMetricFlat g) x z v w)/2 := by
have h := (selfMetricFlat_invertible g x).inverse_apply_eq.mp
(show (selfMetricFlat g x).inverse (coordinateKoszul (fderiv โ (selfMetricFlat g) x) v w) =
metricChristoffel g x v w from rfl)
exact (congrArg (fun l : E โL[โ] โ => l z) h.symm).trans (coordinateKoszul_apply _ _ _ _)
lemma contDiff_metricChristoffel (g : SmoothMetric E E) : ContDiff โ โ (metricChristoffel g) := by
have hG := contDiff_selfMetricFlat g
have hGi : ContDiff โ โ (fun x => (selfMetricFlat g x).inverse) := by
rw [contDiff_iff_contDiffAt]
intro x
exact (selfMetricFlat_invertible g x).contDiffAt_map_inverse.comp x hG.contDiffAt
have hD := hG.fderiv_right (m := โ) (by simp)
have hDf : ContDiff โ โ (fun x => (fderiv โ (selfMetricFlat g) x).flip) :=
(ContinuousLinearMap.flipโแตข โ E E (E โL[โ] โ)).toContinuousLinearMap.contDiff.comp hD
have hK : ContDiff โ โ (fun x => coordinateKoszul (fderiv โ (selfMetricFlat g) x)) :=
(hD.add hDf |>.sub (contDiff_const.clm_comp hDf)).const_smul (1/2 : โ)
exact (contDiff_const.clm_apply hGi).clm_comp hK
omit [FiniteDimensional โ E] in
lemma fderiv_selfMetricFlat_symm (g : SmoothMetric E E) (x v w z : E) :
fderiv โ (selfMetricFlat g) x v w z = fderiv โ (selfMetricFlat g) x v z w := by
have hd := (contDiff_selfMetricFlat g).differentiable (by simp)
have he : (fun y => selfMetricFlat g y w z) = (fun y => selfMetricFlat g y z w) :=
funext (fun y => selfMetricFlat_symm g y w z)
have h := congrArg (fun f : E โ โ => fderiv โ f x v) he
have heval (w z : E) : fderiv โ (fun y => selfMetricFlat g y w z) x v =
fderiv โ (selfMetricFlat g) x v w z := by
rw [fderiv_clm_apply ((hd x).clm_apply (differentiableAt_const w))
(differentiableAt_const z),
fderiv_clm_apply (hd x) (differentiableAt_const w)]
simp
simpa only [heval] using h
lemma metricChristoffel_symm (g : SmoothMetric E E) (x v w : E) :
metricChristoffel g x v w = metricChristoffel g x w v := by
apply (selfMetricFlat_invertible g x).injective
ext z
rw [metricChristoffel_pairing,metricChristoffel_pairing,
fderiv_selfMetricFlat_symm g x z v w]
ring
lemma metricChristoffel_compatible (g : SmoothMetric E E) (x v w z : E) :
fderiv โ (selfMetricFlat g) x v w z =
selfMetricFlat g x (metricChristoffel g x v w) z +
selfMetricFlat g x w (metricChristoffel g x v z) := by
rw [selfMetricFlat_symm g x w, metricChristoffel_pairing,metricChristoffel_pairing,
fderiv_selfMetricFlat_symm g x v z w]
ring
lemma metricGradient_self (g : SmoothMetric E E) (u : E โ โ) (x : E) :
(NormedSpace.fromTangentSpace (๐:=โ) x) (metricGradient g u x) =
(selfMetricFlat g x).inverse (fderiv โ u x) := by
symm
apply (selfMetricFlat_invertible g x).inverse_apply_eq.mpr
ext v
have h := (metricGradient_pairing g u x ((NormedSpace.fromTangentSpace (๐:=โ) x).symm v)).symm
rw [mfderiv_eq_fderiv] at h
change fderiv โ u x v = g.inner x (metricGradient g u x) ((NormedSpace.fromTangentSpace (๐:=โ) x).symm v) at h
simpa only [selfMetricFlat,ContinuousLinearMap.bilinearComp_apply,
ContinuousLinearEquiv.coe_coe,ContinuousLinearEquiv.symm_apply_apply] using h
theorem compact_positive_bilinear_lower {X : Type*} [TopologicalSpace X]
{K : Set X} (hK : IsCompact K) (B : X โ E โL[โ] E โL[โ] โ)
(hB : Continuous B) (hpos : โ x โ K, โ v : E, v โ 0 โ 0 < B x v v) :
โ m : โ, 0 < m โง โ x โ K, โ v : E, m*โvโ^2 โค B x v v := by
let S := K รหข Metric.sphere (0:E) 1
have hS : IsCompact S := hK.prod (isCompact_sphere 0 1)
have hc : Continuous (fun p : X ร E => B p.1 p.2 p.2) :=
((hB.comp continuous_fst).clm_apply continuous_snd).clm_apply continuous_snd
have hm : โ m : โ, 0 < m โง โ x โ K, โ v : E, โvโ = 1 โ m โค B x v v := by
by_cases hne : S.Nonempty
ยท obtain โจp,hp,hminโฉ := hS.exists_isMinOn hne hc.continuousOn
have hv : โp.2โ = 1 := mem_sphere_zero_iff_norm.mp hp.2
refine โจB p.1 p.2 p.2,hpos p.1 hp.1 p.2 (norm_ne_zero_iff.mp (by rw [hv]; norm_num)),?_โฉ
intro x hx v hv
exact hmin (show (x,v) โ S from โจhx,mem_sphere_zero_iff_norm.mpr hvโฉ)
ยท exact โจ1,zero_lt_one,fun x hx v hv => (hne โจ(x,v),hx,mem_sphere_zero_iff_norm.mpr hvโฉ).elimโฉ
obtain โจm,hm,hmBโฉ := hm
refine โจm,hm,?_โฉ
intro x hx v
by_cases hv : v = 0
ยท simp [hv]
have hvn : โvโ โ 0 := norm_ne_zero_iff.mpr hv
let w := โvโโปยน โข v
have hw : โwโ = 1 := by simp [w,norm_smul,hvn]
have hvw : โvโ โข w = v := by simp [w,smul_smul,hvn]
have heq : B x v v = โvโ^2 * B x w w := by
conv_lhs => rw [โhvw]
simp only [map_smul,smul_apply,smul_eq_mul]
ring
rw [heq,mul_comm m]
exact mul_le_mul_of_nonneg_left (hmB x hx w hw) (sq_nonneg _)
lemma compact_selfMetricFlat_lower (g : SmoothMetric E E) {K : Set E} (hK : IsCompact K) :
โ m : โ, 0 < m โง โ x โ K, โ v : E, m*โvโ^2 โค selfMetricFlat g x v v :=
compact_positive_bilinear_lower hK (selfMetricFlat g) (contDiff_selfMetricFlat g).continuous
(fun x _ _ hv => selfMetricFlat_pos g x hv)
theorem compact_metric_tangent_bound (g : SmoothMetric E E) {K : Set E} (hK : IsCompact K) :
letI : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
โ J : โ, 0 < J โง โ x โ K, โ(NormedSpace.fromTangentSpace (๐:=โ) x).toContinuousLinearMapโ โค J := by
let : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
obtain โจm,hm,hmlโฉ := compact_selfMetricFlat_lower g hK
refine โจ(Real.sqrt m)โปยน,inv_pos.mpr (Real.sqrt_pos.mpr hm),?_โฉ
intro x hx
apply ContinuousLinearMap.opNorm_le_bound _ (inv_nonneg.mpr (Real.sqrt_nonneg _))
intro v
have hlow := hml x hx ((NormedSpace.fromTangentSpace (๐:=โ) x) v)
have hnorm : selfMetricFlat g x ((NormedSpace.fromTangentSpace (๐:=โ) x) v)
((NormedSpace.fromTangentSpace (๐:=โ) x) v) = โvโ^2 := by
have hn := real_inner_self_eq_norm_sq (v : TangentSpace ๐(โ,E) x)
change g.inner x v v = โvโ^2 at hn
simpa only [selfMetricFlat,ContinuousLinearMap.bilinearComp_apply,
ContinuousLinearEquiv.coe_coe,ContinuousLinearEquiv.symm_apply_apply] using hn
rw [hnorm] at hlow
have hh : Real.sqrt m * โ(NormedSpace.fromTangentSpace (๐:=โ) x) vโ โค โvโ :=
le_of_sq_le_sq (by simpa only [mul_pow,Real.sq_sqrt hm.le] using hlow) (norm_nonneg _)
change โ(NormedSpace.fromTangentSpace (๐:=โ) x) vโ โค (Real.sqrt m)โปยน * โvโ
rw [โdiv_eq_inv_mul,le_div_iffโ (Real.sqrt_pos.mpr hm)]
rwa [mul_comm]
end
section
open Set Filter Manifold Bundle MeasureTheory
open scoped Topology ContDiff ENNReal
open Set Filter Manifold Bundle
open scoped Topology ContDiff
open Set Filter Metric
open scoped Topology InnerProductSpace
open Set Filter Function Metric
open scoped Topology
open Set Filter Function Metric
open scoped Topology
open Set Filter Manifold Bundle
open scoped Topology ContDiff InnerProductSpace
section GenericCoordinateHessian
variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace โ E]
[NormedAddCommGroup V] [NormedSpace โ V]
local instance genericHessMapNorm : NormedAddCommGroup (E โL[โ] V) := inferInstance
local instance genericHessMapSpace : NormedSpace โ (E โL[โ] V) := inferInstance
local instance genericHessFormNorm : NormedAddCommGroup (E โL[โ] E โL[โ] V) := inferInstance
local instance genericHessFormSpace : NormedSpace โ (E โL[โ] E โL[โ] V) := inferInstance
def coordinateCovariantSecond (ฮ : E โ E โL[โ] E โL[โ] E) (f : E โ V) (x : E) :
E โL[โ] E โL[โ] V :=
fderiv โ (fderiv โ f) x -
(ContinuousLinearMap.compL โ E E V (fderiv โ f x)).comp (ฮ x)
lemma continuous_coordinateCovariantSecond
(ฮ : E โ E โL[โ] E โL[โ] E) (hฮ : Continuous ฮ) {f : E โ V}
(hf : ContDiff โ โ f) : Continuous (coordinateCovariantSecond ฮ f) := by
apply Continuous.sub
ยท exact (hf.fderiv_right (m:=(โ : โโฯ)) (by simp)).continuous_fderiv
(by simp)
ยท exact ((ContinuousLinearMap.compL โ E E V).continuous.comp
(hf.continuous_fderiv (by simp))).clm_comp hฮ
end GenericCoordinateHessian
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace โ E]
[FiniteDimensional โ E]
local instance actualDualNorm : NormedAddCommGroup (E โL[โ] โ) := inferInstance
local instance actualDualSpace : NormedSpace โ (E โL[โ] โ) := inferInstance
local instance actualFormNorm : NormedAddCommGroup (CoordinateForm E) := inferInstance
local instance actualFormSpace : NormedSpace โ (CoordinateForm E) := inferInstance
omit [FiniteDimensional โ E] in
lemma quadraticPlaneStrict_iff_nonzero (T : CoordinateForm E) (q : E) :
quadraticPlaneStrict T q โ โ v, v โ 0 โง inner โ q v = 0 โง 0 < T v v := by
constructor
ยท rintro โจv,hv,hq,hpโฉ
exact โจv,norm_ne_zero_iff.mp (by rw [hv]; norm_num),hq,hpโฉ
ยท rintro โจv,hv,hq,hpโฉ
have hn : 0 < โvโ := norm_pos_iff.mpr hv
refine โจโvโโปยน โข v,?_,?_,?_โฉ
ยท simp [norm_smul,ne_of_gt hn]
ยท simp [inner_smul_right,hq]
ยท simpa only [map_smul,smul_apply,smul_eq_mul] using
mul_pos (inv_pos.mpr hn) (mul_pos (inv_pos.mpr hn) hp)
omit [FiniteDimensional โ E] in
lemma quadraticPlaneFull_iff_nonzero (T : CoordinateForm E) (q : E) :
quadraticPlaneFull T q โ โ v, v โ 0 โ inner โ q v = 0 โ 0 < T v v := by
constructor
ยท intro h v hv hq
have hn : 0 < โvโ := norm_pos_iff.mpr hv
have hp := h (โvโโปยน โข v)
(by simp [norm_smul,ne_of_gt hn])
(by simp [inner_smul_right,hq])
simp only [map_smul,smul_apply,smul_eq_mul] at hp
exact (mul_pos_iff_of_pos_left (inv_pos.mpr hn)).mp
((mul_pos_iff_of_pos_left (inv_pos.mpr hn)).mp hp)
ยท intro h v hv hq
exact h v (norm_ne_zero_iff.mp (by rw [hv]; norm_num)) hq
def actualCoordinateHessian (g : SmoothMetric E E) (u : E โ โ) : E โ CoordinateForm E :=
coordinateCovariantSecond (metricChristoffel g) u
def coordinateMetricGradient (g : SmoothMetric E E) (ฯ : E โ โ) (x : E) : E :=
(selfMetricFlat g x).inverse (fderiv โ ฯ x)
lemma coordinateMetricGradient_eq (g : SmoothMetric E E) (ฯ : E โ โ) (x : E) :
coordinateMetricGradient g ฯ x =
(NormedSpace.fromTangentSpace (๐:=โ) x) (metricGradient g ฯ x) :=
(metricGradient_self g ฯ x).symm
lemma contDiff_coordinateMetricGradient (g : SmoothMetric E E) {ฯ : E โ โ}
(hฯ : ContDiff โ โ ฯ) : ContDiff โ โ (coordinateMetricGradient g ฯ) := by
have hGi : ContDiff โ โ (fun x => (selfMetricFlat g x).inverse) := by
rw [contDiff_iff_contDiffAt]
intro x
exact (selfMetricFlat_invertible g x).contDiffAt_map_inverse.comp x
(contDiff_selfMetricFlat g).contDiffAt
exact hGi.clm_apply (hฯ.fderiv_right (m:=โ) (by simp))
def actualProfileTraceForm (g : SmoothMetric E E) (u : E โ โ) (x : E) : CoordinateForm E :=
metricProfileTraceForm (selfMetricFlat g x) (actualCoordinateHessian g u x)
(coordinateMetricGradient g u x)
def actualProfileStrict (g : SmoothMetric E E) (u : E โ โ) (x : E) : Prop :=
quadraticPlaneStrict (actualProfileTraceForm g u x)
((InnerProductSpace.toDual โ E).symm (fderiv โ u x))
def actualProfileFull (g : SmoothMetric E E) (u : E โ โ) (x : E) : Prop :=
quadraticPlaneFull (actualProfileTraceForm g u x)
((InnerProductSpace.toDual โ E).symm (fderiv โ u x))
lemma continuous_actualProfileTraceForm (g : SmoothMetric E E) {u : E โ โ}
(hu : ContDiff โ โ u) : Continuous (actualProfileTraceForm g u) :=
by
have hB : Continuous (selfMetricFlat g) := (contDiff_selfMetricFlat g).continuous
have hH : Continuous (actualCoordinateHessian g u) :=
continuous_coordinateCovariantSecond _ (contDiff_metricChristoffel g).continuous hu
have ha : Continuous (coordinateMetricGradient g u) :=
(contDiff_coordinateMetricGradient g hu).continuous
change Continuous (fun x => metricProfileTraceForm (selfMetricFlat g x)
(actualCoordinateHessian g u x) (coordinateMetricGradient g u x))
unfold metricProfileTraceForm
exact (((hH.clm_apply ha).clm_apply ha).smul hB).add
((continuous_const.add ((hB.clm_apply ha).clm_apply ha)).smul hH)
omit [FiniteDimensional โ E] in
lemma selfMetricFlat_metric_norm (g : SmoothMetric E E) (x : E) :
letI : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
โ v : TangentSpace ๐(โ,E) x,
selfMetricFlat g x ((NormedSpace.fromTangentSpace (๐:=โ) x) v)
((NormedSpace.fromTangentSpace (๐:=โ) x) v) = โvโ^2 := by
let : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
intro v
have hn := real_inner_self_eq_norm_sq v
change g.inner x v v = โvโ^2 at hn
simpa only [selfMetricFlat,ContinuousLinearMap.bilinearComp_apply,
ContinuousLinearEquiv.coe_coe,ContinuousLinearEquiv.symm_apply_apply] using hn
lemma actualProfileTraceForm_tangent (g : SmoothMetric E E) (u : E โ โ) (x : E) :
letI : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
let j := NormedSpace.fromTangentSpace (๐:=โ) x
let H := (actualCoordinateHessian g u x).bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap
โ v : TangentSpace ๐(โ,E) x, actualProfileTraceForm g u x (j v) (j v) =
โvโ^2*H (metricGradient g u x) (metricGradient g u x) +
(1+โmetricGradient g u xโ^2)*H v v := by
let : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
intro j H v
rw [actualProfileTraceForm,metricProfileTraceForm_apply,coordinateMetricGradient_eq]
rw [selfMetricFlat_metric_norm,selfMetricFlat_metric_norm]
rfl
omit [FiniteDimensional โ E] in
lemma profileStrict_iff_quadratic (H : ProfileForm E) (a : E) :
profileStrict H a โ quadraticPlaneStrict (metricProfileTraceForm (innerSL โ) H a) a := by
have ht (v : E) (hv : โvโ = 1) :
metricProfileTraceForm (innerSL โ) H a v v = profileTrace H a v := by
rw [metricProfileTraceForm_apply]
change inner โ v v * H a a + (1+inner โ a a)*H v v = profileTrace H a v
simp only [real_inner_self_eq_norm_sq,hv,one_pow,one_mul,profileTrace]
constructor
ยท rintro โจv,hv,hav,hpโฉ
exact โจv,hv,hav,by rwa [ht v hv]โฉ
ยท rintro โจv,hv,hav,hpโฉ
exact โจv,hv,hav,by rwa [ht v hv] at hpโฉ
omit [FiniteDimensional โ E] in
lemma profileFull_iff_quadratic (H : ProfileForm E) (a : E) :
profileFull H a โ quadraticPlaneFull (metricProfileTraceForm (innerSL โ) H a) a := by
have ht (v : E) (hv : โvโ = 1) :
metricProfileTraceForm (innerSL โ) H a v v = profileTrace H a v := by
rw [metricProfileTraceForm_apply]
change inner โ v v * H a a + (1+inner โ a a)*H v v = profileTrace H a v
simp only [real_inner_self_eq_norm_sq,hv,one_pow,one_mul,profileTrace]
constructor <;> intro h v hv hav
ยท rw [ht v hv]
exact h v hv hav
ยท rw [โht v hv]
exact h v hv hav
omit [FiniteDimensional โ E] in
lemma quadraticPlaneStrict_transport {V : Type*} [NormedAddCommGroup V]
[InnerProductSpace โ V] (j : V โL[โ] E) (T : CoordinateForm E) (S : CoordinateForm V)
(q : E) (a : V) (hT : โ v, T (j v) (j v) = S v v)
(hq : โ v, inner โ q (j v) = inner โ a v) :
quadraticPlaneStrict T q โ quadraticPlaneStrict S a := by
rw [quadraticPlaneStrict_iff_nonzero,quadraticPlaneStrict_iff_nonzero]
constructor
ยท rintro โจv,hv,hqv,hpโฉ
refine โจj.symm v,by simpa using hv,?_,?_โฉ
ยท rw [โhq,j.apply_symm_apply]
exact hqv
ยท rwa [โhT,j.apply_symm_apply]
ยท rintro โจv,hv,hqv,hpโฉ
exact โจj v,by simpa using hv,(hq v).trans hqv,by rwa [hT]โฉ
omit [FiniteDimensional โ E] in
lemma quadraticPlaneFull_transport {V : Type*} [NormedAddCommGroup V]
[InnerProductSpace โ V] (j : V โL[โ] E) (T : CoordinateForm E) (S : CoordinateForm V)
(q : E) (a : V) (hT : โ v, T (j v) (j v) = S v v)
(hq : โ v, inner โ q (j v) = inner โ a v) :
quadraticPlaneFull T q โ quadraticPlaneFull S a := by
rw [quadraticPlaneFull_iff_nonzero,quadraticPlaneFull_iff_nonzero]
constructor
ยท intro h v hv hqv
rw [โhT]
exact h (j v) (by simpa using hv) ((hq v).trans hqv)
ยท intro h v hv hqv
have horth : inner โ a (j.symm v) = 0 := by
rw [โhq,j.apply_symm_apply]
exact hqv
have hp := h (j.symm v) (by simpa using hv) horth
simpa only [โhT,j.apply_symm_apply] using hp
lemma coordinateProfileStrict_iff_tangent (g : SmoothMetric E E) (u : E โ โ) (x : E)
(Hโ : CoordinateForm E) :
letI : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
let j := NormedSpace.fromTangentSpace (๐:=โ) x
quadraticPlaneStrict (metricProfileTraceForm (selfMetricFlat g x) Hโ (coordinateMetricGradient g u x))
((InnerProductSpace.toDual โ E).symm (fderiv โ u x)) โ profileStrict
(Hโ.bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap)
(metricGradient g u x) := by
let : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
intro j
let : FiniteDimensional โ (TangentSpace ๐(โ,E) x) := Module.Finite.equiv j.symm.toLinearEquiv
let H := Hโ.bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap
rw [profileStrict_iff_quadratic]
apply quadraticPlaneStrict_transport j
ยท intro v
rw [metricProfileTraceForm_apply,metricProfileTraceForm_apply,coordinateMetricGradient_eq]
rw [selfMetricFlat_metric_norm,selfMetricFlat_metric_norm]
change โvโ^2*H (metricGradient g u x) (metricGradient g u x) +
(1+โmetricGradient g u xโ^2)*H v v =
inner โ v v*H (metricGradient g u x) (metricGradient g u x) +
(1+inner โ (metricGradient g u x) (metricGradient g u x))*H v v
simp only [real_inner_self_eq_norm_sq]
ยท intro v
rw [InnerProductSpace.toDual_symm_apply]
change fderiv โ u x (j v) = g.inner x (metricGradient g u x) v
rw [metricGradient_pairing,mfderiv_eq_fderiv]
rfl
lemma coordinateProfileFull_iff_tangent (g : SmoothMetric E E) (u : E โ โ) (x : E)
(Hโ : CoordinateForm E) :
letI : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
let j := NormedSpace.fromTangentSpace (๐:=โ) x
quadraticPlaneFull (metricProfileTraceForm (selfMetricFlat g x) Hโ (coordinateMetricGradient g u x))
((InnerProductSpace.toDual โ E).symm (fderiv โ u x)) โ profileFull
(Hโ.bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap)
(metricGradient g u x) := by
let : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
intro j
let : FiniteDimensional โ (TangentSpace ๐(โ,E) x) := Module.Finite.equiv j.symm.toLinearEquiv
let H := Hโ.bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap
rw [profileFull_iff_quadratic]
apply quadraticPlaneFull_transport j
ยท intro v
rw [metricProfileTraceForm_apply,metricProfileTraceForm_apply,coordinateMetricGradient_eq]
rw [selfMetricFlat_metric_norm,selfMetricFlat_metric_norm]
change โvโ^2*H (metricGradient g u x) (metricGradient g u x) +
(1+โmetricGradient g u xโ^2)*H v v =
inner โ v v*H (metricGradient g u x) (metricGradient g u x) +
(1+inner โ (metricGradient g u x) (metricGradient g u x))*H v v
simp only [real_inner_self_eq_norm_sq]
ยท intro v
rw [InnerProductSpace.toDual_symm_apply]
change fderiv โ u x (j v) = g.inner x (metricGradient g u x) v
rw [metricGradient_pairing,mfderiv_eq_fderiv]
rfl
lemma actualProfileStrict_iff_tangent (g : SmoothMetric E E) (u : E โ โ) (x : E) :
letI : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
let j := NormedSpace.fromTangentSpace (๐:=โ) x
actualProfileStrict g u x โ profileStrict
((actualCoordinateHessian g u x).bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap)
(metricGradient g u x) :=
coordinateProfileStrict_iff_tangent g u x (actualCoordinateHessian g u x)
lemma actualProfileFull_iff_tangent (g : SmoothMetric E E) (u : E โ โ) (x : E) :
letI : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
let j := NormedSpace.fromTangentSpace (๐:=โ) x
actualProfileFull g u x โ profileFull
((actualCoordinateHessian g u x).bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap)
(metricGradient g u x) :=
coordinateProfileFull_iff_tangent g u x (actualCoordinateHessian g u x)
theorem exists_actual_preparation_covector (hd : Module.finrank โ E = 3)
(g : SmoothMetric E E) (u : E โ โ) (x : E)
(ha : coordinateMetricGradient g u x โ 0) (hs : actualProfileStrict g u x) :
โ l : E โL[โ] โ, l โ 0 โง l (coordinateMetricGradient g u x) = 0 โง
(โ c : โ, quadraticPlaneStrict
(metricProfileTraceForm (selfMetricFlat g x) (actualCoordinateHessian g u x+c โข profileRankOne l)
(coordinateMetricGradient g u x)) ((InnerProductSpace.toDual โ E).symm (fderiv โ u x))) โง
โ C : โ, โ c : โ, C โค c โ quadraticPlaneFull
(metricProfileTraceForm (selfMetricFlat g x) (actualCoordinateHessian g u x+c โข profileRankOne l)
(coordinateMetricGradient g u x)) ((InnerProductSpace.toDual โ E).symm (fderiv โ u x)) := by
let : RiemannianBundle (TangentSpace ๐(โ,E) : E โ Type _) := โจg.toRiemannianMetricโฉ
let j := NormedSpace.fromTangentSpace (๐:=โ) x
let : FiniteDimensional โ (TangentSpace ๐(โ,E) x) := Module.Finite.equiv j.symm.toLinearEquiv
let H := (actualCoordinateHessian g u x).bilinearComp j.toContinuousLinearMap j.toContinuousLinearMap
have hdim : Module.finrank โ (TangentSpace ๐(โ,E) x) = 3 :=
j.toLinearEquiv.finrank_eq.trans hd
have ha' : metricGradient g u x โ 0 := by
intro h
apply ha
rw [coordinateMetricGradient_eq,h,map_zero]
obtain โจl,hl,hla,hlS,C,hlFโฉ := exists_preparation_covector hdim ha'
((actualProfileStrict_iff_tangent g u x).mp hs)
let lโ := l.comp j.symm.toContinuousLinearMap
have hform (c : โ) :
(actualCoordinateHessian g u x+c โข profileRankOne lโ).bilinearComp
j.toContinuousLinearMap j.toContinuousLinearMap = H+c โข profileRankOne l := by
ext v w
simp only [ContinuousLinearMap.bilinearComp_apply,add_apply,
smul_apply,profileRankOne,ContinuousLinearMap.smulRight_apply,
lโ,ContinuousLinearMap.comp_apply,ContinuousLinearEquiv.coe_coe,
ContinuousLinearEquiv.symm_apply_apply,smul_eq_mul,H]
refine โจlโ,?_,?_,?_,C,?_โฉ
ยท intro h
apply hl
ext v
have hh := congrArg (fun L : E โL[โ] โ => L (j v)) h
simpa only [lโ,ContinuousLinearMap.comp_apply,ContinuousLinearEquiv.coe_coe,
ContinuousLinearEquiv.symm_apply_apply,zero_apply] using hh
ยท rw [coordinateMetricGradient_eq]
simpa only [lโ,j,ContinuousLinearMap.comp_apply,ContinuousLinearEquiv.coe_coe,
ContinuousLinearEquiv.symm_apply_apply] using hla
ยท intro c
apply (coordinateProfileStrict_iff_tangent g u x _).mpr
rw [hform]
exact hlS c
ยท intro c hc
apply (coordinateProfileFull_iff_tangent g u x _).mpr
rw [hform]
exact hlF c hc
end
section
open Set Filter Function
open scoped Topology ContDiff
variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace โ E]
[NormedAddCommGroup V] [NormedSpace โ V]
lemma second_directional_eq {f : E โ V} (hf : ContDiff โ โ f) (x v w : E) :
fderiv โ (fun z => fderiv โ f z w) x v = fderiv โ (fderiv โ f) x v w := by
rw [fderiv_clm_apply
((hf.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp) x)
(differentiableAt_const w)]
simp
lemma smooth_comp_second {F : V โ โ} {y : E โ V}
(hF : ContDiff โ โ F) (hy : ContDiff โ โ y) (x v w : E) :
fderiv โ (fun z => fderiv โ (F โ y) z w) x v =
fderiv โ (fderiv โ F) (y x) (fderiv โ y x v) (fderiv โ y x w) +
fderiv โ F (y x) (fderiv โ (fun z => fderiv โ y z w) x v) := by
have hdF := hF.differentiable (by simp)
have hdy := hy.differentiable (by simp)
have hdDF := (hF.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp)
have hdDy := (hy.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp)
have he : (fun z => fderiv โ (F โ y) z w) =
(fun z => fderiv โ F (y z) (fderiv โ y z w)) := by
funext z
rw [fderiv_comp z (hdF _) (hdy _),ContinuousLinearMap.comp_apply]
rw [he]
erw [fderiv_clm_apply ((hdDF _).comp x (hdy _))
((hdDy x).clm_apply (differentiableAt_const w))]
erw [fderiv_fun_comp x (hdDF _) (hdy _)]
simp only [_root_.add_apply,ContinuousLinearMap.comp_apply,
ContinuousLinearMap.flip_apply]
exact add_comm _ _
lemma smooth_product_second {f g : E โ โ}
(hf : ContDiff โ โ f) (hg : ContDiff โ โ g) (x v w : E) :
fderiv โ (fun z => fderiv โ (fun t => f t*g t) z w) x v =
f x * fderiv โ (fun z => fderiv โ g z w) x v +
fderiv โ f x v * fderiv โ g x w +
fderiv โ f x w * fderiv โ g x v +
g x * fderiv โ (fun z => fderiv โ f z w) x v := by
have df := hf.differentiable (by simp)
have dg := hg.differentiable (by simp)
have dDf := (hf.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp)
have dDg := (hg.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp)
have he : (fun z => fderiv โ (fun t => f t*g t) z w) =
(fun z => f z * fderiv โ g z w + g z * fderiv โ f z w) := by
funext z
rw [fderiv_fun_mul (df z) (dg z)]
simp
rw [he]
erw [fderiv_fun_add ((df x).mul ((dDg x).clm_apply (differentiableAt_const w)))
((dg x).mul ((dDf x).clm_apply (differentiableAt_const w))),
fderiv_fun_mul (df x) ((dDg x).clm_apply (differentiableAt_const w)),
fderiv_fun_mul (dg x) ((dDf x).clm_apply (differentiableAt_const w))]
simp only [_root_.add_apply,_root_.smul_apply,smul_eq_mul]
ring
theorem corrugation_first {ฯ ฯ : E โ โ} {F : V โ โ} {y : E โ V}
(hฯ : ContDiff โ โ ฯ) (hฯ : ContDiff โ โ ฯ)
(hF : ContDiff โ โ F) (hy : ContDiff โ โ y) (c N : โ) (x v : E) :
fderiv โ (fun z => ฯ z+c*ฯ z*F (N โข y z)) x v =
fderiv โ ฯ x v + c*fderiv โ ฯ x v*F (N โข y x) +
c*ฯ x*N*fderiv โ F (N โข y x) (fderiv โ y x v) := by
have dhฯ := hฯ.differentiable (by simp) x
have dhฯ := hฯ.differentiable (by simp) x
have dhy := hy.differentiable (by simp) x
have dhF := hF.differentiable (by simp) (N โข y x)
have dhny := dhy.const_smul N
have dhcomp := dhF.comp x dhny
erw [fderiv_fun_add dhฯ ((dhฯ.const_mul c).mul dhcomp),
fderiv_fun_mul (dhฯ.const_mul c) dhcomp,
fderiv_const_mul dhฯ c, fderiv_fun_comp x dhF dhny,
fderiv_fun_const_smul dhy N]
simp only [_root_.add_apply,_root_.smul_apply,ContinuousLinearMap.comp_apply,
map_smul,smul_eq_mul,Function.comp_apply,Pi.smul_apply]
ring
end
section
open Set Filter Function
open scoped Topology ContDiff
open scoped Topology ContDiff
variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace โ E]
[NormedAddCommGroup V] [NormedSpace โ V]
lemma smooth_sum_second {f g : E โ V}
(hf : ContDiff โ โ f) (hg : ContDiff โ โ g) (x v w : E) :
fderiv โ (fun z => fderiv โ (fun t => f t+g t) z w) x v =
fderiv โ (fun z => fderiv โ f z w) x v +
fderiv โ (fun z => fderiv โ g z w) x v := by
have df := hf.differentiable (by simp)
have dg := hg.differentiable (by simp)
have dDf := (hf.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp)
have dDg := (hg.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp)
have he : (fun z => fderiv โ (fun t => f t+g t) z w) =
(fun z => fderiv โ f z w + fderiv โ g z w) := by
funext z; rw [fderiv_fun_add (df z) (dg z)]; rfl
rw [he, fderiv_fun_add ((dDf x).clm_apply (differentiableAt_const w))
((dDg x).clm_apply (differentiableAt_const w))]
rfl
lemma smooth_const_smul_second {f : E โ V}
(hf : ContDiff โ โ f) (c : โ) (x v w : E) :
fderiv โ (fun z => fderiv โ (fun t => c โข f t) z w) x v =
c โข fderiv โ (fun z => fderiv โ f z w) x v := by
have df := hf.differentiable (by simp)
have dDf := (hf.fderiv_right (show (โ : โโฯ)+1 โค โ by simp)).differentiable (by simp)
have he : (fun z => fderiv โ (fun t => c โข f t) z w) =
(fun z => c โข fderiv โ f z w) := by
funext z; rw [fderiv_fun_const_smul (df z) c]; rfl
rw [he, fderiv_fun_const_smul ((dDf x).clm_apply (differentiableAt_const w)) c]
rfl
lemma scaled_comp_second {F : V โ โ} {y : E โ V}
(hF : ContDiff โ โ F) (hy : ContDiff โ โ y) (N : โ) (x v w : E) :
fderiv โ (fun z => fderiv โ (fun t => F (N โข y t)) z w) x v =
N^2 * fderiv โ (fderiv โ F) (N โข y x) (fderiv โ y x v) (fderiv โ y x w) +
N * fderiv โ F (N โข y x) (fderiv โ (fun z => fderiv โ y z w) x v) := by
have hh := smooth_comp_second hF (hy.const_smul N) x v w
change fderiv โ (fun z => fderiv โ (fun t => F (N โข y t)) z w) x v = _ at hh
rw [fderiv_fun_const_smul (hy.differentiable (by simp) x) N,
smooth_const_smul_second hy N x v w] at hh
simp only [_root_.smul_apply,map_smul,smul_eq_mul] at hh
rw [hh]
ring
theorem corrugation_second {ฯ ฯ : E โ โ} {F : V โ โ} {y : E โ V}
(hฯ : ContDiff โ โ ฯ) (hฯ : ContDiff โ โ ฯ)
(hF : ContDiff โ โ F) (hy : ContDiff โ โ y) (c N : โ) (x v w : E) :
fderiv โ (fun z => fderiv โ (fun t => ฯ t+c*(ฯ t*F (N โข y t))) z w) x v =
fderiv โ (fun z => fderiv โ ฯ z w) x v +
c*N^2*ฯ x*fderiv โ (fderiv โ F) (N โข y x) (fderiv โ y x v) (fderiv โ y x w) +
c*N*ฯ x*fderiv โ F (N โข y x) (fderiv โ (fun z => fderiv โ y z w) x v) +
c*N*fderiv โ ฯ x v*fderiv โ F (N โข y x) (fderiv โ y x w) +
c*N*fderiv โ ฯ x w*fderiv โ F (N โข y x) (fderiv โ y x v) +
c*F (N โข y x)*fderiv โ (fun z => fderiv โ ฯ z w) x v := by
have hg : ContDiff โ โ (fun t => F (N โข y t)) := hF.comp (hy.const_smul N)
have hh := smooth_sum_second hฯ ((hฯ.mul hg).const_smul c) x v w
simp only [smul_eq_mul] at hh
rw [hh]
have hc := smooth_const_smul_second (hฯ.mul hg) c x v w
simp only [smul_eq_mul] at hc
rw [hc,smooth_product_second hฯ hg x v w,scaled_comp_second hF hy N x v w]
have hfirst (z : E) : fderiv โ (fun t => F (N โข y t)) x z =
N * fderiv โ F (N โข y x) (fderiv โ y x z) := by
erw [fderiv_fun_comp x (hF.differentiable (by simp) _) ((hy.differentiable (by simp) x).const_smul N),
fderiv_fun_const_smul (hy.differentiable (by simp) x) N]
simp
rw [hfirst w,hfirst v]
ring
end
section
open Set Filter Function Metric
open scoped Topology
open Set Filter Function Metric
open scoped Topology ContDiff InnerProductSpace
open Filter Set
open scoped Topology
open Set Filter Function Metric
open scoped Topology ContDiff InnerProductSpace
open Set Filter Function Metric Topology Manifold
open scoped Topology ContDiff
open Set Filter Function Metric Topology Manifold MeasureTheory
open scoped Topology ContDiff
lemma periodicRadialOffset_norm_le {R : โ} (hR : 0 โค R) (x : ProfilePlane) :
โperiodicRadialOffset R xโ โค R := by
classical
unfold periodicRadialOffset
split_ifs with h
ยท exact h.choose_spec.le
ยท simpa using hR
lemma periodicRadialOffset_radius_sq_le {R : โ} (hR : 0 โค R) (x : ProfilePlane) :
(periodicRadialOffset R x).1^2+(periodicRadialOffset R x).2^2 โค 2*R^2 := by
have hn := periodicRadialOffset_norm_le hR x
have h1 := (norm_fst_le (periodicRadialOffset R x)).trans hn
have h2 := (norm_snd_le (periodicRadialOffset R x)).trans hn
rw [Real.norm_eq_abs] at h1 h2
have hsq1 := pow_le_pow_leftโ (abs_nonneg _) h1 2
have hsq2 := pow_le_pow_leftโ (abs_nonneg _) h2 2
simpa only [sq_abs] using (show
|(periodicRadialOffset R x).1|^2+|(periodicRadialOffset R x).2|^2 โค 2*R^2 by
linarith only [hsq1,hsq2])
theorem periodicRadial_coefficients_bounded {ฮฒ : โ โ โ} (hฮฒ : ContDiff โ โ ฮฒ)
(hฮฒc : HasCompactSupport ฮฒ) (hฮฒv : โ t, ฮฒ t โ Icc 0 1)
{R : โ} (hR : 0 < R) :
โ M S K : โ, 0 < M โง 0 < S โง 0 < K โง โ x : ProfilePlane,
0 โค periodicRadialSpeed ฮฒ R x โง periodicRadialSpeed ฮฒ R x โค M โง
0 โค periodicAngularSecond ฮฒ R x โง
(periodicRadialSpeed ฮฒ R x)^2 โค S*periodicAngularSecond ฮฒ R x โง
|periodicRadialSecond ฮฒ R x| โค K := by
obtain โจD,hDโฉ := (hฮฒc.deriv.isCompact_range (hฮฒ.continuous_deriv (by simp))).exists_bound_of_continuousOn
(f := id) continuous_id.continuousOn
let D' := max D 0
have hD' : 0 โค D' := le_max_right _ _
have hDb : โ t, |deriv ฮฒ t| โค D' := fun t =>
(hD _ (mem_range_self t)).trans (le_max_left _ _)
refine โจ4*R+1,4*R^2+1,3+8*R^2*D',by positivity,by positivity,by positivity,?_โฉ
intro x
let z := periodicRadialOffset R x
let t := z.1^2+z.2^2
have ht : 0 โค t := by dsimp [t]; positivity
have htb : t โค 2*R^2 := periodicRadialOffset_radius_sq_le hR.le x
have hs : (Real.sqrt t)^2 = t := Real.sq_sqrt ht
have hsp : 0 โค Real.sqrt t := Real.sqrt_nonneg _
have hsb : Real.sqrt t โค 2*R := by nlinarith only [hs,hsp,htb,hR]
have hp := (hฮฒv t).1
have hb := (hฮฒv t).2
have hbp : 0 โค ฮฒ t*(1-ฮฒ t) := mul_nonneg hp (sub_nonneg.mpr hb)
change 0 โค 2*Real.sqrt t*ฮฒ t โง 2*Real.sqrt t*ฮฒ t โค 4*R+1 โง
0 โค 2*ฮฒ t โง (2*Real.sqrt t*ฮฒ t)^2 โค (4*R^2+1)*(2*ฮฒ t) โง
|2*ฮฒ t+4*t*deriv ฮฒ t| โค 3+8*R^2*D'
refine โจby positivity,?_,by positivity,?_,?_โฉ
ยท have hh := mul_le_mul hsb hb hp (by positivity : 0 โค 2*R)
nlinarith only [hh]
ยท calc
(2*Real.sqrt t*ฮฒ t)^2 = 4*t*(ฮฒ t)^2 := by rw [mul_pow,mul_pow,hs]; ring
_ โค 4*t*ฮฒ t := mul_le_mul_of_nonneg_left (by nlinarith only [hbp]) (by positivity)
_ โค 8*R^2*ฮฒ t := by nlinarith only [mul_le_mul_of_nonneg_right htb hp]
_ โค (4*R^2+1)*(2*ฮฒ t) := by nlinarith only [hp]
ยท calc
|2*ฮฒ t+4*t*deriv ฮฒ t| โค |2*ฮฒ t|+|4*t*deriv ฮฒ t| := abs_add_le _ _
_ = 2*ฮฒ t+4*t*|deriv ฮฒ t| := by
rw [abs_of_nonneg (by positivity : 0 โค 2*ฮฒ t),abs_mul,abs_of_nonneg (by positivity : 0 โค 4*t)]
_ โค 2+4*(2*R^2)*D' := add_le_add (by linarith only [hb])
(mul_le_mul (by nlinarith only [htb]) (hDb t) (abs_nonneg _) (by positivity))
_ โค 3+8*R^2*D' := by ring_nf; linarith
theorem periodicRadialFunction_bounded {ฮฒ : โ โ โ} (hฮฒ : ContDiff โ โ ฮฒ)
{b r R : โ} (hr : 0 โค r) (hrR : r < R) (hsmall : 2*R < 1)
(hb : b โค r^2) (hzero : โ t, b โค t โ ฮฒ t = 0) :
โ B : โ, 0 < B โง โ x, |periodicRadialFunction ฮฒ b x| โค B := by
have hf := radialSquaredBase_zero_of_norm hฮฒ.continuous hr hb hzero
have hfR : โ z, R < โzโ โ radialSquaredBase ฮฒ b z = 0 := fun z hz => hf z (hrR.trans hz)
obtain โจB,hBโฉ := ((radialSquaredBase_compact hฮฒ.continuous hr hb hzero).isCompact_range
(radialSquaredBase_smooth ฮฒ b hฮฒ).continuous).exists_bound_of_continuousOn
(f := id) continuous_id.continuousOn
refine โจ|radialPrimitive ฮฒ b|+max B 0+1,by positivity,?_โฉ
intro x
have hp : |profilePeriodize (radialSquaredBase ฮฒ b) x| โค max B 0 := by
by_cases hx : โ k, โx-profileLatticePoint kโ < R
ยท rw [(profilePeriodize_eventually_single hsmall hfR hx.choose hx.choose_spec).eq_of_nhds]
exact (hB _ (mem_range_self _)).trans (le_max_left _ _)
ยท have hxn : โ k, R โค โx-profileLatticePoint kโ := by simpa only [not_exists,not_lt] using hx
rw [(profilePeriodize_eventually_zero hrR hf x hxn).eq_of_nhds]
simp
unfold periodicRadialFunction
calc
_ โค |radialPrimitive ฮฒ b|+|profilePeriodize (radialSquaredBase ฮฒ b) x| := abs_add_le _ _
_ โค |radialPrimitive ฮฒ b|+max B 0+1 := by linarith only [hp]
theorem periodicRadialFunction_fderiv_bound {ฮฒ : โ โ โ} (hฮฒ : ContDiff โ โ ฮฒ)
(hฮฒ0 : ฮฒ 0 = 0) (hฮฒp : โ t, 0 โค ฮฒ t)
{b r R : โ} (hr : 0 โค r) (hrR : r < R) (hsmall : 2*R < 1)
(hb : b โค r^2) (hzero : โ t, b โค t โ ฮฒ t = 0) (x : ProfilePlane) :
โfderiv โ (periodicRadialFunction ฮฒ b) xโ โค 2*periodicRadialSpeed ฮฒ R x := by
have he : fderiv โ (periodicRadialFunction ฮฒ b) x =
periodicRadialSpeed ฮฒ R x โข planeRadialCovector (periodicRadialOffset R x) := by
apply ContinuousLinearMap.ext
intro v
exact periodicRadialFunction_first hฮฒ hฮฒ0 hr hrR hsmall hb hzero x v
have hp : 0 โค periodicRadialSpeed ฮฒ R x := by
unfold periodicRadialSpeed
exact mul_nonneg (mul_nonneg (by norm_num) (Real.sqrt_nonneg _)) (hฮฒp _)
rw [he,norm_smul,Real.norm_eq_abs,abs_of_nonneg hp]
nlinarith only [mul_le_mul_of_nonneg_left (norm_planeRadialCovector_le (periodicRadialOffset R x)) hp]
end
open Set Filter Function Metric
open scoped Topology
open Set Filter Function Metric
open scoped Topology ContDiff InnerProductSpace
open Filter Set
open scoped Topology
open Set Filter Function Metric
open scoped Topology ContDiff InnerProductSpace
open Set Filter Function Metric Topology Manifold
open scoped Topology ContDiff
open Set Filter Function Metric Topology Manifold MeasureTheory
open scoped Topology ContDiff
open scoped InnerProductSpace
variable {E V : Type*} [NormedAddCommGroup E] [InnerProductSpace โ E]
[FiniteDimensional โ E] [NormedAddCommGroup V] [InnerProductSpace โ V]
[FiniteDimensional โ V]
def pulledGradient (j : V โL[โ] E) (u : E โ โ) (x : E) : V :=
(InnerProductSpace.toDual โ V).symm ((fderiv โ u x).comp j)
omit [FiniteDimensional โ E] in
lemma pulledGradient_pairing (j : V โL[โ] E) (u : E โ โ) (x : E) (v : V) :
inner โ (pulledGradient j u x) v = fderiv โ u x (j v) :=
InnerProductSpace.toDual_symm_apply
def pulledHessian (ฮ : E โ E โL[โ] E โL[โ] E) (j : V โL[โ] E)
(u : E โ โ) (x : E) : ProfileForm V :=
(coordinateCovariantSecond ฮ u x).bilinearComp j j
omit [FiniteDimensional โ E] [FiniteDimensional โ V] in
lemma norm_bilinear_pullback_le (H : ProfileForm E) (j : V โL[โ] E) :
โH.bilinearComp j jโ โค โHโ*โjโ^2 := by
apply (H.bilinearComp j j).opNorm_le_boundโ (by positivity)
intro v w
calc
โH (j v) (j w)โ โค โHโ*โj vโ*โj wโ := H.le_opNormโ _ _
_ โค โHโ*(โjโ*โvโ)*(โjโ*โwโ) :=
mul_le_mul (mul_le_mul_of_nonneg_left (j.le_opNorm v) (norm_nonneg H))
(j.le_opNorm w) (norm_nonneg _) (by positivity)
_ = _ := by ring
lemma planeRadialCovector_le_radius (z v : ProfilePlane) :
|planeRadialCovector z v| โค Real.sqrt (v.1^2+v.2^2) := by
have he := plane_radial_angular_sq z v
have hs := Real.sq_sqrt (show 0 โค v.1^2+v.2^2 by positivity)
have ha := sq_abs (planeRadialCovector z v)
nlinarith only [he,hs,ha,sq_nonneg (planeAngularCovector z v),
abs_nonneg (planeRadialCovector z v),Real.sqrt_nonneg (v.1^2+v.2^2)]
lemma radial_coframe_bounds (D : V โL[โ] ProfilePlane) (a : V) (z : ProfilePlane)
(ha : D a = 0)
(hup : โ v, Real.sqrt ((D v).1^2+(D v).2^2) โค 2*โvโ)
(hlo : โ v, inner โ a v = 0 โ โvโ/2 โค Real.sqrt ((D v).1^2+(D v).2^2)) :
let R := (planeRadialCovector z).comp D
let T := (planeAngularCovector z).comp D
R a = 0 โง T a = 0 โง โ(InnerProductSpace.toDual โ V).symm Rโ โค 2 โง
โ v, inner โ a v = 0 โ โvโ/2 โค Real.sqrt ((R v)^2+(T v)^2) := by
dsimp only
refine โจby simp [ha],by simp [ha],?_,?_โฉ
ยท rw [LinearIsometryEquiv.norm_map]
apply ContinuousLinearMap.opNorm_le_bound _ (by norm_num)
intro v
exact (planeRadialCovector_le_radius z (D v)).trans (hup v)
ยท intro v hv
simpa only [ContinuousLinearMap.comp_apply,plane_radial_angular_sq] using hlo v hv
lemma periodicRadialSpeed_le_angular {ฮฒ : โ โ โ} (hฮฒ : โ t, 0 โค ฮฒ t)
{R : โ} (hR : 0 < R) (x : ProfilePlane) :
periodicRadialSpeed ฮฒ R x/(2*R) โค periodicAngularSecond ฮฒ R x := by
let z := periodicRadialOffset R x
let t := z.1^2+z.2^2
have ht : 0 โค t := by dsimp [t]; positivity
have htb : t โค 2*R^2 := periodicRadialOffset_radius_sq_le hR.le x
have hs : Real.sqrt t โค 2*R := by
nlinarith only [Real.sq_sqrt ht,Real.sqrt_nonneg t,htb,hR]
apply (div_le_iffโ (by positivity : 0 < 2*R)).mpr
change 2*Real.sqrt t*ฮฒ t โค (2*ฮฒ t)*(2*R)
nlinarith only [mul_le_mul_of_nonneg_right hs (hฮฒ t)]
def radialCorrugation (ฯ ฯ : E โ โ) (y : E โ ProfilePlane) (ฮฒ : โ โ โ)
(b ฮด A N : โ) (x : E) : โ :=
ฯ x+(ฮด*A/N)*(ฯ x*periodicRadialFunction ฮฒ b (N โข y x))
omit [FiniteDimensional โ E] in
lemma radialCorrugation_smooth {ฯ ฯ : E โ โ} {y : E โ ProfilePlane}
(hฯ : ContDiff โ โ ฯ) (hฯ : ContDiff โ โ ฯ) (hy : ContDiff โ โ y)
{ฮฒ : โ โ โ} (hฮฒ : ContDiff โ โ ฮฒ) {b r R : โ} (hr : 0 โค r)
(_hrR : r < R) (_hsmall : 2*R < 1) (hb : b โค r^2)
(hzero : โ t, b โค t โ ฮฒ t = 0) (ฮด A N : โ) :
ContDiff โ โ (radialCorrugation ฯ ฯ y ฮฒ b ฮด A N) := by
have hF : ContDiff โ โ (periodicRadialFunction ฮฒ b) := by
exact radial_periodic_smooth hฮฒ hr hb hzero
exact hฯ.add (contDiff_const.mul (hฯ.mul (hF.comp (hy.const_smul N))))
omit [FiniteDimensional โ E] in
lemma radialCorrugation_gradient {ฯ ฯ : E โ โ} {y : E โ ProfilePlane}
(hฯ : ContDiff โ โ ฯ) (hฯ : ContDiff โ โ ฯ) (hy : ContDiff โ โ y)
{ฮฒ : โ โ โ} (hฮฒ : ContDiff โ โ ฮฒ) (hฮฒ0 : ฮฒ 0 = 0)
{b r R : โ} (hr : 0 โค r) (hrR : r < R) (hsmall : 2*R < 1)
(hb : b โค r^2) (hzero : โ t, b โค t โ ฮฒ t = 0)
(j : V โL[โ] E) (ฮด A N : โ) (hN : N โ 0) (x : E) :
pulledGradient j (radialCorrugation ฯ ฯ y ฮฒ b ฮด A N) x =
pulledGradient j ฯ x +
(ฮด*A*ฯ x*periodicRadialSpeed ฮฒ R (N โข y x)) โข
(InnerProductSpace.toDual โ V).symm
((planeRadialCovector (periodicRadialOffset R (N โข y x))).comp ((fderiv โ y x).comp j)) +
(ฮด*A/N*periodicRadialFunction ฮฒ b (N โข y x)) โข pulledGradient j ฯ x := by
have hF : ContDiff โ โ (periodicRadialFunction ฮฒ b) :=
radial_periodic_smooth hฮฒ hr hb hzero
apply ext_inner_right โ
intro v
rw [pulledGradient_pairing,inner_add_left,inner_add_left,real_inner_smul_left,real_inner_smul_left,
pulledGradient_pairing,pulledGradient_pairing,InnerProductSpace.toDual_symm_apply]
have he := corrugation_first hฯ hฯ hF hy (ฮด*A/N) N x (j v)
have heq : (fun z => ฯ z+(ฮด*A/N)*ฯ z*periodicRadialFunction ฮฒ b (N โข y z)) =
radialCorrugation ฯ ฯ y ฮฒ b ฮด A N := by funext z; dsimp [radialCorrugation]; ring
rw [heq,periodicRadialFunction_first hฮฒ hฮฒ0 hr hrR hsmall hb hzero] at he
simp only [ContinuousLinearMap.comp_apply]
rw [he]
field_simp [hN]
ring
end YauCounterexamples
end
end OAI
import Mathlib
import OAI.Geometry.SmoothYau.Estimates.ExistsPreparationCovector
import OAI.Geometry.SmoothYau.Estimates.RadialSpeedPositiveAnnulus
import OAI.Geometry.SmoothYau.Geometry.MetricGradient
import OAI.Geometry.SmoothYau.Limits.CoordinateForm
namespace OAI
noncomputable section
namespace YauCounterexamples
section
open Set Filter Manifold Bundle MeasureTheory
open scoped Topology ContDiff ENNReal
open Set Filter Manifold Bundle
open scoped Topology ContDiff
open Set Filter Manifold Bundle
open scoped Topology ContDiff
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace โ E]
[FiniteDimensional โ E] {M : Type*} [TopologicalSpace M] [ChartedSpace E M]
[IsManifold ๐(โ,E) โ M]
def localMetricFlat (g : SmoothMetric E M) (p x : M) : E โL[โ] E โL[โ] โ :=
ContinuousLinearMap.inCoordinates E (TangentSpace ๐(โ,E)) (E โL[โ] โ)
(fun x => TangentSpace ๐(โ,E) x โL[โ] โ) p x p x (g.inner x)
omit [FiniteDimensional โ E] in
lemma localMetricFlat_pairing (g : SmoothMetric E M) (p x : M)
(hx : x โ (trivializationAt E (TangentSpace ๐(โ,E)) p).baseSet) (v w : E) :
localMetricFlat g p x v w = g.inner x
((trivializationAt E (TangentSpace ๐(โ,E)) p).symm x v)
((trivializationAt E (TangentSpace ๐(โ,E)) p).symm x w) := by
unfold localMetricFlat
rw [inCoordinates_apply_eqโ hx hx (by simp)]
simp
lemma localMetricFlat_invertible (g : SmoothMetric E M) (p x : M)
(hx : x โ (trivializationAt E (TangentSpace ๐(โ,E)) p).baseSet) :
(localMetricFlat g p x).IsInvertible := by
let e := (trivializationAt E (TangentSpace ๐(โ,E)) p).continuousLinearEquivAt โ x hx
have hi : Function.Injective (localMetricFlat g p x) := by
apply (localMetricFlat g p x).ker_eq_bot.mp
rw [LinearMap.ker_eq_bot']
intro v hv
by_contra hn
have he : e.symm v โ 0 := by simpa only [ne_eq,EmbeddingLike.map_eq_zero_iff] using hn
have hp := g.pos x (e.symm v) he
have hz := congrArg (fun f : E โL[โ] โ => f v) hv
change localMetricFlat g p x v v = 0 at hz
rw [localMetricFlat_pairing g p x hx] at hz
change g.inner x (e.symm v) (e.symm v) = 0 at hz
linarith
have hdim : Module.finrank โ E = Module.finrank โ (E โL[โ] โ) :=
(InnerProductSpace.toDual โ E).toLinearEquiv.finrank_eq
have hs := (LinearMap.injective_iff_surjective_of_finrank_eq_finrank hdim).mp hi
exact โจ(LinearEquiv.ofBijective (localMetricFlat g p x).toLinearMap โจhi,hsโฉ).toContinuousLinearEquiv,rflโฉ
omit [FiniteDimensional โ E] in
lemma contMDiffAt_localMetricFlat (g : SmoothMetric E M) (p : M) :
ContMDiffAt ๐(โ,E) ๐(โ,E โL[โ] E โL[โ] โ) โ (localMetricFlat g p) p := by
have hg := g.contMDiff p
rw [contMDiffAt_section p] at hg
simp only [hom_trivializationAt_apply] at hg
convert! hg using 1
lemma local_metricGradient (g : SmoothMetric E M) (u : M โ โ) (p x : M)
(hx : x โ (trivializationAt E (TangentSpace ๐(โ,E)) p).baseSet) :
(trivializationAt E (TangentSpace ๐(โ,E)) p โจx,metricGradient g u xโฉ).2 =
(localMetricFlat g p x).inverse
(inTangentCoordinates ๐(โ,E) ๐(โ,โ) id u
(mfderiv ๐(โ,E) ๐(โ,โ) u) p x) := by
symm
apply (localMetricFlat_invertible g p x hx).inverse_apply_eq.mpr
ext w
rw [localMetricFlat_pairing g p x hx,Trivialization.symm_apply_apply_mk _ hx,
metricGradient_pairing]
unfold inTangentCoordinates
simp only [id_eq]
have he := ContinuousLinearMap.inCoordinates_eq (ฯ := mfderiv ๐(โ,E) ๐(โ,โ) u x) hx
(show u x โ (trivializationAt โ (TangentSpace ๐(โ,โ)) (u p)).baseSet by
simp [TangentBundle.trivializationAt_baseSet, chartAt_self_eq])
have hew := congrArg (fun L : E โL[โ] โ => L w) he
exact hew.trans (by
simp [Trivialization.continuousLinearEquivAt_apply,
Trivialization.continuousLinearEquivAt_symm_apply]
rfl)
theorem contMDiff_metricGradient (g : SmoothMetric E M) {u : M โ โ}
(hu : ContMDiff ๐(โ,E) ๐(โ,โ) โ u) :
ContMDiff ๐(โ,E) (๐(โ,E).prod ๐(โ,E)) โ
(fun x => TotalSpace.mk' E x (metricGradient g u x)) := by
intro p
rw [contMDiffAt_section p]
have hg := contMDiffAt_localMetricFlat g p
have hi := (localMetricFlat_invertible g p p (mem_baseSet_trivializationAt E _ p)).contDiffAt_map_inverse (n := โ)
have hs := (hi.comp_contMDiffAt hg).clm_apply ((hu p).mfderiv_const (m := โ) (by simp))
apply hs.congr_of_eventuallyEq
filter_upwards [(trivializationAt E (TangentSpace ๐(โ,E)) p).open_baseSet.mem_nhds
(mem_baseSet_trivializationAt E _ p)] with x hx
exact local_metricGradient g u p x hx
Xet Storage Details
- Size:
- 52.2 kB
- Xet hash:
- d6c57a19e454c63a240bcf95729148f012f160ab79ed20a01761f71596f27693
ยท
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.