Skip to content

[Merged by Bors] - refactor: remove set_option in ZagierTwoSquares - #43434

Closed
Parcly-Taxel wants to merge 10 commits into
leanprover-community:masterfrom
Parcly-Taxel:zagier2
Closed

Parcly-Taxel wants to merge 10 commits into
leanprover-community:masterfrom
Parcly-Taxel:zagier2

Conversation

@Parcly-Taxel

Copy link
Copy Markdown
Collaborator

I refactor one of my very first non-porting contributions to mathlib by changing zagierSet to a structure Zagier.Triple and rewriting the whole proof to avoid set_options. This required changing the type of card_fixedPoints_modEq to accept just α → α rather than Function.End α.

No deprecations are added since this a leaf file in Archive.

@Parcly-Taxel Parcly-Taxel added t-number-theory Number theory (also use t-algebra or t-analysis to specialize) tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

PR summary 2b79298ce3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ Triple
+ card_fixedPoints_piecewise_eq_one
+ eq_of_piecewise_eq_self
+ instance : Fintype (Triple k)
+ involutive_piecewise
+ involutive_swap
+ piecewise
+ sq_add_sq_of_swap_eq_self
+ swap
+ x_mem_Icc_one_succ
+ x_ne_zero
+ y_mem_Icc_one_succ
+ y_ne_zero
+ z_mem_Icc_one_succ
+ z_ne_zero
- card_fixedPoints_eq_one
- complexInvo
- complexInvo_sq
- eq_of_mem_fixedPoints
- instance : Fintype (zagierSet k)
- obvInvo
- obvInvo_sq
- singletonFixedPoint
- sq_add_sq_of_nonempty_fixedPoints
- zagierSet
- zagierSet_lower_bound
- zagierSet_subset
- zagierSet_upper_bound

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

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


Decrease in strong tech debt: (relative, absolute) = (4.00, 0.00)
Current number Change Type (strong)
4141 -4 backward.isDefEq.respectTransparency
Decrease in weak tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (weak)
5139 -1 exposed public sections

Current commit 2b79298ce3
Reference commit 9515300991

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

@github-actions github-actions Bot added the t-group-theory Group theory label Sep 4, 2026
Comment thread Archive/ZagierTwoSquares.lean Resolved
@jcommelin jcommelin added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Sep 8, 2026
@Parcly-Taxel Parcly-Taxel removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Sep 8, 2026
@Parcly-Taxel Parcly-Taxel removed the RFC Request for comment label Sep 21, 2026
Comment thread Archive/ZagierTwoSquares.lean Resolved
Comment thread Archive/ZagierTwoSquares.lean Resolved
Comment thread Archive/ZagierTwoSquares.lean Resolved
Comment thread Archive/ZagierTwoSquares.lean Resolved
@jjdishere jjdishere added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 31, 2026
@Parcly-Taxel Parcly-Taxel removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 31, 2026
@jcommelin

Copy link
Copy Markdown
Member

Thanks 🎉

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Nov 4, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Nov 4, 2026
I refactor one of my very first non-porting contributions to mathlib by changing `zagierSet` to a structure `Zagier.Triple` and rewriting the whole proof to avoid `set_option`s. This required changing the type of `card_fixedPoints_modEq` to accept just `α → α` rather than `Function.End α`.

No deprecations are added since this a leaf file in Archive.

Co-authored-by: Parcly Taxel <[email protected]>
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Nov 4, 2026
@mathlib-bors

mathlib-bors Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title refactor: remove set_option in ZagierTwoSquares [Merged by Bors] - refactor: remove set_option in ZagierTwoSquares Nov 4, 2026
@mathlib-bors mathlib-bors Bot closed this Nov 4, 2026
@Parcly-Taxel
Parcly-Taxel deleted the zagier2 branch November 4, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-group-theory Group theory t-number-theory Number theory (also use t-algebra or t-analysis to specialize) tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants