Skip to content

[Merged by Bors] - feat(Algebra/ModuleCat): extension of scalars is comonadic for a faithfully flat algebra#32326

Closed
chrisflav wants to merge 6 commits intoleanprover-community:masterfrom
chrisflav:ff-comonadic
Closed

[Merged by Bors] - feat(Algebra/ModuleCat): extension of scalars is comonadic for a faithfully flat algebra#32326
chrisflav wants to merge 6 commits intoleanprover-community:masterfrom
chrisflav:ff-comonadic

Conversation

@chrisflav
Copy link
Contributor

@chrisflav chrisflav commented Dec 1, 2025

This is also known as faithfully flat descent, but the proof that these statements indeed imply each other is much longer than this PR (see #24434).

Co-authored-by: Dagur Asgeirsson dagurtomas@gmail.com
Co-authored-by: Jack McKoen mckoen@ualberta.ca
Co-authored-by: Joël Riou rioujoel@gmail.com
Co-authored-by: Adam Topaz atopaz@fastmail.com

This contribution was created as part of the AIM workshop
"Formalizing algebraic geometry" in June 2024.


This PR continues the work from #14203.

Open in Gitpod

@chrisflav chrisflav added the t-ring-theory Ring theory label Dec 1, 2025
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

PR summary 0bc483ae44

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.RingTheory.Flat.CategoryTheory 1596 1616 +20 (+1.25%)
Import changes for all files
Files Import difference
Mathlib.RingTheory.Flat.CategoryTheory 20
Mathlib.Algebra.Category.ModuleCat.Descent (new file) 2019

Declarations diff

+ ModuleCat.preservesFiniteLimits_extendScalars_of_flat
+ ModuleCat.preservesFiniteLimits_tensorLeft_of_ringHomFlat
+ ModuleCat.reflectsIsomorphisms_extendScalars_of_faithfullyFlat
+ comonadicExtendScalars
+ iff_preservesFiniteLimits_tensorLeft
+ instance [Module.Flat R M] : PreservesFiniteLimits <| tensorLeft M := by
+ instance {R S : Type*} [Ring R] [Ring S] (f : R →+* S) :
+ lTensor_bijective_iff_bijective
+ preservesFiniteColimits_iff_forall_exact_map_and_epi
+ preservesFiniteLimits_iff_forall_exact_map_and_mono

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

@erdOne erdOne added the awaiting-author A reviewer has asked the author a question or requested changes. label Dec 6, 2025
@chrisflav chrisflav added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Jan 15, 2026
@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 Jan 15, 2026
Copy link
Member

@erdOne erdOne left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM
Thanks!
maintainer delegate

@github-actions
Copy link

🚀 Pull request has been placed on the maintainer queue by erdOne.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jan 17, 2026
@riccardobrasca
Copy link
Member

!bench

@leanprover-radar
Copy link

leanprover-radar commented Jan 18, 2026

Benchmark results for ea73cf9 against 0bc483a are in! @riccardobrasca

Small changes (1✅, 1🟥)

  • build/module/Mathlib.Lean.Elab.Term//instructions: -239.6M (-8.8%)
  • 🟥 build/module/Mathlib.Util.GetAllModules//instructions: +262.3M (+9.9%)

@riccardobrasca
Copy link
Member

Thanks!

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Jan 18, 2026
@riccardobrasca
Copy link
Member

bors r-

@riccardobrasca
Copy link
Member

bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 18, 2026

Canceled.

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 18, 2026

✌️ chrisflav 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 delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed ready-to-merge This PR has been sent to bors. labels Jan 18, 2026
@chrisflav
Copy link
Contributor Author

Thanks for the reviews!
bors r+

mathlib-bors bot pushed a commit that referenced this pull request Jan 19, 2026
…hfully flat algebra (#32326)

This is also known as faithfully flat descent, but the proof that these statements indeed imply each other is much longer than this PR (see #24434).


This contribution was created as part of the AIM workshop
"Formalizing algebraic geometry" in June 2024.

Co-authored-by: Dagur Asgeirsson <dagurtomas@gmail.com>
Co-authored-by: Jack McKoen <mckoen@ualberta.ca>
Co-authored-by: Joël Riou <rioujoel@gmail.com>
Co-authored-by: Adam Topaz <atopaz@fastmail.com>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 19, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Algebra/ModuleCat): extension of scalars is comonadic for a faithfully flat algebra [Merged by Bors] - feat(Algebra/ModuleCat): extension of scalars is comonadic for a faithfully flat algebra Jan 19, 2026
@mathlib-bors mathlib-bors bot closed this Jan 19, 2026
goliath-klein pushed a commit to PrParadoxy/mathlib4 that referenced this pull request Jan 24, 2026
…hfully flat algebra (leanprover-community#32326)

This is also known as faithfully flat descent, but the proof that these statements indeed imply each other is much longer than this PR (see leanprover-community#24434).


This contribution was created as part of the AIM workshop
"Formalizing algebraic geometry" in June 2024.

Co-authored-by: Dagur Asgeirsson <dagurtomas@gmail.com>
Co-authored-by: Jack McKoen <mckoen@ualberta.ca>
Co-authored-by: Joël Riou <rioujoel@gmail.com>
Co-authored-by: Adam Topaz <atopaz@fastmail.com>
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-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants