Skip to content

Commit a789c98

Browse files
Connection: clean up unused-section-variable warnings post-Bochner
Bochner closure (commit de19ee7) added [InnerProductSpace] [NeZero] [I.Boundaryless] [T2Space M] to the Connection.lean variable block at line 967, which Lean's linter then flagged as unused on the helper lemmas (koszulFunctional_local, koszulFunctional_tensorialAt, koszulCovDeriv_exists, koszulCovDeriv_inner_eq, koszulCovDerivAux_tensorialAt, koszulFunctional_eventuallyEq_middle, koszulLeviCivita_exists) that don't need them. Extends the existing `omit` directives on those lemmas to include the new variables. Drops duplicate explicit [T2Space M] from koszulCovDeriv_smoothVF_smoothAt, koszulCovDeriv_const_smoothAt, leviCivitaConnection_exists, leviCivitaConnection, and leviCivitaConnection_torsion_zero (already provided by variable block). Bochner stack now builds with zero warnings, zero errors, zero sorrys.
1 parent de19ee7 commit a789c98

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

OpenGALib/Riemannian/Connection.lean

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,8 @@ characterises $\nabla_X Y(x)$ as the unique vector with
979979
$$\langle \nabla_X Y(x), Z(x)\rangle = \tfrac12 K(X, Y; Z)(x)$$
980980
for all smooth $Z$. Riesz uses the framework-owned `metricRiesz`. -/
981981

982-
omit [CompleteSpace E] [FiniteDimensional ℝ E] in
982+
omit [CompleteSpace E] [FiniteDimensional ℝ E] [InnerProductSpace ℝ E]
983+
[NeZero (Module.finrank ℝ E)] [I.Boundaryless] [T2Space M] in
983984
/-- **Locality of the Koszul functional in $Z$**: if two smooth vector
984985
fields $Z_1, Z_2$ agree on a neighborhood of $x$, then
985986
$K(X, Y; Z_1)(x) = K(X, Y; Z_2)(x)$.
@@ -1012,7 +1013,8 @@ private theorem koszulFunctional_local
10121013
rw [hT1.mfderiv_eq, hT2.mfderiv_eq, hZx, hT5, hT6]
10131014
rfl
10141015

1015-
omit [FiniteDimensional ℝ E] [CompleteSpace E] in
1016+
omit [FiniteDimensional ℝ E] [CompleteSpace E] [InnerProductSpace ℝ E]
1017+
[NeZero (Module.finrank ℝ E)] [I.Boundaryless] [T2Space M] in
10161018
/-- **Tensoriality at $x$ of the half-Koszul functional in the third argument.**
10171019
10181020
@@ -1055,7 +1057,8 @@ private theorem koszulFunctional_tensorialAt
10551057
rw [koszul_add_right X Y σ σ' x h_YZ₁ h_YZ₂ h_Z₁X h_Z₂X hσ hσ']
10561058
ring
10571059

1058-
omit [CompleteSpace E] in
1060+
omit [CompleteSpace E] [InnerProductSpace ℝ E] [NeZero (Module.finrank ℝ E)]
1061+
[I.Boundaryless] [T2Space M] in
10591062
/-- **Existence theorem for Riesz extraction**: given smoothness of $X$
10601063
and $Y$ at $x$, the half-Koszul functional $Z \mapsto \tfrac12 K(X, Y; Z)(x)$
10611064
admits a unique tangent-space representative for smooth $Z$.
@@ -1081,7 +1084,8 @@ private theorem koszulLinearFunctional_exists
10811084
fun Z hZ => ?_⟩
10821085
exact TensorialAt.mkHom_apply (koszulFunctional_tensorialAt X Y x hX hY) hZ
10831086

1084-
omit [CompleteSpace E] in
1087+
omit [CompleteSpace E] [InnerProductSpace ℝ E] [NeZero (Module.finrank ℝ E)]
1088+
[I.Boundaryless] [T2Space M] in
10851089
private theorem koszulCovDeriv_exists
10861090
[IsLocallyConstantChartedSpace H M]
10871091
(X Y : Π x : M, TangentSpace I x) (x : M)
@@ -1108,7 +1112,8 @@ private noncomputable def koszulCovDeriv
11081112
(hX : TangentSmoothAt X x) (hY : TangentSmoothAt Y x) : TangentSpace I x :=
11091113
Classical.choose (koszulCovDeriv_exists X Y x hX hY)
11101114

1111-
omit [CompleteSpace E] in
1115+
omit [CompleteSpace E] [InnerProductSpace ℝ E] [NeZero (Module.finrank ℝ E)]
1116+
[I.Boundaryless] [T2Space M] in
11121117
/-- **Riesz defining property**: $\langle \nabla_X Y(x), Z(x)\rangle =
11131118
\tfrac12 K(X, Y; Z)(x)$ for smooth $X, Y, Z$, with `metricInner` as the
11141119
framework-owned inner product.
@@ -1162,6 +1167,8 @@ private noncomputable def koszulCovDerivAux
11621167
classical
11631168
exact if hX : TangentSmoothAt X x then koszulCovDeriv X Y x hX hY else 0
11641169

