Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Simprocs #3124

Merged
merged 54 commits into from Jan 9, 2024
Merged

feat: add Simprocs #3124

merged 54 commits into from Jan 9, 2024

Conversation

leodemoura
Copy link
Member

@leodemoura leodemoura commented Dec 28, 2023

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Dec 29, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 30, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Dec 30, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 30, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 31, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 31, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 31, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 2, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 2, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 2, 2024
leodemoura added a commit to leanprover-community/batteries that referenced this pull request Jan 2, 2024
See leanprover/lean4#3124

Remark: toolchain for PR 3124 is still being built. I tested this PR with my only local lean4.
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 2, 2024
@@ -100,7 +100,7 @@ instance : ShiftLeft (Fin n) where
instance : ShiftRight (Fin n) where
shiftRight := Fin.shiftRight

instance : OfNat (Fin (no_index (n+1))) i where
instance ofNatInst : OfNat (Fin (no_index (n+1))) i where
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In mathlib, we have been using the convention of naming instances like this instOfNat as opposed to ofNatInst, which I believe is also consistent with the automatic naming rules. Is this departure from the convention an indication that the automatic naming rules are going to change soon?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to instOfNat.

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 3, 2024
@leodemoura
Copy link
Member Author

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 06f577f.
There were significant changes against commit 1145976:

  Benchmark                  Metric             Change
  ===============================================================
- import Lean                branches             1.9%   (51.8 σ)
- import Lean                instructions         1.9%   (54.4 σ)
- import Lean                maxrss               1.4%   (82.1 σ)
- lake startup               instructions         1.4%   (21.8 σ)
- libleanshared.so           binary size          2.1%
- reduceMatch                maxrss               1.3%   (76.0 σ)
- stdlib                     instructions         1.6%  (516.1 σ)
- stdlib size                bytes .olean         1.4%
- stdlib size                lines C              2.4%
- tests/bench/ interpreted   maxrss               1.2%   (91.8 σ)
- tests/compiler             sum binary sizes     2.0%
- workspaceSymbols           instructions         2.2% (2525.1 σ)
- workspaceSymbols           maxrss               1.4%   (83.3 σ)

@semorrison
Copy link
Collaborator

Added full-ci label so we get a toolchain for all OSes.

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 6, 2024
semorrison added a commit to leanprover-community/aesop that referenced this pull request Jan 7, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 8, 2024 22:18 Inactive
@leodemoura leodemoura added the will-merge-soon …unless someone speaks up label Jan 9, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 9, 2024 02:10 Inactive
@Kha Kha merged commit e924ef2 into master Jan 9, 2024
19 checks passed
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan builds-mathlib CI has verified that Mathlib builds against this PR and removed builds-mathlib CI has verified that Mathlib builds against this PR breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Jan 10, 2024
joehendrix pushed a commit to leanprover-community/batteries that referenced this pull request Jan 11, 2024
See leanprover/lean4#3124

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
semorrison added a commit to leanprover-community/aesop that referenced this pull request Jan 11, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan builds-mathlib CI has verified that Mathlib builds against this PR and removed builds-mathlib CI has verified that Mathlib builds against this PR breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Jan 11, 2024
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Jan 12, 2024
These are adaptations required for Leo's implementation of simprocs from leanprover/lean4#3124. 

This is a PR to `bump/v4.6.0`. Before it can be merged we need to merge 
- [x] leanprover-community/batteries#496
- [x] leanprover-community/aesop#93
and then to update the lakefile so both dependencies point at the `bump/v4.6.0` branches.

I've updated a number of Mathlib tactics to adjust to the new type signatures in the simplifier, and these changes need to be reviewed carefully.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
semorrison added a commit to leanprover-community/batteries that referenced this pull request Feb 1, 2024
* feat: hover info for `rcases h : ...` (#486)

* feat: hover info for `rcases h : ...`

* fix

* chore: adaptations for leanprover/lean4#3123 (#502)

* chore: adaptations for leanprover/lean4#3123

* update toolchain

* chore: remove unnecessary `have` (#516)

After leanprover/lean4#3132 the linter will complain about this.

* chore: simproc PR changes (#496)

See leanprover/lean4#3124

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

* chore: adaptions for nightly-2023-01-11 (#524)

* advance toolchain to nightly-2024-01-12, no updates required

* chore: updates to DiscrTree for changes in nightly (#536)

* doc: extend docstrings for `ext` and `ext1` (#525)

Makes sure to mention that the patterns are processed using `rintro`, and makes sure `ext` mentions `ext1`.

* docs(Data/List): typo (#529)

* feat: Eq.rec lemma (#385)

* chore: Add empty collection instance to BinomialHeap (#532)

* Incremental Library Search (#421)

This ports library_search from Mathlib to Std.  It preserves the ability to do caching, but is designed to support a cacheless mode.  The exact and apply tactics are named `std_exact?` and `std_apply?`, but will eventually be renamed.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

* fix termination_by clauses in LazyDiscrTree

fix LibrarySearch

* bump toolchain

---------

Co-authored-by: Kyle Miller <kmill31415@gmail.com>
Co-authored-by: Martin Dvořák <martin.dvorak@matfyz.cz>
Co-authored-by: François G. Dorais <fgdorais@gmail.com>
Co-authored-by: Joe Hendrix <joe@lean-fro.org>

* feat: adaptations for leanprover/lean4#3159 (#557)

* merge origin/main

* chore: fixes for `simp` refactor (#571)

* move to v4.6.0-rc1

* fix proofs

---------

Co-authored-by: Mario Carneiro <di.gama@gmail.com>
Co-authored-by: Leonardo de Moura <leonardo@microsoft.com>
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>
Co-authored-by: Kyle Miller <kmill31415@gmail.com>
Co-authored-by: Martin Dvořák <martin.dvorak@matfyz.cz>
Co-authored-by: François G. Dorais <fgdorais@gmail.com>
Co-authored-by: Joe Hendrix <joe@lean-fro.org>
joehendrix pushed a commit to leanprover-community/batteries that referenced this pull request Feb 5, 2024
See leanprover/lean4#3124

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
fgdorais added a commit to fgdorais/batteries that referenced this pull request Feb 18, 2024
)

* feat: hover info for `rcases h : ...` (leanprover-community#486)

* feat: hover info for `rcases h : ...`

* fix

* chore: adaptations for leanprover/lean4#3123 (leanprover-community#502)

* chore: adaptations for leanprover/lean4#3123

* update toolchain

* chore: remove unnecessary `have` (leanprover-community#516)

After leanprover/lean4#3132 the linter will complain about this.

* chore: simproc PR changes (leanprover-community#496)

See leanprover/lean4#3124

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

* chore: adaptions for nightly-2023-01-11 (leanprover-community#524)

* advance toolchain to nightly-2024-01-12, no updates required

* chore: updates to DiscrTree for changes in nightly (leanprover-community#536)

* doc: extend docstrings for `ext` and `ext1` (leanprover-community#525)

Makes sure to mention that the patterns are processed using `rintro`, and makes sure `ext` mentions `ext1`.

* docs(Data/List): typo (leanprover-community#529)

* feat: Eq.rec lemma (leanprover-community#385)

* chore: Add empty collection instance to BinomialHeap (leanprover-community#532)

* Incremental Library Search (leanprover-community#421)

This ports library_search from Mathlib to Std.  It preserves the ability to do caching, but is designed to support a cacheless mode.  The exact and apply tactics are named `std_exact?` and `std_apply?`, but will eventually be renamed.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

* fix termination_by clauses in LazyDiscrTree

fix LibrarySearch

* bump toolchain

---------

Co-authored-by: Kyle Miller <kmill31415@gmail.com>
Co-authored-by: Martin Dvořák <martin.dvorak@matfyz.cz>
Co-authored-by: François G. Dorais <fgdorais@gmail.com>
Co-authored-by: Joe Hendrix <joe@lean-fro.org>

* feat: adaptations for leanprover/lean4#3159 (leanprover-community#557)

* merge origin/main

* chore: fixes for `simp` refactor (leanprover-community#571)

* move to v4.6.0-rc1

* fix proofs

---------

Co-authored-by: Mario Carneiro <di.gama@gmail.com>
Co-authored-by: Leonardo de Moura <leonardo@microsoft.com>
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>
Co-authored-by: Kyle Miller <kmill31415@gmail.com>
Co-authored-by: Martin Dvořák <martin.dvorak@matfyz.cz>
Co-authored-by: François G. Dorais <fgdorais@gmail.com>
Co-authored-by: Joe Hendrix <joe@lean-fro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN will-merge-soon …unless someone speaks up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants