Skip to content

refactor: Lighten finiteness dependencies - #11633

Closed
YaelDillies wants to merge 1 commit into
masterfrom
lighter_finiteness
Closed

refactor: Lighten finiteness dependencies#11633
YaelDillies wants to merge 1 commit into
masterfrom
lighter_finiteness

Conversation

@YaelDillies

@YaelDillies YaelDillies commented Mar 24, 2024

Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies added the WIP Work in progress label Mar 24, 2024
@ghost ghost added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Mar 25, 2024
YaelDillies added a commit that referenced this pull request Mar 25, 2024
These two lemmas have been deprecated for more than a year and are on my way for #11633.
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Mar 25, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Mar 26, 2024
These two lemmas have been deprecated for more than a year and are on my way for #11633.
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Mar 26, 2024
Comment thread Mathlib.lean Outdated
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 28, 2024
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Mar 29, 2024
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) labels Apr 5, 2024
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Apr 24, 2024
@YaelDillies
YaelDillies force-pushed the lighter_finiteness branch from 42bcad9 to cfd3c8d Compare May 18, 2024 06:48
@ghost ghost removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) labels May 18, 2024
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels May 20, 2024
@YaelDillies
YaelDillies force-pushed the lighter_finiteness branch from 11629af to e1eceb5 Compare May 24, 2024 18:17
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels May 24, 2024
@YaelDillies
YaelDillies force-pushed the lighter_finiteness branch from e1eceb5 to 8eab5b1 Compare May 26, 2024 12:53
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels May 26, 2024
@YaelDillies
YaelDillies force-pushed the lighter_finiteness branch from 8eab5b1 to 12fed16 Compare May 27, 2024 09:34
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels May 27, 2024
@YaelDillies
YaelDillies force-pushed the lighter_finiteness branch from 12fed16 to ca1cd6d Compare May 28, 2024 09:22
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels May 28, 2024
@github-actions

github-actions Bot commented Jun 14, 2024

Copy link
Copy Markdown

PR summary 2e421d64e7

Import changes exceeding 2%

