Skip to content

[Merged by Bors] - chore: Rename UniformEmbedding to IsUniformEmbedding#17295

Closed
YaelDillies wants to merge 10 commits intomasterfrom
rename_uniform_embedding
Closed

[Merged by Bors] - chore: Rename UniformEmbedding to IsUniformEmbedding#17295
YaelDillies wants to merge 10 commits intomasterfrom
rename_uniform_embedding

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

Function.Embedding is a type while Embedding is a proposition, and there are many other kinds of embeddings than topological embeddings. Hence this PR is a step towards

  1. renaming Embedding to IsEmbedding and similarly for neighborhing declarations (which DenseEmbedding is)
  2. namespacing it inside Topology

Zulip. See #15993 for context.


Open in Gitpod

@YaelDillies YaelDillies added the t-topology Topological spaces, uniform spaces, metric spaces, filters label Sep 30, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 30, 2024

PR summary 633bfedd11

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ ContinuousLinearMap.isUniformEmbedding_of_bound
+ EMetric.isUniformEmbedding_iff'
+ Embedding.to_isUniformEmbedding
+ Equiv.isUniformEmbedding
+ Filter.HasBasis.isUniformEmbedding_iff
+ Filter.HasBasis.isUniformEmbedding_iff'
+ Int.isUniformEmbedding_coe_rat
+ IsUniformEmbedding
+ IsUniformEmbedding.comapMetricSpace
+ IsUniformEmbedding.comp
+ IsUniformEmbedding.denseEmbedding
+ IsUniformEmbedding.embedding
+ IsUniformEmbedding.isComplete_iff
+ IsUniformEmbedding.isDenseEmbedding
+ IsUniformEmbedding.of_comp_iff
+ IsUniformEmbedding.prod
+ IsUniformEmbedding.toClosedEmbedding
+ IsUniformEmbedding.to_isometry
+ Nat.isUniformEmbedding_coe_rat
+ NonemptyCompacts.ToCloseds.isUniformEmbedding
+ UniformInducing.isUniformEmbedding
+ _root_.LinearEquiv.isUniformEmbedding
+ instance : MetricSpace ℕ := Nat.isUniformEmbedding_coe_real.comapMetricSpace _
+ instance : MetricSpace ℤ := Int.isUniformEmbedding_coe_real.comapMetricSpace _
+ isUniformEmbedding_addEquiv
+ isUniformEmbedding_bot_of_pairwise_le_dist
+ isUniformEmbedding_coeFn
+ isUniformEmbedding_comap
+ isUniformEmbedding_equivBoundedOfCompact
+ isUniformEmbedding_equivRealProd
+ isUniformEmbedding_iff_uniformInducing
+ isUniformEmbedding_inl
+ isUniformEmbedding_inr
+ isUniformEmbedding_of_spaced_out
+ isUniformEmbedding_pureCauchy
+ isUniformEmbedding_set_inclusion
+ isUniformEmbedding_subtypeEmb
+ isUniformEmbedding_subtype_val
+ isUniformEmbedding_toContinuousMap
+ isUniformEmbedding_toContinuousMultilinearMap
+ isUniformEmbedding_toProdMulOpposite
+ isUniformEmbedding_toUniformOnFunIsCompact
+ isUniformEmbedding_translate_mul
+ ofIsUniformEmbedding
+ outCLM_isUniformEmbedding
++ controlled_of_isUniformEmbedding
++ isUniformEmbedding_coe
++ isUniformEmbedding_comp
++ isUniformEmbedding_iff
++ isUniformEmbedding_iff'
++ isUniformEmbedding_toUniformOnFun
++ postcomp_isUniformEmbedding
+++ isUniformEmbedding_coe_real
+++ isUniformEmbedding_restrictScalars
++++++ isUniformEmbedding
++++++------ uniformEmbedding
+++--- uniformEmbedding_coe_real
+++--- uniformEmbedding_restrictScalars
++-- cfc
++-- controlled_of_uniformEmbedding
++-- postcomp_uniformEmbedding
++-- uniformEmbedding_coe
++-- uniformEmbedding_comp
++-- uniformEmbedding_iff
++-- uniformEmbedding_iff'
++-- uniformEmbedding_toUniformOnFun
- UniformEmbedding.denseEmbedding
- instance : MetricSpace ℕ := Nat.uniformEmbedding_coe_real.comapMetricSpace _
- instance : MetricSpace ℤ := Int.uniformEmbedding_coe_real.comapMetricSpace _

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

`Function.Embedding` is a type while `Embedding` is a proposition, and there are many other kinds of embeddings than topological embeddings. Hence this PR is a step towards
1. renaming `Embedding` to `IsEmbedding` and similarly for neighborhing declarations (which `DenseEmbedding` is)
2. namespacing it inside `Topology`

[Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/rename.20.60Inducing.60.20and.20.60Embedding.60.3F). See #15993 for context.
@YaelDillies YaelDillies force-pushed the rename_uniform_embedding branch from ac10a4f to fa6d5d4 Compare October 1, 2024 07:48
@b-mehta
Copy link
Copy Markdown
Contributor

b-mehta commented Oct 1, 2024

Please ensure your PR titles follow the mathlib convention: https://leanprover-community.github.io/contribute/commit.html

Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

Unless I missed them, there are a few deprecations missing.

bors d+

injective. If `α` is a separated space, then the latter assumption follows from the former. -/
@[mk_iff]
structure UniformEmbedding (f : α → β) extends UniformInducing f : Prop where
structure IsUniformEmbedding (f : α → β) extends UniformInducing f : Prop where
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

deprecation missing

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.

@adomani, all the deprecations were generated using your script, so you want to see which were missing to fix the script. Looks like it missed structure and abbrev

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that the deprecation script was a precursor to the decl_diff script and is missing all the future improvements that were added to decl_diff.

I'll see if I get a chance to modify the decl_diff script, or at least try to merge it into the deprecation one, though the term has started and I have less time available now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@YaelDillies, I adapted the script and ran it from your first commit. Besides what I think were the modifications that you also had there, it added a few more, such as

@@ -104,6 +104,9 @@ abbrev IsUniformEmbedding.comapMetricSpace {α β} [UniformSpace α] [m : Metric
     (h : IsUniformEmbedding f) : MetricSpace α :=
   .replaceUniformity (.induced f h.inj m) h.comap_uniformity.symm
 
+@[deprecated (since := "2024-10-04")]
+alias UniformEmbedding.comapMetricSpace := IsUniformEmbedding.comapMetricSpace
+

@@ -222,6 +222,9 @@ noncomputable def ofIsUniformEmbedding (f : α → β) (hf : IsUniformEmbedding
     exact uniformContinuous_subtype_val
   toEquiv := Equiv.ofInjective f hf.inj
 
+@[deprecated (since := "2024-10-04")]
+alias ofUniformEmbedding := ofIsUniformEmbedding
+

@@ -134,12 +134,15 @@ structure IsUniformEmbedding (f : α → β) extends UniformInducing f : Prop wh
   /-- A uniform embedding is injective. -/
   inj : Function.Injective f
 
+@[deprecated (since := "2024-10-04")]
+alias UniformEmbedding := IsUniformEmbedding
+

####  not sure about this one in `Mathlib/Topology/UniformSpace/UniformEmbedding.lean` ~270
+@[deprecated (since := "2024-10-04")]
+alias UniformEmbedding.denseEmbedding := IsUniformEmbedding.denseEmbedding
+

I imagine that these are the ones that were later flagged by Jireh. The last one seems strange. There were others as well, but they looked more like later changes to master.

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.

Interesting! Please post the updated script on Zulip

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 3, 2024

✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 3, 2024
@YaelDillies
Copy link
Copy Markdown
Contributor Author

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Oct 3, 2024
`Function.Embedding` is a type while `Embedding` is a proposition, and there are many other kinds of embeddings than topological embeddings. Hence this PR is a step towards
1. renaming `Embedding` to `IsEmbedding` and similarly for neighborhing declarations (which `DenseEmbedding` is)
2. namespacing it inside `Topology`

[Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/rename.20.60Inducing.60.20and.20.60Embedding.60.3F). See #15993 for context.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 3, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: Rename UniformEmbedding to IsUniformEmbedding [Merged by Bors] - chore: Rename UniformEmbedding to IsUniformEmbedding Oct 3, 2024
@mathlib-bors mathlib-bors bot closed this Oct 3, 2024
@mathlib-bors mathlib-bors bot deleted the rename_uniform_embedding branch October 3, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants