Skip to content

Commit

Permalink
broken again
Browse files Browse the repository at this point in the history
  • Loading branch information
luisacicolini committed Oct 1, 2024
1 parent b720959 commit 909e522
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions SSA/Projects/InstCombine/ForLean.lean
Original file line number Diff line number Diff line change
Expand Up @@ -543,16 +543,6 @@ theorem shiftLeft_and_distrib' {x y : BitVec w} {n m : Nat} :
theorem zero_sub {x : BitVec w} : 0#w - x = - x := by
simp [bv_toNat]

@[simp]
theorem sub_sub_eq (a b c : Nat) : a - (b - (c)) = a - b + (c) := by
induction c generalizing a
case zero =>
simp
case succ n ih =>
rw [Nat.add_succ, Nat.sub_succ]
simp [ih, ← Nat.add_assoc]
sorry

@[simp] theorem getMsbD_sshiftRight {x : BitVec w} {i n : Nat}:
getMsbD (x.sshiftRight n) i = (!decide (w ≤ i) && if i < n then x.msb else getMsbD x (i - n)) := by
simp only [getMsbD]
Expand Down Expand Up @@ -582,6 +572,7 @@ theorem sub_sub_eq (a b c : Nat) : a - (b - (c)) = a - b + (c) := by
· rw [Nat.add_comm]
rw [Nat.sub_add_comm]
· rw [Nat.sub_add_comm]
· sorry
· omega
· omega
· omega
Expand Down Expand Up @@ -614,8 +605,7 @@ theorem sub_sub_eq (a b c : Nat) : a - (b - (c)) = a - b + (c) := by
· rw [← Nat.add_sub_assoc]
· rw [Nat.add_comm]
rw [Nat.sub_add_comm]
· rw [Nat.sub_add_comm]
· omega
· sorry
· omega
· omega
· omega
Expand Down

0 comments on commit 909e522

Please sign in to comment.