-
Notifications
You must be signed in to change notification settings - Fork 547
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: abstractNestedProofs in declaration types #7345
Conversation
This PR abstracts nested proofs in declaration types. This reduces the size of the goal, and subsequent tactics that massage the goal (in particular `match`) will have less work to do and produde smaller proof term. The size of the `olean` of `Vector.Extract` goes down from 20MB to 5MB with this.
Mathlib CI status (docs):
|
!bench |
Here are the benchmark results for commit 23511a3. |
!bench |
Here are the benchmark results for commit 911080a. Benchmark Metric Change
========================================================================
+ big_do maxrss -1.1% (-49.8 σ)
+ big_omega.lean branches -2.2% (-77.7 σ)
+ big_omega.lean instructions -2.2% (-109.4 σ)
+ big_omega.lean maxrss -2.0% (-149.9 σ)
+ big_omega.lean MT branches -2.8% (-100.8 σ)
+ big_omega.lean MT instructions -2.8% (-120.2 σ)
+ big_omega.lean MT maxrss -13.4% (-325.4 σ)
- bv_decide_inequality.lean task-clock 3.8% (28.4 σ)
- bv_decide_inequality.lean wall-clock 3.8% (28.6 σ)
+ bv_decide_realworld maxrss -1.2% (-24.9 σ)
- bv_decide_realworld task-clock 3.6% (16.1 σ)
- bv_decide_realworld wall-clock 1.9% (10.1 σ)
- ilean roundtrip parse 10.1% (28.6 σ)
+ lake config elab maxrss -1.1% (-17.7 σ)
+ lake config import maxrss -1.1% (-43.6 σ)
+ lake env maxrss -1.1% (-23.4 σ)
+ language server startup maxrss -1.6% (-13.1 σ)
- liasolver task-clock 10.9% (13.5 σ)
- liasolver wall-clock 10.9% (15.3 σ)
- parser task-clock 6.4% (12.0 σ)
- parser wall-clock 6.4% (12.0 σ)
- qsort task-clock 10.6% (22.5 σ)
- qsort wall-clock 10.6% (22.0 σ)
- rbmap_1 task-clock 5.2% (18.3 σ)
- rbmap_1 wall-clock 5.2% (18.7 σ)
- rbmap_10 task-clock 2.3% (15.6 σ)
- rbmap_10 wall-clock 2.3% (14.4 σ)
- rbmap_fbip task-clock 11.7% (12.5 σ)
- rbmap_fbip wall-clock 11.8% (12.9 σ)
+ stdlib dsimp -8.0% (-71.3 σ)
+ stdlib fix level params -15.2% (-168.7 σ)
+ stdlib instructions -4.8% (-1433.6 σ)
+ stdlib process pre-definitions -16.7% (-36.3 σ)
+ stdlib share common exprs -16.8% (-22.7 σ)
+ stdlib tactic execution -20.4% (-186.0 σ)
+ stdlib task-clock -4.0% (-29.7 σ)
+ stdlib type checking -12.7% (-147.6 σ)
+ stdlib size bytes .olean -4.6%
+ workspaceSymbols task-clock -6.5% (-18.2 σ)
+ workspaceSymbols wall-clock -6.5% (-18.2 σ) |
#5998 reaped the benefits in a much less invasive way. Dumping some breakage analysis here for future reference But stage2 doesn’t build. Somehow … This can be reproduced with
So abstracting over proofs in theorems makes them more applicable, which seems a good thing in general, but of course breaks things. Sigh. More breakage with abstracted proofs:
Without unfolding the abstracted proof we get
which is not surprising: With For reference:
Another breakage was already fixed in #7355 |
This PR abstracts nested proofs in declaration types. This reduces the size of the goal, and subsequent tactics that massage the goal (in particular
match
) will have less work to do and produde smaller proof term. The size of theolean
ofVector.Extract
goes down from 20MB to 5MB with this.