Skip to content

Commit 2db7a25

Browse files
mhk119tobiasgrosser
authored andcommitted
extra stuff
1 parent 9b5ad73 commit 2db7a25

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

src/Init/Data/Int/DivModLemmas.lean

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -550,23 +550,6 @@ theorem emod_eq_of_lt {a b : Int} (H1 : 0 ≤ a) (H2 : a < b) : a % b = a :=
550550
match a, b, eq_ofNat_of_zero_le H1, eq_ofNat_of_zero_le b0 with
551551
| _, _, ⟨_, rfl⟩, ⟨_, rfl⟩ => congrArg ofNat <| Nat.mod_eq_of_lt (Int.ofNat_lt.1 H2)
552552

553-
-- #check Int.ediv_eq_zero_of_lt
554-
-- #eval (-3)/10
555-
-- #eval (-3)%10
556-
557-
-- theorem emod_eq_of_gt_lt {a b : Int} (H1 : -b < a) (H2 : a < b) : a % b = a := by
558-
-- rw [Int.emod_def]
559-
-- have : a/b = 0 := by
560-
-- simp [Int.ediv_]
561-
-- rw [natAbs_eq_zero] at this
562-
-- simp [this]
563-
564-
565-
566-
567-
-- match a, b, eq_ofNat_of_zero_le H1, eq_ofNat_of_zero_le b0 with
568-
-- | _, _, ⟨_, rfl⟩, ⟨_, rfl⟩ => congrArg ofNat <| Nat.mod_eq_of_lt (Int.ofNat_lt.1 H2)
569-
570553
@[simp] theorem emod_self_add_one {x : Int} (h : 0 ≤ x) : x % (x + 1) = x :=
571554
emod_eq_of_lt h (Int.lt_succ x)
572555

0 commit comments

Comments
 (0)