1170+
omit [InnerProductSpace ℝ E] [NeZero (Module.finrank ℝ E)] [I.Boundaryless]
1171+
[T2Space M] in
11651172
/-- Tensorality of `koszulCovDerivAux Y x hY` in the `X` argument: for
11661173
smooth `X`, `f`, `koszulCovDerivAux` respects scalar multiplication and
11671174
addition. Uses `koszul_smul_left` / `koszul_add_left` together with
@@ -1230,6 +1237,8 @@ private theorem koszulCovDerivAux_tensorialAt
12301237
koszulCovDeriv_inner_eq X' Y Z x hX' hY hZ_smooth]
12311238
ring
12321239

1240+
omit [InnerProductSpace ℝ E] [NeZero (Module.finrank ℝ E)] [I.Boundaryless]
1241+
[T2Space M] in
12331242
/-- **Levi-Civita `CovariantDerivative` existence.**
12341243
12351244
A `CovariantDerivative` whose `toFun` extends the pointwise
@@ -1394,7 +1403,7 @@ linear-functional section, not just the constant case) closes both forms.
13941403
the bumped global form to the original chartBasisVec form on a
13951404
neighbourhood of `x`. -/
13961405
private theorem koszulCovDeriv_smoothVF_smoothAt
1397-
[IsLocallyConstantChartedSpace H M] [T2Space M]
1406+
[IsLocallyConstantChartedSpace H M]
13981407
(X Y : SmoothVectorField I M) (x : M) :
13991408
TangentSmoothAt
14001409
(fun y : M => koszulCovDeriv X.toFun Y.toFun y
@@ -1625,7 +1634,7 @@ private theorem koszulCovDeriv_smoothVF_smoothAt
16251634

16261635
/-- Constant-direction specialisation of `koszulCovDeriv_smoothVF_smoothAt`. -/
16271636
private theorem koszulCovDeriv_const_smoothAt
1628-
[IsLocallyConstantChartedSpace H M] [T2Space M]
1637+
[IsLocallyConstantChartedSpace H M]
16291638
(v : E) (Y : SmoothVectorField I M) (x : M) :
16301639
TangentSmoothAt
16311640
(fun y : M => koszulCovDeriv (fun _ : M => v) Y.toFun y
@@ -1658,7 +1667,7 @@ invariant "zero existence axioms in the Riemannian package" preserved.
16581667
**Ground truth**: do Carmo 1992 §2 Theorem 3.6 (existence + uniqueness via
16591668
the Koszul formula); Lee 2018 Prop. 4.26 (smoothness of covariant
16601669
derivative on smooth manifolds). -/
1661-
theorem leviCivitaConnection_exists [IsLocallyConstantChartedSpace H M] [T2Space M] :
1670+
theorem leviCivitaConnection_exists [IsLocallyConstantChartedSpace H M] :
16621671
∃ cov : CovariantDerivative I E (fun x : M => TangentSpace I x),
16631672
cov.torsion = 0
16641673
(∀ (X Y Z : Π x : M, TangentSpace I x) (x : M)
@@ -1730,13 +1739,13 @@ satisfies `leviCivitaConnection.torsion = 0` (see
17301739
**Used by**: `Riemannian.Curvature`, `Riemannian.SecondFundamentalForm`,
17311740
`Riemannian.Gradient`. -/
17321741
noncomputable def leviCivitaConnection
1733-
[IsLocallyConstantChartedSpace H M] [T2Space M] :
1742+
[IsLocallyConstantChartedSpace H M] :
17341743
CovariantDerivative I E (fun x : M => TangentSpace I x) :=
17351744
Classical.choose (leviCivitaConnection_exists (I := I) (M := M))
17361745

17371746
/-- The Levi-Civita connection is torsion-free. -/
17381747
theorem leviCivitaConnection_torsion_zero
1739-
[IsLocallyConstantChartedSpace H M] [T2Space M] :
1748+
[IsLocallyConstantChartedSpace H M] :
17401749
(leviCivitaConnection : CovariantDerivative I E
17411750
(fun x : M => TangentSpace I x)).torsion = 0 :=
17421751
(Classical.choose_spec leviCivitaConnection_exists).1
@@ -1944,6 +1953,8 @@ agree, and consequently their Levi-Civita derivatives at `x` agree (Riesz
19441953
uniqueness). -/
19451954

19461955
omit [CompleteSpace E] [FiniteDimensional ℝ E] in
1956+
omit [CompleteSpace E] [FiniteDimensional ℝ E] [InnerProductSpace ℝ E]
1957+
[NeZero (Module.finrank ℝ E)] [I.Boundaryless] [T2Space M] in
19471958
/-- **Locality of `koszulFunctional` in the middle argument**: if
19481959
$Y_1 =ᶠ[𝓝 x] Y_2$, then $K(X, Y_1; Z)(x) = K(X, Y_2; Z)(x)$.
19491960

0 commit comments

Comments
 (0)