Skip to content

chore: bump reenableeta branch to current Lean4/mathlib4 master - #3780

Merged
gebner merged 426 commits into
reenableetafrom
reenableeta-230503
May 6, 2023
Merged

gebner merged 426 commits into
reenableetafrom
reenableeta-230503

Conversation

@kim-em

@kim-em kim-em commented May 3, 2023

Copy link
Copy Markdown
Contributor

🚫🤖🔍👀

I wanted to be able to try this out on current PRs, so updated everything. In particular this changes the lean-toolchain to point at a tag on my fork of the Lean4 repository.


Open in Gitpod

kim-em and others added 30 commits April 20, 2023 08:29
This fixes a regression of `@[simps]` to `@[simp]` from #2969, per [zulip](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/!4.232969.20simps.20bug.3F.20.28Monad.2EBasic.29).

There are a few incidental changes to `@[simps]` arguments in this PR, just removing arguments that had no effect on behaviour.



Co-authored-by: Scott Morrison <[email protected]>
This makes `linarith` print the goal (including hypotheses) when it fails, as many other tactics do.

This was motivated by watching the `sagredo` tactic trying to use `linarith`, but failing to see that it didn't quite have the correct hypotheses yet. Once it gave up on using `linarith`, it tried `contradiction`, which printed a more helpful error message (in which a human, although not quite GPT, could easily see the inequalities weren't quite right).



Co-authored-by: Scott Morrison <[email protected]>
Co-authored-by: Scott Morrison <[email protected]>
Co-authored-by: Jeremy Tan Jie Rui <[email protected]>
Those used to be necessary because of a linarith bug, which was fixed in
#2611



Co-authored-by: Moritz Firsching <[email protected]>
mac users should have this in their `.gitignore` file, but sometimes don't, as evidenced by #3511, which then unfortunately broke the port-status bot for a day!



Co-authored-by: Scott Morrison <[email protected]>
This PR also make `Prod.rec` computable.



Co-authored-by: Jeremy Tan Jie Rui <[email protected]>
Co-authored-by: Ruben Van de Velde <[email protected]>
Co-authored-by: Chris Hughes <[email protected]>
Co-authored-by: Scott Morrison <[email protected]>
Co-authored-by: Johan Commelin <[email protected]>
Co-authored-by: Jeremy Tan Jie Rui <[email protected]>
Co-authored-by: Parcly Taxel <[email protected]>
Co-authored-by: Jeremy Tan Jie Rui <[email protected]>
Co-authored-by: Parcly Taxel <[email protected]>
We had some unfortunate spaghetti code in `solve_by_elim`. When @hrmacbeth had requested additional features for `apply_rules`, the easiest way to provide them was to re-use `solve_by_elim`'s parsing and lemma handling. (See #856.) However `apply_rules` doesn't to backtracking, and `solve_by_elim` is all about it. At the time, `solve_by_elim` didn't have clean separation between its "lemma application" and "backtracking" considerations, so the solution was to add some hacks the prevented the backtracking from actually occurring, in the backtracking code...

Since #2920, those considerations have been cleanly separated out. Thus it's possible to greatly simplify how we don't backtrack when we don't want to (in `apply_rules`). This PR does that.



Co-authored-by: Scott Morrison <[email protected]>
Hide the unsafe inductive powering `ListM` behind a safe API using `implemented_by`.
Co-authored-by: Jeremy Tan Jie Rui <[email protected]>
Co-authored-by: Parcly Taxel <[email protected]>
@kim-em

kim-em commented May 3, 2023

Copy link
Copy Markdown
Contributor Author

This is failing on the issue discussed at the last porting meeting, and minimised at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Failure.20of.20TC.20search.20in.20.60simp.60.20with.20.60etaExperiment.60.2E

And worked around by allowing aesop to use Subsingleton.elim.

This should all be compiling again. I think the relevant diff to look at is not the one github shows for this PR, but instead master...reenableeta-230503

Ruben-VandeVelde and others added 27 commits May 3, 2023 12:09
One was missed; curiously it wasn't harmful in `master`, but when we turn on `etaExperiment` globally this causes a breakage 

Co-authored-by: Scott Morrison <[email protected]>
Co-authored-by: Moritz Firsching <[email protected]>
Co-authored-by: Scott Morrison <[email protected]>
Co-authored-by: Joël Riou <[email protected]>
Co-authored-by: Johan Commelin <[email protected]>
…nstantiateMVars` (#3758)

This PR factors out a `MetaM` version of the `rfl` tactic and adds a missing `whnfR` and `instantiateMVars` in front of the goal type. This means that a few `rw`s across mathlib4 now close the goal instead of e.g. requiring a trailing `exact le_rfl`.

Note: we do not use `whnfR` on the return type when adding the `refl` extension in the first place, as `forallMetaTelescopeReducing` already performs `whnf` (here, at reducible transparency).

See [zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/!4.233758.20.E2.80.93.20rfl.20refactor.20.26.20fix) for some discussion on the internal changes made.



Co-authored-by: Floris van Doorn <[email protected]>
Also fixes some spacing in their `syntax` commands, which impacts pretty printing.
Co-authored-by: Jeremy Tan Jie Rui <[email protected]>
Co-authored-by: Komyyy <[email protected]>
I forgot to update it in #3753.
* `data.mv_polynomial.basic`, `data.mv_polynomial.funext`: leanprover-community/mathlib3#18839
* `category_theory.limits.preserves.finite`, `category_theory.preadditive.projective`:  leanprover-community/mathlib3#18890
* `category_theory.abelian.basic`, `category_theory.abelian.opposite`:  leanprover-community/mathlib3#18740
* `topology.category.Top.limits.basic`: leanprover-community/mathlib3#18871. Note that this does not show a useful diff on the dashboard pages as file splits aren't tracked well by git.



Co-authored-by: Scott Morrison <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
@gebner
gebner merged commit fbcaecd into reenableeta May 6, 2023
@bors
bors Bot deleted the reenableeta-230503 branch May 6, 2023 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.