lean4-htt/tests
Rob23oba 9b7a8eb7c8
perf: improve over-applied cases in ToLCNF (#12284)
This PR changes the handling of over-applied cases expressions in
`ToLCNF` to avoid generating function declarations that are called
immediately. For example, `ToLCNF` previously produced this:
```lean-4
set_option trace.Compiler.init true
/--
trace: [Compiler.init] size: 4
    def test x y : Bool :=
      fun _y.1 _y.2 : Bool :=
        cases x : Bool
        | PUnit.unit =>
          fun _f.3 a : Bool :=
            return a;
          let _x.4 := _f.3 _y.2;
          return _x.4;
      let _x.5 := _y.1 y;
      return _x.5
-/
#guard_msgs in
def test (x : Unit) (y : Bool) : Bool :=
  x.casesOn (fun a => a) y
```
which is now simplified to
```lean-4
set_option trace.Compiler.init true
/--
trace: [Compiler.init] size: 3
    def test x y : Bool :=
      cases x : Bool
      | PUnit.unit =>
        let a := y;
        return a
-/
#guard_msgs in
def test (x : Unit) (y : Bool) : Bool :=
  x.casesOn (fun a => a) y
```
This is especially relevant for #8309 because there `dite` is defined as
an over-applied `Bool.casesOn`.
2026-02-06 09:27:15 +00:00
..
bench test: add program evaluation benchmark to cbv (#12280) 2026-02-04 15:37:00 +00:00
bench-radar chore: fail benchmarks if lakeprof upload fails (#12313) 2026-02-04 15:53:33 +00:00
compiler
elabissues
ir
lake fix: lake: facet names in unknown facet errors (#12261) 2026-01-31 20:57:13 +00:00
lean perf: improve over-applied cases in ToLCNF (#12284) 2026-02-06 09:27:15 +00:00
pkg fix: [local simp] on privately imported theorem (#12287) 2026-02-03 12:57:23 +00:00
playground
plugin
simpperf
.gitignore
CMakeLists.txt chore: move test suite setup to tests/CMakeLists.txt (#12278) 2026-02-03 13:22:20 +00:00
common.sh
lakefile.toml
lean-toolchain