feat: do not export theorem bodies#8090
Conversation
|
Mathlib CI status (docs):
|
|
!bench |
|
Here are the benchmark results for commit 008d4c7. |
|
!bench |
|
Here are the benchmark results for commit 5a123dc. |
|
I imagine that changing theorems to axioms will cause quite a few problems -- an alternative I see that might be less intrusive is to replace the body with some dummy value like |
|
Also I guess this could get weird w.r.t. |
4feae53 to
dbf50e6
Compare
|
Thanks for thinking through this!
Do you have some specific concerns in mind? Current evidence suggests the opposite, the transitive uses of
Look forward to a follow-up PR introducing an environment extension for this. This was the only non-trivial thmInfo use case I found in core. |
|
Hmm I guess I can't really say much about where
One way that you could address these would definitely be to make |
|
@nomeata will work on the |
|
!bench |
|
Here are the benchmark results for commit 205d08d. Benchmark Metric Change
=============================================================================
+ Init size bytes .olean -55.1%
- Init size bytes .olean.private 283914.3%
- Init.Data.BitVec.Lemmas branch-misses 64.3% (268.9 σ)
- Init.Data.BitVec.Lemmas branches 12.8% (227.4 σ)
- Init.Data.BitVec.Lemmas instructions 14.4% (227.3 σ)
- Init.Data.BitVec.Lemmas maxrss 53.6% (23.0 σ)
- Init.Data.BitVec.Lemmas task-clock 87.9% (1561.4 σ)
+ Init.Data.BitVec.Lemmas wall-clock -25.7% (-506.0 σ)
+ Init.Data.List.Sublist async branches -4.5% (-38.4 σ)
+ Init.Data.List.Sublist async instructions -5.0% (-37.4 σ)
+ Init.Data.List.Sublist async task-clock -20.5% (-26.2 σ)
- Init.Data.List.Sublist async wall-clock 15.0% (12.9 σ)
+ bv_decide_large_aig.lean task-clock -5.6% (-19.5 σ)
+ bv_decide_large_aig.lean wall-clock -5.5% (-23.3 σ)
- identifier auto-completion branches 3.1% (905.5 σ)
- identifier auto-completion instructions 2.7% (1147.7 σ)
+ import Lean task-clock -3.8% (-24.0 σ)
+ import Lean wall-clock -3.7% (-31.6 σ)
+ parser task-clock -2.3% (-10.4 σ)
+ parser wall-clock -2.3% (-10.3 σ)
- qsort task-clock 2.3% (15.9 σ)
- qsort wall-clock 2.3% (15.8 σ)
- reduceMatch task-clock 1.9% (11.5 σ)
+ stdlib blocked -21.8% (-69.2 σ)
- stdlib dsimp 5.6% (279.7 σ)
- stdlib maxrss 9.9% (11.1 σ)
- stdlib process pre-definitions 7.0% (18.7 σ)
- stdlib tactic execution 13.0% (209.5 σ)
- stdlib task-clock 5.1% (108.9 σ)
- stdlib type checking 4.1% (65.5 σ)
+ stdlib size bytes .olean -9.8%
- stdlib size bytes .olean.private 283914.3% |
| -- For theorems, `isProp` has already been checked at declaration time | ||
| unless wasOriginallyTheorem (← getEnv) declName do |
There was a problem hiding this comment.
@leodemoura FYI - I'm assuming this was the intention of the check and that it is still helpful even if it requires an additional environment extension lookup. Also please let me know if you can think of a better name for the function!
4eed60d to
6702c30
Compare
#8090 accidentally affected `dsimp` applications even outside the module system, restore previous extension data.
This PR adjusts the experimental module system to elide theorem bodies (i.e. proofs) from being imported into other modules.