statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
normalize : α →*₀ α
{ to_fun := λ x, x * norm_unit x, map_zero' := by simp, map_one' := by rw [norm_unit_one, units.coe_one, mul_one], map_mul' := λ x y, classical.by_cases (λ hx : x = 0, by rw [hx, zero_mul, zero_mul, zero_mul]) $ λ hx, classical.by_cases (λ hy : y = 0, by rw [hy, mul_zero, zero_mul, mul_zero]) $ λ hy, by sim...
def
normalize
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "mul_assoc", "mul_left_comm", "mul_one", "mul_zero", "norm_unit_one", "units.coe_mul", "units.coe_one", "zero_mul" ]
Chooses an element of each associate class, by multiplying by `norm_unit`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
associated_normalize (x : α) : associated x (normalize x)
⟨_, rfl⟩
theorem
associated_normalize
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_associated (x : α) : associated (normalize x) x
(associated_normalize _).symm
theorem
normalize_associated
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_normalize", "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
associated_normalize_iff {x y : α} : associated x (normalize y) ↔ associated x y
⟨λ h, h.trans (normalize_associated y), λ h, h.trans (associated_normalize y)⟩
lemma
associated_normalize_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_normalize", "normalize", "normalize_associated" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_associated_iff {x y : α} : associated (normalize x) y ↔ associated x y
⟨λ h, (associated_normalize _).trans h, λ h, (normalize_associated _).trans h⟩
lemma
normalize_associated_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_normalize", "normalize", "normalize_associated" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
associates.mk_normalize (x : α) : associates.mk (normalize x) = associates.mk x
associates.mk_eq_mk_iff_associated.2 (normalize_associated _)
lemma
associates.mk_normalize
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates.mk", "normalize", "normalize_associated" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_apply (x : α) : normalize x = x * norm_unit x
rfl
lemma
normalize_apply
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_zero : normalize (0 : α) = 0
normalize.map_zero
lemma
normalize_zero
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_one : normalize (1 : α) = 1
normalize.map_one
lemma
normalize_one
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_coe_units (u : αˣ) : normalize (u : α) = 1
by simp
lemma
normalize_coe_units
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_eq_zero {x : α} : normalize x = 0 ↔ x = 0
⟨λ hx, (associated_zero_iff_eq_zero x).1 $ hx ▸ associated_normalize _, by rintro rfl; exact normalize_zero⟩
lemma
normalize_eq_zero
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated_normalize", "associated_zero_iff_eq_zero", "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_eq_one {x : α} : normalize x = 1 ↔ is_unit x
⟨λ hx, is_unit_iff_exists_inv.2 ⟨_, hx⟩, λ ⟨u, hu⟩, hu ▸ normalize_coe_units u⟩
lemma
normalize_eq_one
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "is_unit", "normalize", "normalize_coe_units" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
norm_unit_mul_norm_unit (a : α) : norm_unit (a * norm_unit a) = 1
begin nontriviality α using [subsingleton.elim a 0], obtain rfl|h := eq_or_ne a 0, { rw [norm_unit_zero, zero_mul, norm_unit_zero] }, { rw [norm_unit_mul h (units.ne_zero _), norm_unit_coe_units, mul_inv_eq_one] } end
theorem
norm_unit_mul_norm_unit
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "eq_or_ne", "mul_inv_eq_one", "units.ne_zero", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_idem (x : α) : normalize (normalize x) = normalize x
by simp
theorem
normalize_idem
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_eq_normalize {a b : α} (hab : a ∣ b) (hba : b ∣ a) : normalize a = normalize b
begin nontriviality α, rcases associated_of_dvd_dvd hab hba with ⟨u, rfl⟩, refine classical.by_cases (by rintro rfl; simp only [zero_mul]) (assume ha : a ≠ 0, _), suffices : a * ↑(norm_unit a) = a * ↑u * ↑(norm_unit a) * ↑u⁻¹, by simpa only [normalize_apply, mul_assoc, norm_unit_mul ha u.ne_zero, norm_unit_...
theorem
normalize_eq_normalize
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated_of_dvd_dvd", "mul_assoc", "mul_right_comm", "normalize", "normalize_apply", "units.mul_inv_cancel_right", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_eq_normalize_iff {x y : α} : normalize x = normalize y ↔ x ∣ y ∧ y ∣ x
⟨λ h, ⟨units.dvd_mul_right.1 ⟨_, h.symm⟩, units.dvd_mul_right.1 ⟨_, h⟩⟩, λ ⟨hxy, hyx⟩, normalize_eq_normalize hxy hyx⟩
lemma
normalize_eq_normalize_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "normalize_eq_normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_antisymm_of_normalize_eq {a b : α} (ha : normalize a = a) (hb : normalize b = b) (hab : a ∣ b) (hba : b ∣ a) : a = b
ha ▸ hb ▸ normalize_eq_normalize hab hba
theorem
dvd_antisymm_of_normalize_eq
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "normalize_eq_normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_normalize_iff {a b : α} : a ∣ normalize b ↔ a ∣ b
units.dvd_mul_right
lemma
dvd_normalize_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "units.dvd_mul_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_dvd_iff {a b : α} : normalize a ∣ b ↔ a ∣ b
units.mul_right_dvd
lemma
normalize_dvd_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "units.mul_right_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
out : associates α → α
quotient.lift (normalize : α → α) $ λ a b ⟨u, hu⟩, hu ▸ normalize_eq_normalize ⟨_, rfl⟩ (units.mul_right_dvd.2 $ dvd_refl a)
def
associates.out
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "dvd_refl", "normalize", "normalize_eq_normalize" ]
Maps an element of `associates` back to the normalized element of its associate class
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
out_mk (a : α) : (associates.mk a).out = normalize a
rfl
lemma
associates.out_mk
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates.mk", "normalize" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
out_one : (1 : associates α).out = 1
normalize_one
lemma
associates.out_one
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "normalize_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
out_mul (a b : associates α) : (a * b).out = a.out * b.out
quotient.induction_on₂ a b $ assume a b, by simp only [associates.quotient_mk_eq_mk, out_mk, mk_mul_mk, normalize.map_mul]
lemma
associates.out_mul
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "associates.quotient_mk_eq_mk" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_out_iff (a : α) (b : associates α) : a ∣ b.out ↔ associates.mk a ≤ b
quotient.induction_on b $ by simp [associates.out_mk, associates.quotient_mk_eq_mk, mk_le_mk_iff_dvd_iff]
lemma
associates.dvd_out_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "associates.mk", "associates.out_mk", "associates.quotient_mk_eq_mk" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
out_dvd_iff (a : α) (b : associates α) : b.out ∣ a ↔ b ≤ associates.mk a
quotient.induction_on b $ by simp [associates.out_mk, associates.quotient_mk_eq_mk, mk_le_mk_iff_dvd_iff]
lemma
associates.out_dvd_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "associates.mk", "associates.out_mk", "associates.quotient_mk_eq_mk" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
out_top : (⊤ : associates α).out = 0
normalize_zero
lemma
associates.out_top
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "normalize_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_out (a : associates α) : normalize a.out = a.out
quotient.induction_on a normalize_idem
lemma
associates.normalize_out
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "normalize", "normalize_idem" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_out (a : associates α) : associates.mk (a.out) = a
quotient.induction_on a mk_normalize
lemma
associates.mk_out
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates", "associates.mk" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
out_injective : function.injective (associates.out : _ → α)
function.left_inverse.injective mk_out
lemma
associates.out_injective
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associates.out" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_monoid (α : Type*) [cancel_comm_monoid_with_zero α]
(gcd : α → α → α) (lcm : α → α → α) (gcd_dvd_left : ∀a b, gcd a b ∣ a) (gcd_dvd_right : ∀a b, gcd a b ∣ b) (dvd_gcd : ∀{a b c}, a ∣ c → a ∣ b → a ∣ gcd c b) (gcd_mul_lcm : ∀a b, associated (gcd a b * lcm a b) (a * b)) (lcm_zero_left : ∀a, lcm 0 a = 0) (lcm_zero_right : ∀a, lcm a 0 = 0)
class
gcd_monoid
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "cancel_comm_monoid_with_zero", "gcd_mul_lcm" ]
GCD monoid: a `cancel_comm_monoid_with_zero` with `gcd` (greatest common divisor) and `lcm` (least common multiple) operations, determined up to a unit. The type class focuses on `gcd` and we derive the corresponding `lcm` facts from `gcd`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalized_gcd_monoid (α : Type*) [cancel_comm_monoid_with_zero α] extends normalization_monoid α, gcd_monoid α
(normalize_gcd : ∀a b, normalize (gcd a b) = gcd a b) (normalize_lcm : ∀a b, normalize (lcm a b) = lcm a b)
class
normalized_gcd_monoid
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "cancel_comm_monoid_with_zero", "gcd_monoid", "normalization_monoid", "normalize", "normalize_gcd", "normalize_lcm" ]
Normalized GCD monoid: a `cancel_comm_monoid_with_zero` with normalization and `gcd` (greatest common divisor) and `lcm` (least common multiple) operations. In this setting `gcd` and `lcm` form a bounded lattice on the associated elements where `gcd` is the infimum, `lcm` is the supremum, `1` is bottom, and `0` is top....
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_gcd [normalized_gcd_monoid α] : ∀a b:α, normalize (gcd a b) = gcd a b
normalized_gcd_monoid.normalize_gcd
theorem
normalize_gcd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_mul_lcm [gcd_monoid α] : ∀a b:α, associated (gcd a b * lcm a b) (a * b)
gcd_monoid.gcd_mul_lcm
theorem
gcd_mul_lcm
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_gcd_iff [gcd_monoid α] (a b c : α) : a ∣ gcd b c ↔ (a ∣ b ∧ a ∣ c)
iff.intro (assume h, ⟨h.trans (gcd_dvd_left _ _), h.trans (gcd_dvd_right _ _)⟩) (assume ⟨hab, hac⟩, dvd_gcd hab hac)
theorem
dvd_gcd_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_comm [normalized_gcd_monoid α] (a b : α) : gcd a b = gcd b a
dvd_antisymm_of_normalize_eq (normalize_gcd _ _) (normalize_gcd _ _) (dvd_gcd (gcd_dvd_right _ _) (gcd_dvd_left _ _)) (dvd_gcd (gcd_dvd_right _ _) (gcd_dvd_left _ _))
theorem
gcd_comm
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "normalize_gcd", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_comm' [gcd_monoid α] (a b : α) : associated (gcd a b) (gcd b a)
associated_of_dvd_dvd (dvd_gcd (gcd_dvd_right _ _) (gcd_dvd_left _ _)) (dvd_gcd (gcd_dvd_right _ _) (gcd_dvd_left _ _))
theorem
gcd_comm'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_assoc [normalized_gcd_monoid α] (m n k : α) : gcd (gcd m n) k = gcd m (gcd n k)
dvd_antisymm_of_normalize_eq (normalize_gcd _ _) (normalize_gcd _ _) (dvd_gcd ((gcd_dvd_left (gcd m n) k).trans (gcd_dvd_left m n)) (dvd_gcd ((gcd_dvd_left (gcd m n) k).trans (gcd_dvd_right m n)) (gcd_dvd_right (gcd m n) k))) (dvd_gcd (dvd_gcd (gcd_dvd_left m (gcd n k)) ((gcd_dvd_right m (gcd n k)...
theorem
gcd_assoc
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "normalize_gcd", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_assoc' [gcd_monoid α] (m n k : α) : associated (gcd (gcd m n) k) (gcd m (gcd n k))
associated_of_dvd_dvd (dvd_gcd ((gcd_dvd_left (gcd m n) k).trans (gcd_dvd_left m n)) (dvd_gcd ((gcd_dvd_left (gcd m n) k).trans (gcd_dvd_right m n)) (gcd_dvd_right (gcd m n) k))) (dvd_gcd (dvd_gcd (gcd_dvd_left m (gcd n k)) ((gcd_dvd_right m (gcd n k)).trans (gcd_dvd_left n k))) ((gcd_dvd_righ...
theorem
gcd_assoc'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_eq_normalize [normalized_gcd_monoid α] {a b c : α} (habc : gcd a b ∣ c) (hcab : c ∣ gcd a b) : gcd a b = normalize c
normalize_gcd a b ▸ normalize_eq_normalize habc hcab
theorem
gcd_eq_normalize
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "normalize_eq_normalize", "normalize_gcd", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_zero_left [normalized_gcd_monoid α] (a : α) : gcd 0 a = normalize a
gcd_eq_normalize (gcd_dvd_right 0 a) (dvd_gcd (dvd_zero _) (dvd_refl a))
theorem
gcd_zero_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_refl", "dvd_zero", "gcd_eq_normalize", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_zero_left' [gcd_monoid α] (a : α) : associated (gcd 0 a) a
associated_of_dvd_dvd (gcd_dvd_right 0 a) (dvd_gcd (dvd_zero _) (dvd_refl a))
theorem
gcd_zero_left'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "dvd_refl", "dvd_zero", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_zero_right [normalized_gcd_monoid α] (a : α) : gcd a 0 = normalize a
gcd_eq_normalize (gcd_dvd_left a 0) (dvd_gcd (dvd_refl a) (dvd_zero _))
theorem
gcd_zero_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_refl", "dvd_zero", "gcd_eq_normalize", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_zero_right' [gcd_monoid α] (a : α) : associated (gcd a 0) a
associated_of_dvd_dvd (gcd_dvd_left a 0) (dvd_gcd (dvd_refl a) (dvd_zero _))
theorem
gcd_zero_right'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "dvd_refl", "dvd_zero", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_eq_zero_iff [gcd_monoid α] (a b : α) : gcd a b = 0 ↔ a = 0 ∧ b = 0
iff.intro (assume h, let ⟨ca, ha⟩ := gcd_dvd_left a b, ⟨cb, hb⟩ := gcd_dvd_right a b in by rw [h, zero_mul] at ha hb; exact ⟨ha, hb⟩) (assume ⟨ha, hb⟩, by { rw [ha, hb, ←zero_dvd_iff], apply dvd_gcd; refl })
theorem
gcd_eq_zero_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_monoid", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_one_left [normalized_gcd_monoid α] (a : α) : gcd 1 a = 1
dvd_antisymm_of_normalize_eq (normalize_gcd _ _) normalize_one (gcd_dvd_left _ _) (one_dvd _)
theorem
gcd_one_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "normalize_gcd", "normalize_one", "normalized_gcd_monoid", "one_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_one_left' [gcd_monoid α] (a : α) : associated (gcd 1 a) 1
associated_of_dvd_dvd (gcd_dvd_left _ _) (one_dvd _)
theorem
gcd_one_left'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "gcd_monoid", "one_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_one_right [normalized_gcd_monoid α] (a : α) : gcd a 1 = 1
dvd_antisymm_of_normalize_eq (normalize_gcd _ _) normalize_one (gcd_dvd_right _ _) (one_dvd _)
theorem
gcd_one_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "normalize_gcd", "normalize_one", "normalized_gcd_monoid", "one_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_one_right' [gcd_monoid α] (a : α) : associated (gcd a 1) 1
associated_of_dvd_dvd (gcd_dvd_right _ _) (one_dvd _)
theorem
gcd_one_right'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "gcd_monoid", "one_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_dvd_gcd [gcd_monoid α] {a b c d: α} (hab : a ∣ b) (hcd : c ∣ d) : gcd a c ∣ gcd b d
dvd_gcd ((gcd_dvd_left _ _).trans hab) ((gcd_dvd_right _ _).trans hcd)
theorem
gcd_dvd_gcd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_same [normalized_gcd_monoid α] (a : α) : gcd a a = normalize a
gcd_eq_normalize (gcd_dvd_left _ _) (dvd_gcd (dvd_refl a) (dvd_refl a))
theorem
gcd_same
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_refl", "gcd_eq_normalize", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_mul_left [normalized_gcd_monoid α] (a b c : α) : gcd (a * b) (a * c) = normalize a * gcd b c
classical.by_cases (by rintro rfl; simp only [zero_mul, gcd_zero_left, normalize_zero]) $ assume ha : a ≠ 0, suffices gcd (a * b) (a * c) = normalize (a * gcd b c), by simpa only [normalize.map_mul, normalize_gcd], let ⟨d, eq⟩ := dvd_gcd (dvd_mul_right a b) (dvd_mul_right a c) in gcd_eq_normalize (eq.symm ▸ mul_dvd...
theorem
gcd_mul_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_right", "gcd_eq_normalize", "gcd_zero_left", "mul_dvd_mul_iff_left", "mul_dvd_mul_left", "normalize", "normalize_gcd", "normalize_zero", "normalized_gcd_monoid", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_mul_left' [gcd_monoid α] (a b c : α) : associated (gcd (a * b) (a * c)) (a * gcd b c)
begin obtain rfl|ha := eq_or_ne a 0, { simp only [zero_mul, gcd_zero_left'] }, obtain ⟨d, eq⟩ := dvd_gcd (dvd_mul_right a b) (dvd_mul_right a c), apply associated_of_dvd_dvd, { rw eq, apply mul_dvd_mul_left, exact dvd_gcd ((mul_dvd_mul_iff_left ha).1 $ eq ▸ gcd_dvd_left _ _) ((mul_dvd_mul_...
theorem
gcd_mul_left'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "dvd_mul_right", "eq_or_ne", "gcd_monoid", "gcd_zero_left'", "mul_dvd_mul_iff_left", "mul_dvd_mul_left", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_mul_right [normalized_gcd_monoid α] (a b c : α) : gcd (b * a) (c * a) = gcd b c * normalize a
by simp only [mul_comm, gcd_mul_left]
theorem
gcd_mul_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_mul_left", "mul_comm", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_mul_right' [gcd_monoid α] (a b c : α) : associated (gcd (b * a) (c * a)) (gcd b c * a)
by simp only [mul_comm, gcd_mul_left']
theorem
gcd_mul_right'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "gcd_monoid", "gcd_mul_left'", "mul_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_eq_left_iff [normalized_gcd_monoid α] (a b : α) (h : normalize a = a) : gcd a b = a ↔ a ∣ b
iff.intro (assume eq, eq ▸ gcd_dvd_right _ _) $ assume hab, dvd_antisymm_of_normalize_eq (normalize_gcd _ _) h (gcd_dvd_left _ _) (dvd_gcd (dvd_refl a) hab)
theorem
gcd_eq_left_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "dvd_refl", "normalize", "normalize_gcd", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_eq_right_iff [normalized_gcd_monoid α] (a b : α) (h : normalize b = b) : gcd a b = b ↔ b ∣ a
by simpa only [gcd_comm a b] using gcd_eq_left_iff b a h
theorem
gcd_eq_right_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_comm", "gcd_eq_left_iff", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_dvd_gcd_mul_left [gcd_monoid α] (m n k : α) : gcd m n ∣ gcd (k * m) n
gcd_dvd_gcd (dvd_mul_left _ _) dvd_rfl
theorem
gcd_dvd_gcd_mul_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_left", "dvd_rfl", "gcd_dvd_gcd", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_dvd_gcd_mul_right [gcd_monoid α] (m n k : α) : gcd m n ∣ gcd (m * k) n
gcd_dvd_gcd (dvd_mul_right _ _) dvd_rfl
theorem
gcd_dvd_gcd_mul_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_right", "dvd_rfl", "gcd_dvd_gcd", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_dvd_gcd_mul_left_right [gcd_monoid α] (m n k : α) : gcd m n ∣ gcd m (k * n)
gcd_dvd_gcd dvd_rfl (dvd_mul_left _ _)
theorem
gcd_dvd_gcd_mul_left_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_left", "dvd_rfl", "gcd_dvd_gcd", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_dvd_gcd_mul_right_right [gcd_monoid α] (m n k : α) : gcd m n ∣ gcd m (n * k)
gcd_dvd_gcd dvd_rfl (dvd_mul_right _ _)
theorem
gcd_dvd_gcd_mul_right_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_right", "dvd_rfl", "gcd_dvd_gcd", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
associated.gcd_eq_left [normalized_gcd_monoid α] {m n : α} (h : associated m n) (k : α) : gcd m k = gcd n k
dvd_antisymm_of_normalize_eq (normalize_gcd _ _) (normalize_gcd _ _) (gcd_dvd_gcd h.dvd dvd_rfl) (gcd_dvd_gcd h.symm.dvd dvd_rfl)
theorem
associated.gcd_eq_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "dvd_antisymm_of_normalize_eq", "dvd_rfl", "gcd_dvd_gcd", "normalize_gcd", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
associated.gcd_eq_right [normalized_gcd_monoid α] {m n : α} (h : associated m n) (k : α) : gcd k m = gcd k n
dvd_antisymm_of_normalize_eq (normalize_gcd _ _) (normalize_gcd _ _) (gcd_dvd_gcd dvd_rfl h.dvd) (gcd_dvd_gcd dvd_rfl h.symm.dvd)
theorem
associated.gcd_eq_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "dvd_antisymm_of_normalize_eq", "dvd_rfl", "gcd_dvd_gcd", "normalize_gcd", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_gcd_mul_of_dvd_mul [gcd_monoid α] {m n k : α} (H : k ∣ m * n) : k ∣ (gcd k m) * n
(dvd_gcd (dvd_mul_right _ n) H).trans (gcd_mul_right' n k m).dvd
lemma
dvd_gcd_mul_of_dvd_mul
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_right", "gcd_monoid", "gcd_mul_right'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_mul_gcd_of_dvd_mul [gcd_monoid α] {m n k : α} (H : k ∣ m * n) : k ∣ m * gcd k n
by { rw mul_comm at H ⊢, exact dvd_gcd_mul_of_dvd_mul H }
lemma
dvd_mul_gcd_of_dvd_mul
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_gcd_mul_of_dvd_mul", "gcd_monoid", "mul_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_dvd_and_dvd_of_dvd_mul [gcd_monoid α] {m n k : α} (H : k ∣ m * n) : ∃ d₁ d₂, d₁ ∣ m ∧ d₂ ∣ n ∧ k = d₁ * d₂
begin by_cases h0 : gcd k m = 0, { rw gcd_eq_zero_iff at h0, rcases h0 with ⟨rfl, rfl⟩, refine ⟨0, n, dvd_refl 0, dvd_refl n, _⟩, simp }, { obtain ⟨a, ha⟩ := gcd_dvd_left k m, refine ⟨gcd k m, a, gcd_dvd_right _ _, _, ha⟩, suffices h : gcd k m * a ∣ gcd k m * n, { cases h with b hb, ...
lemma
exists_dvd_and_dvd_of_dvd_mul
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_gcd_mul_of_dvd_mul", "dvd_refl", "gcd_eq_zero_iff", "gcd_monoid", "mul_assoc", "mul_left_cancel₀" ]
Represent a divisor of `m * n` as a product of a divisor of `m` and a divisor of `n`. In other words, the nonzero elements of a `gcd_monoid` form a decomposition monoid (more widely known as a pre-Schreier domain in the context of rings). Note: In general, this representation is highly non-unique. See `nat.prod_dvd_...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_mul [gcd_monoid α] {k m n : α} : k ∣ (m * n) ↔ ∃ d₁ d₂, d₁ ∣ m ∧ d₂ ∣ n ∧ k = d₁ * d₂
begin refine ⟨exists_dvd_and_dvd_of_dvd_mul, _⟩, rintro ⟨d₁, d₂, hy, hz, rfl⟩, exact mul_dvd_mul hy hz, end
lemma
dvd_mul
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_monoid", "mul_dvd_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_mul_dvd_mul_gcd [gcd_monoid α] (k m n : α) : gcd k (m * n) ∣ gcd k m * gcd k n
begin obtain ⟨m', n', hm', hn', h⟩ := exists_dvd_and_dvd_of_dvd_mul (gcd_dvd_right k (m * n)), replace h : gcd k (m * n) = m' * n' := h, rw h, have hm'n' : m' * n' ∣ k := h ▸ gcd_dvd_left _ _, apply mul_dvd_mul, { have hm'k : m' ∣ k := (dvd_mul_right m' n').trans hm'n', exact dvd_gcd hm'k hm' }, { hav...
theorem
gcd_mul_dvd_mul_gcd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_left", "dvd_mul_right", "exists_dvd_and_dvd_of_dvd_mul", "gcd_monoid", "mul_dvd_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_pow_right_dvd_pow_gcd [gcd_monoid α] {a b : α} {k : ℕ} : gcd a (b ^ k) ∣ (gcd a b) ^ k
begin by_cases hg : gcd a b = 0, { rw gcd_eq_zero_iff at hg, rcases hg with ⟨rfl, rfl⟩, exact (gcd_zero_left' (0 ^ k : α)).dvd.trans (pow_dvd_pow_of_dvd (gcd_zero_left' (0 : α)).symm.dvd _) }, { induction k with k hk, { simp only [pow_zero], exact (gcd_one_right' a).dvd, }, rw [pow_suc...
theorem
gcd_pow_right_dvd_pow_gcd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_eq_zero_iff", "gcd_monoid", "gcd_mul_dvd_mul_gcd", "gcd_one_right'", "gcd_zero_left'", "mul_dvd_mul_iff_left", "pow_dvd_pow_of_dvd", "pow_succ", "pow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_pow_left_dvd_pow_gcd [gcd_monoid α] {a b : α} {k : ℕ} : gcd (a ^ k) b ∣ (gcd a b) ^ k
calc gcd (a ^ k) b ∣ gcd b (a ^ k) : (gcd_comm' _ _).dvd ... ∣ (gcd b a) ^ k : gcd_pow_right_dvd_pow_gcd ... ∣ (gcd a b) ^ k : pow_dvd_pow_of_dvd (gcd_comm' _ _).dvd _
theorem
gcd_pow_left_dvd_pow_gcd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_comm'", "gcd_monoid", "gcd_pow_right_dvd_pow_gcd", "pow_dvd_pow_of_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_dvd_of_mul_eq_pow [gcd_monoid α] {a b c d₁ d₂ : α} (ha : a ≠ 0) (hab : is_unit (gcd a b)) {k : ℕ} (h : a * b = c ^ k) (hc : c = d₁ * d₂) (hd₁ : d₁ ∣ a) : d₁ ^ k ≠ 0 ∧ d₁ ^ k ∣ a
begin have h1 : is_unit (gcd (d₁ ^ k) b), { apply is_unit_of_dvd_one, transitivity (gcd d₁ b) ^ k, { exact gcd_pow_left_dvd_pow_gcd }, { apply is_unit.dvd, apply is_unit.pow, apply is_unit_of_dvd_one, apply dvd_trans _ hab.dvd, apply gcd_dvd_gcd hd₁ (dvd_refl b) } }, have h2 : d₁ ^ k ∣ a *...
theorem
pow_dvd_of_mul_eq_pow
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_gcd_mul_of_dvd_mul", "dvd_refl", "dvd_trans", "gcd_dvd_gcd", "gcd_monoid", "gcd_pow_left_dvd_pow_gcd", "is_unit", "is_unit.dvd", "is_unit.mul_left_dvd", "is_unit.pow", "is_unit_of_dvd_one", "mul_comm", "mul_pow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_associated_pow_of_mul_eq_pow [gcd_monoid α] {a b c : α} (hab : is_unit (gcd a b)) {k : ℕ} (h : a * b = c ^ k) : ∃ (d : α), associated (d ^ k) a
begin casesI subsingleton_or_nontrivial α, { use 0, rw [subsingleton.elim a (0 ^ k)] }, by_cases ha : a = 0, { use 0, rw ha, obtain (rfl | hk) := k.eq_zero_or_pos, { exfalso, revert h, rw [ha, zero_mul, pow_zero], apply zero_ne_one }, { rw zero_pow hk } }, by_cases hb : b = 0, { use 1, rw [one_p...
theorem
exists_associated_pow_of_mul_eq_pow
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "dvd_pow_self", "exists_dvd_and_dvd_of_dvd_mul", "gcd_comm'", "gcd_monoid", "gcd_zero_right'", "is_unit", "mul_assoc", "mul_comm", "mul_one", "mul_pow", "mul_right_inj'", "one_mul", "one_pow", "pow_dvd_of_mul_eq_pow", "pow_zero", "subsingleton_or_nontrivial", "units.c...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_eq_pow_of_mul_eq_pow [gcd_monoid α] [unique αˣ] {a b c : α} (hab : is_unit (gcd a b)) {k : ℕ} (h : a * b = c ^ k) : ∃ (d : α), a = d ^ k
let ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow hab h in ⟨d, (associated_iff_eq.mp hd).symm⟩
theorem
exists_eq_pow_of_mul_eq_pow
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "exists_associated_pow_of_mul_eq_pow", "gcd_monoid", "is_unit", "unique" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_greatest {α : Type*} [cancel_comm_monoid_with_zero α] [normalized_gcd_monoid α] {a b d : α} (hda : d ∣ a) (hdb : d ∣ b) (hd : ∀ e : α, e ∣ a → e ∣ b → e ∣ d) : gcd_monoid.gcd a b = normalize d
begin have h := hd _ (gcd_monoid.gcd_dvd_left a b) (gcd_monoid.gcd_dvd_right a b), exact gcd_eq_normalize h (gcd_monoid.dvd_gcd hda hdb), end
lemma
gcd_greatest
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "cancel_comm_monoid_with_zero", "gcd_eq_normalize", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gcd_greatest_associated {α : Type*} [cancel_comm_monoid_with_zero α] [gcd_monoid α] {a b d : α} (hda : d ∣ a) (hdb : d ∣ b) (hd : ∀ e : α, e ∣ a → e ∣ b → e ∣ d) : associated d (gcd_monoid.gcd a b)
begin have h := hd _ (gcd_monoid.gcd_dvd_left a b) (gcd_monoid.gcd_dvd_right a b), exact associated_of_dvd_dvd (gcd_monoid.dvd_gcd hda hdb) h, end
lemma
gcd_greatest_associated
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "cancel_comm_monoid_with_zero", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_unit_gcd_of_eq_mul_gcd {α : Type*} [cancel_comm_monoid_with_zero α] [gcd_monoid α] {x y x' y' : α} (ex : x = gcd x y * x') (ey : y = gcd x y * y') (h : gcd x y ≠ 0) : is_unit (gcd x' y')
begin rw ← associated_one_iff_is_unit, refine associated.of_mul_left _ (associated.refl $ gcd x y) h, convert (gcd_mul_left' _ _ _).symm using 1, rw [← ex, ← ey, mul_one], end
lemma
is_unit_gcd_of_eq_mul_gcd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated.of_mul_left", "associated.refl", "associated_one_iff_is_unit", "cancel_comm_monoid_with_zero", "gcd_monoid", "gcd_mul_left'", "is_unit", "mul_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
extract_gcd {α : Type*} [cancel_comm_monoid_with_zero α] [gcd_monoid α] (x y : α) : ∃ x' y', x = gcd x y * x' ∧ y = gcd x y * y' ∧ is_unit (gcd x' y')
begin by_cases h : gcd x y = 0, { obtain ⟨rfl, rfl⟩ := (gcd_eq_zero_iff x y).1 h, simp_rw ← associated_one_iff_is_unit, exact ⟨1, 1, by rw [h, zero_mul], by rw [h, zero_mul], gcd_one_left' 1⟩ }, obtain ⟨x', ex⟩ := gcd_dvd_left x y, obtain ⟨y', ey⟩ := gcd_dvd_right x y, exact ⟨x', y', ex, ey, is_unit_g...
lemma
extract_gcd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated_one_iff_is_unit", "cancel_comm_monoid_with_zero", "gcd_eq_zero_iff", "gcd_monoid", "gcd_one_left'", "is_unit", "is_unit_gcd_of_eq_mul_gcd", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_dvd_iff [gcd_monoid α] {a b c : α} : lcm a b ∣ c ↔ a ∣ c ∧ b ∣ c
begin by_cases this : a = 0 ∨ b = 0, { rcases this with rfl | rfl; simp only [iff_def, lcm_zero_left, lcm_zero_right, zero_dvd_iff, dvd_zero, eq_self_iff_true, and_true, imp_true_iff] {contextual:=tt} }, { obtain ⟨h1, h2⟩ := not_or_distrib.1 this, have h : gcd a b ≠ 0, from λ H, h1 ((gcd_eq_zero_iff...
lemma
lcm_dvd_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_gcd_iff", "dvd_zero", "gcd_eq_zero_iff", "gcd_monoid", "gcd_mul_lcm", "gcd_mul_right'", "iff_def", "imp_true_iff", "mul_comm", "mul_dvd_mul_iff_left", "mul_dvd_mul_iff_right", "zero_dvd_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_lcm_left [gcd_monoid α] (a b : α) : a ∣ lcm a b
(lcm_dvd_iff.1 (dvd_refl (lcm a b))).1
lemma
dvd_lcm_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_refl", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_lcm_right [gcd_monoid α] (a b : α) : b ∣ lcm a b
(lcm_dvd_iff.1 (dvd_refl (lcm a b))).2
lemma
dvd_lcm_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_refl", "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_dvd [gcd_monoid α] {a b c : α} (hab : a ∣ b) (hcb : c ∣ b) : lcm a c ∣ b
lcm_dvd_iff.2 ⟨hab, hcb⟩
lemma
lcm_dvd
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_eq_zero_iff [gcd_monoid α] (a b : α) : lcm a b = 0 ↔ a = 0 ∨ b = 0
iff.intro (assume h : lcm a b = 0, have associated (a * b) 0 := (gcd_mul_lcm a b).symm.trans $ by rw [h, mul_zero], by simpa only [associated_zero_iff_eq_zero, mul_eq_zero]) (by rintro (rfl | rfl); [apply lcm_zero_left, apply lcm_zero_right])
theorem
lcm_eq_zero_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_zero_iff_eq_zero", "gcd_monoid", "gcd_mul_lcm", "mul_eq_zero", "mul_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normalize_lcm [normalized_gcd_monoid α] (a b : α) : normalize (lcm a b) = lcm a b
normalized_gcd_monoid.normalize_lcm a b
lemma
normalize_lcm
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_comm [normalized_gcd_monoid α] (a b : α) : lcm a b = lcm b a
dvd_antisymm_of_normalize_eq (normalize_lcm _ _) (normalize_lcm _ _) (lcm_dvd (dvd_lcm_right _ _) (dvd_lcm_left _ _)) (lcm_dvd (dvd_lcm_right _ _) (dvd_lcm_left _ _))
theorem
lcm_comm
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "dvd_lcm_left", "dvd_lcm_right", "lcm_dvd", "normalize_lcm", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_comm' [gcd_monoid α] (a b : α) : associated (lcm a b) (lcm b a)
associated_of_dvd_dvd (lcm_dvd (dvd_lcm_right _ _) (dvd_lcm_left _ _)) (lcm_dvd (dvd_lcm_right _ _) (dvd_lcm_left _ _))
theorem
lcm_comm'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "dvd_lcm_left", "dvd_lcm_right", "gcd_monoid", "lcm_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_assoc [normalized_gcd_monoid α] (m n k : α) : lcm (lcm m n) k = lcm m (lcm n k)
dvd_antisymm_of_normalize_eq (normalize_lcm _ _) (normalize_lcm _ _) (lcm_dvd (lcm_dvd (dvd_lcm_left _ _) ((dvd_lcm_left _ _).trans (dvd_lcm_right _ _))) ((dvd_lcm_right _ _).trans (dvd_lcm_right _ _))) (lcm_dvd ((dvd_lcm_left _ _).trans (dvd_lcm_left _ _)) (lcm_dvd ((dvd_lcm_right _ _).trans (dvd_l...
theorem
lcm_assoc
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "dvd_lcm_left", "dvd_lcm_right", "lcm_dvd", "normalize_lcm", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_assoc' [gcd_monoid α] (m n k : α) : associated (lcm (lcm m n) k) (lcm m (lcm n k))
associated_of_dvd_dvd (lcm_dvd (lcm_dvd (dvd_lcm_left _ _) ((dvd_lcm_left _ _).trans (dvd_lcm_right _ _))) ((dvd_lcm_right _ _).trans (dvd_lcm_right _ _))) (lcm_dvd ((dvd_lcm_left _ _).trans (dvd_lcm_left _ _)) (lcm_dvd ((dvd_lcm_right _ _).trans (dvd_lcm_left _ _)) (dvd_lcm_right _ _)))
theorem
lcm_assoc'
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "associated", "associated_of_dvd_dvd", "dvd_lcm_left", "dvd_lcm_right", "gcd_monoid", "lcm_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_eq_normalize [normalized_gcd_monoid α] {a b c : α} (habc : lcm a b ∣ c) (hcab : c ∣ lcm a b) : lcm a b = normalize c
normalize_lcm a b ▸ normalize_eq_normalize habc hcab
lemma
lcm_eq_normalize
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "normalize", "normalize_eq_normalize", "normalize_lcm", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_dvd_lcm [gcd_monoid α] {a b c d : α} (hab : a ∣ b) (hcd : c ∣ d) : lcm a c ∣ lcm b d
lcm_dvd (hab.trans (dvd_lcm_left _ _)) (hcd.trans (dvd_lcm_right _ _))
theorem
lcm_dvd_lcm
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_lcm_left", "dvd_lcm_right", "gcd_monoid", "lcm_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_units_coe_left [normalized_gcd_monoid α] (u : αˣ) (a : α) : lcm ↑u a = normalize a
lcm_eq_normalize (lcm_dvd units.coe_dvd dvd_rfl) (dvd_lcm_right _ _)
theorem
lcm_units_coe_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_lcm_right", "dvd_rfl", "lcm_dvd", "lcm_eq_normalize", "normalize", "normalized_gcd_monoid", "units.coe_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_units_coe_right [normalized_gcd_monoid α] (a : α) (u : αˣ) : lcm a ↑u = normalize a
(lcm_comm a u).trans $ lcm_units_coe_left _ _
theorem
lcm_units_coe_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "lcm_comm", "lcm_units_coe_left", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_one_left [normalized_gcd_monoid α] (a : α) : lcm 1 a = normalize a
lcm_units_coe_left 1 a
theorem
lcm_one_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "lcm_units_coe_left", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_one_right [normalized_gcd_monoid α] (a : α) : lcm a 1 = normalize a
lcm_units_coe_right a 1
theorem
lcm_one_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "lcm_units_coe_right", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_same [normalized_gcd_monoid α] (a : α) : lcm a a = normalize a
lcm_eq_normalize (lcm_dvd dvd_rfl dvd_rfl) (dvd_lcm_left _ _)
theorem
lcm_same
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_lcm_left", "dvd_rfl", "lcm_dvd", "lcm_eq_normalize", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_eq_one_iff [normalized_gcd_monoid α] (a b : α) : lcm a b = 1 ↔ a ∣ 1 ∧ b ∣ 1
iff.intro (assume eq, eq ▸ ⟨dvd_lcm_left _ _, dvd_lcm_right _ _⟩) (assume ⟨⟨c, hc⟩, ⟨d, hd⟩⟩, show lcm (units.mk_of_mul_eq_one a c hc.symm : α) (units.mk_of_mul_eq_one b d hd.symm) = 1, by rw [lcm_units_coe_left, normalize_coe_units])
theorem
lcm_eq_one_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_lcm_right", "lcm_units_coe_left", "normalize_coe_units", "normalized_gcd_monoid", "units.mk_of_mul_eq_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_mul_left [normalized_gcd_monoid α] (a b c : α) : lcm (a * b) (a * c) = normalize a * lcm b c
classical.by_cases (by rintro rfl; simp only [zero_mul, lcm_zero_left, normalize_zero]) $ assume ha : a ≠ 0, suffices lcm (a * b) (a * c) = normalize (a * lcm b c), by simpa only [normalize.map_mul, normalize_lcm], have a ∣ lcm (a * b) (a * c), from (dvd_mul_right _ _).trans (dvd_lcm_left _ _), let ⟨d, eq⟩ := this in...
theorem
lcm_mul_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_lcm_left", "dvd_lcm_right", "dvd_mul_right", "lcm_dvd", "lcm_eq_normalize", "mul_dvd_mul_iff_left", "mul_dvd_mul_left", "normalize", "normalize_lcm", "normalize_zero", "normalized_gcd_monoid", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_mul_right [normalized_gcd_monoid α] (a b c : α) : lcm (b * a) (c * a) = lcm b c * normalize a
by simp only [mul_comm, lcm_mul_left]
theorem
lcm_mul_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "lcm_mul_left", "mul_comm", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_eq_left_iff [normalized_gcd_monoid α] (a b : α) (h : normalize a = a) : lcm a b = a ↔ b ∣ a
iff.intro (assume eq, eq ▸ dvd_lcm_right _ _) $ assume hab, dvd_antisymm_of_normalize_eq (normalize_lcm _ _) h (lcm_dvd (dvd_refl a) hab) (dvd_lcm_left _ _)
theorem
lcm_eq_left_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_antisymm_of_normalize_eq", "dvd_lcm_left", "dvd_lcm_right", "dvd_refl", "lcm_dvd", "normalize", "normalize_lcm", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_eq_right_iff [normalized_gcd_monoid α] (a b : α) (h : normalize b = b) : lcm a b = b ↔ a ∣ b
by simpa only [lcm_comm b a] using lcm_eq_left_iff b a h
theorem
lcm_eq_right_iff
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "lcm_comm", "lcm_eq_left_iff", "normalize", "normalized_gcd_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_dvd_lcm_mul_left [gcd_monoid α] (m n k : α) : lcm m n ∣ lcm (k * m) n
lcm_dvd_lcm (dvd_mul_left _ _) dvd_rfl
theorem
lcm_dvd_lcm_mul_left
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_left", "dvd_rfl", "gcd_monoid", "lcm_dvd_lcm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lcm_dvd_lcm_mul_right [gcd_monoid α] (m n k : α) : lcm m n ∣ lcm (m * k) n
lcm_dvd_lcm (dvd_mul_right _ _) dvd_rfl
theorem
lcm_dvd_lcm_mul_right
algebra.gcd_monoid
src/algebra/gcd_monoid/basic.lean
[ "algebra.associated", "algebra.group_power.lemmas", "algebra.ring.regular" ]
[ "dvd_mul_right", "dvd_rfl", "gcd_monoid", "lcm_dvd_lcm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83