lean4-htt/tests/bench/sym
Leonardo de Moura 58e599f2f9
perf: optimize congruence proof construction in Sym.simp (#11974)
This PR optimizes congruence proof construction in `Sym.simp` by
avoiding
`inferType` calls on expressions that are less likely to be cached.
Instead of
inferring types of expressions like `@HAdd.hAdd Nat Nat Nat instAdd 5`,
we infer
the type of the function prefix `@HAdd.hAdd Nat Nat Nat instAdd` and
traverse
the forall telescope.

The key insight is that function prefixes are more likely shared across
many call sites
(e.g., all `Nat` additions use the same `@HAdd.hAdd Nat Nat Nat
instAdd`), so they
benefit from `inferType` caching. 

Benchmark results show improvements on workloads with shared function
prefixes:
- `many_rewrites_5000`: 48.8ms → 43.1ms (-12%)
- `term_tree_5000`: 53.4ms → 30.5ms (-43%)
2026-01-11 23:00:19 +00:00
..
meta_simp_1.lean chore: include free variables (#11894) 2026-01-04 18:51:18 +00:00
meta_simp_2.lean test: benchmarks for lambda-telescopes (#11929) 2026-01-08 00:20:03 +00:00
meta_simp_4.lean feat: simpForall and simpArrow in Sym.simp (#11950) 2026-01-09 06:20:04 +00:00
simp_1.lean perf: optimize congruence proof construction in Sym.simp (#11974) 2026-01-11 23:00:19 +00:00
simp_2.lean test: benchmarks for lambda-telescopes (#11929) 2026-01-08 00:20:03 +00:00
simp_3.lean perf: optimize kernel type-checking for have-telescope simplification in Sym.simp (#11967) 2026-01-11 02:20:47 +00:00
simp_4.lean test: implies vs Arrow Sym.simp benchmark (#11966) 2026-01-10 18:51:54 +00:00