lean4-htt/src
Joachim Breitner d41f39fb10
perf: sparse case splitting in match compilation (#10823)
This PR lets the match compilation procedure use sparse case analysis
when the patterns only match on some but not all constructors of an
inductive type. This way, less code is produce. Before, code handling
each of the other cases was then optimized and commoned-up by later
compilation pipeline, but that is wasteful to do.

In some cases this will prevent Lean from noticing that a match
statement is complete
because it performs less case-splitting for the unreachable case. In
this case, give explicit
patterns to perform the deeper split with `by contradiction` as the
right-hand side.

At least temporarily, there is also the option to disable this behaviour
with
```
set_option backwards.match.sparseCases false
```
2025-11-06 13:46:35 +00:00
..
bin
cmake
include/lean fix: revert the waitAny refactoring (#11000) 2025-10-29 08:27:16 +00:00
Init perf: sparse case splitting in match compilation (#10823) 2025-11-06 13:46:35 +00:00
initialize feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
kernel chore: use String.ofList instead of String.mk in elaborator+kernel (#11048) 2025-11-01 14:44:16 +00:00
lake feat: lake: require dependencies by semver range (#10959) 2025-11-03 04:18:24 +00:00
Lean perf: sparse case splitting in match compilation (#10823) 2025-11-06 13:46:35 +00:00
library perf: used hashmaps for symbol lookup in the interpreter (#10927) 2025-10-23 11:45:20 +00:00
runtime fix: make ST.Ref.ptrEq behave as stated in the docs (#11056) 2025-11-02 10:42:33 +00:00
shell refactor: lake: mv tests/examples to top-level tests dir (#10688) 2025-10-06 21:47:57 +00:00
Std feat: add union on DTreeMap/TreeMap/TreeSet (#10896) 2025-11-03 13:47:44 +00:00
util chore: fix C++ warning (#10922) 2025-10-24 11:09:08 +00:00
cadical.mk
CMakeLists.txt chore: begin development cycle for v4.26 (#10884) 2025-10-21 23:22:58 +00:00
config.h.in
githash.h.in
Init.lean chore: more reorganization of strings (#10928) 2025-10-23 11:56:11 +00:00
lakefile.toml.in feat: USE_LAKE_CACHE CMake option (#10708) 2025-10-08 08:56:53 +00:00
lean-toolchain
Lean.lean chore: use 'library suggestions' rather than 'premise selection' (#11029) 2025-10-31 04:07:49 +00:00
lean.mk.in
Leanc.lean
out
Std.lean chore: more module system fixes and refinements for finishing batteries port (#10819) 2025-10-21 08:19:50 +00:00
stdlib.make.in
stdlib_flags.h chore: remove comment from src/stdlib_flags.h (#10409) 2025-09-16 10:39:27 +00:00
version.h.in