Skip to content

feat: add ground evaluation for And/Or in Sym.Simp#12660

Open
wkrozowski wants to merge 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/cbv_perf4
Open

feat: add ground evaluation for And/Or in Sym.Simp#12660
wkrozowski wants to merge 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/cbv_perf4

Conversation

@wkrozowski
Copy link
Contributor

@wkrozowski wkrozowski commented Feb 23, 2026

This PR adds evalPropAnd and evalPropOr to the Sym.Simp ground term evaluator, short-circuiting And and Or expressions when either operand is True or False. Specialized zero-argument Sym lemmas are used for the fully-ground cases (True ∧ False, etc.), while the standard true_and/false_or/etc. lemmas handle the mixed cases.

🤖 Generated with Claude Code

This PR adds `evalPropAnd` and `evalPropOr` to the ground term evaluator,
short-circuiting `And` and `Or` expressions when either operand is `True`
or `False`. Specialized `Sym` lemmas avoid reconstructing `Decidable`
instances, matching the existing pattern for `Not`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wkrozowski wkrozowski added the changelog-tactics User facing tactics label Feb 23, 2026
@wkrozowski
Copy link
Contributor Author

!bench

@leanprover-radar
Copy link

leanprover-radar commented Feb 23, 2026

Benchmark results for 3a909cd against 8ed6b30 are in! @wkrozowski

  • 🟥 build//instructions: +608.2M (+0.00%)

Large changes (1✅)

  • cbv tactic (evaluating Decidable.decide)//instructions: -40.0G (-45.98%)

Small changes (2🟥)

  • 🟥 build/module/Init.Sym.Lemmas//instructions: +39.2M (+2.05%)
  • 🟥 build/module/Lean.Meta.Sym.Simp.EvalGround//instructions: +1.2G (+5.05%) (reduced significance based on *//lines)

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Feb 23, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 8ed6b30084dfc1d2fe303dbc7a8d1c435dac6655 --onto e7e3588c973226e85d79ed0f3154cfca79b61c6f. You can force Mathlib CI using the force-mathlib-ci label. (2026-02-23 20:22:44)

@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 8ed6b30084dfc1d2fe303dbc7a8d1c435dac6655 --onto 8038a8b8904f89ad9542c8eda11379f8f006eab1. You can force reference manual CI using the force-manual-ci label. (2026-02-23 20:22:46)

@wkrozowski wkrozowski changed the title feat: add ground evaluation simprocs for propositional And/Or in cbv feat: add ground evaluation for And/Or in Sym.Simp Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-tactics User facing tactics toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants