Skip to content

feat(Tactic/CategoryTheory): whiskering lemmas for rotate_isos#25752

Draft
robin-carlier wants to merge 28 commits intoleanprover-community:masterfrom
robin-carlier:robin-carlier/rotate_isos_lemma_whiskering
Draft

feat(Tactic/CategoryTheory): whiskering lemmas for rotate_isos#25752
robin-carlier wants to merge 28 commits intoleanprover-community:masterfrom
robin-carlier:robin-carlier/rotate_isos_lemma_whiskering

Conversation

@robin-carlier
Copy link
Copy Markdown
Contributor

This PR extends the base set of terms recognized by the rotate_isos tactic to include terms of the form whiskerLeft F f, isoWhiskerLeft F e, and NatTrans.hcomp/ NatIso.hcomp.


Technically, it could depend solely on #24506, but there’s not much point getting this merged if the base tactic is not there.

Open in Gitpod


This PR continues the work from #24650.

Original PR: #24650

This fixes a bug where some terms of the form `f.symm.symm` might
appears in the expressions the tactic returns. This was due to the fact
that a `mkExpectedTypeHint` was forgotten, and so that some def-eq
equalities like `f.symm.symm = f` where ignored by the tactic, despite
being in the simp set when simplifying the final expression.
Variables where swapped in lemmas `Iso.refl_eq_symm_trans` which had
some undesired behaviour in the tactic
@robin-carlier robin-carlier added the t-meta Tactics, attributes or user commands label Jun 12, 2025
@robin-carlier robin-carlier marked this pull request as draft June 12, 2025 08:26
@github-actions
Copy link
Copy Markdown

PR summary 8b2141b23d

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Tactic 2734 2738 +4 (+0.15%)
Import changes for all files
Files Import difference
Mathlib.Tactic.CategoryTheory.RotateIsos.Core (new file) 1
Mathlib.Tactic 4
Mathlib.Tactic.CategoryTheory.RotateIsos.Cancelable (new file) 279
Mathlib.Tactic.CategoryTheory.RotateIsos.Lemmas (new file) 285

Declarations diff

+ CancelM
+ Cancelable
+ Functor.eq_comp_inv
+ Functor.eq_inv_comp
+ Functor.id_eq_comp_inv
+ Functor.id_eq_inv_comp
+ IsIso.eq_comp_inv
+ IsIso.eq_inv_comp
+ IsIso.id_eq_comp_inv
+ IsIso.id_eq_inv_comp
+ Iso.eq_comp_hom
+ Iso.eq_comp_inv
+ Iso.eq_hom_comp
+ Iso.eq_inv_comp
+ Iso.eq_symm_trans
+ Iso.eq_trans_symm
+ Iso.id_eq_comp_hom
+ Iso.id_eq_comp_inv
+ Iso.id_eq_hom_comp
+ Iso.id_eq_inv_comp
+ Iso.refl_eq_symm_trans
+ Iso.refl_eq_trans_symm
+ NatIso.hcomp.eq_symm_trans
+ NatIso.hcomp.eq_trans_symm
+ NatIso.hcomp.refl_eq_symm_trans
+ NatIso.hcomp.refl_eq_trans_symm
+ NatTrans.eq_comp_inv
+ NatTrans.eq_inv_comp
+ NatTrans.hcomp.eq_symm_trans
+ NatTrans.hcomp.eq_trans_symm
+ NatTrans.hcomp.refl_eq_symm_trans
+ NatTrans.hcomp.refl_eq_trans_symm
+ NatTrans.id_eq_comp_inv
+ NatTrans.id_eq_inv_comp
+ comp_assoc_rev
+ getCancelable?
+ insertCancelableFactory
+ insertCancelableFactory'
+ isoWhiskerLeft.eq_isoWhiskerLeft_symm_trans
+ isoWhiskerLeft.eq_trans_isoWhiskerLeft_symm
+ isoWhiskerLeft.refl_eq_isoWhiskerLeft_symm_trans
+ isoWhiskerLeft.refl_eq_trans_isoWhiskerLeft_symm
+ isoWhiskerRight.eq_isoWhiskerRight_symm_trans
+ isoWhiskerRight.eq_trans_isoWhiskerRight_symm
+ isoWhiskerRight.refl_eq_isoWhiskerRight_symm_trans
+ isoWhiskerRight.refl_eq_trans_isoWhiskerRight_symm
+ rotateIsosAtGoal
+ rotateIsosAtHyp
+ rotateIsosCore
+ rotateIsosCoreAux
+ rotateIsosCoreIff
+ rotateIsosForallTelescope
+ rotateIsosForallTelescopeIff
+ trans_assoc_rev
+ tryCancelFunctorMap
+ tryCancelIsIso
+ tryCancelIso
+ tryCancelIsoHom
+ tryCancelIsoInv
+ tryCancelIsoWhiskerLeft
+ tryCancelIsoWhiskerRight
+ tryCancelNatIsoHcomp
+ tryCancelNatTransApp
+ tryCancelNatTransHcomp
+ tryCancelWhiskerLeft
+ tryCancelWhiskerRight
+ whiskerLeft.eq_comp_whiskerLeft_inv
+ whiskerLeft.eq_whiskerLeft_inv_comp
+ whiskerLeft.id_eq_comp_whiskerLeft_inv
+ whiskerLeft.id_eq_whiskerLeft_inv_comp
+ whiskerRight.eq_comp_whiskerRight_inv
+ whiskerRight.eq_whiskerRight_inv_comp
+ whiskerRight.id_eq_comp_whiskerRight_inv
+ whiskerRight.id_eq_whiskerRight_inv_comp

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

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jun 12, 2025
@mathlib4-dependent-issues-bot
Copy link
Copy Markdown
Collaborator

This PR/issue depends on:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants