This PR replaces eager let-expression zeta-reduction in the sym-based mvcgen with on-demand unfolding that mirrors the production mvcgen's behavior. Previously, all let-expressions in the program head were immediately zeta-reduced. Now, let-expressions are hoisted to the top of the goal target, and the value is only inlined if it is duplicable (literals, fvars, consts, `OfNat.ofNat`). Complex values are introduced into the local context via `introsSimp`, preserving SymM's maximal sharing invariants, and unfolded on demand when the fvar later appears as the program head. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cases | ||
| lib | ||
| baseline_add_sub_cancel.lean | ||
| lakefile.lean | ||
| lean-toolchain | ||
| README.md | ||
| run_bench.sh | ||
| run_test.sh | ||
| test_vcgen.lean | ||
| vcgen_add_sub_cancel.lean | ||
| vcgen_add_sub_cancel_deep.lean | ||
| vcgen_add_sub_cancel_simp.lean | ||
| vcgen_get_throw_set.lean | ||
| vcgen_get_throw_set_grind.lean | ||
| vcgen_match_split.lean | ||
| vcgen_pure_precond.lean | ||
| vcgen_reader_state.lean | ||
Benchmarks for a Sym-based mvcgen
Compares the performance of a Sym-based rewrite of mvcgen with that of a direct, hard-coded solution procedure (the shallow_add_sub_cancel benchmark).
To run the benchmarks, launch lake build.
To run individual benchmarks, run lake lean vcgen_add_sub_cancel.lean (which runs the VCGen-based version) or lake lean baseline_add_sub_cancel.lean (which runs the baseline hard-coded solution procedure).