Skip to content

Commit

Permalink
chore: remove @[simp] from Bool.bne_assoc
Browse files Browse the repository at this point in the history
  • Loading branch information
semorrison committed Sep 19, 2024
1 parent 77cd700 commit 1cf5429
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Init/Data/Bool.lean
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ due to `beq_iff_eq`.

theorem not_bne_not : ∀ (x y : Bool), ((!x) != (!y)) = (x != y) := by simp

@[simp] theorem bne_assoc : ∀ (x y z : Bool), ((x != y) != z) = (x != (y != z)) := by decide
theorem bne_assoc : ∀ (x y z : Bool), ((x != y) != z) = (x != (y != z)) := by decide
instance : Std.Associative (· != ·) := ⟨bne_assoc⟩

@[simp] theorem bne_left_inj : ∀ {x y z : Bool}, (x != y) = (x != z) ↔ y = z := by decide
@[simp] theorem bne_right_inj : ∀ {x y z : Bool}, (x != z) = (y != z) ↔ x = y := by decide

theorem eq_not_of_ne : ∀ {x y : Bool}, x ≠ y → x = !y := by decide

/-! ### coercision related normal forms -/
/-! ### coercion related normal forms -/

theorem beq_eq_decide_eq [BEq α] [LawfulBEq α] [DecidableEq α] (a b : α) :
(a == b) = decide (a = b) := by
Expand Down
2 changes: 1 addition & 1 deletion src/Init/Data/Nat/Bitwise/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ protected theorem xor_comm (x y : Nat) : x ^^^ y = y ^^^ x := by

protected theorem xor_assoc (x y z : Nat) : (x ^^^ y) ^^^ z = x ^^^ (y ^^^ z) := by
apply Nat.eq_of_testBit_eq
simp
simp [Bool.bne_assoc]

instance : Std.Associative (α := Nat) (· ^^^ ·) where
assoc := Nat.xor_assoc
Expand Down
2 changes: 1 addition & 1 deletion tests/lean/bool_simp.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variable (u v w : Prop) [Decidable u] [Decidable v] [Decidable w]
#check_simp decide (u → False) ~> !decide u
#check_simp decide (¬u) ~> !decide u
#check_simp (b = true) ≠ (c = false) ~> b = c
#check_simp (b != c) != (false != d) ~> b != (c != d)
#check_simp (b != c) != (false != d) ~> (b != c) != d
#check_simp (b == false) ≠ (c != d) ~> b = (c != d)
#check_simp (b = true) ≠ (c = false) ~> b = c
#check_simp ¬b = !c ~> b = c
Expand Down

0 comments on commit 1cf5429

Please sign in to comment.