lean4-htt/src
Joachim Breitner 445c8f2ee0
feat: FunInd: more equalities in context, more careful cleanup (#5364)
A round of clean-up for the context of the functional induction
principle cases.

* Already previously, with `match e with | p => …`, functional induction
would ensure that `h : e = p` is in scope, but it wouldn’t work in
dependent cases. Now it introduces heterogeneous equality where needed
(fixes #4146)
* These equalities are now added always (previously we omitted them when
the discriminant was a variable that occurred in the goal, on the
grounds that the goal gets refined through the match, but it’s more
consistent to introduce the equality in any case)
* We no longer use `MVarId.cleanup` to clean up the goal; it was
sometimes too aggressive (fixes #5347)
* Instead, we clean up more carefully and with a custom strategy:
* First, we substitute all variables without a user-accessible name, if
we can.
  * Then, we substitute all variable, if we can, outside in.
* As we do that, we look for `HEq`s that we can turn into `Eq`s to
substitute some more
  * We substitute unused `let`s.
  
**Breaking change**: In some cases leads to a different functional
induction principle (different names and order of assumptions, for
example).
2024-09-16 12:30:12 +00:00
..
bin
cmake chore: more libuv search patterns for the speedcenter (#5008) 2024-08-13 10:40:09 +02:00
include/lean chore: rename Array.data to Array.toList 2024-09-10 15:24:23 +10:00
Init feat: some BitVec GetElem lemmas (#5361) 2024-09-16 11:30:05 +00:00
initialize
kernel doc: code comments about reflection support (#5235) 2024-09-10 06:36:38 +00:00
lake chore: cleanup after export Bool.and/or/not/xor 2024-09-16 12:45:51 +10:00
Lean feat: FunInd: more equalities in context, more careful cleanup (#5364) 2024-09-16 12:30:12 +00:00
library chore: rename Array.data to Array.toList 2024-09-10 15:24:23 +10:00
runtime chore: rename Array.data to Array.toList 2024-09-10 15:24:23 +10:00
shell chore: avoid rebuilding leanmanifest in each build (#5057) 2024-08-15 14:55:36 +00:00
Std chore: cleanup after export Bool.and/or/not/xor 2024-09-16 12:45:51 +10:00
util fix: Windows needs more LEAN_EXPORTs 2024-08-12 14:14:42 +02:00
cadical.mk feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
CMakeLists.txt chore: restore Lake build 2024-09-10 15:24:23 +10:00
config.h.in
githash.h.in
Init.lean
lakefile.toml.in
lean-toolchain
Lean.lean
lean.mk.in fix: split libleanshared on Windows to avoid symbol limit 2024-08-12 14:14:42 +02:00
Leanc.lean
Std.lean chore: move Lean.Data.Parsec to Std.Internal.Parsec (#5115) 2024-08-21 15:26:17 +00:00
stdlib.make.in fix: do not link to Lake_shared with absolute path (#5286) 2024-09-09 11:11:00 +00:00
stdlib_flags.h
version.h.in