Skip to content

refactor(AlgebraicGeometry/Modules): transport pushforward along Opens.map functoriality isos - #43570

Open
kim-em wants to merge 2 commits into
leanprover-community:masterfrom
kim-em:opens-map
Open

refactor(AlgebraicGeometry/Modules): transport pushforward along Opens.map functoriality isos#43570
kim-em wants to merge 2 commits into
leanprover-community:masterfrom
kim-em:opens-map

Conversation

@kim-em

@kim-em kim-em commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This PR defines Scheme.Modules.pushforwardId and pushforwardComp by transporting the sheaf-of-modules isomorphisms along the existing Opens.mapId and Opens.mapComp (via SheafOfModules.pushforwardCongr₂) rather than by identifying Opens.map (𝟙 X).base with 𝟭 and Opens.map (f ≫ g).base with Opens.map g.base ⋙ Opens.map f.base by unfolding Opens.map. The componentwise simp lemmas become M.presheaf.map_id rather than rfl, and the pseudofunctor coherence fields are discharged explicitly since cat_disch no longer finds them by reflexivity. Also adds the simp lemma Adj.eqToHom_τl.

It is extracted from Paul Reichert's experiment making Functor.comp and Functor.id instance_reducible (master...leanprover-community:mathlib4-nightly-testing:datokrat/functorcomp, discussed at https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/backward.2EisDefEq.2ErespectTransparency), and depends on #43569. The diff relative to that PR is kim-em/mathlib4@associators-sheaves...opens-map.

🤖 Prepared with Claude Code

@github-actions github-actions Bot added the tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

PR summary 0ca56e655a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ conjugateIsoEquiv_symm_pushforwardCongr
+ eqToHom_τl
+ leftAdjointCompIso_trans
+ map_id_apply
+ pullback_assoc
+ pullback_comp_id
+ pullback_id_comp
+ pushforwardCompHom_eq
+ pushforwardCompHom_hom
+ pushforwardCongr
+ pushforwardCongr_hom_app_app_apply
+ pushforwardCongr_inv_app_app_apply
+ pushforwardCongr_refl
+ pushforwardCongr_symm
+ pushforwardCongr₂
+ pushforwardCongr₂_hom_app_app_apply
+ pushforwardIdHom_eq
+ pushforwardIdHom_hom
+ pushforwardNatIso
+ pushforwardNatTrans
+ pushforwardNatTrans_app_app_apply
+ pushforward_assoc
++ instance : (pushforward.{v} (pushforwardCompHom φ ψ)).IsRightAdjoint
++ instance : (pushforward.{v} (pushforwardIdHom S)).IsRightAdjoint
++ pullbackCongr₂
++ pushforwardCompHom
++ pushforwardCompHom_assoc
++ pushforwardCompHom_pushforwardIdHom_left
++ pushforwardCompHom_pushforwardIdHom_right
++ pushforwardIdHom
++-- pushforwardId
- instance : (pushforward.{v} (F := F ⋙ G)
- instance : (pushforward.{v} (F := F ⋙ G) (φ ≫ whiskerLeft F.op ψ)).IsRightAdjoint
-++ pushforward_comp_id
-++ pushforward_id_comp
-- instance : (pushforward.{v} (F := 𝟭 C) (𝟙 S)).IsRightAdjoint
--++ pullbackId

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit 0ca56e6).

  • +45 new declarations
  • −4 removed declarations
+AlgebraicGeometry.Scheme.Modules.conjugateIsoEquiv_symm_pushforwardCongr
+AlgebraicGeometry.Scheme.Modules.pullbackCongr.congr_simp
+AlgebraicGeometry.Scheme.Modules.pullback_assoc
+AlgebraicGeometry.Scheme.Modules.pullback_comp_id
+AlgebraicGeometry.Scheme.Modules.pullback_id_comp
+AlgebraicGeometry.Scheme.Modules.pushforwardCongr.congr_simp
+AlgebraicGeometry.Scheme.Modules.pushforwardCongr_refl
+AlgebraicGeometry.Scheme.Modules.pushforward_assoc
+AlgebraicGeometry.Scheme.Modules.pushforward_comp_id
+AlgebraicGeometry.Scheme.Modules.pushforward_id_comp
+CategoryTheory.Adjunction.leftAdjointCompIso_trans
+CategoryTheory.Bicategory.Adj.eqToHom_τl
-PresheafOfModules.instIsRightAdjointPushforwardCompFunctorOppositeRingCatWhiskerLeftOp
-PresheafOfModules.instIsRightAdjointPushforwardIdFunctorOppositeRingCat
+PresheafOfModules.instIsRightAdjointPushforwardPushforwardCompHom
+PresheafOfModules.instIsRightAdjointPushforwardPushforwardIdHom
+PresheafOfModules.map_id_apply
+PresheafOfModules.pullbackCongr₂
+PresheafOfModules.pushforwardCompHom
+PresheafOfModules.pushforwardCompHom_app
+PresheafOfModules.pushforwardCompHom_assoc
+PresheafOfModules.pushforwardCompHom_eq
+PresheafOfModules.pushforwardCompHom_pushforwardIdHom_left
+PresheafOfModules.pushforwardCompHom_pushforwardIdHom_right
+PresheafOfModules.pushforwardCongr
+PresheafOfModules.pushforwardCongr_hom_app_app_apply
+PresheafOfModules.pushforwardCongr_inv_app_app_apply
+PresheafOfModules.pushforwardCongr_symm
+PresheafOfModules.pushforwardCongr₂
+PresheafOfModules.pushforwardCongr₂_hom_app_app_apply
+PresheafOfModules.pushforwardIdHom
+PresheafOfModules.pushforwardIdHom_app
+PresheafOfModules.pushforwardIdHom_eq
+PresheafOfModules.pushforwardNatIso
+PresheafOfModules.pushforwardNatIso_hom
+PresheafOfModules.pushforwardNatTrans
+PresheafOfModules.pushforwardNatTrans_app_app_apply
-SheafOfModules.instIsRightAdjointPushforwardCompSheafRingCatMapSheafPushforwardContinuous
-SheafOfModules.instIsRightAdjointPushforwardIdSheafRingCat
+SheafOfModules.instIsRightAdjointPushforwardPushforwardCompHom
+SheafOfModules.instIsRightAdjointPushforwardPushforwardIdHom
+SheafOfModules.pullbackCongr₂
+SheafOfModules.pushforwardCompHom
+SheafOfModules.pushforwardCompHom_assoc
+SheafOfModules.pushforwardCompHom_hom
+SheafOfModules.pushforwardCompHom_pushforwardIdHom_left
+SheafOfModules.pushforwardCompHom_pushforwardIdHom_right
+SheafOfModules.pushforwardIdHom
+SheafOfModules.pushforwardIdHom_hom

Decrease in strong tech debt: (relative, absolute) = (3.00, 0.00)
Current number Change Type (strong)
backward.isDefEq.respectTransparency 4684 -3
No changes to weak technical debt.

Current commit 0ca56e655a
Reference commit 572e4d091b

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

@kim-em
kim-em force-pushed the opens-map branch 2 times, most recently from 3c265da to 2ec1899 Compare September 8, 2026 10:57
kim-em and others added 2 commits September 8, 2026 11:09
…functor bracketings

Introduce pushforwardIdHom and pushforwardCompHom as the honestly-typed data
along which the pushforward by the identity and by a composition are taken
(they are the unitor and associator composed with Functor.opId/opComp), and
transport the associativity and unitality isomorphisms of pushforward and
pullback along the functor associator and unitors instead of relying on the
two bracketings being definitionally equal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s.map functoriality isos

Define Scheme.Modules.pushforwardId and pushforwardComp by transporting along
the new opensMapIdIso and opensMapCompIso instead of identifying
Opens.map (𝟙 X).base with the identity and Opens.map (f ≫ g).base with the
composition by unfolding.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant