diff --git a/library/data/int/basic.lean b/library/data/int/basic.lean index ee9651a15..1ac2bcf84 100644 --- a/library/data/int/basic.lean +++ b/library/data/int/basic.lean @@ -528,7 +528,7 @@ begin {rewrite add.comm4} end -protected theorem mul_right_distrib (a b c : ℤ) : (a + b) * c = a * c + b * c := +protected theorem right_distrib (a b c : ℤ) : (a + b) * c = a * c + b * c := eq_of_repr_equiv_repr (calc repr ((a + b) * c) = pmul (repr (a + b)) (repr c) : repr_mul @@ -538,10 +538,10 @@ eq_of_repr_equiv_repr ... = padd (repr (a * c)) (repr (b * c)) : repr_mul ... ≡ repr (a * c + b * c) : repr_add) -protected theorem mul_left_distrib (a b c : ℤ) : a * (b + c) = a * b + a * c := +protected theorem left_distrib (a b c : ℤ) : a * (b + c) = a * b + a * c := calc a * (b + c) = (b + c) * a : int.mul_comm - ... = b * a + c * a : int.mul_right_distrib + ... = b * a + c * a : int.right_distrib ... = a * b + c * a : int.mul_comm ... = a * b + a * c : int.mul_comm @@ -567,8 +567,8 @@ protected definition integral_domain [reducible] [trans_instance] : algebra.inte one := 1, one_mul := int.one_mul, mul_one := int.mul_one, - left_distrib := int.mul_left_distrib, - right_distrib := int.mul_right_distrib, + left_distrib := int.left_distrib, + right_distrib := int.right_distrib, mul_comm := int.mul_comm, zero_ne_one := int.zero_ne_one, eq_zero_or_eq_zero_of_mul_eq_zero := @int.eq_zero_or_eq_zero_of_mul_eq_zero⦄ diff --git a/library/data/int/div.lean b/library/data/int/div.lean index 6246ff994..32f6c9d17 100644 --- a/library/data/int/div.lean +++ b/library/data/int/div.lean @@ -406,7 +406,7 @@ calc a * b div (a * c) = a * (b div c * c + b mod c) div (a * c) : eq_div_mul_add_mod ... = (a * (b mod c) + a * c * (b div c)) div (a * c) : - by rewrite [!add.comm, int.mul_left_distrib, mul.comm _ c, -!mul.assoc] + by rewrite [!add.comm, int.left_distrib, mul.comm _ c, -!mul.assoc] ... = a * (b mod c) div (a * c) + b div c : !int.add_mul_div_self_left H3 ... = 0 + b div c : {!div_eq_zero_of_lt H5 H4} ... = b div c : zero_add diff --git a/tests/lean/interactive/findp.input.expected.out b/tests/lean/interactive/findp.input.expected.out index f8f4c4b86..00573eb46 100644 --- a/tests/lean/interactive/findp.input.expected.out +++ b/tests/lean/interactive/findp.input.expected.out @@ -9,7 +9,6 @@ false.rec_on|Π (C : Type), false → C false.cases_on|Π (C : Type), false → C false.induction_on|∀ (C : Prop), false → C true_ne_false|¬true = false -nat.lt_self_iff_false|∀ (n : ℕ), n < n ↔ false not_of_is_false|is_false ?c → ¬?c not_of_iff_false|(?a ↔ false) → ¬?a is_false|Π (c : Prop) [H : decidable c], Prop diff --git a/tests/lean/run/div2.lean b/tests/lean/run/div2.lean index f5c9005d0..703a58906 100644 --- a/tests/lean/run/div2.lean +++ b/tests/lean/run/div2.lean @@ -78,8 +78,8 @@ nat.case_strong_induction_on m take z, assume Hzx : measure z < measure x, calc - f' m z = restrict default measure f m z : IH m !le.refl z - ... = f z : !restrict_lt_eq (lt_of_lt_of_le Hzx (le_of_lt_succ H1)) + f' m z = restrict default measure f m z : IH m !nat.le_refl z + ... = f z : !restrict_lt_eq (nat.lt_of_lt_of_le Hzx (le_of_lt_succ H1)) ∎, have H2 : f' (succ m) x = rec_val x f, proof diff --git a/tests/lean/run/div_wf.lean b/tests/lean/run/div_wf.lean index 9c4f45ccc..154e5ad58 100644 --- a/tests/lean/run/div_wf.lean +++ b/tests/lean/run/div_wf.lean @@ -4,7 +4,7 @@ open nat well_founded decidable prod eq.ops -- Auxiliary lemma used to justify recursive call private definition lt_aux {x y : nat} (H : 0 < y ∧ y ≤ x) : x - y < x := and.rec_on H (λ ypos ylex, - sub_lt (lt_of_lt_of_le ypos ylex) ypos) + sub_lt (nat.lt_of_lt_of_le ypos ylex) ypos) definition wdiv.F (x : nat) (f : Π x₁, x₁ < x → nat → nat) (y : nat) : nat := if H : 0 < y ∧ y ≤ x then f (x - y) (lt_aux H) y + 1 else zero diff --git a/tests/lean/run/eq17.lean b/tests/lean/run/eq17.lean index c704120dc..1dd742a9f 100644 --- a/tests/lean/run/eq17.lean +++ b/tests/lean/run/eq17.lean @@ -1,5 +1,5 @@ open nat definition lt_of_succ : ∀ {a b : nat}, succ a < b → a < b -| lt_of_succ (lt.base (succ a)) := lt.trans (lt.base a) (lt.base (succ a)) +| lt_of_succ (lt.base (succ a)) := nat.lt_trans (lt.base a) (lt.base (succ a)) | lt_of_succ (lt.step h) := lt.step (lt_of_succ h) diff --git a/tests/lean/run/fib_wrec.lean b/tests/lean/run/fib_wrec.lean index dd6e6c78f..faebd4c84 100644 --- a/tests/lean/run/fib_wrec.lean +++ b/tests/lean/run/fib_wrec.lean @@ -8,7 +8,7 @@ nat.cases_on n (λ (f : Π (m : nat), m < (succ zero) → nat), succ zero) (λ (n₂ : nat) (f : Π (m : nat), m < (succ (succ n₂)) → nat), have l₁ : succ n₂ < succ (succ n₂), from lt.base (succ n₂), - have l₂ : n₂ < succ (succ n₂), from lt.trans (lt.base n₂) l₁, + have l₂ : n₂ < succ (succ n₂), from nat.lt_trans (lt.base n₂) l₁, f (succ n₂) l₁ + f n₂ l₂)) definition fib (n : nat) := diff --git a/tests/lean/run/nested_rec.lean b/tests/lean/run/nested_rec.lean index 950127fb4..a248e4fb8 100644 --- a/tests/lean/run/nested_rec.lean +++ b/tests/lean/run/nested_rec.lean @@ -5,13 +5,13 @@ open nat prod sigma -- g (succ x) := g (g x) definition g.F (x : nat) : (Π y, y < x → Σ r : nat, r ≤ y) → Σ r : nat, r ≤ x := nat.cases_on x - (λ f, ⟨zero, le.refl zero⟩) + (λ f, ⟨zero, nat.le_refl zero⟩) (λ x₁ (f : Π y, y < succ x₁ → Σ r : nat, r ≤ y), let p₁ := f x₁ (lt.base x₁) in let gx₁ := pr₁ p₁ in - let p₂ := f gx₁ (lt_of_le_of_lt (pr₂ p₁) (lt.base x₁)) in + let p₂ := f gx₁ (nat.lt_of_le_of_lt (pr₂ p₁) (lt.base x₁)) in let ggx₁ := pr₁ p₂ in - ⟨ggx₁, le_succ_of_le (le.trans (pr₂ p₂) (pr₂ p₁))⟩) + ⟨ggx₁, le_succ_of_le (nat.le_trans (pr₂ p₂) (pr₂ p₁))⟩) definition g (x : nat) : nat := pr₁ (well_founded.fix g.F x) diff --git a/tests/lean/run/rewriter6.lean b/tests/lean/run/rewriter6.lean index 75c3277d6..1490ff6d7 100644 --- a/tests/lean/run/rewriter6.lean +++ b/tests/lean/run/rewriter6.lean @@ -10,4 +10,4 @@ by rewrite ^sub -- unfold sub definition double (x : int) := x + x theorem double_zero (x : int) : double (0 + x) = (1 + 1)*x := -by rewrite [↑double, zero_add, mul.right_distrib, one_mul] +by rewrite [↑double, int.zero_add, int.right_distrib, int.one_mul] diff --git a/tests/lean/run/tree_height.lean b/tests/lean/run/tree_height.lean index 1a4976950..18f4be207 100644 --- a/tests/lean/run/tree_height.lean +++ b/tests/lean/run/tree_height.lean @@ -25,7 +25,7 @@ theorem height_lt.node_right {A : Type} (t₁ t₂ : tree A) : height_lt t₂ (n lt_succ_of_le (le_max_right (height t₁) (height t₂)) theorem height_lt.trans {A : Type} : transitive (@height_lt A) := -inv_image.trans lt height @lt.trans +inv_image.trans lt height @nat.lt_trans example : height_lt (leaf (2:nat)) (node (leaf 1) (leaf 2)) := !height_lt.node_right diff --git a/tests/lean/rw_set2.lean.expected.out b/tests/lean/rw_set2.lean.expected.out index 288702e14..4f688c884 100644 --- a/tests/lean/rw_set2.lean.expected.out +++ b/tests/lean/rw_set2.lean.expected.out @@ -7,7 +7,6 @@ simplification rules for iff #2, ?M_1 - ?M_2 < succ ?M_1 ↦ true #1, ?M_1 < 0 ↦ false #1, ?M_1 < succ ?M_1 ↦ true -#1, ?M_1 < ?M_1 ↦ false #1, 0 < succ ?M_1 ↦ true simplification rules for eq #1, g ?M_1 ↦ f ?M_1 + 1