% File
+7.74% Mathlib.Computability.Primrec
+6.34% Mathlib.Data.Fintype.Card
+2.06% Mathlib.Data.Nat.Factorial.DoubleFactorial
+8.46% Mathlib.Dynamics.BirkhoffSum.Basic
+15.18% Mathlib.Logic.Denumerable
+3.26% Mathlib.Order.PartialSups
+3.31% Mathlib.Order.RelSeries
+2.99% Mathlib.Order.SupIndep
+22.36% Mathlib.Tactic.NormNum.BigOperators

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Tactic.NormNum.BigOperators 550 673 +123 (+22.36%)
Mathlib.Algebra.BigOperators.Intervals 674 557 -117 (-17.36%)
Mathlib.Logic.Denumerable 448 516 +68 (+15.18%)
Mathlib.Dynamics.BirkhoffSum.Basic 520 564 +44 (+8.46%)
Mathlib.Order.SuccPred.LinearLocallyFinite 567 520 -47 (-8.29%)
Mathlib.Computability.Primrec 530 571 +41 (+7.74%)
Mathlib.Data.Fintype.Card 426 453 +27 (+6.34%)
Mathlib.Order.RelSeries 513 530 +17 (+3.31%)
Mathlib.Order.PartialSups 491 507 +16 (+3.26%)
Mathlib.Order.SupIndep 469 483 +14 (+2.99%)
Mathlib.Data.Int.Interval 557 542 -15 (-2.69%)
Mathlib.Data.Nat.Factorial.DoubleFactorial 630 643 +13 (+2.06%)
Mathlib.Data.Finset.NatAntidiagonal 501 511 +10 (+2.00%)
Mathlib.Combinatorics.Young.YoungDiagram 501 510 +9 (+1.80%)
Mathlib.Analysis.Normed.Group.Basic 948 931 -17 (-1.79%)
Mathlib.Data.List.ToFinsupp 509 517 +8 (+1.57%)
Mathlib.Data.Multiset.Fintype 514 520 +6 (+1.17%)
Mathlib.Data.Holor 566 572 +6 (+1.06%)
Mathlib.Data.Nat.Factorial.BigOperators 656 662 +6 (+0.91%)
Mathlib.Combinatorics.Derangements.Finite 675 681 +6 (+0.89%)
Mathlib.Data.Sign 590 595 +5 (+0.85%)
Mathlib.Data.Rat.Denumerable 632 637 +5 (+0.79%)
Mathlib.RingTheory.Coprime.Lemmas 635 640 +5 (+0.79%)
Mathlib.GroupTheory.Perm.Sign 650 655 +5 (+0.77%)
Mathlib.Data.Matrix.Basic 806 800 -6 (-0.74%)
Mathlib.Topology.Algebra.InfiniteSum.NatInt 960 967 +7 (+0.73%)
Mathlib.Order.Interval.Finset.Basic 501 503 +2 (+0.40%)
Mathlib.Order.Interval.Finset.Nat 503 505 +2 (+0.40%)
Mathlib.Algebra.BigOperators.Fin 565 567 +2 (+0.35%)
Mathlib.Combinatorics.SetFamily.LYM 664 666 +2 (+0.30%)
Mathlib.Combinatorics.Enumerative.Catalan 709 711 +2 (+0.28%)
Mathlib.Data.Finset.Image 410 409 -1 (-0.24%)
Mathlib.Data.Finset.Card 411 410 -1 (-0.24%)
Mathlib.Data.Sym.Sym2 441 440 -1 (-0.23%)
Mathlib.Data.Finset.Lattice 443 442 -1 (-0.23%)
Mathlib.Data.Finset.Powerset 449 448 -1 (-0.22%)
Mathlib.Data.Set.Finite 488 487 -1 (-0.20%)
Mathlib.LinearAlgebra.Matrix.Transvection 978 980 +2 (+0.20%)
Mathlib.Order.Interval.Set.Infinite 489 488 -1 (-0.20%)
Mathlib.Algebra.BigOperators.Group.Finset 513 512 -1 (-0.19%)
Mathlib.Data.Fintype.BigOperators 517 516 -1 (-0.19%)
Mathlib.RingTheory.Prime 536 537 +1 (+0.19%)
Mathlib.Algebra.BigOperators.Ring 550 549 -1 (-0.18%)
Mathlib.Order.Category.NonemptyFinLinOrd 626 625 -1 (-0.16%)
Mathlib.Data.Finite.Card 727 728 +1 (+0.14%)
Mathlib.Algebra.Polynomial.Degree.TrailingDegree 864 863 -1 (-0.12%)
Mathlib.Topology.Algebra.Order.LiminfLimsup 906 905 -1 (-0.11%)
Mathlib.Algebra.MvPolynomial.Degrees 936 935 -1 (-0.11%)
Mathlib.AlgebraicTopology.AlternatingFaceMapComplex 978 979 +1 (+0.10%)
Mathlib.RingTheory.ChainOfDivisors 1065 1064 -1 (-0.09%)
Import changes for all files
Files Import difference
There are 3377 files with changed transitive imports taking up over 145670 characters: this is too many to display!
You can run scripts/import_trans_difference.sh all locally to see the whole output.

Declarations diff

+ List.toFinset_range
+ Multiset.sup_powersetCard
+ Multiset.toFinset_range
+ Nat.instInfinite
+ eventually_constant_prod
+ piFinsetUnion
+ prod_fin_eq_prod_range
+ prod_range_add
+ prod_range_add_div_prod_range
+ prod_range_one
+ prod_range_succ
+ prod_range_succ'
+ prod_range_succ_comm
+ prod_range_zero
+ sum_range_succ_mul_sum_range_succ
+ union
+ union_symm_inl
+ union_symm_inr
- Finset.prod_fin_eq_prod_range
- instance : Infinite ℕ
- ⟨_,

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.

@YaelDillies

Copy link
Copy Markdown
Contributor Author

The main goal of this PR, namely to rid basic Finset API of algebra imports, has been achieved. There are stil some interesting ideas in this PR that could be worth exploring in a new unrotted PR:

  • Delaying defining Finset.range/merge it with Finset.Iio.
  • Strategically relocating lemmas about Fin-indexed big operators

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

Labels

large-import Automatically added label for PRs with a significant increase in transitive imports merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants