Repository navigation
Conversation
…mplicit_reducible` Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Fy5GMt95bGddnqxoZmMK46
|
LLM-generated |
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to Zulip and join the Lean community. |
PR summary ad26728b5eImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (strong) |
|---|---|---|
| 1678 | -1 | backward.defeqAttrib.useBackward |
| 3464 | -1 | backward.isDefEq.respectTransparency |
Current commit ad26728b5e
Reference commit 98f3735536
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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
Mark the free functor
AddCommGrpCat.freeas@[implicit_reducible]and remove the two optionsset_option backward.defeqAttrib.useBackward true inandset_option backward.isDefEq.respectTransparency false infromAddCommGrpCat.adj.The two options work around two separate stricter checks, and both stumble on
freebeing an ordinarydef. Since leanprover/lean4#12179 (Lean v4.29),isDefEqcompares implicit arguments at a transparency that does not unfold ordinary definitions;backward.isDefEq.respectTransparency falserestores the old behaviour. Separately,dsimponly uses anrfllemma that holds at.implicittransparency (@[defeq]); lemmas that arerflonly at default transparency are tagged@[backward_defeq]and are used only underbackward.defeqAttrib.useBackward. Becausefree.obj αisof (FreeAddCommGroup α)only after unfoldingfree, thesimpslemmasfree_objandfree_mapare@[backward_defeq]but not@[defeq]. In the proof ofhomEquiv_naturality_left_symminadj,rw [← FreeAddCommGroup.lift_comp](afterdsimp [ConcreteCategory.homEquiv]) then finds no instance of its pattern if either option is removed. The.implicittransparency unfoldsimplicit_reducibledefinitions, so with the attributefree_objandfree_mapbecome@[defeq], the implicit arguments match, andadjneeds neither option. This is the same kind of change as #42161 and #44272.The attribute does not make any of the other
backward.*options in the files that import this one removable (therespectTransparencyanduseBackwardoptions inMathlib/CategoryTheory/Sites/MayerVietorisSquare.leanand therespectTransparencyoptions inMathlib/CategoryTheory/Sites/SheafCohomology/MayerVietoris.lean), including the two oninstance : Mono S.shortComplex.f, whose failing instance goal involvesAddCommGrpCat.free(through the definition ofshortComplex).I found this while looking at a
respectTransparencyworkaround in the Riemann Hypothesis formalization (https://github.com/leanprover-community/riemann-hypothesis), whereAddCommGrpCat.freeis one of the definitions involved.AI use: I used Claude Code (Anthropic's coding agent) to find the definition while investigating that workaround, make the change, build and test Mathlib with it, compare the declarations and heartbeat counts before and after, and draft this description, and a second AI model (Grok) to review it adversarially.
🤖 Generated with Claude Code