Skip to content

Commit

Permalink
fix(failing build): remove now-unneeded tactics after nonterminal simp (
Browse files Browse the repository at this point in the history
#1102)

Co-authored-by: Paul Reichert <[email protected]>
  • Loading branch information
datokrat and datokrat authored Jan 29, 2025
1 parent c00be7c commit 5db9111
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
23 changes: 0 additions & 23 deletions Batteries/Classes/Order.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,6 @@ Authors: Mario Carneiro
-/
import Batteries.Tactic.SeqFocus

/-! ## Ordering -/

namespace Ordering

@[simp] theorem swap_swap {o : Ordering} : o.swap.swap = o := by cases o <;> rfl

@[simp] theorem swap_inj {o₁ o₂ : Ordering} : o₁.swap = o₂.swap ↔ o₁ = o₂ :=
fun h => by simpa using congrArg swap h, congrArg _⟩

theorem swap_then (o₁ o₂ : Ordering) : (o₁.then o₂).swap = o₁.swap.then o₂.swap := by
cases o₁ <;> rfl

theorem then_eq_lt {o₁ o₂ : Ordering} : o₁.then o₂ = lt ↔ o₁ = lt ∨ o₁ = eq ∧ o₂ = lt := by
cases o₁ <;> cases o₂ <;> decide

theorem then_eq_eq {o₁ o₂ : Ordering} : o₁.then o₂ = eq ↔ o₁ = eq ∧ o₂ = eq := by
cases o₁ <;> simp [«then»]

theorem then_eq_gt {o₁ o₂ : Ordering} : o₁.then o₂ = gt ↔ o₁ = gt ∨ o₁ = eq ∧ o₂ = gt := by
cases o₁ <;> cases o₂ <;> decide

end Ordering

namespace Batteries

/-- `TotalBLE le` asserts that `le` has a total order, that is, `le a b ∨ le b a`. -/
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Data/RBMap/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ theorem size_eq {t : RBNode α} : t.size = t.toList.length := by
@[simp] theorem Any_reverse {t : RBNode α} : t.reverse.Any p ↔ t.Any p := by simp [Any_def]

@[simp] theorem memP_reverse {t : RBNode α} : MemP cut t.reverse ↔ MemP (cut · |>.swap) t := by
simp [MemP]; apply Iff.of_eq; congr; funext x; rw [← Ordering.swap_inj]; rfl
simp [MemP]

theorem Mem_reverse [@OrientedCmp α cmp] {t : RBNode α} :
Mem cmp x t.reverse ↔ Mem (flip cmp) x t := by
Expand Down

0 comments on commit 5db9111

Please sign in to comment.