Skip to content

Commit a2e9ee1

Browse files
committed
better typeclass formulation
1 parent 2f1bbfe commit a2e9ee1

1 file changed

Lines changed: 5 additions & 21 deletions

File tree

  • Mathlib/Geometry/Manifold/VectorBundle/CovariantDerivative

Mathlib/Geometry/Manifold/VectorBundle/CovariantDerivative/Metric.lean

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,15 @@ open scoped Manifold ContDiff
4747

4848
@[expose] public section
4949

50-
-- TODO: revisit and fix this once the dust has settled
51-
set_option backward.isDefEq.respectTransparency false
52-
5350
variable
5451
-- Let `M` be a `C^k` real manifold modeled on `(E, H)`
5552
{E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
5653
{H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H)
57-
{M : Type*} [TopologicalSpace M] [ChartedSpace H M]
54+
{M : Type*}
5855
-- Let `V` be a bundle over `M`, endowed with a Riemannian metric.
5956
(F : Type*) [NormedAddCommGroup F] [NormedSpace ℝ F]
6057
{V : M → Type*} [TopologicalSpace (TotalSpace F V)]
61-
[∀ x, AddCommGroup (V x)] [∀ x, Module ℝ (V x)]
62-
[∀ x : M, TopologicalSpace (V x)]
63-
[∀ x, IsTopologicalAddGroup (V x)] [∀ x, ContinuousSMul ℝ (V x)]
64-
[FiberBundle F V] [RiemannianBundle V]
58+
[∀ x, NormedAddCommGroup (V x)] [∀ x, InnerProductSpace ℝ (V x)]
6559

6660
/-! # Compatible connections
6761
@@ -85,18 +79,11 @@ noncomputable abbrev product (σ τ : Π x : M, V x) : M → ℝ :=
8579

8680
-- `product` is C^k if σ and τ are: this is shown in `Riemannian.lean`
8781

88-
-- Performance hack: TODO find a better fix, see
89-
-- https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Slow.20Riemannian.20geometry/with/580396376
90-
attribute [instance 900] NormedAddGroup.toAddGroup SeminormedAddGroup.toAddGroup
91-
NormedAlgebra.toAlgebra
92-
9382
local notation "⟪" σ ", " τ "⟫" => product σ τ
9483

9584
-- Basic API for the product of two sections.
9685
section product
9786

98-
omit [TopologicalSpace M]
99-
10087
lemma product_apply (x) : ⟪σ, τ⟫ x = inner ℝ (σ x) (τ x) := rfl
10188

10289
variable (σ σ' τ)
@@ -162,19 +149,16 @@ end product
162149

163150
-- These lemmas are necessary as my Lie bracket identities (assuming minimal differentiability)
164151
-- only hold point-wise. They abstract the expanding and unexpanding of `product`.
165-
omit [TopologicalSpace M] in
166152
lemma product_congr_left {x} (h : σ x = σ' x) : product σ τ x = product σ' τ x := by
167153
rw [product_apply, h, ← product_apply]
168154

169-
omit [TopologicalSpace M] in
170155
lemma product_congr_left₂ {x} (h : σ x = σ' x + σ'' x) :
171156
product σ τ x = product σ' τ x + product σ'' τ x := by
172157
rw [product_apply, h, inner_add_left, ← product_apply]
173-
omit [TopologicalSpace M] in
158+
174159
lemma product_congr_right {x} (h : τ x = τ' x) : product σ τ x = product σ τ' x := by
175160
rw [product_apply, h, ← product_apply]
176161

177-
omit [TopologicalSpace M] in
178162
lemma product_congr_right₂ {x} (h : τ x = τ' x + τ'' x) :
179163
product σ τ x = product σ τ' x + product σ τ'' x := by
180164
rw [product_apply, h, inner_add_right, ← product_apply]
@@ -183,8 +167,8 @@ namespace CovariantDerivative
183167

184168
-- Let `cov` be a covariant derivative on `V`.
185169
-- TODO: include in cheat sheet!
186-
variable (cov : CovariantDerivative I F V)
187-
170+
variable [TopologicalSpace M] [ChartedSpace H M] [FiberBundle F V]
171+
(cov : CovariantDerivative I F V)
188172

189173
/-- Local notation for a covariant derivative on a vector bundle acting on a vector field and a
190174
section. -/

0 commit comments

Comments
 (0)