Skip to content

feat(Topology/Algebra/Valued): IsLinearTopology 𝒪[K] K and 𝒪[K] 𝒪[K]#24627

Open
pechersky wants to merge 48 commits intomasterfrom
pechersky/linear-top-val-ring
Open

feat(Topology/Algebra/Valued): IsLinearTopology 𝒪[K] K and 𝒪[K] 𝒪[K]#24627
pechersky wants to merge 48 commits intomasterfrom
pechersky/linear-top-val-ring

Conversation

@pechersky
Copy link
Copy Markdown
Contributor

@pechersky pechersky commented May 6, 2025

as well as
`IsDiscreteValuationRing 𝒪[ℚ_[p]]`
`IsLinearTopology ℤ_[p] ℤ_[p]`
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 6, 2025

PR summary 81ccf8f455

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Topology.Algebra.Valued.LinearTopology (new file) 1522
Mathlib.NumberTheory.Padics.LinearTopology (new file) 1897

Declarations diff

+ IsLinearTopology.of_isOpenEmbedding
+ IsLinearTopology.of_valued
+ IsLinearTopology.of_valued'
+ discreteTopology_valuationRing_iff_discreteTopology
+ instance : IsLinearTopology ℤ_[p] ℚ_[p] := inferInstanceAs (IsLinearTopology 𝒪[ℚ_[p]] ℚ_[p])
+ instance : IsLinearTopology ℤ_[p] ℤ_[p] := inferInstanceAs (IsLinearTopology 𝒪[ℚ_[p]] 𝒪[ℚ_[p]])
+ isClopen_leAddSubgroup
+ isClopen_leIdeal
+ isClopen_leSubmodule
+ isClopen_ltAddSubgroup
+ isClopen_ltIdeal
+ isClopen_ltSubmodule
+ isClosedEmbedding_algebraMap_integer
+ isClosedEmbedding_subtype_integer
+ isClosed_leAddSubgroup
+ isClosed_leIdeal
+ isClosed_leSubmodule
+ isClosed_ltAddSubgroup
+ isClosed_ltIdeal
+ isClosed_ltSubmodule
+ isOpenEmbedding_algebraMap_integer
+ isOpenEmbedding_subtype_integer
+ isOpen_leAddSubgroup
+ isOpen_leIdeal
+ isOpen_leSubmodule
+ isOpen_ltAddSubgroup
+ isOpen_ltIdeal
+ isOpen_ltSubmodule

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.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-topology Topological spaces, uniform spaces, metric spaces, filters label May 6, 2025
@pechersky pechersky requested a review from loefflerd May 19, 2025 10:52
@loefflerd
Copy link
Copy Markdown
Contributor

Looks like you have updated the proofs not to require DVR assumptions, but you have not updated the lemma names to match?

If the comment about Qp not being Valued is correct, then how can the lines immediately below work?

@loefflerd loefflerd added the awaiting-author A reviewer has asked the author a question or requested changes. label May 19, 2025
@pechersky pechersky removed the awaiting-author A reviewer has asked the author a question or requested changes. label May 29, 2025
@pechersky
Copy link
Copy Markdown
Contributor Author

Thanks, I fixed the name, and expanded the implementation notes to explain why inferInstanceAs is needed.

@loefflerd loefflerd added the awaiting-author A reviewer has asked the author a question or requested changes. label May 29, 2025
pechersky and others added 4 commits June 4, 2025 15:27
@leanprover-community-bot-assistant
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 5, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 23, 2025
@mathlib4-dependent-issues-bot
Copy link
Copy Markdown
Collaborator

@pechersky pechersky removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 23, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 23, 2025
simpa [mem_nhds_zero] using hI.mem_nhds I.zero_mem

instance IsLinearTopology.of_valued' :
IsLinearTopology 𝒪[K] 𝒪[K] := by
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.

Is there a way to make this rely less on the specific defeq of the ring of integers? And more on a predicate that asserts that K is the ring of fractions of some domain 𝒪 (+ suitable hyps, of course)

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.

Is this comment about IsLinearTopology 𝒪[K] K in particular?

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.

Not too particular. I'm generally somewhat concerned about API relying on such defeqs. If you think that concern should be dealt with in a separate PR, than I think that's fair.
I'm interested in what you think about this.

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.

Let me know if the generalization is acceptable.

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'm happy to merge this for now. But eventually we should transition the API away from 𝒪[K], and state everything in terms of predicates.

@jcommelin jcommelin added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 31, 2025
@erdOne
Copy link
Copy Markdown
Member

erdOne commented Nov 10, 2025

Am I correct that the titular results follows from #23758 and infer instance?

@pechersky
Copy link
Copy Markdown
Contributor Author

pechersky commented Nov 11, 2025

@erdOne

No, unfortunately:

import Mathlib

variable {R K Γ₀ : Type*} [Ring R] [TopologicalSpace R] [IsTopologicalAddGroup R]
  [Field K] [LinearOrderedCommGroupWithZero Γ₀] [Valued K Γ₀]

open Valued

-- failed to synthesize
--  Module.Finite ℤ ↥𝒪[K]
instance IsLinearTopology.of_valued :
    IsLinearTopology 𝒪[K] 𝒪[K] :=
  (isLinearTopology_iff_nonarchimedeanAddGroup_of_finite _ _).mpr _

In fact, neither of the following synths either:

#synth NonarchimedeanAddGroup 𝒪[K]
#synth NonarchimedeanAddGroup K

@pechersky pechersky removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 11, 2025
Comment on lines +23 to +27
lemma IsLinearTopology.of_isOpenEmbedding {R K : Type*} [CommRing R] [rTop : TopologicalSpace R]
[ContinuousAdd R] [hl : IsLinearTopology R R]
[CommRing K] [kTop : TopologicalSpace K] [ContinuousAdd K] -- inferrable from ContinuousAdd R?
[Algebra R K] (h : IsOpenEmbedding (algebraMap R K)) :
IsLinearTopology R K := by
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.

This looks good to me.
Does #find_home give something useful?

simpa [mem_nhds_zero] using hI.mem_nhds I.zero_mem

instance IsLinearTopology.of_valued' :
IsLinearTopology 𝒪[K] 𝒪[K] := by
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'm happy to merge this for now. But eventually we should transition the API away from 𝒪[K], and state everything in terms of predicates.

variable (K : Type*) {Γ₀ : Type*} [Field K] [LinearOrderedCommGroupWithZero Γ₀] [Valued K Γ₀]

lemma isOpenEmbedding_algebraMap_integer :
Topology.IsOpenEmbedding (algebraMap 𝒪[K] K) :=
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.

Eg results like the ones you add here should probably also generalize away from the defeq ring of integers.

@pechersky
Copy link
Copy Markdown
Contributor Author

But eventually we should transition the API away from 𝒪[K], and state everything in terms of predicates.

Fair, but what is the predicate that is available to TC search? Valuation.Integer is not a class (not sure it should be). Should it be about integral closures?

@jcommelin
Copy link
Copy Markdown
Member

Yes something about integral closures, just like in the case of number fields. (And then something about topologies.)

@mathlib4-merge-conflict-bot mathlib4-merge-conflict-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 19, 2025
@mathlib4-merge-conflict-bot
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@jcommelin jcommelin added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants