lean4-htt/src
Leonardo de Moura 18702bdd47
feat: add instantiateRevBetaS (#11814)
This PR implements `instantiateRevBetaS`, which is similar to
`instantiateRevS` but beta-reduces nested applications whose function
becomes a lambda after substitution.

For example, if `e` contains a subterm `#0 a` and we apply the
substitution `#0 := fun x => x + 1`, then `instantiateRevBetaS` produces
`a + 1` instead of `(fun x => x + 1) a`.

This is useful when applying theorems. For example, when applying
`Exists.intro`:
```lean
Exists.intro.{u} {α : Sort u} {p : α → Prop} (w : α) (h : p w) : Exists p
```
to a goal of the form `∃ x : Nat, p x ∧ q x`, we create metavariables
`?w` and `?h`. With `instantiateRevBetaS`, the type of `?h` becomes `p
?w ∧ q ?w` instead of `(fun x => p x ∧ q x) ?w`.
2025-12-28 03:28:15 +00:00
..
bin
cmake chore: fix spelling errors (#10042) 2025-08-22 07:23:12 +00:00
include/lean fix: avoid SIGFPE on x86_64 for signed integer division overflow (#11624) 2025-12-13 02:42:33 +00:00
Init feat: add TransparencyMode.none (#11810) 2025-12-27 03:10:17 +00:00
initialize feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
kernel perf: use lean::unordered_set for expr_eq_fn (#11731) 2025-12-18 14:24:50 +00:00
lake fix: add table variant for require.git field in lakefile.toml schema (#11536) 2025-12-16 10:47:33 +00:00
Lean feat: add instantiateRevBetaS (#11814) 2025-12-28 03:28:15 +00:00
library perf: do not consult isNoConfusion in whnf (#11571) 2025-12-09 23:36:46 +00:00
runtime fix: Signal.Handler segmentation fault with Selector (#11724) 2025-12-27 02:07:00 +00:00
shell chore: tests: use filenames as test names (#11302) 2025-11-21 12:40:58 +00:00
Std perf: tune the behavior of and flattening in bv_decide (#11781) 2025-12-23 13:08:31 +00:00
util refactor: port shell option processing to Lean (v2) (#11434) 2025-12-02 17:41:51 +00:00
cadical.mk fix: cadical distribution on Linux (#8201) 2025-05-02 18:25:16 +00:00
CMakeLists.txt chore: begin development cycle for v4.28.0 (#11667) 2025-12-14 12:42:12 +00:00
config.h.in perf: use mimalloc by default (#7710) 2025-03-30 22:40:41 +00:00
githash.h.in
Init.lean feat: port Batteries.WF for executable well-founded fixpoints (#11620) 2025-12-12 18:22:54 +00:00
lakefile.toml.in feat: module system is no longer experimental (#11637) 2025-12-12 21:20:26 +00:00
lean-toolchain
Lean.lean refactor: move error explanation text to the manual (#11688) 2025-12-26 17:14:58 +00:00
lean.mk.in chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
Leanc.lean fix: Unicode path support for Lean Windows executables (#10133) 2025-08-27 11:28:55 +00:00
out feat: ac normalization in grind (#10146) 2025-08-27 03:28:30 +00:00
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 chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
stdlib_flags.h chore: remove comment from wrong stdlib_flags.h (#11646) 2025-12-12 22:59:38 +00:00
version.h.in feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00