Skip to content

chore: simplify bif to if - #14588

Merged
TwoFX merged 4 commits into
leanprover:masterfrom
TwoFX:julia/cond
Jul 30, 2026
Merged

chore: simplify bif to if#14588
TwoFX merged 4 commits into
leanprover:masterfrom
TwoFX:julia/cond

Conversation

@TwoFX

@TwoFX TwoFX commented Jul 29, 2026

Copy link
Copy Markdown
Member

This PR turns cond_eq_ite into a simp lemma.

This means that users of cond now automatically benefit from the better lemma coverage of ite.

We also prefer if over bif in some definitions, establishing the pattern of using ite instead of cond unless there is a demonstrated benefit to using cond.

@TwoFX TwoFX added changelog-library Library downstream Request a downstream-lean4 adaptation PR. labels Jul 29, 2026
@downstream-lean4

downstream-lean4 Bot commented Jul 29, 2026

Copy link
Copy Markdown

The adaptation PR for this PR is leanprover/downstream-lean4#20.

@TwoFX

TwoFX commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

!radar

@leanprover-radar

leanprover-radar commented Jul 29, 2026

Copy link
Copy Markdown

Benchmark results for 44e5d21 against 0bfc3ac are in. No significant results found. @TwoFX

Warning

These warnings may indicate that the benchmark results are not directly comparable, for example due to changes in the runner configuration or hardware.

  • Bench repo commit hashes for run build differ between commits.
  • Bench repo commit hashes for run other differ between commits.
  • build//instructions: -118.5M (-0.00%)

Medium changes (1🟥)

  • 🟥 build/profile/grind dsimp//wall-clock: +3ms (+86.20%)

Small changes (1✅, 6🟥)

  • 🟥 build/module/Init.Data.Bool//instructions: +24.9M (+0.57%)
  • build/module/Init.Data.List.Erase//instructions: -34.1M (-0.48%)
  • 🟥 build/module/Lean.Meta.Tactic.BVDecide//instructions: +17.6M (+1.76%)
  • 🟥 build/module/Std.Data.Internal.List.Associative//instructions: +301.4M (+0.38%)
  • 🟥 build/module/Std.Tactic.BVDecide.Normalize.BitVec//instructions: +106.8M (+2.43%) (reduced significance based on absolute threshold)
  • 🟥 build/module/Std.Tactic.BVDecide.Normalize.Bool//instructions: +86.0M (+3.24%) (reduced significance based on absolute threshold)
  • 🟥 misc/import Std.Data.Internal.List.Associative//instructions: +322.2M (+0.49%)

@github-actions github-actions Bot added toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN labels Jul 29, 2026
@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Jul 29, 2026
@leanprover-bot

leanprover-bot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Jul 29, 2026
@mathlib-lean-pr-testing

Copy link
Copy Markdown

Mathlib CI status (docs):

@TwoFX
TwoFX marked this pull request as ready for review July 30, 2026 06:25
@TwoFX
TwoFX requested review from digama0 and kim-em as code owners July 30, 2026 06:25
@TwoFX
TwoFX enabled auto-merge July 30, 2026 06:25
@TwoFX
TwoFX added this pull request to the merge queue Jul 30, 2026
Merged via the queue into leanprover:master with commit 5fe7f24 Jul 30, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan builds-manual CI has verified that the Lean Language Reference builds against this PR changelog-library Library downstream Request a downstream-lean4 adaptation PR. mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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