lean4-htt/tests
Leonardo de Moura 96e7ab078d
fix: performance issue when elaborating match-expressions with many literals (#9372)
This PR fixes a performance issue that occurs when generating equation
lemmas for functions that use match-expressions containing several
literals. This issue was exposed by #9322 and arises from a combination
of factors:

1. Literal values are compiled into a chain of dependent if-then-else
expressions.
2. Dependent if-then-else expressions are significantly more expensive
to simplify than regular ones.
3. The `split` tactic selects a target, splits it, and then invokes
`simp` on the resulting subgoals. Moreover, `simp` traverses the entire
goal bottom-up and does not stop after reaching the target.

This PR addresses the issue by introducing a custom simproc that avoids
recursively simplifying nested if-then-else expressions. It does **not**
alter the user-facing behavior of the `split` tactic because such a
change would be highly disruptive. Instead, the PR adds a new flag,
`backward.split` to control the behavior of the user-facing `split`
tactic. It is currently set to `true`, i.e., the old behavior is still
the default one. In a future PR, we should set this flag to `false` by
default and begin repairing all affected proofs.

closes #9322
2025-07-15 03:52:23 +00:00
..
bench perf: basic micro benchmarks for Std.Data.TreeMap (#9250) 2025-07-08 13:55:13 +00:00
compiler fix: avoid caching uses of never_extract constants in toLCNF (#8956) 2025-06-24 02:04:56 +00:00
elabissues
ir
lean fix: performance issue when elaborating match-expressions with many literals (#9372) 2025-07-15 03:52:23 +00:00
pkg feat: prettier expected type mismatch error message (#9099) 2025-07-01 07:50:53 +00:00
playground refactor: migrate all usages of old slice notation (#9000) 2025-06-27 18:52:07 +00:00
plugin
simpperf
.gitignore
common.sh
lakefile.toml
lean-toolchain