lean4-htt/tests/lean/445.lean.expected.out
Kyle Miller 68c006a95b
feat: transform nondependent lets into haves in declarations and equation lemmas (#8373)
This PR enables transforming nondependent `let`s into `have`s in a
number of contexts: the bodies of nonrecursive definitions, equation
lemmas, smart unfolding definitions, and types of theorems. A motivation
for this change is that when zeta reduction is disabled, `simp` can only
effectively rewrite `have` expressions (e.g. `split` uses `simp` with
zeta reduction disabled), and so we cache the nondependence calculations
by transforming `let`s to `have`s. The transformation can be disabled
using `set_option cleanup.letToHave false`.

Uses `Meta.letToHave`, introduced in #8954.
2025-06-29 19:45:45 +00:00

15 lines
195 B
Text

true
(match i with
| 0 => true
| n.succ => true) &&
f i
if i < 5 then 0 else 1
if i < 5 then 0 else g i j
i + 1
i + h i j
i + 1
i + i * 2
i + i * r i j
i + i * r i j
have z := s i j;
z + z