Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bcf33a3
add Topology/MetricSpace/DirectLimit.lean, which gives an instance of…
drocta May 19, 2026
b8ce6ff
rename namespace, and change namespace for lemma
drocta May 19, 2026
12f2b05
add a module docstring for Topology/MetricSpace/DirectLimit.lean
drocta May 19, 2026
286d813
in Topology/MetricSpace/DirectLimit , slightly simplify proof of eq_o…
drocta May 19, 2026
fc170d6
in Topology/MetricSpace/DirectLimit , slightly shorten proof of dist_…
drocta May 19, 2026
98c336a
in Topology/MetricSpace/DirectLimit , shorten proofs of dist_comm and…
drocta May 19, 2026
b0e4bea
in Topology/MetricSpace/DirectLimit , shorten proofs of dist_self and…
drocta May 20, 2026
8e35650
in Topology/MetricSpace/DirectLimit , move apostrophes for clarity in…
drocta May 20, 2026
c243914
improve module docstring for Topology/MetricSpace/DirectLimit.lean
drocta May 20, 2026
24ee6ab
add instance of NormedAddGroup for DirectLimit
drocta May 21, 2026
ea02f04
add lemma DirectLimit.NormedAddGroup.norm_def for DirectLimit of Norm…
drocta May 21, 2026
b394832
add instance of NormedAddCommGroup for DirectLimit
drocta May 21, 2026
d0e0b4f
add module docstring for Analysis/Normed/Group/DirectLimit.lean
drocta May 21, 2026
b09c2aa
make fields of instNormedAddCommGroup all be obtained by inheriting f…
drocta May 21, 2026
a5ce1cf
whitespaces fixes in Analysis/Normed/Group/DirectLimit.lean
drocta May 21, 2026
572df6a
in Analysis/Normed/Group/DirectLimit.lean replace => with \mapsto
drocta May 21, 2026
4ab90f8
in Analysis/Normed/Group/DirectLimit.lean remove unnecessary type asc…
drocta May 21, 2026
e265879
use inferInstance rather than _ in the __ field for AddCommGroup in i…
drocta May 21, 2026
5e688ed
rephrase module docstring in Analys/Normed/Group/DirectLimit.lean
drocta May 21, 2026
2d606d8
remove more unnecessary type ascription in Analysis/Normed/Group/Dire…
drocta May 21, 2026
947769b
remove example showing that DirectLimit.NormedAddGroup.norm_def works…
drocta May 21, 2026
12252bf
run lake exe mk_all
drocta May 21, 2026
0d08ac8
move the expose public section to be after the module docstring rathe…
drocta May 21, 2026
579e942
make instance of PseudoMetricSpace for DirectLimit, pulling it out of…
drocta May 22, 2026
0e28c84
add nndist_def and edist_def lemmas in Topology/MetricSpace/DirectLim…
drocta May 22, 2026
8203924
in Topology/MetricSpace/DirectLimit.lean changes the namespace blocks…
drocta May 22, 2026
a74866d
add instances of SeminormedGroup and NormedGroup for DirectLimit (as …
drocta May 22, 2026
4703329
remove redundant instance of NormedGroup, and a #synth line, and some…
drocta May 22, 2026
506ed18
add @[to_additive] on instance of NormedGroup for DirectLimit, and re…
drocta May 22, 2026
b5ef65e
in Analysis/Normed/Group/DirectLimit.lean replace namespace and insta…
drocta May 22, 2026
f54956e
make the instance of MetricSpace for DirectLimit get the definition o…
drocta May 22, 2026
fcbc4e5
add lemmas mul_nnnorm_def and mul_enorm_def (and import Analysis.Norm…
drocta May 22, 2026
40b3149
add instances of (Pseudo)EMetricSpace to DirectLimit
drocta May 22, 2026
c6e97a3
add instance of SeminormedCommGroup to DirectLimit
drocta May 22, 2026
a0c8075
add instances of NormedRing and NonUnitalNormedRing in Analysis/Norme…
drocta May 22, 2026
47f4c30
ran lake exe mk_all
drocta May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2117,6 +2117,7 @@ public import Mathlib.Analysis.Normed.Group.Constructions
public import Mathlib.Analysis.Normed.Group.Continuity
public import Mathlib.Analysis.Normed.Group.ControlledClosure
public import Mathlib.Analysis.Normed.Group.Defs
public import Mathlib.Analysis.Normed.Group.DirectLimit
public import Mathlib.Analysis.Normed.Group.FunctionSeries
public import Mathlib.Analysis.Normed.Group.Hom
public import Mathlib.Analysis.Normed.Group.HomCompletion
Expand Down Expand Up @@ -2211,6 +2212,7 @@ public import Mathlib.Analysis.Normed.Order.Hom.Ultra
public import Mathlib.Analysis.Normed.Order.Lattice
public import Mathlib.Analysis.Normed.Order.UpperLower
public import Mathlib.Analysis.Normed.Ring.Basic
public import Mathlib.Analysis.Normed.Ring.DirectLimit
public import Mathlib.Analysis.Normed.Ring.Finite
public import Mathlib.Analysis.Normed.Ring.InfiniteProd
public import Mathlib.Analysis.Normed.Ring.InfiniteSum
Expand Down Expand Up @@ -7817,6 +7819,7 @@ public import Mathlib.Topology.MetricSpace.CoveringNumbers
public import Mathlib.Topology.MetricSpace.Defs
public import Mathlib.Topology.MetricSpace.Dilation
public import Mathlib.Topology.MetricSpace.DilationEquiv
public import Mathlib.Topology.MetricSpace.DirectLimit
public import Mathlib.Topology.MetricSpace.Equicontinuity
public import Mathlib.Topology.MetricSpace.Gluing
public import Mathlib.Topology.MetricSpace.GromovHausdorff
Expand Down
97 changes: 97 additions & 0 deletions Mathlib/Analysis/Normed/Group/DirectLimit.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/-
Copyright (c) 2026 Matthew Corbelli. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Matthew Corbelli
-/
module

public import Mathlib.Analysis.Normed.Group.Basic
public import Mathlib.Algebra.Colimit.DirectLimit
public import Mathlib.Topology.MetricSpace.DirectLimit

/-!
# Direct Limit of normed additive groups

We introduct instances of `NormedAddGroup` and `NormedAddCommGroup` on `DirectLimit`,
under the assumption that the types `T h` that the maps in the directed system come from,
all have instances of `IsometryClass`.
-/

@[expose] public section

namespace DirectLimit

variable {ι : Type*} [Preorder ι] {G : ι → Type*}
variable {T : ∀ ⦃i j : ι⦄, i ≤ j → Type*} {f : ∀ _ _ h, T h}
variable [∀ i j (h : i ≤ j), FunLike (T h) (G i) (G j)] [DirectedSystem G (f · · ·)]
variable [IsDirectedOrder ι]
variable [Nonempty ι]

section SeminormedGroup

variable [∀ i, SeminormedGroup (G i)]
variable [∀ i j h, MonoidHomClass (T h) (G i) (G j)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

@[to_additive]
noncomputable instance : SeminormedGroup (DirectLimit G f) where
norm := DirectLimit.lift f (ih := fun i x ↦ ‖x‖) (fun i j h x ↦ by
simpa [SeminormedGroup.dist_eq] using (IsometryClass.dist_eq (f i j h) 1 x).symm)
dist_eq := DirectLimit.induction₂ f (fun i x y ↦ by
rw [dist_def, SeminormedGroup.dist_eq, inv_def, mul_def, DirectLimit.lift_def])

@[to_additive norm_def]
lemma mul_norm_def (i : ι) (x : G i) : ‖(⟦⟨i, x⟩⟧ : DirectLimit G f)‖ = ‖x‖ := by
change DirectLimit.lift f (ih := fun i x ↦ ‖x‖) _ ⟦⟨i, x⟩⟧ = ‖x‖
apply DirectLimit.lift_def

@[to_additive nnnorm_def]
lemma mul_nnnorm_def (i : ι) (x : G i) : ‖(⟦⟨i, x⟩⟧ : DirectLimit G f)‖₊ = ‖x‖₊ := by
simp_rw [← @norm_toNNReal', mul_norm_def]

@[to_additive enorm_def]
lemma mul_enorm_def (i : ι) (x : G i) : ‖(⟦⟨i, x⟩⟧ : DirectLimit G f)‖ₑ = ‖x‖ₑ := by
rw [@enorm'_eq_iff_norm_eq, mul_norm_def]

end SeminormedGroup

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're missing SeminormedCommGroup?

section NormedGroup

variable [∀ i, NormedGroup (G i)]
variable [∀ i j h, MonoidHomClass (T h) (G i) (G j)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

@[to_additive]
noncomputable instance : NormedGroup (DirectLimit G f) where
__ := (inferInstance : SeminormedGroup (DirectLimit G f))
__ := (inferInstance : MetricSpace (DirectLimit G f))

end NormedGroup

section SeminormedCommGroup

variable [∀ i, SeminormedCommGroup (G i)]
variable [∀ i j h, MonoidHomClass (T h) (G i) (G j)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

@[to_additive]
noncomputable instance : SeminormedCommGroup (DirectLimit G f) where
__ := (inferInstance : SeminormedGroup (DirectLimit G f))
__ := (inferInstance : CommGroup (DirectLimit G f))

end SeminormedCommGroup

section NormedCommGroup

variable [∀ i, NormedCommGroup (G i)]
variable [∀ i j h, MonoidHomClass (T h) (G i) (G j)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

@[to_additive]
noncomputable instance : NormedCommGroup (DirectLimit G f) where
__ := (inferInstance : NormedGroup (DirectLimit G f))
__ := (inferInstance : CommGroup (DirectLimit G f))

end NormedCommGroup

end DirectLimit
57 changes: 57 additions & 0 deletions Mathlib/Analysis/Normed/Ring/DirectLimit.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/-
Copyright (c) 2026 Matthew Corbelli. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Matthew Corbelli
-/
module

public import Mathlib.Analysis.Normed.Group.DirectLimit
public import Mathlib.Analysis.Normed.Ring.Basic
public import Mathlib.Algebra.Colimit.DirectLimit

/-!
# Direct Limit of normed rings

We introduct instances of `NormedRing` and `NonUnitalNormedRing` on `DirectLimit`,
under the assumption that the types `T h` that the maps in the directed system come from,
all have instances of `IsometryClass`.
-/

@[expose] public section

namespace DirectLimit

variable {ι : Type*} [Preorder ι] {G : ι → Type*}
variable {T : ∀ ⦃i j : ι⦄, i ≤ j → Type*} {f : ∀ _ _ h, T h}
variable [∀ i j (h : i ≤ j), FunLike (T h) (G i) (G j)] [DirectedSystem G (f · · ·)]
variable [IsDirectedOrder ι]
variable [Nonempty ι]

section NonUnitalNormedRing

variable [∀ i, NonUnitalNormedRing (G i)]
variable [∀ i j h, NonUnitalRingHomClass (T h) (G i) (G j)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

noncomputable instance : NonUnitalNormedRing (DirectLimit G f) where
__ := (inferInstance : NormedAddCommGroup (DirectLimit G f))
__ := (inferInstance : NonUnitalRing (DirectLimit G f))
norm_mul_le := DirectLimit.induction₂ f
fun i x y ↦ by simp_rw [mul_def, norm_def]; exact norm_mul_le x y

end NonUnitalNormedRing

section NormedRing

variable [∀ i, NormedRing (G i)]
variable [∀ i j h, RingHomClass (T h) (G i) (G j)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

noncomputable instance : NormedRing (DirectLimit G f) where
__ := (inferInstance : Ring (DirectLimit G f))
__ := (inferInstance : NonUnitalNormedRing (DirectLimit G f))

end NormedRing


end DirectLimit
101 changes: 101 additions & 0 deletions Mathlib/Topology/MetricSpace/DirectLimit.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/-
Copyright (c) 2026 Matthew Corbelli. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Matthew Corbelli
-/
module

public import Mathlib.Order.DirectedInverseSystem
public import Mathlib.Topology.MetricSpace.Isometry

/-!
# Metrics on direct limits

This file defines a `MetricSpace` instance on `DirectLimit G f` when `G` and `f` form a directed
system of metric spaces and the transition maps `f` are isometries (using `IsometryClass`).

See also `Metric.InductiveLimit` in `Mathlib/Topology/MetricSpace/Gluing.lean`, which
handles sequential inductive limits of metric spaces.
-/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a remark that for now the only uniform space and bornology available on a DirectLimit are the ones induced through the metric.

@[expose] public section

namespace DirectLimit

variable {ι : Type*} [Preorder ι] {G : ι → Type*}
variable {T : ∀ ⦃i j : ι⦄, i ≤ j → Type*} {f : ∀ _ _ h, T h}
variable [∀ i j (h : i ≤ j), FunLike (T h) (G i) (G j)] [DirectedSystem G (f · · ·)]
variable [IsDirectedOrder ι]

section PseudoEMetricSpace

variable [∀ i, PseudoEMetricSpace (G i)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

noncomputable instance : PseudoEMetricSpace (DirectLimit G f) where
edist := DirectLimit.lift₂ f f (fun i ↦ edist (α := G i))
(fun i j h x y ↦ (IsometryClass.edist_eq (f i j h) x y).symm)
edist_self := DirectLimit.induction f fun i x ↦ by rw [← edist_self x, lift₂_def]
edist_comm := DirectLimit.induction₂ f fun i x y ↦ by simp_rw [lift₂_def, edist_comm x y]
edist_triangle := DirectLimit.induction₃ f fun i x y z ↦ by simp_rw [lift₂_def, edist_triangle]

lemma edist_def (i : ι) (x y : G i) :
edist (α := DirectLimit G f) ⟦⟨i,x⟩⟧ ⟦⟨i,y⟩⟧ = edist x y := by
change DirectLimit.lift₂ f f _
(fun i j h x y ↦ (IsometryClass.edist_eq (f i j h) x y).symm)
⟦⟨i, x⟩⟧ ⟦⟨i, y⟩⟧ = edist x y
rw [lift₂_def]

end PseudoEMetricSpace

section EMetricSpace

variable [∀ i, EMetricSpace (G i)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

noncomputable instance : EMetricSpace (DirectLimit G f) where
__ := (inferInstance : PseudoEMetricSpace (DirectLimit G f))
eq_of_edist_eq_zero {x y} h := DirectLimit.induction₂ f (fun i x' y' h' ↦ by
rw [edist_def] at h'
simp [eq_of_edist_eq_zero h']) x y h

end EMetricSpace

section PseudoMetricSpace

variable [∀ i, PseudoMetricSpace (G i)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

noncomputable instance : PseudoMetricSpace (DirectLimit G f) where
dist := DirectLimit.lift₂ f f (fun i ↦ dist (α := G i))
(fun i j h x y ↦ (IsometryClass.dist_eq (f i j h) x y).symm)
dist_self := DirectLimit.induction f fun i x ↦ by rw [← dist_self x, lift₂_def]
dist_comm := DirectLimit.induction₂ f fun i x y ↦ by simp_rw [lift₂_def, dist_comm x y]
dist_triangle := DirectLimit.induction₃ f fun i x y z ↦ by simp_rw [lift₂_def, dist_triangle]
Comment on lines +68 to +73
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you also need toTopologicalSpace := inferInstance, which will no doubt create a headache.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test you need to pass (which we should commit) is:

example : (UniformSpace.toTopologicalSpace : TopologicalSpace (DirectLimit G f)) = instTopologicalSpaceQuotient :=
  rfl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm a bit confused here.
When I try to set toTopologicalSpace := inferInstance in there, it tells me that "toTopologicalSpace is not a field of structure PseudoMetricSpace" .


lemma dist_def (i : ι) (x y : G i) :
dist (α := DirectLimit G f) ⟦⟨i,x⟩⟧ ⟦⟨i,y⟩⟧ = dist x y := by
change DirectLimit.lift₂ f f _
(fun i j h x y ↦ (IsometryClass.dist_eq (f i j h) x y).symm)
⟦⟨i, x⟩⟧ ⟦⟨i, y⟩⟧ = dist x y
rw [lift₂_def]
Comment thread
eric-wieser marked this conversation as resolved.

lemma nndist_def (i : ι) (x y : G i) :
nndist (α := DirectLimit G f) ⟦⟨i,x⟩⟧ ⟦⟨i,y⟩⟧ = nndist x y := by
simp_rw [nndist_dist, dist_def]

end PseudoMetricSpace

section MetricSpace

variable [∀ i, MetricSpace (G i)]
variable [∀ i j h, IsometryClass (T h) (G i) (G j)]

noncomputable instance : MetricSpace (DirectLimit G f) where
__ := (inferInstance : PseudoMetricSpace (DirectLimit G f))
eq_of_dist_eq_zero {x y} h := DirectLimit.induction₂ f (fun i x' y' h' ↦ by
rw [dist_def] at h'
simp [eq_of_dist_eq_zero h']) x y h

end MetricSpace

end DirectLimit
Loading