algebra.divisibility.basic
⟷
Mathlib.Algebra.Divisibility.Basic
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
A few convenience shortcuts for dvd
along with some simple nat
lemmas. Also
neg_dvd_of_dvd
/dvd_of_neg_dvd
/dvd_neg_of_dvd
/dvd_of_dvd_neg
in favor of the aforementioned shortcuts.dvd_neg
/neg_dvd
.int.of_nat_dvd_of_dvd_nat_abs
/int.dvd_nat_abs_of_of_nat_dvd
because they are the two directions of int.coe_nat_dvd_left
.group_with_zero.to_cancel_monoid_with_zero
from algebra.group_with_zero.units.basic
back to algebra.group_with_zero.basic
. It was erroneously moved during the Great Splits.@@ -91,7 +91,7 @@ end semigroup
section monoid
-variables [monoid α]
+variables [monoid α] {a b : α}
@[refl, simp] theorem dvd_refl (a : α) : a ∣ a := dvd.intro 1 (mul_one a)
theorem dvd_rfl : ∀ {a : α}, a ∣ a := dvd_refl
@@ -99,6 +99,10 @@ instance : is_refl α (∣) := ⟨dvd_refl⟩
theorem one_dvd (a : α) : 1 ∣ a := dvd.intro a (one_mul a)
+lemma dvd_of_eq (h : a = b) : a ∣ b := by rw h
+
+alias dvd_of_eq ← eq.dvd
+
end monoid
section comm_semigroup
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
-/
-import Algebra.Hom.Group
+import Algebra.Group.Hom.Defs
#align_import algebra.divisibility.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
@@ -251,7 +251,7 @@ theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c :=
#print pow_dvd_pow_of_dvd /-
theorem pow_dvd_pow_of_dvd {a b : α} (h : a ∣ b) : ∀ n : ℕ, a ^ n ∣ b ^ n
| 0 => by rw [pow_zero, pow_zero]
- | n + 1 => by rw [pow_succ, pow_succ]; exact mul_dvd_mul h (pow_dvd_pow_of_dvd n)
+ | n + 1 => by rw [pow_succ', pow_succ']; exact mul_dvd_mul h (pow_dvd_pow_of_dvd n)
#align pow_dvd_pow_of_dvd pow_dvd_pow_of_dvd
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -175,7 +175,7 @@ variable [CommSemigroup α] {a b c : α}
#print Dvd.intro_left /-
theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b :=
- Dvd.intro _ (by rw [mul_comm] at h ; apply h)
+ Dvd.intro _ (by rw [mul_comm] at h; apply h)
#align dvd.intro_left Dvd.intro_left
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
-/
-import Mathbin.Algebra.Hom.Group
+import Algebra.Hom.Group
#align_import algebra.divisibility.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -55,7 +55,7 @@ theorem Dvd.intro (c : α) (h : a * c = b) : a ∣ b :=
#align dvd.intro Dvd.intro
-/
-alias Dvd.intro ← dvd_of_mul_right_eq
+alias dvd_of_mul_right_eq := Dvd.intro
#align dvd_of_mul_right_eq dvd_of_mul_right_eq
#print exists_eq_mul_right_of_dvd /-
@@ -79,7 +79,7 @@ theorem dvd_trans : a ∣ b → b ∣ c → a ∣ c
#align dvd_trans dvd_trans
-/
-alias dvd_trans ← Dvd.Dvd.trans
+alias Dvd.Dvd.trans := dvd_trans
#align has_dvd.dvd.trans Dvd.Dvd.trans
instance : IsTrans α (· ∣ ·) :=
@@ -98,7 +98,7 @@ theorem dvd_mul_of_dvd_left (h : a ∣ b) (c : α) : a ∣ b * c :=
#align dvd_mul_of_dvd_left dvd_mul_of_dvd_left
-/
-alias dvd_mul_of_dvd_left ← Dvd.Dvd.hMul_right
+alias Dvd.Dvd.hMul_right := dvd_mul_of_dvd_left
#align has_dvd.dvd.mul_right Dvd.Dvd.hMul_right
#print dvd_of_mul_right_dvd /-
@@ -164,7 +164,7 @@ theorem dvd_of_eq (h : a = b) : a ∣ b := by rw [h]
#align dvd_of_eq dvd_of_eq
-/
-alias dvd_of_eq ← Eq.dvd
+alias Eq.dvd := dvd_of_eq
#align eq.dvd Eq.dvd
end Monoid
@@ -179,7 +179,7 @@ theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b :=
#align dvd.intro_left Dvd.intro_left
-/
-alias Dvd.intro_left ← dvd_of_mul_left_eq
+alias dvd_of_mul_left_eq := Dvd.intro_left
#align dvd_of_mul_left_eq dvd_of_mul_left_eq
#print exists_eq_mul_left_of_dvd /-
@@ -213,7 +213,7 @@ theorem dvd_mul_of_dvd_right (h : a ∣ b) (c : α) : a ∣ c * b := by rw [mul_
#align dvd_mul_of_dvd_right dvd_mul_of_dvd_right
-/
-alias dvd_mul_of_dvd_right ← Dvd.Dvd.hMul_left
+alias Dvd.Dvd.hMul_left := dvd_mul_of_dvd_right
#align has_dvd.dvd.mul_left Dvd.Dvd.hMul_left
attribute [local simp] mul_assoc mul_comm mul_left_comm
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -98,8 +98,8 @@ theorem dvd_mul_of_dvd_left (h : a ∣ b) (c : α) : a ∣ b * c :=
#align dvd_mul_of_dvd_left dvd_mul_of_dvd_left
-/
-alias dvd_mul_of_dvd_left ← Dvd.Dvd.mul_right
-#align has_dvd.dvd.mul_right Dvd.Dvd.mul_right
+alias dvd_mul_of_dvd_left ← Dvd.Dvd.hMul_right
+#align has_dvd.dvd.mul_right Dvd.Dvd.hMul_right
#print dvd_of_mul_right_dvd /-
theorem dvd_of_mul_right_dvd (h : a * b ∣ c) : a ∣ c :=
@@ -213,8 +213,8 @@ theorem dvd_mul_of_dvd_right (h : a ∣ b) (c : α) : a ∣ c * b := by rw [mul_
#align dvd_mul_of_dvd_right dvd_mul_of_dvd_right
-/
-alias dvd_mul_of_dvd_right ← Dvd.Dvd.mul_left
-#align has_dvd.dvd.mul_left Dvd.Dvd.mul_left
+alias dvd_mul_of_dvd_right ← Dvd.Dvd.hMul_left
+#align has_dvd.dvd.mul_left Dvd.Dvd.hMul_left
attribute [local simp] mul_assoc mul_comm mul_left_comm
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -3,14 +3,11 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
-
-! This file was ported from Lean 3 source module algebra.divisibility.basic
-! leanprover-community/mathlib commit e8638a0fcaf73e4500469f368ef9494e495099b3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Hom.Group
+#align_import algebra.divisibility.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
+
/-!
# Divisibility
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -50,22 +50,28 @@ instance (priority := 100) semigroupDvd : Dvd α :=
#align semigroup_has_dvd semigroupDvd
-/
+#print Dvd.intro /-
-- TODO: this used to not have `c` explicit, but that seems to be important
-- for use with tactics, similar to `exists.intro`
theorem Dvd.intro (c : α) (h : a * c = b) : a ∣ b :=
Exists.intro c h.symm
#align dvd.intro Dvd.intro
+-/
alias Dvd.intro ← dvd_of_mul_right_eq
#align dvd_of_mul_right_eq dvd_of_mul_right_eq
+#print exists_eq_mul_right_of_dvd /-
theorem exists_eq_mul_right_of_dvd (h : a ∣ b) : ∃ c, b = a * c :=
h
#align exists_eq_mul_right_of_dvd exists_eq_mul_right_of_dvd
+-/
+#print Dvd.elim /-
theorem Dvd.elim {P : Prop} {a b : α} (H₁ : a ∣ b) (H₂ : ∀ c, b = a * c → P) : P :=
Exists.elim H₁ H₂
#align dvd.elim Dvd.elim
+-/
attribute [local simp] mul_assoc mul_comm mul_left_comm
@@ -82,37 +88,49 @@ alias dvd_trans ← Dvd.Dvd.trans
instance : IsTrans α (· ∣ ·) :=
⟨fun a b c => dvd_trans⟩
+#print dvd_mul_right /-
@[simp]
theorem dvd_mul_right (a b : α) : a ∣ a * b :=
Dvd.intro b rfl
#align dvd_mul_right dvd_mul_right
+-/
+#print dvd_mul_of_dvd_left /-
theorem dvd_mul_of_dvd_left (h : a ∣ b) (c : α) : a ∣ b * c :=
h.trans (dvd_mul_right b c)
#align dvd_mul_of_dvd_left dvd_mul_of_dvd_left
+-/
alias dvd_mul_of_dvd_left ← Dvd.Dvd.mul_right
#align has_dvd.dvd.mul_right Dvd.Dvd.mul_right
+#print dvd_of_mul_right_dvd /-
theorem dvd_of_mul_right_dvd (h : a * b ∣ c) : a ∣ c :=
(dvd_mul_right a b).trans h
#align dvd_of_mul_right_dvd dvd_of_mul_right_dvd
+-/
section map_dvd
variable {M N : Type _} [Monoid M] [Monoid N]
+#print map_dvd /-
theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
#align map_dvd map_dvd
+-/
+#print MulHom.map_dvd /-
theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
#align mul_hom.map_dvd MulHom.map_dvd
+-/
+#print MonoidHom.map_dvd /-
theorem MonoidHom.map_dvd (f : M →* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
#align monoid_hom.map_dvd MonoidHom.map_dvd
+-/
end map_dvd
@@ -138,9 +156,11 @@ theorem dvd_rfl : ∀ {a : α}, a ∣ a :=
instance : IsRefl α (· ∣ ·) :=
⟨dvd_refl⟩
+#print one_dvd /-
theorem one_dvd (a : α) : 1 ∣ a :=
Dvd.intro a (one_mul a)
#align one_dvd one_dvd
+-/
#print dvd_of_eq /-
theorem dvd_of_eq (h : a = b) : a ∣ b := by rw [h]
@@ -156,46 +176,62 @@ section CommSemigroup
variable [CommSemigroup α] {a b c : α}
+#print Dvd.intro_left /-
theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b :=
Dvd.intro _ (by rw [mul_comm] at h ; apply h)
#align dvd.intro_left Dvd.intro_left
+-/
alias Dvd.intro_left ← dvd_of_mul_left_eq
#align dvd_of_mul_left_eq dvd_of_mul_left_eq
+#print exists_eq_mul_left_of_dvd /-
theorem exists_eq_mul_left_of_dvd (h : a ∣ b) : ∃ c, b = c * a :=
Dvd.elim h fun c => fun H1 : b = a * c => Exists.intro c (Eq.trans H1 (mul_comm a c))
#align exists_eq_mul_left_of_dvd exists_eq_mul_left_of_dvd
+-/
+#print dvd_iff_exists_eq_mul_left /-
theorem dvd_iff_exists_eq_mul_left : a ∣ b ↔ ∃ c, b = c * a :=
⟨exists_eq_mul_left_of_dvd, by rintro ⟨c, rfl⟩; exact ⟨c, mul_comm _ _⟩⟩
#align dvd_iff_exists_eq_mul_left dvd_iff_exists_eq_mul_left
+-/
+#print Dvd.elim_left /-
theorem Dvd.elim_left {P : Prop} (h₁ : a ∣ b) (h₂ : ∀ c, b = c * a → P) : P :=
Exists.elim (exists_eq_mul_left_of_dvd h₁) fun c => fun h₃ : b = c * a => h₂ c h₃
#align dvd.elim_left Dvd.elim_left
+-/
+#print dvd_mul_left /-
@[simp]
theorem dvd_mul_left (a b : α) : a ∣ b * a :=
Dvd.intro b (mul_comm a b)
#align dvd_mul_left dvd_mul_left
+-/
+#print dvd_mul_of_dvd_right /-
theorem dvd_mul_of_dvd_right (h : a ∣ b) (c : α) : a ∣ c * b := by rw [mul_comm];
exact h.mul_right _
#align dvd_mul_of_dvd_right dvd_mul_of_dvd_right
+-/
alias dvd_mul_of_dvd_right ← Dvd.Dvd.mul_left
#align has_dvd.dvd.mul_left Dvd.Dvd.mul_left
attribute [local simp] mul_assoc mul_comm mul_left_comm
+#print mul_dvd_mul /-
theorem mul_dvd_mul : ∀ {a b c d : α}, a ∣ b → c ∣ d → a * c ∣ b * d
| a, _, c, _, ⟨e, rfl⟩, ⟨f, rfl⟩ => ⟨e * f, by simp⟩
#align mul_dvd_mul mul_dvd_mul
+-/
+#print dvd_of_mul_left_dvd /-
theorem dvd_of_mul_left_dvd (h : a * b ∣ c) : b ∣ c :=
Dvd.elim h fun d ceq => Dvd.intro (a * d) (by simp [ceq])
#align dvd_of_mul_left_dvd dvd_of_mul_left_dvd
+-/
end CommSemigroup
@@ -203,13 +239,17 @@ section CommMonoid
variable [CommMonoid α] {a b : α}
+#print mul_dvd_mul_left /-
theorem mul_dvd_mul_left (a : α) {b c : α} (h : b ∣ c) : a * b ∣ a * c :=
mul_dvd_mul (dvd_refl a) h
#align mul_dvd_mul_left mul_dvd_mul_left
+-/
+#print mul_dvd_mul_right /-
theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c :=
mul_dvd_mul h (dvd_refl c)
#align mul_dvd_mul_right mul_dvd_mul_right
+-/
#print pow_dvd_pow_of_dvd /-
theorem pow_dvd_pow_of_dvd {a b : α} (h : a ∣ b) : ∀ n : ℕ, a ^ n ∣ b ^ n
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -157,7 +157,7 @@ section CommSemigroup
variable [CommSemigroup α] {a b c : α}
theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b :=
- Dvd.intro _ (by rw [mul_comm] at h; apply h)
+ Dvd.intro _ (by rw [mul_comm] at h ; apply h)
#align dvd.intro_left Dvd.intro_left
alias Dvd.intro_left ← dvd_of_mul_left_eq
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -50,43 +50,19 @@ instance (priority := 100) semigroupDvd : Dvd α :=
#align semigroup_has_dvd semigroupDvd
-/
-/- warning: dvd.intro -> Dvd.intro is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α _inst_1)) a c) b) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α _inst_1)) a c) b) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align dvd.intro Dvd.introₓ'. -/
-- TODO: this used to not have `c` explicit, but that seems to be important
-- for use with tactics, similar to `exists.intro`
theorem Dvd.intro (c : α) (h : a * c = b) : a ∣ b :=
Exists.intro c h.symm
#align dvd.intro Dvd.intro
-/- warning: dvd_of_mul_right_eq -> dvd_of_mul_right_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α _inst_1)) a c) b) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α _inst_1)) a c) b) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align dvd_of_mul_right_eq dvd_of_mul_right_eqₓ'. -/
alias Dvd.intro ← dvd_of_mul_right_eq
#align dvd_of_mul_right_eq dvd_of_mul_right_eq
-/- warning: exists_eq_mul_right_of_dvd -> exists_eq_mul_right_of_dvd is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b) -> (Exists.{succ u1} α (fun (c : α) => Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α _inst_1)) a c)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b) -> (Exists.{succ u1} α (fun (c : α) => Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α _inst_1)) a c)))
-Case conversion may be inaccurate. Consider using '#align exists_eq_mul_right_of_dvd exists_eq_mul_right_of_dvdₓ'. -/
theorem exists_eq_mul_right_of_dvd (h : a ∣ b) : ∃ c, b = a * c :=
h
#align exists_eq_mul_right_of_dvd exists_eq_mul_right_of_dvd
-/- warning: dvd.elim -> Dvd.elim is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {P : Prop} {a : α} {b : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b) -> (forall (c : α), (Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α _inst_1)) a c)) -> P) -> P
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {P : Prop} {a : α} {b : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b) -> (forall (c : α), (Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α _inst_1)) a c)) -> P) -> P
-Case conversion may be inaccurate. Consider using '#align dvd.elim Dvd.elimₓ'. -/
theorem Dvd.elim {P : Prop} {a b : α} (H₁ : a ∣ b) (H₂ : ∀ c, b = a * c → P) : P :=
Exists.elim H₁ H₂
#align dvd.elim Dvd.elim
@@ -106,23 +82,11 @@ alias dvd_trans ← Dvd.Dvd.trans
instance : IsTrans α (· ∣ ·) :=
⟨fun a b c => dvd_trans⟩
-/- warning: dvd_mul_right -> dvd_mul_right is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] (a : α) (b : α), Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] (a : α) (b : α), Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align dvd_mul_right dvd_mul_rightₓ'. -/
@[simp]
theorem dvd_mul_right (a b : α) : a ∣ a * b :=
Dvd.intro b rfl
#align dvd_mul_right dvd_mul_right
-/- warning: dvd_mul_of_dvd_left -> dvd_mul_of_dvd_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b) -> (forall (c : α), Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α _inst_1)) b c))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a b) -> (forall (c : α), Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α _inst_1)) b c))
-Case conversion may be inaccurate. Consider using '#align dvd_mul_of_dvd_left dvd_mul_of_dvd_leftₓ'. -/
theorem dvd_mul_of_dvd_left (h : a ∣ b) (c : α) : a ∣ b * c :=
h.trans (dvd_mul_right b c)
#align dvd_mul_of_dvd_left dvd_mul_of_dvd_left
@@ -130,12 +94,6 @@ theorem dvd_mul_of_dvd_left (h : a ∣ b) (c : α) : a ∣ b * c :=
alias dvd_mul_of_dvd_left ← Dvd.Dvd.mul_right
#align has_dvd.dvd.mul_right Dvd.Dvd.mul_right
-/- warning: dvd_of_mul_right_dvd -> dvd_of_mul_right_dvd is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α} {c : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α _inst_1)) a b) c) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Semigroup.{u1} α] {a : α} {b : α} {c : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α _inst_1)) a b) c) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align dvd_of_mul_right_dvd dvd_of_mul_right_dvdₓ'. -/
theorem dvd_of_mul_right_dvd (h : a * b ∣ c) : a ∣ c :=
(dvd_mul_right a b).trans h
#align dvd_of_mul_right_dvd dvd_of_mul_right_dvd
@@ -144,32 +102,14 @@ section map_dvd
variable {M N : Type _} [Monoid M] [Monoid N]
-/- warning: map_dvd -> map_dvd is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f a) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f b))
-but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) _inst_3)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f a) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f b))
-Case conversion may be inaccurate. Consider using '#align map_dvd map_dvdₓ'. -/
theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
#align map_dvd map_dvd
-/- warning: mul_hom.map_dvd -> MulHom.map_dvd is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f b))
-but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
-Case conversion may be inaccurate. Consider using '#align mul_hom.map_dvd MulHom.map_dvdₓ'. -/
theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
#align mul_hom.map_dvd MulHom.map_dvd
-/- warning: monoid_hom.map_dvd -> MonoidHom.map_dvd is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f b))
-but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
-Case conversion may be inaccurate. Consider using '#align monoid_hom.map_dvd MonoidHom.map_dvdₓ'. -/
theorem MonoidHom.map_dvd (f : M →* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
#align monoid_hom.map_dvd MonoidHom.map_dvd
@@ -198,12 +138,6 @@ theorem dvd_rfl : ∀ {a : α}, a ∣ a :=
instance : IsRefl α (· ∣ ·) :=
⟨dvd_refl⟩
-/- warning: one_dvd -> one_dvd is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Monoid.{u1} α] (a : α), Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α _inst_1)) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))))) a
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Monoid.{u1} α] (a : α), Dvd.dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α _inst_1)) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Monoid.toOne.{u1} α _inst_1))) a
-Case conversion may be inaccurate. Consider using '#align one_dvd one_dvdₓ'. -/
theorem one_dvd (a : α) : 1 ∣ a :=
Dvd.intro a (one_mul a)
#align one_dvd one_dvd
@@ -222,72 +156,30 @@ section CommSemigroup
variable [CommSemigroup α] {a b c : α}
-/- warning: dvd.intro_left -> Dvd.intro_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a) b) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a) b) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align dvd.intro_left Dvd.intro_leftₓ'. -/
theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b :=
Dvd.intro _ (by rw [mul_comm] at h; apply h)
#align dvd.intro_left Dvd.intro_left
-/- warning: dvd_of_mul_left_eq -> dvd_of_mul_left_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a) b) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} (c : α), (Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a) b) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align dvd_of_mul_left_eq dvd_of_mul_left_eqₓ'. -/
alias Dvd.intro_left ← dvd_of_mul_left_eq
#align dvd_of_mul_left_eq dvd_of_mul_left_eq
-/- warning: exists_eq_mul_left_of_dvd -> exists_eq_mul_left_of_dvd is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (Exists.{succ u1} α (fun (c : α) => Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (Exists.{succ u1} α (fun (c : α) => Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a)))
-Case conversion may be inaccurate. Consider using '#align exists_eq_mul_left_of_dvd exists_eq_mul_left_of_dvdₓ'. -/
theorem exists_eq_mul_left_of_dvd (h : a ∣ b) : ∃ c, b = c * a :=
Dvd.elim h fun c => fun H1 : b = a * c => Exists.intro c (Eq.trans H1 (mul_comm a c))
#align exists_eq_mul_left_of_dvd exists_eq_mul_left_of_dvd
-/- warning: dvd_iff_exists_eq_mul_left -> dvd_iff_exists_eq_mul_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α}, Iff (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) (Exists.{succ u1} α (fun (c : α) => Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α}, Iff (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) (Exists.{succ u1} α (fun (c : α) => Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a)))
-Case conversion may be inaccurate. Consider using '#align dvd_iff_exists_eq_mul_left dvd_iff_exists_eq_mul_leftₓ'. -/
theorem dvd_iff_exists_eq_mul_left : a ∣ b ↔ ∃ c, b = c * a :=
⟨exists_eq_mul_left_of_dvd, by rintro ⟨c, rfl⟩; exact ⟨c, mul_comm _ _⟩⟩
#align dvd_iff_exists_eq_mul_left dvd_iff_exists_eq_mul_left
-/- warning: dvd.elim_left -> Dvd.elim_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} {P : Prop}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (forall (c : α), (Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a)) -> P) -> P
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} {P : Prop}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (forall (c : α), (Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a)) -> P) -> P
-Case conversion may be inaccurate. Consider using '#align dvd.elim_left Dvd.elim_leftₓ'. -/
theorem Dvd.elim_left {P : Prop} (h₁ : a ∣ b) (h₂ : ∀ c, b = c * a → P) : P :=
Exists.elim (exists_eq_mul_left_of_dvd h₁) fun c => fun h₃ : b = c * a => h₂ c h₃
#align dvd.elim_left Dvd.elim_left
-/- warning: dvd_mul_left -> dvd_mul_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] (a : α) (b : α), Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] (a : α) (b : α), Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) b a)
-Case conversion may be inaccurate. Consider using '#align dvd_mul_left dvd_mul_leftₓ'. -/
@[simp]
theorem dvd_mul_left (a b : α) : a ∣ b * a :=
Dvd.intro b (mul_comm a b)
#align dvd_mul_left dvd_mul_left
-/- warning: dvd_mul_of_dvd_right -> dvd_mul_of_dvd_right is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (forall (c : α), Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (forall (c : α), Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c b))
-Case conversion may be inaccurate. Consider using '#align dvd_mul_of_dvd_right dvd_mul_of_dvd_rightₓ'. -/
theorem dvd_mul_of_dvd_right (h : a ∣ b) (c : α) : a ∣ c * b := by rw [mul_comm];
exact h.mul_right _
#align dvd_mul_of_dvd_right dvd_mul_of_dvd_right
@@ -297,22 +189,10 @@ alias dvd_mul_of_dvd_right ← Dvd.Dvd.mul_left
attribute [local simp] mul_assoc mul_comm mul_left_comm
-/- warning: mul_dvd_mul -> mul_dvd_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} {c : α} {d : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) c d) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) a c) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) b d))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} {c : α} {d : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) c d) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) a c) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) b d))
-Case conversion may be inaccurate. Consider using '#align mul_dvd_mul mul_dvd_mulₓ'. -/
theorem mul_dvd_mul : ∀ {a b c d : α}, a ∣ b → c ∣ d → a * c ∣ b * d
| a, _, c, _, ⟨e, rfl⟩, ⟨f, rfl⟩ => ⟨e * f, by simp⟩
#align mul_dvd_mul mul_dvd_mul
-/- warning: dvd_of_mul_left_dvd -> dvd_of_mul_left_dvd is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} {c : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toHasMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) a b) c) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) b c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α} {c : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) a b) c) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) b c)
-Case conversion may be inaccurate. Consider using '#align dvd_of_mul_left_dvd dvd_of_mul_left_dvdₓ'. -/
theorem dvd_of_mul_left_dvd (h : a * b ∣ c) : b ∣ c :=
Dvd.elim h fun d ceq => Dvd.intro (a * d) (by simp [ceq])
#align dvd_of_mul_left_dvd dvd_of_mul_left_dvd
@@ -323,22 +203,10 @@ section CommMonoid
variable [CommMonoid α] {a b : α}
-/- warning: mul_dvd_mul_left -> mul_dvd_mul_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (a : α) {b : α} {c : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) b c) -> (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) a b) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) a c))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (a : α) {b : α} {c : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) b c) -> (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) a b) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) a c))
-Case conversion may be inaccurate. Consider using '#align mul_dvd_mul_left mul_dvd_mul_leftₓ'. -/
theorem mul_dvd_mul_left (a : α) {b c : α} (h : b ∣ c) : a * b ∣ a * c :=
mul_dvd_mul (dvd_refl a) h
#align mul_dvd_mul_left mul_dvd_mul_left
-/- warning: mul_dvd_mul_right -> mul_dvd_mul_right is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] {a : α} {b : α}, (Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) a b) -> (forall (c : α), Dvd.Dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) a c) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) b c))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] {a : α} {b : α}, (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) a b) -> (forall (c : α), Dvd.dvd.{u1} α (semigroupDvd.{u1} α (Monoid.toSemigroup.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) a c) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) b c))
-Case conversion may be inaccurate. Consider using '#align mul_dvd_mul_right mul_dvd_mul_rightₓ'. -/
theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c :=
mul_dvd_mul h (dvd_refl c)
#align mul_dvd_mul_right mul_dvd_mul_right
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -258,9 +258,7 @@ but is expected to have type
forall {α : Type.{u1}} [_inst_1 : CommSemigroup.{u1} α] {a : α} {b : α}, Iff (Dvd.dvd.{u1} α (semigroupDvd.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1)) a b) (Exists.{succ u1} α (fun (c : α) => Eq.{succ u1} α b (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Semigroup.toMul.{u1} α (CommSemigroup.toSemigroup.{u1} α _inst_1))) c a)))
Case conversion may be inaccurate. Consider using '#align dvd_iff_exists_eq_mul_left dvd_iff_exists_eq_mul_leftₓ'. -/
theorem dvd_iff_exists_eq_mul_left : a ∣ b ↔ ∃ c, b = c * a :=
- ⟨exists_eq_mul_left_of_dvd, by
- rintro ⟨c, rfl⟩
- exact ⟨c, mul_comm _ _⟩⟩
+ ⟨exists_eq_mul_left_of_dvd, by rintro ⟨c, rfl⟩; exact ⟨c, mul_comm _ _⟩⟩
#align dvd_iff_exists_eq_mul_left dvd_iff_exists_eq_mul_left
/- warning: dvd.elim_left -> Dvd.elim_left is a dubious translation:
@@ -348,9 +346,7 @@ theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c :=
#print pow_dvd_pow_of_dvd /-
theorem pow_dvd_pow_of_dvd {a b : α} (h : a ∣ b) : ∀ n : ℕ, a ^ n ∣ b ^ n
| 0 => by rw [pow_zero, pow_zero]
- | n + 1 => by
- rw [pow_succ, pow_succ]
- exact mul_dvd_mul h (pow_dvd_pow_of_dvd n)
+ | n + 1 => by rw [pow_succ, pow_succ]; exact mul_dvd_mul h (pow_dvd_pow_of_dvd n)
#align pow_dvd_pow_of_dvd pow_dvd_pow_of_dvd
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -148,7 +148,7 @@ variable {M N : Type _} [Monoid M] [Monoid N]
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f a) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) _inst_3)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f a) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) _inst_3)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f a) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f b))
Case conversion may be inaccurate. Consider using '#align map_dvd map_dvdₓ'. -/
theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
@@ -158,7 +158,7 @@ theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
Case conversion may be inaccurate. Consider using '#align mul_hom.map_dvd MulHom.map_dvdₓ'. -/
theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
@@ -168,7 +168,7 @@ theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
Case conversion may be inaccurate. Consider using '#align monoid_hom.map_dvd MonoidHom.map_dvdₓ'. -/
theorem MonoidHom.map_dvd (f : M →* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
mathlib commit https://github.com/leanprover-community/mathlib/commit/c9236f47f5b9df573443aa499c0d3968769628b7
@@ -208,8 +208,10 @@ theorem one_dvd (a : α) : 1 ∣ a :=
Dvd.intro a (one_mul a)
#align one_dvd one_dvd
+#print dvd_of_eq /-
theorem dvd_of_eq (h : a = b) : a ∣ b := by rw [h]
#align dvd_of_eq dvd_of_eq
+-/
alias dvd_of_eq ← Eq.dvd
#align eq.dvd Eq.dvd
mathlib commit https://github.com/leanprover-community/mathlib/commit/06a655b5fcfbda03502f9158bbf6c0f1400886f9
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston,
Neil Strickland, Aaron Anderson
! This file was ported from Lean 3 source module algebra.divisibility.basic
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
+! leanprover-community/mathlib commit e8638a0fcaf73e4500469f368ef9494e495099b3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -180,7 +180,7 @@ end Semigroup
section Monoid
-variable [Monoid α]
+variable [Monoid α] {a b : α}
#print dvd_refl /-
@[refl, simp]
@@ -208,6 +208,12 @@ theorem one_dvd (a : α) : 1 ∣ a :=
Dvd.intro a (one_mul a)
#align one_dvd one_dvd
+theorem dvd_of_eq (h : a = b) : a ∣ b := by rw [h]
+#align dvd_of_eq dvd_of_eq
+
+alias dvd_of_eq ← Eq.dvd
+#align eq.dvd Eq.dvd
+
end Monoid
section CommSemigroup
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -148,7 +148,7 @@ variable {M N : Type _} [Monoid M] [Monoid N]
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f a) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) _inst_3)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f a) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) _inst_3)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f a) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f b))
Case conversion may be inaccurate. Consider using '#align map_dvd map_dvdₓ'. -/
theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
@@ -158,7 +158,7 @@ theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
Case conversion may be inaccurate. Consider using '#align mul_hom.map_dvd MulHom.map_dvdₓ'. -/
theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
@@ -168,7 +168,7 @@ theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
Case conversion may be inaccurate. Consider using '#align monoid_hom.map_dvd MonoidHom.map_dvdₓ'. -/
theorem MonoidHom.map_dvd (f : M →* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
mathlib commit https://github.com/leanprover-community/mathlib/commit/38f16f960f5006c6c0c2bac7b0aba5273188f4e5
@@ -148,7 +148,7 @@ variable {M N : Type _} [Monoid M] [Monoid N]
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f a) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => N) (MulHomClass.toFunLike.{u3, u1, u2} F M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3)) _inst_4)) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) _inst_3)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f a) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] {F : Type.{u3}} [_inst_4 : MulHomClass.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))] (f : F) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) _inst_3)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f a) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) _inst_4) f b))
Case conversion may be inaccurate. Consider using '#align map_dvd map_dvdₓ'. -/
theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
@@ -158,7 +158,7 @@ theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) (fun (_x : MulHom.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) => M -> N) (MulHom.hasCoeToFun.{u1, u2} M N (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_2)) (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_3))) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MulHom.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3))) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MulHom.mulHomClass.{u2, u1} M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
Case conversion may be inaccurate. Consider using '#align mul_hom.map_dvd MulHom.map_dvdₓ'. -/
theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
@@ -168,7 +168,7 @@ theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
lean 3 declaration is
forall {M : Type.{u1}} {N : Type.{u2}} [_inst_2 : Monoid.{u1} M] [_inst_3 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) {a : M} {b : M}, (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M _inst_2)) a b) -> (Dvd.Dvd.{u2} N (semigroupDvd.{u2} N (Monoid.toSemigroup.{u2} N _inst_3)) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f a) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) (fun (_x : MonoidHom.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) => M -> N) (MonoidHom.hasCoeToFun.{u1, u2} M N (Monoid.toMulOneClass.{u1} M _inst_2) (Monoid.toMulOneClass.{u2} N _inst_3)) f b))
but is expected to have type
- forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
+ forall {M : Type.{u2}} {N : Type.{u1}} [_inst_2 : Monoid.{u2} M] [_inst_3 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) {a : M} {b : M}, (Dvd.dvd.{u2} M (semigroupDvd.{u2} M (Monoid.toSemigroup.{u2} M _inst_2)) a b) -> (Dvd.dvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (semigroupDvd.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) (Monoid.toSemigroup.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) a) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f a) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_2)) (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_3)) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)) M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3) (MonoidHom.monoidHomClass.{u2, u1} M N (Monoid.toMulOneClass.{u2} M _inst_2) (Monoid.toMulOneClass.{u1} N _inst_3)))) f b))
Case conversion may be inaccurate. Consider using '#align monoid_hom.map_dvd MonoidHom.map_dvdₓ'. -/
theorem MonoidHom.map_dvd (f : M →* N) {a b} : a ∣ b → f a ∣ f b :=
map_dvd f
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : ∀ (n : ℕ) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -159,7 +159,7 @@ lemma pow_dvd_pow (a : α) (h : m ≤ n) : a ^ m ∣ a ^ n :=
lemma dvd_pow (hab : a ∣ b) : ∀ {n : ℕ} (_ : n ≠ 0), a ∣ b ^ n
| 0, hn => (hn rfl).elim
- | n + 1, _ => by rw [pow_succ]; exact hab.mul_right _
+ | n + 1, _ => by rw [pow_succ']; exact hab.mul_right _
#align dvd_pow dvd_pow
alias Dvd.dvd.pow := dvd_pow
@@ -242,7 +242,7 @@ theorem pow_dvd_pow_of_dvd (h : a ∣ b) : ∀ n : ℕ, a ^ n ∣ b ^ n
| 0 => by rw [pow_zero, pow_zero]
| n + 1 => by
rw [pow_succ, pow_succ]
- exact mul_dvd_mul h (pow_dvd_pow_of_dvd h n)
+ exact mul_dvd_mul (pow_dvd_pow_of_dvd h n) h
#align pow_dvd_pow_of_dvd pow_dvd_pow_of_dvd
end CommMonoid
mul_dvd_mul_left
to Monoid
(#11695)
mul_dvd_mul_left
was implemented for CommMonoid
.
We have generalised it to Monoid
.
@@ -130,7 +130,7 @@ theorem exists_dvd_and_dvd_of_dvd_mul [DecompositionMonoid α] {b c a : α} (H :
end Semigroup
section Monoid
-variable [Monoid α] {a b : α} {m n : ℕ}
+variable [Monoid α] {a b c : α} {m n : ℕ}
@[refl, simp]
theorem dvd_refl (a : α) : a ∣ a :=
@@ -167,6 +167,12 @@ alias Dvd.dvd.pow := dvd_pow
lemma dvd_pow_self (a : α) {n : ℕ} (hn : n ≠ 0) : a ∣ a ^ n := dvd_rfl.pow hn
#align dvd_pow_self dvd_pow_self
+theorem mul_dvd_mul_left (a : α) (h : b ∣ c) : a * b ∣ a * c := by
+ obtain ⟨d, rfl⟩ := h
+ use d
+ rw [mul_assoc]
+#align mul_dvd_mul_left mul_dvd_mul_left
+
end Monoid
section CommSemigroup
@@ -228,15 +234,11 @@ section CommMonoid
variable [CommMonoid α] {a b : α}
-theorem mul_dvd_mul_left (a : α) {b c : α} (h : b ∣ c) : a * b ∣ a * c :=
- mul_dvd_mul (dvd_refl a) h
-#align mul_dvd_mul_left mul_dvd_mul_left
-
theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c :=
mul_dvd_mul h (dvd_refl c)
#align mul_dvd_mul_right mul_dvd_mul_right
-theorem pow_dvd_pow_of_dvd {a b : α} (h : a ∣ b) : ∀ n : ℕ, a ^ n ∣ b ^ n
+theorem pow_dvd_pow_of_dvd (h : a ∣ b) : ∀ n : ℕ, a ^ n ∣ b ^ n
| 0 => by rw [pow_zero, pow_zero]
| n + 1 => by
rw [pow_succ, pow_succ]
IsRelPrime
and DecompositionMonoid
and refactor (#10327)
Introduce typeclass DecompositionMonoid
, which says every element in the monoid is primal, i.e., whenever an element divides a product b * c
, it can be factored into a product such that the factors divides b
and c
respectively. A domain is called pre-Schreier if its multiplicative monoid is a decomposition monoid, and these are more general than GCD domains.
Show that any GCDMonoid
is a DecompositionMonoid
. In order for lemmas about DecompositionMonoid
s to automatically apply to UniqueFactorizationMonoid
s, we add instances from UniqueFactorizationMonoid α
to Nonempty (NormalizedGCDMonoid α)
to Nonempty (GCDMonoid α)
to DecompositionMonoid α
. (Zulip) See the bottom of message for an updated diagram of classes and instances.
Introduce binary predicate IsRelPrime
which says that the only common divisors of the two elements are units. Replace previous occurrences in mathlib by this predicate.
Duplicate all lemmas about IsCoprime
in Coprime/Basic (except three lemmas about smul) to IsRelPrime
. Due to import constraints, they are spread into three files Algebra/Divisibility/Units (including key lemmas assuming DecompositionMonoid), GroupWithZero/Divisibility, and Coprime/Basic.
Show IsCoprime
always imply IsRelPrime
and is equivalent to it in Bezout rings. To reduce duplication, the definition of Bezout rings and the GCDMonoid instance are moved from RingTheory/Bezout to RingTheory/PrincipalIdealDomain, and some results in PrincipalIdealDomain are generalized to Bezout rings.
Remove the recently added file Squarefree/UniqueFactorizationMonoid and place the results appropriately within Squarefree/Basic. All results are generalized to DecompositionMonoid or weaker except the last one.
With this PR, all the following instances (indicated by arrows) now work; this PR fills the central part.
EuclideanDomain (bundled)
↙ ↖
IsPrincipalIdealRing ← Field (bundled)
↓ ↓
NormalizationMonoid ← NormalizedGCDMonoid → GCDMonoid IsBezout ← ValuationRing ← DiscreteValuationRing
↓ ↓ ↘ ↙
Nonempty NormalizationMonoid ← Nonempty NormalizedGCDMonoid → Nonempty GCDMonoid → IsIntegrallyClosed
↑ ↓
WfDvdMonoid ← UniqueFactorizationMonoid → DecompositionMonoid
↑
IsPrincipalIdealRing
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com> Co-authored-by: Oliver Nash <github@olivernash.org>
@@ -112,6 +112,21 @@ theorem MonoidHom.map_dvd [Monoid M] [Monoid N] (f : M →* N) {a b} : a ∣ b
end map_dvd
+/-- An element `a` in a semigroup is primal if whenever `a` is a divisor of `b * c`, it can be
+factored as the product of a divisor of `b` and a divisor of `c`. -/
+def IsPrimal (a : α) : Prop := ∀ ⦃b c⦄, a ∣ b * c → ∃ a₁ a₂, a₁ ∣ b ∧ a₂ ∣ c ∧ a = a₁ * a₂
+
+variable (α) in
+/-- A monoid is a decomposition monoid if every element is primal. An integral domain whose
+multiplicative monoid is a decomposition monoid, is called a pre-Schreier domain; it is a
+Schreier domain if it is moreover integrally closed. -/
+@[mk_iff] class DecompositionMonoid : Prop where
+ primal (a : α) : IsPrimal a
+
+theorem exists_dvd_and_dvd_of_dvd_mul [DecompositionMonoid α] {b c a : α} (H : a ∣ b * c) :
+ ∃ a₁ a₂, a₁ ∣ b ∧ a₂ ∣ c ∧ a = a₁ * a₂ := DecompositionMonoid.primal a H
+#align exists_dvd_and_dvd_of_dvd_mul exists_dvd_and_dvd_of_dvd_mul
+
end Semigroup
section Monoid
@@ -200,6 +215,13 @@ theorem dvd_of_mul_left_dvd (h : a * b ∣ c) : b ∣ c :=
Dvd.elim h fun d ceq => Dvd.intro (a * d) (by simp [ceq])
#align dvd_of_mul_left_dvd dvd_of_mul_left_dvd
+theorem dvd_mul [DecompositionMonoid α] {k m n : α} :
+ k ∣ m * n ↔ ∃ d₁ d₂, d₁ ∣ m ∧ d₂ ∣ n ∧ k = d₁ * d₂ := by
+ refine ⟨exists_dvd_and_dvd_of_dvd_mul, ?_⟩
+ rintro ⟨d₁, d₂, hy, hz, rfl⟩
+ exact mul_dvd_mul hy hz
+#align dvd_mul dvd_mul
+
end CommSemigroup
section CommMonoid
The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun
instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike
is EquivLike
, since that has a custom coe_injective'
field that is easier to implement. All other classes should take FunLike
or EquivLike
as a parameter.
Previously, morphism classes would be Type
-valued and extend FunLike
:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
After this PR, they should be Prop
-valued and take FunLike
as a parameter:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
[FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
(Note that A B
stay marked as outParam
even though they are not purely required to be so due to the FunLike
parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam
is slightly faster.)
Similarly, MyEquivClass
should take EquivLike
as a parameter.
As a result, every mention of [MyHomClass F A B]
should become [FunLike F A B] [MyHomClass F A B]
.
While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul
is more expensive. This is due to suboptimal processing of arguments. For example:
variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)
theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y
example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _
Before this PR, applying map_mul f
gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Since M
and N
are out_param
s, [MulHomClass F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found.
After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Now [FunLike F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found, before trying MulHomClass F M N
which fails. Since the Mul
hierarchy is very big, this can be slow to fail, especially when there is no such Mul
instance.
A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul
to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N]
because MulHomClass
fails or succeeds much faster than the others.
As a consequence, the simpNF
linter is much slower since by design it tries and fails to apply many map_
lemmas. The same issue occurs a few times in existing calls to simp [map_mul]
, where map_mul
is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.
simp
not firing sometimesThis affects map_smulₛₗ
and related definitions. For simp
lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw
can find every argument to map_smulₛₗ
successfully but simp
can't: leanprover/lean4#3701.
Especially in the category theory library, we might sometimes have a type A
which is also accessible as a synonym (Bundled A hA).1
. Instance synthesis doesn't always work if we have f : A →* B
but x * y : (Bundled A hA).1
or vice versa. This seems to be mostly fixed by keeping A B
as outParam
s in MulHomClass F A B
. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1
instead of using the syntax in the discrimination tree.)
The timeouts can be worked around for now by specifying which map_mul
we mean, either as map_mul f
for some explicit f
, or as e.g. MonoidHomClass.map_mul
.
map_smulₛₗ
not firing as simp
lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ
a simp
lemma instead of the generic map_smulₛₗ
. Writing simp [map_smulₛₗ _]
also works.
Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -97,8 +97,8 @@ section map_dvd
variable {M N : Type*}
-theorem map_dvd [Semigroup M] [Semigroup N] {F : Type*} [MulHomClass F M N] (f : F) {a b} :
- a ∣ b → f a ∣ f b
+theorem map_dvd [Semigroup M] [Semigroup N] {F : Type*} [FunLike F M N] [MulHomClass F M N]
+ (f : F) {a b} : a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
#align map_dvd map_dvd
Many lemmas about BlahOrderedRing α
did not mention negation. I could generalise almost all those lemmas to BlahOrderedSemiring α
+ ExistsAddOfLE α
except for a series of five lemmas (left a TODO about them).
Now those lemmas apply to things like the naturals. This is not very useful on its own, because those lemmas are trivially true on canonically ordered semirings (they are about multiplication by negative elements, of which there are none, or nonnegativity of squares, but we already know everything is nonnegative), except that I will soon add more complicated inequalities that are based on those, and it would be a shame having to write two versions of each: one for ordered rings, one for canonically ordered semirings.
A similar refactor could be made for scalar multiplication, but this PR is big enough already.
From LeanAPAP
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
-/
-import Mathlib.Algebra.Group.Basic
+import Mathlib.Algebra.GroupPower.Basic
import Mathlib.Algebra.Group.Hom.Defs
#align_import algebra.divisibility.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
@@ -115,8 +115,7 @@ end map_dvd
end Semigroup
section Monoid
-
-variable [Monoid α] {a b : α}
+variable [Monoid α] {a b : α} {m n : ℕ}
@[refl, simp]
theorem dvd_refl (a : α) : a ∣ a :=
@@ -139,6 +138,20 @@ theorem dvd_of_eq (h : a = b) : a ∣ b := by rw [h]
alias Eq.dvd := dvd_of_eq
#align eq.dvd Eq.dvd
+lemma pow_dvd_pow (a : α) (h : m ≤ n) : a ^ m ∣ a ^ n :=
+ ⟨a ^ (n - m), by rw [← pow_add, Nat.add_comm, Nat.sub_add_cancel h]⟩
+#align pow_dvd_pow pow_dvd_pow
+
+lemma dvd_pow (hab : a ∣ b) : ∀ {n : ℕ} (_ : n ≠ 0), a ∣ b ^ n
+ | 0, hn => (hn rfl).elim
+ | n + 1, _ => by rw [pow_succ]; exact hab.mul_right _
+#align dvd_pow dvd_pow
+
+alias Dvd.dvd.pow := dvd_pow
+
+lemma dvd_pow_self (a : α) {n : ℕ} (hn : n ≠ 0) : a ∣ a ^ n := dvd_rfl.pow hn
+#align dvd_pow_self dvd_pow_self
+
end Monoid
section CommSemigroup
Polynomial.rootMultiplicity
(#8563)
Main changes:
Monic.mem_nonZeroDivisors
and mem_nonZeroDivisors_of_leadingCoeff
which states that a monic polynomial (resp. a polynomial whose leading coefficient is not zero divisor) is not a zero divisor.rootMultiplicity_mul_X_sub_C_pow
which states that * (X - a) ^ n
adds the root multiplicity at a
by n
.rootMultiplicity_X_sub_C_self
, rootMultiplicity_X_sub_C
and rootMultiplicity_X_sub_C_pow
from IsDomain
to Nontrivial
.rootMultiplicity_eq_natTrailingDegree
which relates rootMultiplicity
and natTrailingDegree
, and eval_divByMonic_eq_trailingCoeff_comp
.le_rootMultiplicity_mul
which is similar to le_trailingDegree_mul
.rootMultiplicity_mul'
which slightly generalizes rootMultiplicity_mul
In Data/Polynomial/FieldDivision
:
rootMultiplicity_sub_one_le_derivative_rootMultiplicity_of_ne_zero
which slightly generalizes rootMultiplicity_sub_one_le_derivative_rootMultiplicity
.derivative_rootMultiplicity_of_root_of_mem_nonZeroDivisors
which slightly generalizes derivative_rootMultiplicity_of_root
.rootMultiplicity
In addition:
eq_of_monic_of_associated
from RingDivision to Monic and generalize.dvd_cancel
lemmas to NonZeroDivisors.algEquivOfCompEqX
: two polynomials that compose to X both ways induces an isomorphism of the polynomial algebra.Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -95,17 +95,18 @@ theorem dvd_of_mul_right_dvd (h : a * b ∣ c) : a ∣ c :=
section map_dvd
-variable {M N : Type*} [Monoid M] [Monoid N]
+variable {M N : Type*}
-theorem map_dvd {F : Type*} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
+theorem map_dvd [Semigroup M] [Semigroup N] {F : Type*} [MulHomClass F M N] (f : F) {a b} :
+ a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
#align map_dvd map_dvd
-theorem MulHom.map_dvd (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
+theorem MulHom.map_dvd [Semigroup M] [Semigroup N] (f : M →ₙ* N) {a b} : a ∣ b → f a ∣ f b :=
_root_.map_dvd f
#align mul_hom.map_dvd MulHom.map_dvd
-theorem MonoidHom.map_dvd (f : M →* N) {a b} : a ∣ b → f a ∣ f b :=
+theorem MonoidHom.map_dvd [Monoid M] [Monoid N] (f : M →* N) {a b} : a ∣ b → f a ∣ f b :=
_root_.map_dvd f
#align monoid_hom.map_dvd MonoidHom.map_dvd
Hom
and file name (#8095)
I believe the file defining a type of morphisms belongs alongside the file defining the structure this morphism works on. So I would like to reorganize the files in the Mathlib.Algebra.Hom
folder so that e.g. Mathlib.Algebra.Hom.Ring
becomes Mathlib.Algebra.Ring.Hom
and Mathlib.Algebra.Hom.NonUnitalAlg
becomes Mathlib.Algebra.Algebra.NonUnitalHom
.
While fixing the imports I went ahead and sorted them for good luck.
The full list of changes is: renamed: Mathlib/Algebra/Hom/NonUnitalAlg.lean -> Mathlib/Algebra/Algebra/NonUnitalHom.lean renamed: Mathlib/Algebra/Hom/Aut.lean -> Mathlib/Algebra/Group/Aut.lean renamed: Mathlib/Algebra/Hom/Commute.lean -> Mathlib/Algebra/Group/Commute/Hom.lean renamed: Mathlib/Algebra/Hom/Embedding.lean -> Mathlib/Algebra/Group/Embedding.lean renamed: Mathlib/Algebra/Hom/Equiv/Basic.lean -> Mathlib/Algebra/Group/Equiv/Basic.lean renamed: Mathlib/Algebra/Hom/Equiv/TypeTags.lean -> Mathlib/Algebra/Group/Equiv/TypeTags.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/Basic.lean -> Mathlib/Algebra/Group/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/GroupWithZero.lean -> Mathlib/Algebra/GroupWithZero/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Freiman.lean -> Mathlib/Algebra/Group/Freiman.lean renamed: Mathlib/Algebra/Hom/Group/Basic.lean -> Mathlib/Algebra/Group/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Group/Defs.lean -> Mathlib/Algebra/Group/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/GroupAction.lean -> Mathlib/GroupTheory/GroupAction/Hom.lean renamed: Mathlib/Algebra/Hom/GroupInstances.lean -> Mathlib/Algebra/Group/Hom/Instances.lean renamed: Mathlib/Algebra/Hom/Iterate.lean -> Mathlib/Algebra/GroupPower/IterateHom.lean renamed: Mathlib/Algebra/Hom/Centroid.lean -> Mathlib/Algebra/Ring/CentroidHom.lean renamed: Mathlib/Algebra/Hom/Ring/Basic.lean -> Mathlib/Algebra/Ring/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Ring/Defs.lean -> Mathlib/Algebra/Ring/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/Units.lean -> Mathlib/Algebra/Group/Units/Hom.lean
Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Reorganizing.20.60Mathlib.2EAlgebra.2EHom.60
@@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
-/
-import Mathlib.Algebra.Hom.Group.Defs
import Mathlib.Algebra.Group.Basic
+import Mathlib.Algebra.Group.Hom.Defs
#align_import algebra.divisibility.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
@@ -4,7 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
-/
-import Mathlib.Algebra.Hom.Group
+import Mathlib.Algebra.Hom.Group.Defs
+import Mathlib.Algebra.Group.Basic
#align_import algebra.divisibility.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
@@ -48,7 +48,7 @@ theorem Dvd.intro (c : α) (h : a * c = b) : a ∣ b :=
Exists.intro c h.symm
#align dvd.intro Dvd.intro
-alias Dvd.intro ← dvd_of_mul_right_eq
+alias dvd_of_mul_right_eq := Dvd.intro
#align dvd_of_mul_right_eq dvd_of_mul_right_eq
theorem exists_eq_mul_right_of_dvd (h : a ∣ b) : ∃ c, b = a * c :=
@@ -58,7 +58,7 @@ theorem exists_eq_mul_right_of_dvd (h : a ∣ b) : ∃ c, b = a * c :=
theorem dvd_def : a ∣ b ↔ ∃ c, b = a * c :=
Iff.rfl
-alias dvd_def ← dvd_iff_exists_eq_mul_right
+alias dvd_iff_exists_eq_mul_right := dvd_def
theorem Dvd.elim {P : Prop} {a b : α} (H₁ : a ∣ b) (H₂ : ∀ c, b = a * c → P) : P :=
Exists.elim H₁ H₂
@@ -71,7 +71,7 @@ theorem dvd_trans : a ∣ b → b ∣ c → a ∣ c
| ⟨d, h₁⟩, ⟨e, h₂⟩ => ⟨d * e, h₁ ▸ h₂.trans <| mul_assoc a d e⟩
#align dvd_trans dvd_trans
-alias dvd_trans ← Dvd.dvd.trans
+alias Dvd.dvd.trans := dvd_trans
/-- Transitivity of `|` for use in `calc` blocks. -/
instance : IsTrans α Dvd.dvd :=
@@ -86,7 +86,7 @@ theorem dvd_mul_of_dvd_left (h : a ∣ b) (c : α) : a ∣ b * c :=
h.trans (dvd_mul_right b c)
#align dvd_mul_of_dvd_left dvd_mul_of_dvd_left
-alias dvd_mul_of_dvd_left ← Dvd.dvd.mul_right
+alias Dvd.dvd.mul_right := dvd_mul_of_dvd_left
theorem dvd_of_mul_right_dvd (h : a * b ∣ c) : a ∣ c :=
(dvd_mul_right a b).trans h
@@ -134,7 +134,7 @@ theorem one_dvd (a : α) : 1 ∣ a :=
theorem dvd_of_eq (h : a = b) : a ∣ b := by rw [h]
#align dvd_of_eq dvd_of_eq
-alias dvd_of_eq ← Eq.dvd
+alias Eq.dvd := dvd_of_eq
#align eq.dvd Eq.dvd
end Monoid
@@ -147,7 +147,7 @@ theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b :=
Dvd.intro _ (by rw [mul_comm] at h; apply h)
#align dvd.intro_left Dvd.intro_left
-alias Dvd.intro_left ← dvd_of_mul_left_eq
+alias dvd_of_mul_left_eq := Dvd.intro_left
#align dvd_of_mul_left_eq dvd_of_mul_left_eq
theorem exists_eq_mul_left_of_dvd (h : a ∣ b) : ∃ c, b = c * a :=
@@ -173,7 +173,7 @@ theorem dvd_mul_of_dvd_right (h : a ∣ b) (c : α) : a ∣ c * b := by
rw [mul_comm]; exact h.mul_right _
#align dvd_mul_of_dvd_right dvd_mul_of_dvd_right
-alias dvd_mul_of_dvd_right ← Dvd.dvd.mul_left
+alias Dvd.dvd.mul_left := dvd_mul_of_dvd_right
attribute [local simp] mul_assoc mul_comm mul_left_comm
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -30,7 +30,7 @@ divisibility, divides
-/
-variable {α : Type _}
+variable {α : Type*}
section Semigroup
@@ -94,9 +94,9 @@ theorem dvd_of_mul_right_dvd (h : a * b ∣ c) : a ∣ c :=
section map_dvd
-variable {M N : Type _} [Monoid M] [Monoid N]
+variable {M N : Type*} [Monoid M] [Monoid N]
-theorem map_dvd {F : Type _} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
+theorem map_dvd {F : Type*} [MulHomClass F M N] (f : F) {a b} : a ∣ b → f a ∣ f b
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩
#align map_dvd map_dvd
Briefly during the port we were adding "Ported by" headers, but only ~60 / 3000 files ended up with such a header.
I propose deleting them.
We could consider adding these uniformly via a script, as part of the great history rewrite...?
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -3,7 +3,6 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
-Ported by: Matej Penciak
-/
import Mathlib.Algebra.Hom.Group
@@ -4,14 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
Ported by: Matej Penciak
-
-! This file was ported from Lean 3 source module algebra.divisibility.basic
-! leanprover-community/mathlib commit e8638a0fcaf73e4500469f368ef9494e495099b3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Hom.Group
+#align_import algebra.divisibility.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
+
/-!
# Divisibility
@@ -59,6 +59,11 @@ theorem exists_eq_mul_right_of_dvd (h : a ∣ b) : ∃ c, b = a * c :=
h
#align exists_eq_mul_right_of_dvd exists_eq_mul_right_of_dvd
+theorem dvd_def : a ∣ b ↔ ∃ c, b = a * c :=
+ Iff.rfl
+
+alias dvd_def ← dvd_iff_exists_eq_mul_right
+
theorem Dvd.elim {P : Prop} {a b : α} (H₁ : a ∣ b) (H₂ : ∀ c, b = a * c → P) : P :=
Exists.elim H₁ H₂
#align dvd.elim Dvd.elim
Match https://github.com/leanprover-community/mathlib/pull/18698 and a bit of https://github.com/leanprover-community/mathlib/pull/18785.
algebra.divisibility.basic
@70d50ecfd4900dd6d328da39ab7ebd516abe4025
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.euclidean_domain.basic
@655994e298904d7e5bbd1e18c95defd7b543eb94
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group.units
@369525b73f229ccd76a6ec0e0e0bf2be57599768
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group_with_zero.basic
@2196ab363eb097c008d4497125e0dde23fb36db2
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group_with_zero.divisibility
@f1a2caaf51ef593799107fe9a8d5e411599f3996
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group_with_zero.units.basic
@70d50ecfd4900dd6d328da39ab7ebd516abe4025
..df5e9937a06fdd349fc60106f54b84d47b1434f0
algebra.order.monoid.canonical.defs
@de87d5053a9fe5cbde723172c0fb7e27e7436473
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.ring.divisibility
@f1a2caaf51ef593799107fe9a8d5e411599f3996
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.int.dvd.basic
@e1bccd6e40ae78370f01659715d3c948716e3b7e
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.int.dvd.pow
@b3f25363ae62cb169e72cd6b8b1ac97bacf21ca7
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.int.order.basic
@728baa2f54e6062c5879a3e397ac6bac323e506f
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.nat.gcd.basic
@a47cda9662ff3925c6df271090b5808adbca5b46
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.nat.order.basic
@26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.nat.order.lemmas
@2258b40dacd2942571c8ce136215350c702dc78f
..e8638a0fcaf73e4500469f368ef9494e495099b3
group_theory.perm.cycle.basic
@92ca63f0fb391a9ca5f22d2409a6080e786d99f7
..e8638a0fcaf73e4500469f368ef9494e495099b3
number_theory.divisors
@f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c
..e8638a0fcaf73e4500469f368ef9494e495099b3
number_theory.pythagorean_triples
@70fd9563a21e7b963887c9360bd29b2393e6225a
..e8638a0fcaf73e4500469f368ef9494e495099b3
number_theory.zsqrtd.basic
@7ec294687917cbc5c73620b4414ae9b5dd9ae1b4
..e8638a0fcaf73e4500469f368ef9494e495099b3
ring_theory.multiplicity
@ceb887ddf3344dab425292e497fa2af91498437c
..e8638a0fcaf73e4500469f368ef9494e495099b3
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
@@ -6,7 +6,7 @@ Neil Strickland, Aaron Anderson
Ported by: Matej Penciak
! This file was ported from Lean 3 source module algebra.divisibility.basic
-! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! leanprover-community/mathlib commit e8638a0fcaf73e4500469f368ef9494e495099b3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -113,7 +113,7 @@ end Semigroup
section Monoid
-variable [Monoid α]
+variable [Monoid α] {a b : α}
@[refl, simp]
theorem dvd_refl (a : α) : a ∣ a :=
@@ -130,6 +130,12 @@ theorem one_dvd (a : α) : 1 ∣ a :=
Dvd.intro a (one_mul a)
#align one_dvd one_dvd
+theorem dvd_of_eq (h : a = b) : a ∣ b := by rw [h]
+#align dvd_of_eq dvd_of_eq
+
+alias dvd_of_eq ← Eq.dvd
+#align eq.dvd Eq.dvd
+
end Monoid
section CommSemigroup
This PR is the result of a slight variant on the following "algorithm"
_
and make all uppercase letters into lowercase_
and make all uppercase letters into lowercase(original_lean3_name, OriginalLean4Name)
#align
statement just before the next empty line#align
statement to have been inserted too early)@@ -53,6 +53,7 @@ theorem Dvd.intro (c : α) (h : a * c = b) : a ∣ b :=
#align dvd.intro Dvd.intro
alias Dvd.intro ← dvd_of_mul_right_eq
+#align dvd_of_mul_right_eq dvd_of_mul_right_eq
theorem exists_eq_mul_right_of_dvd (h : a ∣ b) : ∃ c, b = a * c :=
h
@@ -140,6 +141,7 @@ theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b :=
#align dvd.intro_left Dvd.intro_left
alias Dvd.intro_left ← dvd_of_mul_left_eq
+#align dvd_of_mul_left_eq dvd_of_mul_left_eq
theorem exists_eq_mul_left_of_dvd (h : a ∣ b) : ∃ c, b = c * a :=
Dvd.elim h fun c => fun H1 : b = a * c => Exists.intro c (Eq.trans H1 (mul_comm a c))
IsTrans α r → Trans r r r
and Trans r r r → IsTrans α r
(#1522)
Now Trans.trans
conflicts with _root_.trans
.
@@ -71,12 +71,10 @@ theorem dvd_trans : a ∣ b → b ∣ c → a ∣ c
alias dvd_trans ← Dvd.dvd.trans
-instance : IsTrans α (· ∣ ·) :=
+/-- Transitivity of `|` for use in `calc` blocks. -/
+instance : IsTrans α Dvd.dvd :=
⟨fun _ _ _ => dvd_trans⟩
-/-- Transitivity of `|` for use in `calc` blocks -/
-instance : @Trans α α α Dvd.dvd Dvd.dvd Dvd.dvd := ⟨dvd_trans⟩
-
@[simp]
theorem dvd_mul_right (a b : α) : a ∣ a * b :=
Dvd.intro b rfl
@@ -74,6 +74,9 @@ alias dvd_trans ← Dvd.dvd.trans
instance : IsTrans α (· ∣ ·) :=
⟨fun _ _ _ => dvd_trans⟩
+/-- Transitivity of `|` for use in `calc` blocks -/
+instance : @Trans α α α Dvd.dvd Dvd.dvd Dvd.dvd := ⟨dvd_trans⟩
+
@[simp]
theorem dvd_mul_right (a b : α) : a ∣ a * b :=
Dvd.intro b rfl
The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md
@@ -4,6 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Amelia Livingston, Yury Kudryashov,
Neil Strickland, Aaron Anderson
Ported by: Matej Penciak
+
+! This file was ported from Lean 3 source module algebra.divisibility.basic
+! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
-/
import Mathlib.Algebra.Hom.Group
All dependencies are ported!