feat(Mathlib/Geometry/Manifold): Riemannian metrics exist II#33714
feat(Mathlib/Geometry/Manifold): Riemannian metrics exist II#33714idontgetoutmuch wants to merge 28 commits intoleanprover-community:masterfrom
Conversation
PR summary 0e708caf75Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
From #33519 (comment)
@grunweg do you mean generalising this? /-
Overloading the use of π, let φ : π⁻¹(U) → U × ℝⁿ and ψ : π⁻¹(U) → U × (ℝⁿ ⊗ ℝⁿ →ₗ ℝ) be local
trivialisations of the tangent bundle and the bundle of bilinear forms respectively and
w ∈ π⁻¹(U) and (x, u) and (y, v) ∈ U × ℝⁿ then ψ(w)(u, v) = w(φ⁻¹(x, u), φ⁻¹(x, v))
-/
lemma trivializationAt_tangentSpace_bilinearForm_apply (x₀ x : B)
(w : (TangentSpace (M := B) IB) x →L[ℝ] (TangentSpace (M := B) IB) x →L[ℝ] ℝ)
(u v : EB)
(hx : x ∈ (trivializationAt EB (TangentSpace (M := B) IB) x₀).baseSet) :
(trivializationAt (EB →L[ℝ] EB →L[ℝ] ℝ)
(fun x ↦ (TangentSpace (M := B) IB) x →L[ℝ]
(TangentSpace (M := B) IB) x →L[ℝ]
ℝ) x₀).continuousLinearMapAt ℝ x w u v =
w ((trivializationAt EB (TangentSpace (M := B) IB) x₀).symm x u)
((trivializationAt EB (TangentSpace (M := B) IB) x₀).symm x v)Code here: |
|
You know what your comment refers to - but this seems about right. |
|
See also #28056 |
grunweg
left a comment
There was a problem hiding this comment.
Thanks for your PR; this result is sorely missing from mathlib.
I have two kinds of comments. The first one is that the code is not yet at mathlib's quality bar; it can be shortened significantly, for instance. I have made some example comments below. The second, higher-level, comment is that this result holds on any finite rank vector bundle --- hence should be proven in that generality. Would you like to attempt this generalisation also? As-is, this PR probably should not get merged.
Mathlib/Geometry/Manifold/ExistsRiemannianMetricTangentSpace.lean
Outdated
Show resolved
Hide resolved
| change NormedAddCommGroup EB | ||
| infer_instance | ||
|
|
||
| noncomputable instance (p : B) : NormedSpace ℝ (TangentSpace IB p) := by |
| infer_instance | ||
|
|
||
| end | ||
|
|
There was a problem hiding this comment.
I'd write noncomputable section here, and drop all the noncomputable keywords below
| noncomputable | ||
| def g_bilin_1 (i b : B) : | ||
| (TotalSpace (EB →L[ℝ] EB →L[ℝ] ℝ) | ||
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ)) := by | ||
| let ψ := FiberBundle.trivializationAt (EB →L[ℝ] EB →L[ℝ] ℝ) | ||
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ) i | ||
| by_cases h : (b, (fun (x : B) ↦ innerSL ℝ) b) ∈ ψ.target | ||
| · exact ψ.invFun (b, (fun (x : B) ↦ innerSL ℝ) b) | ||
| · exact ⟨b, 0⟩ |
There was a problem hiding this comment.
It's better to avoid tactics to construct definitions --- in particular, if is slightly better than by_cases here. I'd write this as a proof term:
| noncomputable | |
| def g_bilin_1 (i b : B) : | |
| (TotalSpace (EB →L[ℝ] EB →L[ℝ] ℝ) | |
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ)) := by | |
| let ψ := FiberBundle.trivializationAt (EB →L[ℝ] EB →L[ℝ] ℝ) | |
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ) i | |
| by_cases h : (b, (fun (x : B) ↦ innerSL ℝ) b) ∈ ψ.target | |
| · exact ψ.invFun (b, (fun (x : B) ↦ innerSL ℝ) b) | |
| · exact ⟨b, 0⟩ | |
| def g_bilin_1 (i b : B) : | |
| (TotalSpace (EB →L[ℝ] EB →L[ℝ] ℝ) | |
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ)) := by | |
| letI ψ := FiberBundle.trivializationAt (EB →L[ℝ] EB →L[ℝ] ℝ) | |
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ) i | |
| by_cases h : (b, (fun (x : B) ↦ innerSL ℝ) b) ∈ ψ.target | |
| · exact ψ.invFun (b, (fun (x : B) ↦ innerSL ℝ) b) | |
| · exact ⟨b, 0⟩ |
Note the use of letI, which gives you better proof terms.
| noncomputable | ||
| def g_bilin_2 (i p : B) : | ||
| (TangentSpace IB) p →L[ℝ] ((TangentSpace IB) p →L[ℝ] ℝ) := by | ||
| let χ := trivializationAt EB (TangentSpace (M := B) IB) i |
There was a problem hiding this comment.
inner is unused, so can be removed. With the same procedure as above, I arrive at
letI χ := trivializationAt EB (TangentSpace (M := B) IB) i
if h : p ∈ χ.baseSet then
(innerSL ℝ).comp (χ.continuousLinearMapAt ℝ p) |>.flip.comp (χ.continuousLinearMapAt ℝ p)
else 0
| ((trivializationAt EB (TangentSpace (M := B) IB) x₀).symm x v) := by | ||
| rw [Trivialization.continuousLinearMapAt_apply] | ||
| rw [@Trivialization.linearMapAt_apply] | ||
| simp only [hom_trivializationAt_baseSet, TangentBundle.trivializationAt_baseSet, |
There was a problem hiding this comment.
In this lemma, simp is working against you because you're working with the tangent bundle: this simp simplifies the baseSet to something involving (chartAt HB x₀).source, and then you need to convert it back using hx'. This will go away when you work with general bundles.
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ) i | ||
| let χ := trivializationAt EB (TangentSpace (M := B) IB) i | ||
| let w := ψ.symm b (innerSL ℝ) | ||
| have h1 : ∀ u v, |
There was a problem hiding this comment.
h1 is only used once and can be inlined below
| (((Trivialization.continuousLinearMapAt ℝ ψ b) w) u) v = | ||
| w (χ.symm b u) (χ.symm b v) | ||
| := fun u v ↦ trivializationAt_tangentSpace_bilinearForm_apply i b w u v hb | ||
| have h4 : ∀ u v, |
There was a problem hiding this comment.
The mathlib style guide has a rule "hypothesis left of colon": applied here, it would yield
| have h4 : ∀ u v, | |
| have h4 (u v) : | |
| (((Trivialization.continuousLinearMapAt ℝ ψ b) (ψ.symmL ℝ b (innerSL ℝ))) u) v = | |
| innerSL ℝ u v := by | |
| rw [Trivialization.continuousLinearMapAt_symmL ψ hc] |
| (fun (x : B) ↦ TangentSpace IB x →L[ℝ] TangentSpace IB x →L[ℝ] ℝ) i).toOpenPartialHomeomorph.symm | ||
| (b, innerSL ℝ)).snd α) β = | ||
| ((innerSL ℝ) | ||
| ((Trivialization.linearMapAt ℝ (trivializationAt EB (TangentSpace (M := B) IB) i) b) β)) |
There was a problem hiding this comment.
No need for specifying M again.
| and given that both of these are defined by two cases (effectively if b is in the source of the | ||
| trivialisation at i) then we need 4 different cases. This is the essential case. | ||
| -/ | ||
| lemma g_bilin_eq_00 (i b : B) |
There was a problem hiding this comment.
In general, this proof is very long --- and my intuition is that it should be shortened. If the haves cannot be inlined easily, that's to be investigated.
|
I have been thinking about the comment on generalisation. But can this be generalised? What would the statement of a general theorem be? Existence of an n-form on a manifold? Moreover the proof relies on |
|
You want to prove the existence of a Riemannian metric, on any vector bundle. (Let's say finite-dimensional for now.) I don't see the issues with |
Thank you. I have been barking up the wrong generalisation tree (auf dem Holzweg). That feels like it should be easy enough. Yes |
|
@grunweg thanks for all the feedback - I am working through generalising everything and then I will address your feedback (which may no longer apply if we are lucky). |
[∀ x, TopologicalSpace (E x)] [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] is replaced by [∀ x, NormedAddCommGroup (E x)] [∀ x, NormedSpace ℝ (E x)]
(hhz : ∀ x, (trivializationAt F E x).baseSet = (chartAt HB (M := B) x).source)
Supersedes #33519