Skip to content

Commit 665d861

Browse files
committed
fix: rename definitions which use underscores in their name (#33103)
Per the naming convention, "all other terms of types" should be named in lowerCamelCase: this applies to all changes made in this PR. This PR is far from exhaustive.
1 parent 6e8b590 commit 665d861

File tree

4 files changed

+27
-14
lines changed

4 files changed

+27
-14
lines changed

β€ŽMathlib/Geometry/Manifold/IsManifold/Basic.leanβ€Ž

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ structure ModelWithCorners (π•œ : Type*) [NontriviallyNormedField π•œ] (E : Ty
168168
source_eq : source = univ
169169
/-- To check this condition when the space already has a real normed space structure,
170170
use `Convex.convex_isRCLikeNormedField` which eliminates the `letI`s below, or the constructor
171-
`ModelWithCorners.of_convex_range` -/
171+
`ModelWithCorners.ofConvexRange` -/
172172
convex_range' :
173173
if h : IsRCLikeNormedField π•œ then
174174
letI := h.rclike π•œ
@@ -185,7 +185,7 @@ lemma ModelWithCorners.range_eq_target {π•œ E H : Type*} [NontriviallyNormedFie
185185
rw [← I.image_source_eq_target, I.source_eq, image_univ.symm]
186186

187187
/-- If a model with corners has full range, the `convex_range'` condition is satisfied. -/
188-
def ModelWithCorners.of_target_univ (π•œ : Type*) [NontriviallyNormedField π•œ]
188+
def ModelWithCorners.ofTargetUniv (π•œ : Type*) [NontriviallyNormedField π•œ]
189189
{E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {H : Type*} [TopologicalSpace H]
190190
(Ο† : PartialEquiv H E) (hsource : Ο†.source = univ) (htarget : Ο†.target = univ)
191191
(hcont : Continuous Ο†) (hcont_inv : Continuous Ο†.symm) : ModelWithCorners π•œ E H where
@@ -202,12 +202,15 @@ def ModelWithCorners.of_target_univ (π•œ : Type*) [NontriviallyNormedField π•œ
202202
have : range Ο† = Ο†.target := by rw [← Ο†.image_source_eq_target, hsource, image_univ.symm]
203203
simp [this, htarget]
204204

205+
@[deprecated (since := "2025-12-19")]
206+
alias ModelWithCorners.of_target_univ := ModelWithCorners.ofTargetUniv
207+
205208
attribute [simp, mfld_simps] ModelWithCorners.source_eq
206209

207210
/-- A vector space is a model with corners, denoted as `π“˜(π•œ, E)` within the `Manifold` namespace. -/
208211
def modelWithCornersSelf (π•œ : Type*) [NontriviallyNormedField π•œ] (E : Type*)
209212
[NormedAddCommGroup E] [NormedSpace π•œ E] : ModelWithCorners π•œ E E :=
210-
ModelWithCorners.of_target_univ π•œ (PartialEquiv.refl E) rfl rfl continuous_id continuous_id
213+
ModelWithCorners.ofTargetUniv π•œ (PartialEquiv.refl E) rfl rfl continuous_id continuous_id
211214

212215
@[inherit_doc] scoped[Manifold] notation "π“˜(" π•œ ", " E ")" => modelWithCornersSelf π•œ E
213216

@@ -316,7 +319,7 @@ lemma _root_.Convex.convex_isRCLikeNormedField [NormedSpace ℝ E] [h : IsRCLike
316319
Β· rw [← @algebraMap_smul (R := ℝ) (A := π•œ), ← @algebraMap_smul (R := ℝ) (A := π•œ)]
317320

318321
/-- Construct a model with corners over `ℝ` from a continuous partial equiv with convex range. -/
319-
def of_convex_range
322+
def ofConvexRange
320323
{E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type*} [TopologicalSpace H]
321324
(Ο† : PartialEquiv H E) (hsource : Ο†.source = univ) (htarget : Convex ℝ Ο†.target)
322325
(hcont : Continuous Ο†) (hcont_inv : Continuous Ο†.symm) (hint : (interior Ο†.target).Nonempty) :
@@ -331,6 +334,8 @@ def of_convex_range
331334
have : range Ο† = Ο†.target := by rw [← Ο†.image_source_eq_target, hsource, image_univ.symm]
332335
simp [this, hint]
333336

337+
@[deprecated (since := "2025-12-19")] alias of_convex_range := ModelWithCorners.ofConvexRange
338+
334339
theorem convex_range [NormedSpace ℝ E] : Convex ℝ (range I) := by
335340
by_cases h : IsRCLikeNormedField π•œ
336341
Β· letI : RCLike π•œ := h.rclike

β€ŽMathlib/Geometry/Manifold/LocalDiffeomorph.leanβ€Ž

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ diffeomorphism at every `x ∈ s`, and a **local diffeomorphism** iff it is a lo
3030
* `IsLocalDiffeomorph.isLocalHomeomorph`: a local diffeomorphism is a local homeomorphism,
3131
and similarly for a local diffeomorphism on `s`.
3232
* `IsLocalDiffeomorph.isOpen_range`: the image of a local diffeomorphism is open
33-
* `IsLocalDiffeomorph.diffeomorph_of_bijective`:
33+
* `IsLocalDiffeomorph.diffeomorphOfBijective`:
3434
a bijective local diffeomorphism is a diffeomorphism
3535
3636
* `Diffeomorph.mfderivToContinuousLinearEquiv`: each differential of a `C^n` diffeomorphism
@@ -331,7 +331,7 @@ lemma IsLocalDiffeomorph.image_coe (hf : IsLocalDiffeomorph I J n f) : hf.image.
331331
-- This argument implies a `LocalDiffeomorphOn f s` for `s` open is a `PartialDiffeomorph`
332332

333333
/-- A bijective local diffeomorphism is a diffeomorphism. -/
334-
noncomputable def IsLocalDiffeomorph.diffeomorph_of_bijective
334+
noncomputable def IsLocalDiffeomorph.diffeomorphOfBijective
335335
(hf : IsLocalDiffeomorph I J n f) (hf' : Function.Bijective f) : Diffeomorph I J M N n := by
336336
-- Choose a right inverse `g` of `f`.
337337
choose g hgInverse using (Function.bijective_iff_has_inverse).mp hf'
@@ -359,6 +359,9 @@ noncomputable def IsLocalDiffeomorph.diffeomorph_of_bijective
359359
have : y = (Ξ¦ x) x := ((hgInverse.2 y).congr (hfx hx)).mp rfl
360360
exact this β–Έ (Ξ¦ x).map_source hx }
361361

362+
@[deprecated (since := "2025-12-19")]
363+
alias IsLocalDiffeomorph.diffeomorph_of_bijective := IsLocalDiffeomorph.diffeomorphOfBijective
364+
362365
end Basic
363366

364367
section Differential

β€ŽMathlib/Geometry/Manifold/VectorBundle/LocalFrame.leanβ€Ž

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,17 @@ lemma toBasisAt_coe (hs : IsLocalFrameOn I F n s u) (hx : x ∈ u) (i : ι) :
164164

165165
/-- If `{sα΅’}` is a local frame on a vector bundle, `F` being finite-dimensional implies the
166166
indexing set being finite. -/
167-
def fintype_of_finiteDimensional [VectorBundle π•œ F V] [FiniteDimensional π•œ F]
167+
noncomputable def fintypeOfFiniteDimensional [VectorBundle π•œ F V] [FiniteDimensional π•œ F]
168168
(hs : IsLocalFrameOn I F n s u) (hx : x ∈ u) : Fintype ι := by
169169
have : FiniteDimensional π•œ (V x) := by
170170
let phi := (trivializationAt F V x).linearEquivAt π•œ x
171171
(FiberBundle.mem_baseSet_trivializationAt' x)
172172
exact Finite.equiv phi.symm
173173
exact FiniteDimensional.fintypeBasisIndex (hs.toBasisAt hx)
174174

175+
@[deprecated (since := "2025-12-19")]
176+
alias fintype_of_finiteDimensional := fintypeOfFiniteDimensional
177+
175178
open scoped Classical in
176179
/-- Coefficients of a section `s` of `V` w.r.t. a local frame `{s i}` on `u`.
177180
Outside of `u`, this returns the junk value 0. -/
@@ -234,7 +237,7 @@ frame at `x` agree. -/
234237
lemma eq_iff_coeff [VectorBundle π•œ F V] [FiniteDimensional π•œ F]
235238
(hs : IsLocalFrameOn I F n s u) (hx : x ∈ u) :
236239
t x = t' x ↔ βˆ€ i, hs.coeff i t x = hs.coeff i t' x := by
237-
have := fintype_of_finiteDimensional hs hx
240+
have := fintypeOfFiniteDimensional hs hx
238241
exact ⟨fun h i ↦ hs.coeff_congr h i, fun h ↦ by
239242
simp +contextual [h, hs.coeff_sum_eq t hx, hs.coeff_sum_eq t' hx]⟩
240243

@@ -249,7 +252,7 @@ then `t` is `C^n` on `u`. -/
249252
lemma contMDiffOn_of_coeff [FiniteDimensional π•œ F] (h : βˆ€ i, CMDiff[u] n (hs.coeff i t)) :
250253
CMDiff[u] n (T% t) := by
251254
rcases u.eq_empty_or_nonempty with rfl | ⟨x, hx⟩; · simp
252-
have := fintype_of_finiteDimensional hs hx
255+
have := fintypeOfFiniteDimensional hs hx
253256
have this (i) : CMDiff[u] n (T% (hs.coeff i t β€’ s i)) :=
254257
(h i).smul_section (hs.contMDiffOn i)
255258
have almost : CMDiff[u] n (T% (fun x ↦ βˆ‘ i, (hs.coeff i t) x β€’ s i x)) :=
@@ -262,7 +265,7 @@ lemma contMDiffOn_of_coeff [FiniteDimensional π•œ F] (h : βˆ€ i, CMDiff[u] n (h
262265
if a section `t` has `C^k` coefficients at `x` w.r.t. `s i`, then `t` is `C^n` at `x`. -/
263266
lemma contMDiffAt_of_coeff [FiniteDimensional π•œ F]
264267
(h : βˆ€ i, CMDiffAt n (hs.coeff i t) x) (hu : u ∈ 𝓝 x) : CMDiffAt n (T% t) x := by
265-
have := fintype_of_finiteDimensional hs (mem_of_mem_nhds hu)
268+
have := fintypeOfFiniteDimensional hs (mem_of_mem_nhds hu)
266269
have almost : CMDiffAt n (T% (fun x ↦ βˆ‘ i, (hs.coeff i t) x β€’ s i x)) x :=
267270
.sum_section (fun i _ ↦ (h i).smul_section <| (hs.contMDiffOn i).contMDiffAt hu)
268271
exact almost.congr_of_eventuallyEq <| (hs.eventually_eq_sum_coeff_smul t hu).mono (by simp)
@@ -271,7 +274,7 @@ lemma contMDiffAt_of_coeff [FiniteDimensional π•œ F]
271274
coefficients at `x ∈ u` w.r.t. `s i`, then `t` is `C^n` at `x`. -/
272275
lemma contMDiffAt_of_coeff_aux [FiniteDimensional π•œ F] (h : βˆ€ i, CMDiffAt n (hs.coeff i t) x)
273276
(hu : IsOpen u) (hx : x ∈ u) : CMDiffAt n (T% t) x := by
274-
have := fintype_of_finiteDimensional hs hx
277+
have := fintypeOfFiniteDimensional hs hx
275278
exact hs.contMDiffAt_of_coeff h (hu.mem_nhds hx)
276279

277280
section
@@ -283,7 +286,7 @@ w.r.t. `s i`, then `t` is differentiable on `u`. -/
283286
lemma mdifferentiableOn_of_coeff [FiniteDimensional π•œ F] (h : βˆ€ i, MDiff[u] (hs.coeff i t)) :
284287
MDiff[u] (T% t) := by
285288
rcases u.eq_empty_or_nonempty with rfl | ⟨x, hx⟩; · simp
286-
have := fintype_of_finiteDimensional hs hx
289+
have := fintypeOfFiniteDimensional hs hx
287290
have this (i) : MDiff[u] (T% (hs.coeff i t β€’ s i)) :=
288291
(h i).smul_section ((hs.contMDiffOn i).mdifferentiableOn le_rfl)
289292
have almost : MDiff[u] (T% (fun x ↦ βˆ‘ i, (hs.coeff i t) x β€’ s i x)) :=
@@ -296,7 +299,7 @@ lemma mdifferentiableOn_of_coeff [FiniteDimensional π•œ F] (h : βˆ€ i, MDiff[u]
296299
coefficients at `x` w.r.t. `s i`, then `t` is differentiable at `x`. -/
297300
lemma mdifferentiableAt_of_coeff [FiniteDimensional π•œ F]
298301
(h : βˆ€ i, MDiffAt (hs.coeff i t) x) (hu : u ∈ 𝓝 x) : MDiffAt (T% t) x := by
299-
have := fintype_of_finiteDimensional hs (mem_of_mem_nhds hu)
302+
have := fintypeOfFiniteDimensional hs (mem_of_mem_nhds hu)
300303
have almost : MDiffAt (T% (fun x ↦ βˆ‘ i, (hs.coeff i t) x β€’ s i x)) x :=
301304
.sum_section (fun i ↦ (h i).smul_section <|
302305
((hs.contMDiffOn i).mdifferentiableOn le_rfl).mdifferentiableAt hu)

β€ŽMathlib/Topology/IsLocalHomeomorph.leanβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,12 @@ theorem isOpenEmbedding_of_injective (hf : IsLocalHomeomorph f) (hi : f.Injectiv
250250
.of_continuous_injective_isOpenMap hf.continuous hi hf.isOpenMap
251251

252252
/-- A bijective local homeomorphism is a homeomorphism. -/
253-
noncomputable def toHomeomorph_of_bijective (hf : IsLocalHomeomorph f) (hb : f.Bijective) :
253+
noncomputable def toHomeomorphOfBijective (hf : IsLocalHomeomorph f) (hb : f.Bijective) :
254254
X β‰ƒβ‚œ Y :=
255255
(Equiv.ofBijective f hb).toHomeomorphOfContinuousOpen hf.continuous hf.isOpenMap
256256

257+
@[deprecated (since := "2025-12-19")] alias toHomeomorph_of_bijective := toHomeomorphOfBijective
258+
257259
/-- Continuous local sections of a local homeomorphism are open embeddings. -/
258260
theorem isOpenEmbedding_of_comp (hf : IsLocalHomeomorph g) (hgf : IsOpenEmbedding (g ∘ f))
259261
(cont : Continuous f) : IsOpenEmbedding f :=

0 commit comments

Comments
Β (0)