lean4-htt/src/Lean/Meta/Constructions
Joachim Breitner af6d2077a0
refactor: use match compilation to generate splitter (#11220)
This PR changes how match splitters are generated: Rather than rewriting
the match statement, the match compilation pipeline is used again.


The benefits are:

* Re-doing the match compilation means we can do more intelligent book
keeping, e.g. prove overlap assumptions only once and re-use the proof,
or prune the context of the MVar to speed up `contradiction`. This may
have allowed a different solution than #11200.
 
* It would unblock #11105, as the existing splitter implementation would
have trouble dealing with the matchers produced that way.
 
* It provides the necessary machinery also for source-exposed “none of
the above” bindings, a feature that we probably want at some point (and
we mostly need to find good syntax for, see #3136, although maybe I
should open a dedicated RFC).

* It allows us to skip costly things during matcher creation that would
only be useful for the splitter, and thus allows performance
improvements like #11508.
 
 * We can drop the existing implementation.
 
It’s not entirely free:

* We have to run `simpH` twice, once for the match equations and once
for the splitter.
2025-12-04 15:03:13 +00:00
..
BRecOn.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
CasesOn.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
CasesOnSameCtor.lean refactor: use match compilation to generate splitter (#11220) 2025-12-04 15:03:13 +00:00
CtorElim.lean feat: sparse casesOn constructions (#11072) 2025-11-05 15:49:11 +00:00
CtorIdx.lean refactor: use withImplicitBinderInfos and mkArrowN in more places (#11492) 2025-12-03 08:42:16 +00:00
NoConfusion.lean feat: heterogeneous noConfusion (#11474) 2025-12-02 15:19:47 +00:00
RecOn.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
SparseCasesOn.lean perf: use Nat-based bitmask in sparse cases construction (#11200) 2025-11-17 10:05:18 +00:00