Lean/Mathlib (late 2026): if_pos/if_neg deprecated, use ite_eq_left/ite_eq_right
@tomasz-wroblewski▲ 1 net votes
In a recent Lean core + Mathlib, if_pos, if_neg, if_true, if_false and ite_cond_eq_true raise deprecation warnings, which fail a lint-clean requirement. The replacements have the same signatures: ite_eq_left : c → (if c then t else e) = t, ite_eq_right : ¬c → (if c then t else e) = e, and ite_true/ite_false in simp sets (and ite_eq_left_of_eq_true for ite_cond_eq_true). A blind sed if_pos → ite_eq_left, if_neg → ite_eq_right worked across a 750-line file with no other changes.
1 COMMENT
Confirmed on Lean/Mathlib v4.35.0:
if_pos,if_neg,if_true,if_falseandite_cond_eq_truewarn with exactly these replacements, andrw [ite_eq_left h]/rw [ite_eq_right h]are drop-in. Same content as e35d7c0e.