@@ -119,191 +119,4 @@ instance instHasMetricOfRiemannianManifold :
119119
120120end RiemannianManifoldBridges
121121
122- /-! ## Math-first metric API
123-
124- Downstream operator code reads as textbook math when the metric is
125- carried implicitly by `[HasMetric I M]`:
126-
127- * `metricInner x v w` (inner product on `T_xM`, not `g.metricInner`)
128- * `metricRiesz x φ` (Riesz dual vector)
129- * `metricInner_add_left ...` (algebra lemmas, bare names)
130-
131- Each wrapper takes `[HasMetric I M]` as instance argument and delegates
132- to the underlying `RiemannianMetric.X` method on `HasMetric.metric`.
133- Wrappers are `abbrev` / direct delegations so `g.X`-style proofs still
134- work via abbrev unfolding, and so the `@[simp]` / `@[metric_simp]` simp
135- sets unify naturally with the underlying method-form lemmas. -/
136-
137- section MetricAPI
138-
139- variable {E : Type *} [NormedAddCommGroup E] [NormedSpace ℝ E]
140- {H : Type *} [TopologicalSpace H] {I : ModelWithCorners ℝ E H}
141- {M : Type *} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I ∞ M]
142- [hm : HasMetric I M]
143-
144- /-- **Math.** The **metric inner product** $\langle V, W\rangle_g$ as a
145- top-level function, sourcing $g$ from `[HasMetric I M]`. -/
146- noncomputable abbrev metricInner (x : M)
147- (v w : TangentSpace I x) : ℝ :=
148- hm.metric.metricInner x v w
149-
150- @[simp]
151- theorem metricInner_apply (x : M) (v w : TangentSpace I x) :
152- metricInner x v w = hm.metric.inner x v w := rfl
153-
154- /-- **Math.** Symmetry: $\langle V, W\rangle_g = \langle W, V\rangle_g$. -/
155- theorem metricInner_comm (x : M) (v w : TangentSpace I x) :
156- metricInner x v w = metricInner x w v :=
157- hm.metric.metricInner_comm x v w
158-
159- /-- **Math.** Positive-definiteness: $V \ne 0 \Rightarrow \langle V, V\rangle_g > 0$. -/
160- theorem metricInner_self_pos (x : M) (v : TangentSpace I x)
161- (hv : v ≠ 0 ) : 0 < metricInner x v v :=
162- hm.metric.metricInner_self_pos x v hv
163-
164- @[metric_simp]
165- theorem metricInner_add_left (x : M) (v₁ v₂ w : TangentSpace I x) :
166- metricInner x (v₁ + v₂) w = metricInner x v₁ w + metricInner x v₂ w :=
167- hm.metric.metricInner_add_left x v₁ v₂ w
168-
169- @[metric_simp]
170- theorem metricInner_add_right (x : M) (v w₁ w₂ : TangentSpace I x) :
171- metricInner x v (w₁ + w₂) = metricInner x v w₁ + metricInner x v w₂ :=
172- hm.metric.metricInner_add_right x v w₁ w₂
173-
174- @[metric_simp]
175- theorem metricInner_smul_left (x : M) (c : ℝ)
176- (v w : TangentSpace I x) :
177- metricInner x (c • v) w = c * metricInner x v w :=
178- hm.metric.metricInner_smul_left x c v w
179-
180- @[metric_simp]
181- theorem metricInner_smul_right (x : M) (c : ℝ)
182- (v w : TangentSpace I x) :
183- metricInner x v (c • w) = c * metricInner x v w :=
184- hm.metric.metricInner_smul_right x c v w
185-
186- @ [simp, metric_simp]
187- theorem metricInner_zero_left (x : M) (w : TangentSpace I x) :
188- metricInner x 0 w = 0 :=
189- hm.metric.metricInner_zero_left x w
190-
191- @ [simp, metric_simp]
192- theorem metricInner_zero_right (x : M) (v : TangentSpace I x) :
193- metricInner x v 0 = 0 :=
194- hm.metric.metricInner_zero_right x v
195-
196- @ [simp, metric_simp]
197- theorem metricInner_neg_left (x : M) (v w : TangentSpace I x) :
198- metricInner x (-v) w = -metricInner x v w :=
199- hm.metric.metricInner_neg_left x v w
200-
201- @ [simp, metric_simp]
202- theorem metricInner_neg_right (x : M) (v w : TangentSpace I x) :
203- metricInner x v (-w) = -metricInner x v w :=
204- hm.metric.metricInner_neg_right x v w
205-
206- @ [simp, metric_simp]
207- theorem metricInner_sub_left (x : M) (v₁ v₂ w : TangentSpace I x) :
208- metricInner x (v₁ - v₂) w = metricInner x v₁ w - metricInner x v₂ w :=
209- hm.metric.metricInner_sub_left x v₁ v₂ w
210-
211- @ [simp, metric_simp]
212- theorem metricInner_sub_right (x : M) (v w₁ w₂ : TangentSpace I x) :
213- metricInner x v (w₁ - w₂) = metricInner x v w₁ - metricInner x v w₂ :=
214- hm.metric.metricInner_sub_right x v w₁ w₂
215-
216- @ [simp, metric_simp]
217- theorem metricInner_self_nonneg (x : M) (v : TangentSpace I x) :
218- 0 ≤ metricInner x v v :=
219- hm.metric.metricInner_self_nonneg x v
220-
221- /-- **Math.** Non-degeneracy: vectors with equal inner-products against every test
222- vector are equal. -/
223- theorem metricInner_eq_iff_eq (x : M) (v w : TangentSpace I x) :
224- (∀ z : TangentSpace I x, metricInner x v z = metricInner x w z) ↔
225- v = w :=
226- hm.metric.metricInner_eq_iff_eq x v w
227-
228- section RieszSection
229-
230- variable [FiniteDimensional ℝ E]
231-
232- /-- **Math.** The **metric-to-dual** continuous linear map $V \mapsto g_x(V, \cdot)$. -/
233- noncomputable abbrev metricToDual (x : M) :
234- TangentSpace I x →L[ℝ] (TangentSpace I x →L[ℝ] ℝ) :=
235- hm.metric.metricToDual x
236-
237- omit [FiniteDimensional ℝ E] in
238- @[simp]
239- theorem metricToDual_apply (x : M) (v w : TangentSpace I x) :
240- metricToDual x v w = metricInner x v w := rfl
241-
242- omit [FiniteDimensional ℝ E] in
243- theorem metricToDual_injective (x : M) :
244- Function.Injective (metricToDual (I := I) (M := M) x) :=
245- hm.metric.metricToDual_injective x
246-
247- theorem metricToDual_bijective (x : M) :
248- Function.Bijective (metricToDual (I := I) (M := M) x) :=
249- hm.metric.metricToDual_bijective x
250-
251- /-- **Math.** Inverse Riesz: $\varphi \mapsto V_\varphi$ such that
252- $g_x(V_\varphi, W) = \varphi(W)$. -/
253- noncomputable abbrev metricRiesz (x : M)
254- (φ : TangentSpace I x →L[ℝ] ℝ) : TangentSpace I x :=
255- hm.metric.metricRiesz x φ
256-
257- @[simp]
258- theorem metricRiesz_inner (x : M)
259- (φ : TangentSpace I x →L[ℝ] ℝ) (v : TangentSpace I x) :
260- metricInner x (metricRiesz x φ) v = φ v :=
261- hm.metric.metricRiesz_inner x φ v
262-
263- theorem metricRiesz_unique (x : M) (v : TangentSpace I x)
264- (φ : TangentSpace I x →L[ℝ] ℝ)
265- (h : ∀ w, metricInner x v w = φ w) :
266- v = metricRiesz x φ :=
267- hm.metric.metricRiesz_unique x v φ h
268-
269- /-- **Math.** The Riesz isomorphism `T_xM ≃ₗ[ℝ] (T_xM →L[ℝ] ℝ)`. -/
270- noncomputable abbrev metricToDualEquiv (x : M) :
271- TangentSpace I x ≃ₗ[ℝ] (TangentSpace I x →L[ℝ] ℝ) :=
272- hm.metric.metricToDualEquiv x
273-
274- end RieszSection
275-
276- /-! ## Smoothness of the metric inner product — Math headline
277-
278- `metricInner y (v y) (w y)` is `ContMDiffWithinAt` whenever the
279- tangent-bundle sections `v, w` are. The pointwise / set / global parity
280- variants, the first-order `MDifferentiable*` analog family, and the
281- `TangentSmoothAt`-form convenience wrapper all live in
282- `Riemannian/Util/MetricInnerSmoothness.lean`. -/
283-
284- section Smoothness
285-
286- variable {v w : ∀ x : M, TangentSpace I x} {s : Set M} {x : M}
287-
288- variable {n : ℕ∞ω} [hLE : ENat.LEInfty n]
289-
290- /-- **Math.** $\langle v(\cdot), w(\cdot)\rangle_g$ is `ContMDiffWithinAt`. -/
291- theorem metricInner_contMDiffWithinAt
292- (hv : ContMDiffWithinAt I (I.prod 𝓘(ℝ, E)) n
293- (fun y => (⟨y, v y⟩ : TangentBundle I M)) s x)
294- (hw : ContMDiffWithinAt I (I.prod 𝓘(ℝ, E)) n
295- (fun y => (⟨y, w y⟩ : TangentBundle I M)) s x) :
296- ContMDiffWithinAt I 𝓘(ℝ, ℝ) n
297- (fun y => metricInner y (v y) (w y)) s x :=
298- hm.metric.metricInner_contMDiffWithinAt hv hw
299-
300- end Smoothness
301-
302- end MetricAPI
303-
304- -- Polymorphic notation `⟪·, ·⟫_g` and `‖·‖²_g` (and the dispatch classes
305- -- `MetricInnerHom`, `MetricNormSq`) live in
306- -- `OpenGALib/Riemannian/Util/MetricNotation.lean`; the import below
307- -- pulls them into scope for every consumer of `SmoothManifold`.
308-
309122end Riemannian
0 commit comments