Skip to content

feat(RingTheory/AdicCompletion): more APIs for IsAdicComplete - #21582

Closed
jjdishere wants to merge 75 commits into
masterfrom
jiedong_jiang_is_adic_complete
Closed

feat(RingTheory/AdicCompletion): more APIs for IsAdicComplete#21582
jjdishere wants to merge 75 commits into
masterfrom
jiedong_jiang_is_adic_complete

Conversation

@jjdishere

@jjdishere jjdishere commented Feb 8, 2025

Copy link
Copy Markdown
Collaborator

In this PR, we establish more APIs for IsAdicComplete.

  1. Instead of checking the definition in IsPrecomplete (starting with a compatible sequence in M), we build APIs to lift elements (or maps) from compatible sequences in M ⧸ I ^ n • ⊤.
  2. We also build APIs to lift a sequence of LinearMaps to LinearMap and a sequence of RingHoms to RingHom directly.
  3. Since I * ⊤ is not definitionally equal to I, we build special APIs for the M = R case, enabling one to use R ⧸ I ^ n instead of R ⧸ I ^ n • ⊤.
  4. We generalize the compatible sequence from defined on every M ⧸ I ^ n • ⊤ to only defined on M ⧸ I ^ a n • ⊤ for a strictly increasing sequence a n. (I would use the case a n = n + 1 in feat(RingTheory/Perfectoid): Fontaine's theta map and the de Rham period rings #21564 )

Open in Gitpod

@jjdishere jjdishere added WIP Work in progress t-algebra Algebra (groups, rings, fields, etc) labels Feb 8, 2025
@mergify

mergify Bot commented Feb 8, 2025

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #21564. Mergify cannot evaluate rules on this PR. ⚠️

@github-actions

github-actions Bot commented Feb 8, 2025

Copy link
Copy Markdown

PR summary c13c0b4820

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ _root_.isHausdorff_iff
+ _root_.isPrecomplete_iff
+ eq_iff_smodEq
+ eq_iff_smodEq'
+ eq_iff_smodEq_of_strictMono
+ eq_iff_smodEq_of_strictMono'
+ eq_of_smodEq
+ eq_of_smodEq'
+ eq_one
+ eq_zero
+ eq_zero'
+ exists_pow_dvd
+ factor_eq_factor
+ function_of_eq_factorPow
+ function_of_eq_factorPow'
+ haus
+ limLinearMap
+ limRingHom
+ map_add
+ map_add'
+ map_mul
+ map_smul
+ mkQ_comp_limLinearMap
+ mk_comp_limRingHom
+ mk_limLinearMap
+ mk_limRingHom
+ of_SModEq_succ
+ of_eq_factorPow
+ of_eq_factorPow'
+ of_eq_factorPowSucc
+ of_eq_factorPowSucc'
+ prec
+ quotEquivOfEq_eq_factor
++ _
- IsHausdorff.eq_iff_smodEq
- IsHausdorff.haus
- IsPrecomplete.prec
- isHausdorff_iff
- isPrecomplete_iff

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).

@jjdishere jjdishere changed the title feat(RingTheory/AdicCompletion): More APIs for IsAdicComplete feat(RingTheory/AdicCompletion): more APIs for IsAdicComplete Feb 9, 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 Feb 20, 2025
@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 Feb 20, 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 Feb 21, 2025
@jjdishere jjdishere added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed WIP Work in progress labels Feb 21, 2025
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Feb 21, 2025

@riccardobrasca riccardobrasca left a comment

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 had to stop at some point, but already a couple of comments.

Comment thread Mathlib/RingTheory/AdicCompletion/Basic.lean
Comment thread Mathlib/RingTheory/AdicCompletion/Basic.lean
Comment thread Mathlib/RingTheory/AdicCompletion/Basic.lean
/--
The `M = R` invariant of `IsHausdorff.eq_iff_smodEq_of_strictMono`.
-/
theorem eq_iff_smodEq_of_strictMono' [IsHausdorff I R] {x y : R} :

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.

Wouldn't be faster to prove that I ^ n • ⊤ = I ^ n (this is probably already there) and rw this? Or there is some type theoretic issue I don't see?

limit function of `f n : N → M ⧸ (I ^ a n • ⊤)`, and each
`f n` is additive, then `F` is additive.
-/
protected theorem map_add {N : Type*} [Add N] {f : (n : ℕ) → N → M ⧸ (I ^ (a n) • ⊤)}

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 am a bit skeptical that this lemma is not a special case of AdicCompletion.lift. Of course there is the same problem as above, and I am not against having a primed version to handle the case M = R, but the that is the standard formulation of the universal property.

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 mean, you are expressing the universal property in the relevant category of algebras, right?

@jjdishere jjdishere Feb 25, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I mean, you are expressing the universal property in the relevant category of algebras, right?

Thank you for your careful review! These lemmas are used in the construction limRingHom (at line 355) and limLinearMap (at line 404). (Maybe I should rename them into liftRingHom and liftLinearMap) They are formulated in a way very similar to AdicCompletion.lift, which expresses the universal property of adic-completeness. They are formulated using the property IsAdicComplete instead of an explicit construction AdicCompletion.

For this map_add lemma, I found that it can be stated without any condition on N except for [Add N]. So I wrote down this general form here.

What do you think about these lemmas here? @riccardobrasca

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.

Ah sorry, I didn't realize AdicCompletion.lift is only about the completion. Then I agree we want this. Why not calling it IsAdicComplete.lift? Putting aside for a moment the ring map version, I think you can just copy the API, and the names, of AdicCompletion.lift (I think we cannot remove it since the completion is not always complete).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for your advice! I'll rename it as IsAdicComplete.lift and copy APIs for it and names from AdicCompletion.lift. I think I would also leave several original lemmas unchanged since there are also cases people would like to construct single elements instead of a whole linear map using the universal property.

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.

Yeah, if they're more general why not keeping them. Can you please add a comment saying where the "usual" universal property is? Also, IsAdicComplete.lift and AdicCompletion.lift should have comments relating them. here a reference for a completion that is not complete.

Comment thread Mathlib/RingTheory/AdicCompletion/Basic.lean
@jjdishere jjdishere added the awaiting-author A reviewer has asked the author a question or requested changes. label Feb 26, 2025
Comment thread Mathlib/LinearAlgebra/Quotient/Defs.lean Outdated
@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 Mar 1, 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 Apr 23, 2025
@jjdishere

Copy link
Copy Markdown
Collaborator Author

This PR has been migrated to a fork-based workflow: #25927

@jjdishere jjdishere closed this Jun 25, 2025
@YaelDillies
YaelDillies deleted the jiedong_jiang_is_adic_complete branch August 17, 2025 11:45
mathlib-bors Bot pushed a commit that referenced this pull request Nov 6, 2025
…pletion.lift` (#25927)

This PR continues the work from #21582.

Original PR: #21582

Co-authored-by: Jiedong Jiang <emailboxofjjd@163.com>
Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
Co-authored-by: jjdishere <emailboxofjjd@163.com>
Co-authored-by: cirno <cirno@shiguna.moe>
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. migrated-to-fork t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants