Conversation
PR summary ad86c4cc21Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (strong) |
|---|---|---|
| backward.privateInPublic | 408 | -122 |
| backward.privateInPublic.warn | 170 | -45 |
| adaptation notes | 397 | 2 |
Current commit ad86c4cc21
Reference commit 0a6c8e0355
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).
|
All uses of |
Could we do this separately, please? I would prefer to not have any metaprogramming in this PR. If someone wants to adjust the syntax, either by overriding in mathlib4, or adjusting in lean4 (I would merge!) then it's a simple matter to strip the then-unnecessary parentheses. |
37fb3b0 to
ad86c4c
Compare
This PR removes 171 uses of
backward.privateInPublicacross 37 files. Wherever a public declaration used a private lemma in a proof position, the proof is wrapped with core'sprivate_decl%elaborator, or with thefield := private proofstructure-instance syntax where the proof fills a structure field. Both elaborate the proof in a private context and hide it behind an auxiliary declaration, which is harmless by proof irrelevance. No declaration changes visibility and no statement changes, except that inCombinatorics/SetFamily/AhlswedeZhangtheFinset → Setcoercion inlowerClosure sis now written explicitly, sinceprivate_decl%elaborates eagerly and otherwise sees the coercion's pending metavariable.This follows the plan of #42755 by @thorimur and takes its non-elaborator changes verbatim: moving
variablecommands out ofpublic sectionin four files where almost every declaration is private (Galois/Decomposition, ChevalleyComplexity, GromovHausdorffRealized, NumberField/House; see leanprover/lean4#14708 and leanprover/lean4#14718), making the two lemmas used by thesz_positivitymacro public under internal names, and separating data from proof inbinomExpansionandarchimedeanClassOrderIso. The difference is that this PR uses the elaborator that already exists in core rather than theprivateterm elaborator proposed in #42563, so that it can land now. Once #42563 is in, everyprivate_decl% (…)here can be replaced mechanically byprivate …. The 13 files that only need the field syntax are in #44023 and are not touched here.🤖 Prepared with Claude Code