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 |
|---|---|---|---|---|---|---|---|---|---|---|
dvd_of_mem_factors {p a : α} (h : p ∈ factors a) : p ∣ a | dvd_trans (multiset.dvd_prod h) (associated.dvd (factors_prod (ne_zero_of_mem_factors h))) | lemma | unique_factorization_monoid.dvd_of_mem_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated.dvd",
"dvd_trans",
"multiset.dvd_prod"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prime_of_factor {a : α} (x : α) (hx : x ∈ factors a) : prime x | begin
have ane0 := ne_zero_of_mem_factors hx,
rw [factors, dif_neg ane0] at hx,
exact (classical.some_spec (unique_factorization_monoid.exists_prime_factors a ane0)).1 x hx,
end | theorem | unique_factorization_monoid.prime_of_factor | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"prime",
"unique_factorization_monoid.exists_prime_factors"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
irreducible_of_factor {a : α} : ∀ (x : α), x ∈ factors a → irreducible x | λ x h, (prime_of_factor x h).irreducible | theorem | unique_factorization_monoid.irreducible_of_factor | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_zero : factors (0 : α) = 0 | by simp [factors] | lemma | unique_factorization_monoid.factors_zero | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_one : factors (1 : α) = 0 | begin
nontriviality α using [factors],
rw ← multiset.rel_zero_right,
refine factors_unique irreducible_of_factor (λ x hx, (multiset.not_mem_zero x hx).elim) _,
rw multiset.prod_zero,
exact factors_prod one_ne_zero,
end | lemma | unique_factorization_monoid.factors_one | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"multiset.not_mem_zero",
"multiset.prod_zero",
"multiset.rel_zero_right",
"one_ne_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_mem_factors_of_dvd {a p : α} (ha0 : a ≠ 0) (hp : irreducible p) : p ∣ a →
∃ q ∈ factors a, p ~ᵤ q | λ ⟨b, hb⟩,
have hb0 : b ≠ 0, from λ hb0, by simp * at *,
have multiset.rel associated (p ::ₘ factors b) (factors a),
from factors_unique
(λ x hx, (multiset.mem_cons.1 hx).elim (λ h, h.symm ▸ hp) (irreducible_of_factor _))
irreducible_of_factor
(associated.symm $ calc multiset.prod (factors a) ~ᵤ a : facto... | lemma | unique_factorization_monoid.exists_mem_factors_of_dvd | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"associated.symm",
"irreducible",
"multiset.exists_mem_of_rel_of_mem",
"multiset.prod",
"multiset.prod_cons",
"multiset.rel"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_mem_factors {x : α} (hx : x ≠ 0) (h : ¬ is_unit x) : ∃ p, p ∈ factors x | begin
obtain ⟨p', hp', hp'x⟩ := wf_dvd_monoid.exists_irreducible_factor h hx,
obtain ⟨p, hp, hpx⟩ := exists_mem_factors_of_dvd hx hp' hp'x,
exact ⟨p, hp⟩
end | lemma | unique_factorization_monoid.exists_mem_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"is_unit",
"wf_dvd_monoid.exists_irreducible_factor"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_mul {x y : α} (hx : x ≠ 0) (hy : y ≠ 0) :
multiset.rel associated (factors (x * y)) (factors x + factors y) | begin
refine factors_unique irreducible_of_factor
(λ a ha, (multiset.mem_add.mp ha).by_cases (irreducible_of_factor _) (irreducible_of_factor _))
((factors_prod (mul_ne_zero hx hy)).trans _),
rw multiset.prod_add,
exact (associated.mul_mul (factors_prod hx) (factors_prod hy)).symm,
end | lemma | unique_factorization_monoid.factors_mul | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"associated.mul_mul",
"mul_ne_zero",
"multiset.prod_add",
"multiset.rel"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_pow {x : α} (n : ℕ) :
multiset.rel associated (factors (x ^ n)) (n • factors x) | begin
induction n with n ih,
{ simp },
by_cases h0 : x = 0,
{ simp [h0, zero_pow n.succ_pos, smul_zero] },
rw [pow_succ, succ_nsmul],
refine multiset.rel.trans _ (factors_mul h0 (pow_ne_zero n h0)) _,
refine multiset.rel.add _ ih,
exact multiset.rel_refl_of_refl_on (λ y hy, associated.refl _),
end | lemma | unique_factorization_monoid.factors_pow | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"associated.refl",
"ih",
"multiset.rel",
"multiset.rel.add",
"multiset.rel.trans",
"multiset.rel_refl_of_refl_on",
"pow_ne_zero",
"pow_succ",
"smul_zero",
"zero_pow"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_pos (x : α) (hx : x ≠ 0) : 0 < factors x ↔ ¬ is_unit x | begin
split,
{ intros h hx,
obtain ⟨p, hp⟩ := multiset.exists_mem_of_ne_zero h.ne',
exact (prime_of_factor _ hp).not_unit (is_unit_of_dvd_unit (dvd_of_mem_factors hp) hx) },
{ intros h,
obtain ⟨p, hp⟩ := exists_mem_factors hx h,
exact bot_lt_iff_ne_bot.mpr (mt multiset.eq_zero_iff_forall_not_mem.m... | lemma | unique_factorization_monoid.factors_pos | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"is_unit",
"is_unit_of_dvd_unit",
"multiset.exists_mem_of_ne_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors (a : α) : multiset α | multiset.map normalize $ factors a | def | unique_factorization_monoid.normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"multiset",
"multiset.map",
"normalize"
] | Noncomputably determines the multiset of prime factors. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
factors_eq_normalized_factors {M : Type*} [cancel_comm_monoid_with_zero M]
[decidable_eq M] [unique_factorization_monoid M] [unique (Mˣ)] (x : M) :
factors x = normalized_factors x | begin
unfold normalized_factors,
convert (multiset.map_id (factors x)).symm,
ext p,
exact normalize_eq p
end | lemma | unique_factorization_monoid.factors_eq_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"cancel_comm_monoid_with_zero",
"multiset.map_id",
"normalize_eq",
"unique",
"unique_factorization_monoid"
] | An arbitrary choice of factors of `x : M` is exactly the (unique) normalized set of factors,
if `M` has a trivial group of units. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
normalized_factors_prod {a : α} (ane0 : a ≠ 0) : associated (normalized_factors a).prod a | begin
rw [normalized_factors, factors, dif_neg ane0],
refine associated.trans _ (classical.some_spec (exists_prime_factors a ane0)).2,
rw [← associates.mk_eq_mk_iff_associated, ← associates.prod_mk, ← associates.prod_mk,
multiset.map_map],
congr' 2,
ext,
rw [function.comp_apply, associates.mk_normaliz... | theorem | unique_factorization_monoid.normalized_factors_prod | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"associated.trans",
"associates.mk_eq_mk_iff_associated",
"associates.mk_normalize",
"associates.prod_mk",
"function.comp_apply",
"multiset.map_map"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prime_of_normalized_factor {a : α} : ∀ (x : α), x ∈ normalized_factors a → prime x | begin
rw [normalized_factors, factors],
split_ifs with ane0, { simp },
intros x hx, rcases multiset.mem_map.1 hx with ⟨y, ⟨hy, rfl⟩⟩,
rw (normalize_associated _).prime_iff,
exact (classical.some_spec (unique_factorization_monoid.exists_prime_factors a ane0)).1 y hy,
end | theorem | unique_factorization_monoid.prime_of_normalized_factor | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"normalize_associated",
"prime",
"unique_factorization_monoid.exists_prime_factors"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
irreducible_of_normalized_factor {a : α} :
∀ (x : α), x ∈ normalized_factors a → irreducible x | λ x h, (prime_of_normalized_factor x h).irreducible | theorem | unique_factorization_monoid.irreducible_of_normalized_factor | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalize_normalized_factor {a : α} :
∀ (x : α), x ∈ normalized_factors a → normalize x = x | begin
rw [normalized_factors, factors],
split_ifs with h, { simp },
intros x hx,
obtain ⟨y, hy, rfl⟩ := multiset.mem_map.1 hx,
apply normalize_idem
end | theorem | unique_factorization_monoid.normalize_normalized_factor | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"normalize",
"normalize_idem"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_irreducible {a : α} (ha : irreducible a) :
normalized_factors a = {normalize a} | begin
obtain ⟨p, a_assoc, hp⟩ := prime_factors_irreducible ha
⟨prime_of_normalized_factor, normalized_factors_prod ha.ne_zero⟩,
have p_mem : p ∈ normalized_factors a,
{ rw hp, exact multiset.mem_singleton_self _ },
convert hp,
rwa [← normalize_normalized_factor p p_mem, normalize_eq_normalize_iff, dvd_dvd... | lemma | unique_factorization_monoid.normalized_factors_irreducible | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"dvd_dvd_iff_associated",
"irreducible",
"multiset.mem_singleton_self",
"normalize",
"normalize_eq_normalize_iff",
"prime_factors_irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_eq_of_dvd (a : α) : ∀ (p q ∈ normalized_factors a), p ∣ q → p = q | begin
intros p hp q hq hdvd,
convert normalize_eq_normalize hdvd
(((prime_of_normalized_factor _ hp).irreducible).dvd_symm
((prime_of_normalized_factor _ hq).irreducible) hdvd);
apply (normalize_normalized_factor _ _).symm; assumption
end | lemma | unique_factorization_monoid.normalized_factors_eq_of_dvd | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible",
"normalize_eq_normalize"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_mem_normalized_factors_of_dvd {a p : α} (ha0 : a ≠ 0) (hp : irreducible p) : p ∣ a →
∃ q ∈ normalized_factors a, p ~ᵤ q | λ ⟨b, hb⟩,
have hb0 : b ≠ 0, from λ hb0, by simp * at *,
have multiset.rel associated (p ::ₘ normalized_factors b) (normalized_factors a),
from factors_unique
(λ x hx, (multiset.mem_cons.1 hx).elim (λ h, h.symm ▸ hp)
(irreducible_of_normalized_factor _))
irreducible_of_normalized_factor
(associated.... | lemma | unique_factorization_monoid.exists_mem_normalized_factors_of_dvd | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"associated.symm",
"irreducible",
"multiset.exists_mem_of_rel_of_mem",
"multiset.prod",
"multiset.prod_cons",
"multiset.rel"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_mem_normalized_factors {x : α} (hx : x ≠ 0) (h : ¬ is_unit x) :
∃ p, p ∈ normalized_factors x | begin
obtain ⟨p', hp', hp'x⟩ := wf_dvd_monoid.exists_irreducible_factor h hx,
obtain ⟨p, hp, hpx⟩ := exists_mem_normalized_factors_of_dvd hx hp' hp'x,
exact ⟨p, hp⟩
end | lemma | unique_factorization_monoid.exists_mem_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"is_unit",
"wf_dvd_monoid.exists_irreducible_factor"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_zero : normalized_factors (0 : α) = 0 | by simp [normalized_factors, factors] | lemma | unique_factorization_monoid.normalized_factors_zero | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_one : normalized_factors (1 : α) = 0 | begin
nontriviality α using [normalized_factors, factors],
rw ← multiset.rel_zero_right,
apply factors_unique irreducible_of_normalized_factor,
{ intros x hx,
exfalso,
apply multiset.not_mem_zero x hx },
{ simp [normalized_factors_prod one_ne_zero] },
apply_instance
end | lemma | unique_factorization_monoid.normalized_factors_one | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"multiset.not_mem_zero",
"multiset.rel_zero_right",
"one_ne_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_mul {x y : α} (hx : x ≠ 0) (hy : y ≠ 0) :
normalized_factors (x * y) = normalized_factors x + normalized_factors y | begin
have h : (normalize : α → α) = associates.out ∘ associates.mk,
{ ext, rw [function.comp_apply, associates.out_mk], },
rw [← multiset.map_id' (normalized_factors (x * y)), ← multiset.map_id' (normalized_factors x),
← multiset.map_id' (normalized_factors y), ← multiset.map_congr rfl normalize_normalized_f... | lemma | unique_factorization_monoid.normalized_factors_mul | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates.mk",
"associates.out",
"associates.out_mk",
"function.comp_apply",
"mul_ne_zero",
"multiset.map_add",
"multiset.map_congr",
"multiset.map_id'",
"multiset.map_map",
"multiset.map_mk_eq_map_mk_of_rel",
"multiset.prod_add",
"normalize"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_pow {x : α} (n : ℕ) :
normalized_factors (x ^ n) = n • normalized_factors x | begin
induction n with n ih,
{ simp },
by_cases h0 : x = 0,
{ simp [h0, zero_pow n.succ_pos, smul_zero] },
rw [pow_succ, succ_nsmul, normalized_factors_mul h0 (pow_ne_zero _ h0), ih],
end | lemma | unique_factorization_monoid.normalized_factors_pow | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"ih",
"pow_ne_zero",
"pow_succ",
"smul_zero",
"zero_pow"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
_root_.irreducible.normalized_factors_pow {p : α} (hp : irreducible p) (k : ℕ) :
normalized_factors (p ^ k) = multiset.replicate k (normalize p) | by rw [normalized_factors_pow, normalized_factors_irreducible hp, multiset.nsmul_singleton] | theorem | irreducible.normalized_factors_pow | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible",
"multiset.nsmul_singleton",
"multiset.replicate",
"normalize"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_prod_eq (s : multiset α) (hs : ∀ a ∈ s, irreducible a) :
normalized_factors s.prod = s.map normalize | begin
induction s using multiset.induction with a s ih,
{ rw [multiset.prod_zero, normalized_factors_one, multiset.map_zero] },
{ have ia := hs a (multiset.mem_cons_self a _),
have ib := λ b h, hs b (multiset.mem_cons_of_mem h),
obtain rfl | ⟨b, hb⟩ := s.empty_or_exists_mem,
{ rw [multiset.cons_zero, ... | theorem | unique_factorization_monoid.normalized_factors_prod_eq | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"ih",
"irreducible",
"multiset",
"multiset.cons_zero",
"multiset.induction",
"multiset.map_cons",
"multiset.map_singleton",
"multiset.map_zero",
"multiset.mem_cons_of_mem",
"multiset.mem_cons_self",
"multiset.prod_cons",
"multiset.prod_ne_zero",
"multiset.prod_singleton",
"multiset.prod_ze... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dvd_iff_normalized_factors_le_normalized_factors {x y : α} (hx : x ≠ 0) (hy : y ≠ 0) :
x ∣ y ↔ normalized_factors x ≤ normalized_factors y | begin
split,
{ rintro ⟨c, rfl⟩,
simp [hx, right_ne_zero_of_mul hy] },
{ rw [← (normalized_factors_prod hx).dvd_iff_dvd_left,
← (normalized_factors_prod hy).dvd_iff_dvd_right],
apply multiset.prod_dvd_prod_of_le }
end | lemma | unique_factorization_monoid.dvd_iff_normalized_factors_le_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"multiset.prod_dvd_prod_of_le",
"right_ne_zero_of_mul"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
associated_iff_normalized_factors_eq_normalized_factors {x y : α} (hx : x ≠ 0) (hy : y ≠ 0) :
x ~ᵤ y ↔ normalized_factors x = normalized_factors y | begin
refine ⟨λ h, _,
λ h, (normalized_factors_prod hx).symm.trans (trans (by rw h) (normalized_factors_prod hy))⟩,
apply le_antisymm; rw [← dvd_iff_normalized_factors_le_normalized_factors],
all_goals { simp [*, h.dvd, h.symm.dvd], },
end | lemma | unique_factorization_monoid.associated_iff_normalized_factors_eq_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_of_irreducible_pow {p : α} (hp : irreducible p) (k : ℕ) :
normalized_factors (p ^ k) = multiset.replicate k (normalize p) | by rw [normalized_factors_pow, normalized_factors_irreducible hp, multiset.nsmul_singleton] | theorem | unique_factorization_monoid.normalized_factors_of_irreducible_pow | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible",
"multiset.nsmul_singleton",
"multiset.replicate",
"normalize"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
zero_not_mem_normalized_factors (x : α) : (0 : α) ∉ normalized_factors x | λ h, prime.ne_zero (prime_of_normalized_factor _ h) rfl | lemma | unique_factorization_monoid.zero_not_mem_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"prime.ne_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dvd_of_mem_normalized_factors {a p : α} (H : p ∈ normalized_factors a) : p ∣ a | begin
by_cases hcases : a = 0,
{ rw hcases,
exact dvd_zero p },
{ exact dvd_trans (multiset.dvd_prod H) (associated.dvd (normalized_factors_prod hcases)) },
end | lemma | unique_factorization_monoid.dvd_of_mem_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated.dvd",
"dvd_trans",
"dvd_zero",
"multiset.dvd_prod"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_associated_prime_pow_of_unique_normalized_factor {p r : α}
(h : ∀ {m}, m ∈ normalized_factors r → m = p) (hr : r ≠ 0) : ∃ (i : ℕ), associated (p ^ i) r | begin
use (normalized_factors r).card,
have := unique_factorization_monoid.normalized_factors_prod hr,
rwa [multiset.eq_replicate_of_mem (λ b, h), multiset.prod_replicate] at this
end | lemma | unique_factorization_monoid.exists_associated_prime_pow_of_unique_normalized_factor | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"multiset.prod_replicate",
"unique_factorization_monoid.normalized_factors_prod"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_prod_of_prime [nontrivial α] [unique αˣ] {m : multiset α}
(h : ∀ p ∈ m, prime p) : (normalized_factors m.prod) = m | by simpa only [←multiset.rel_eq, ←associated_eq_eq] using prime_factors_unique
(prime_of_normalized_factor) h (normalized_factors_prod (m.prod_ne_zero_of_prime h)) | lemma | unique_factorization_monoid.normalized_factors_prod_of_prime | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"multiset",
"nontrivial",
"prime",
"prime_factors_unique",
"unique"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_normalized_factors_eq_of_associated {a b c : α} (ha : a ∈ normalized_factors c)
(hb : b ∈ normalized_factors c) (h : associated a b) : a = b | begin
rw [← normalize_normalized_factor a ha, ← normalize_normalized_factor b hb,
normalize_eq_normalize_iff],
apply associated.dvd_dvd h,
end | lemma | unique_factorization_monoid.mem_normalized_factors_eq_of_associated | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"associated.dvd_dvd",
"normalize_eq_normalize_iff"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalized_factors_pos (x : α) (hx : x ≠ 0) :
0 < normalized_factors x ↔ ¬ is_unit x | begin
split,
{ intros h hx,
obtain ⟨p, hp⟩ := multiset.exists_mem_of_ne_zero h.ne',
exact (prime_of_normalized_factor _ hp).not_unit
(is_unit_of_dvd_unit (dvd_of_mem_normalized_factors hp) hx) },
{ intros h,
obtain ⟨p, hp⟩ := exists_mem_normalized_factors hx h,
exact bot_lt_iff_ne_bot.mpr (m... | lemma | unique_factorization_monoid.normalized_factors_pos | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"is_unit",
"is_unit_of_dvd_unit",
"multiset.exists_mem_of_ne_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dvd_not_unit_iff_normalized_factors_lt_normalized_factors
{x y : α} (hx : x ≠ 0) (hy : y ≠ 0) :
dvd_not_unit x y ↔ normalized_factors x < normalized_factors y | begin
split,
{ rintro ⟨_, c, hc, rfl⟩,
simp only [hx, right_ne_zero_of_mul hy, normalized_factors_mul, ne.def, not_false_iff,
lt_add_iff_pos_right, normalized_factors_pos, hc] },
{ intro h,
exact dvd_not_unit_of_dvd_of_not_dvd
((dvd_iff_normalized_factors_le_normalized_factors hx hy).mpr h.le)... | lemma | unique_factorization_monoid.dvd_not_unit_iff_normalized_factors_lt_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"dvd_not_unit",
"dvd_not_unit_of_dvd_of_not_dvd",
"right_ne_zero_of_mul"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
normalization_monoid : normalization_monoid α | normalization_monoid_of_monoid_hom_right_inverse
{ to_fun := λ a : associates α, if a = 0 then 0 else ((normalized_factors a).map
(classical.some mk_surjective.has_right_inverse : associates α → α)).prod,
map_one' := by simp,
map_mul' := λ x y, by
{ by_cases hx : x = 0, { simp [hx] },
by_cases hy : y = 0,... | def | unique_factorization_monoid.normalization_monoid | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated_iff_eq",
"associates",
"associates.mk_monoid_hom",
"function.comp_apply",
"map_id",
"monoid_hom.map_multiset_prod",
"normalization_monoid",
"normalization_monoid_of_monoid_hom_right_inverse"
] | Noncomputably defines a `normalization_monoid` structure on a `unique_factorization_monoid`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
no_factors_of_no_prime_factors {a b : R} (ha : a ≠ 0)
(h : (∀ {d}, d ∣ a → d ∣ b → ¬ prime d)) : ∀ {d}, d ∣ a → d ∣ b → is_unit d | λ d, induction_on_prime d
(by { simp only [zero_dvd_iff], intros, contradiction })
(λ x hx _ _, hx)
(λ d q hp hq ih dvd_a dvd_b,
absurd hq (h (dvd_of_mul_right_dvd dvd_a) (dvd_of_mul_right_dvd dvd_b))) | lemma | unique_factorization_monoid.no_factors_of_no_prime_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"dvd_of_mul_right_dvd",
"ih",
"is_unit",
"prime",
"zero_dvd_iff"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dvd_of_dvd_mul_left_of_no_prime_factors {a b c : R} (ha : a ≠ 0) :
(∀ {d}, d ∣ a → d ∣ c → ¬ prime d) → a ∣ b * c → a ∣ b | begin
refine induction_on_prime c _ _ _,
{ intro no_factors,
simp only [dvd_zero, mul_zero, forall_prop_of_true],
haveI := classical.prop_decidable,
exact is_unit_iff_forall_dvd.mp
(no_factors_of_no_prime_factors ha @no_factors (dvd_refl a) (dvd_zero a)) _ },
{ rintros _ ⟨x, rfl⟩ _ a_dvd_bx,
... | lemma | unique_factorization_monoid.dvd_of_dvd_mul_left_of_no_prime_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"dvd_mul_right",
"dvd_refl",
"dvd_zero",
"forall_prop_of_true",
"ih",
"mul_left_comm",
"mul_zero",
"prime"
] | Euclid's lemma: if `a ∣ b * c` and `a` and `c` have no common prime factors, `a ∣ b`.
Compare `is_coprime.dvd_of_dvd_mul_left`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
dvd_of_dvd_mul_right_of_no_prime_factors {a b c : R} (ha : a ≠ 0)
(no_factors : ∀ {d}, d ∣ a → d ∣ b → ¬ prime d) : a ∣ b * c → a ∣ c | by simpa [mul_comm b c] using dvd_of_dvd_mul_left_of_no_prime_factors ha @no_factors | lemma | unique_factorization_monoid.dvd_of_dvd_mul_right_of_no_prime_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"mul_comm",
"prime"
] | Euclid's lemma: if `a ∣ b * c` and `a` and `b` have no common prime factors, `a ∣ c`.
Compare `is_coprime.dvd_of_dvd_mul_right`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_reduced_factors : ∀ (a ≠ (0 : R)) b,
∃ a' b' c', (∀ {d}, d ∣ a' → d ∣ b' → is_unit d) ∧ c' * a' = a ∧ c' * b' = b | begin
haveI := classical.prop_decidable,
intros a,
refine induction_on_prime a _ _ _,
{ intros, contradiction },
{ intros a a_unit a_ne_zero b,
use [a, b, 1],
split,
{ intros p p_dvd_a _,
exact is_unit_of_dvd_unit p_dvd_a a_unit },
{ simp } },
{ intros a p a_ne_zero p_prime ih_a pa_ne_... | lemma | unique_factorization_monoid.exists_reduced_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"dvd_mul_of_dvd_right",
"is_unit",
"is_unit_of_dvd_unit",
"mul_assoc",
"mul_left_comm"
] | If `a ≠ 0, b` are elements of a unique factorization domain, then dividing
out their common factor `c'` gives `a'` and `b'` with no factors in common. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_reduced_factors' (a b : R) (hb : b ≠ 0) :
∃ a' b' c', (∀ {d}, d ∣ a' → d ∣ b' → is_unit d) ∧ c' * a' = a ∧ c' * b' = b | let ⟨b', a', c', no_factor, hb, ha⟩ := exists_reduced_factors b hb a
in ⟨a', b', c', λ _ hpb hpa, no_factor hpa hpb, ha, hb⟩ | lemma | unique_factorization_monoid.exists_reduced_factors' | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"is_unit"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
pow_right_injective {a : R} (ha0 : a ≠ 0) (ha1 : ¬ is_unit a) :
function.injective ((^) a : ℕ → R) | begin
letI := classical.dec_eq R,
intros i j hij,
letI : nontrivial R := ⟨⟨a, 0, ha0⟩⟩,
letI : normalization_monoid R := unique_factorization_monoid.normalization_monoid,
obtain ⟨p', hp', dvd'⟩ := wf_dvd_monoid.exists_irreducible_factor ha1 ha0,
obtain ⟨p, mem, _⟩ := exists_mem_normalized_factors_of_dvd ha0... | lemma | unique_factorization_monoid.pow_right_injective | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"classical.dec_eq",
"is_unit",
"mul_right_cancel₀",
"multiset.count",
"multiset.count_nsmul",
"nontrivial",
"normalization_monoid",
"unique_factorization_monoid.normalization_monoid",
"wf_dvd_monoid.exists_irreducible_factor"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
pow_eq_pow_iff {a : R} (ha0 : a ≠ 0) (ha1 : ¬ is_unit a) {i j : ℕ} :
a ^ i = a ^ j ↔ i = j | (pow_right_injective ha0 ha1).eq_iff | lemma | unique_factorization_monoid.pow_eq_pow_iff | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"is_unit"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
le_multiplicity_iff_replicate_le_normalized_factors [decidable_eq R] {a b : R} {n : ℕ}
(ha : irreducible a) (hb : b ≠ 0) :
↑n ≤ multiplicity a b ↔ replicate n (normalize a) ≤ normalized_factors b | begin
rw ← pow_dvd_iff_le_multiplicity,
revert b,
induction n with n ih, { simp },
intros b hb,
split,
{ rintro ⟨c, rfl⟩,
rw [ne.def, pow_succ, mul_assoc, mul_eq_zero, decidable.not_or_iff_and_not] at hb,
rw [pow_succ, mul_assoc, normalized_factors_mul hb.1 hb.2, replicate_succ,
normalized_fac... | lemma | unique_factorization_monoid.le_multiplicity_iff_replicate_le_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated.pow_pow",
"associated_normalize",
"dvd.intro",
"ih",
"irreducible",
"mul_assoc",
"mul_eq_zero",
"multiplicity",
"multiset.le_iff_exists_add",
"normalize",
"pow_succ"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
multiplicity_eq_count_normalized_factors [decidable_eq R] {a b : R} (ha : irreducible a)
(hb : b ≠ 0) : multiplicity a b = (normalized_factors b).count (normalize a) | begin
apply le_antisymm,
{ apply part_enat.le_of_lt_add_one,
rw [← nat.cast_one, ← nat.cast_add, lt_iff_not_ge, ge_iff_le,
le_multiplicity_iff_replicate_le_normalized_factors ha hb, ← le_count_iff_replicate_le],
simp },
rw [le_multiplicity_iff_replicate_le_normalized_factors ha hb, ← le_count_iff_re... | lemma | unique_factorization_monoid.multiplicity_eq_count_normalized_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"ge_iff_le",
"irreducible",
"multiplicity",
"nat.cast_add",
"nat.cast_one",
"normalize",
"part_enat.le_of_lt_add_one"
] | The multiplicity of an irreducible factor of a nonzero element is exactly the number of times
the normalized factor occurs in the `normalized_factors`.
See also `count_normalized_factors_eq` which expands the definition of `multiplicity`
to produce a specification for `count (normalized_factors _) _`.. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
count_normalized_factors_eq [decidable_eq R] {p x : R} (hp : irreducible p)
(hnorm : normalize p = p) {n : ℕ} (hle : p^n ∣ x) (hlt : ¬ (p^(n+1) ∣ x)) :
(normalized_factors x).count p = n | begin
letI : decidable_rel ((∣) : R → R → Prop) := λ _ _, classical.prop_decidable _,
by_cases hx0 : x = 0,
{ simp [hx0] at hlt, contradiction },
rw [← part_enat.coe_inj],
convert (multiplicity_eq_count_normalized_factors hp hx0).symm,
{ exact hnorm.symm },
exact (multiplicity.eq_coe_iff.mpr ⟨hle, hlt⟩).s... | lemma | unique_factorization_monoid.count_normalized_factors_eq | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible",
"normalize",
"part_enat.coe_inj"
] | The number of times an irreducible factor `p` appears in `normalized_factors x` is defined by
the number of times it divides `x`.
See also `multiplicity_eq_count_normalized_factors` if `n` is given by `multiplicity p x`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
count_normalized_factors_eq' [decidable_eq R] {p x : R} (hp : p = 0 ∨ irreducible p)
(hnorm : normalize p = p) {n : ℕ} (hle : p^n ∣ x) (hlt : ¬ (p^(n+1) ∣ x)) :
(normalized_factors x).count p = n | begin
rcases hp with rfl|hp,
{ cases n,
{ exact count_eq_zero.2 (zero_not_mem_normalized_factors _) },
{ rw [zero_pow (nat.succ_pos _)] at hle hlt,
exact absurd hle hlt } },
{ exact count_normalized_factors_eq hp hnorm hle hlt }
end | lemma | unique_factorization_monoid.count_normalized_factors_eq' | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible",
"normalize",
"zero_pow"
] | The number of times an irreducible factor `p` appears in `normalized_factors x` is defined by
the number of times it divides `x`. This is a slightly more general version of
`unique_factorization_monoid.count_normalized_factors_eq` that allows `p = 0`.
See also `multiplicity_eq_count_normalized_factors` if `n` is given... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
max_power_factor {a₀ : R} {x : R} (h : a₀ ≠ 0) (hx : irreducible x) :
∃ n : ℕ, ∃ a : R, ¬ x ∣ a ∧ a₀ = x ^ n * a | begin
classical,
let n := (normalized_factors a₀).count (normalize x),
obtain ⟨a, ha1, ha2⟩ := (@exists_eq_pow_mul_and_not_dvd R _ _ x a₀
(ne_top_iff_finite.mp (part_enat.ne_top_iff.mpr _))),
simp_rw [← (multiplicity_eq_count_normalized_factors hx h).symm] at ha1,
use [n, a, ha2, ha1],
use [n, (multipli... | lemma | unique_factorization_monoid.max_power_factor | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"irreducible",
"normalize"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prime_pow_coprime_prod_of_coprime_insert [decidable_eq α] {s : finset α} (i : α → ℕ) (p : α)
(hps : p ∉ s) (is_prime : ∀ q ∈ insert p s, prime q)
(is_coprime : ∀ (q q' ∈ insert p s), q ∣ q' → q = q') :
∀ (q : α), q ∣ p ^ i p → q ∣ ∏ p' in s, p' ^ i p' → is_unit q | begin
have hp := is_prime _ (finset.mem_insert_self _ _),
refine λ _, no_factors_of_no_prime_factors (pow_ne_zero _ hp.ne_zero) _,
intros d hdp hdprod hd,
apply hps,
replace hdp := hd.dvd_of_dvd_pow hdp,
obtain ⟨q, q_mem', hdq⟩ := hd.exists_mem_multiset_dvd hdprod,
obtain ⟨q, q_mem, rfl⟩ := multiset.mem_m... | lemma | unique_factorization_monoid.prime_pow_coprime_prod_of_coprime_insert | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"dvd_trans",
"finset",
"finset.mem_insert_of_mem",
"finset.mem_insert_self",
"is_coprime",
"is_unit",
"pow_ne_zero",
"prime"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
induction_on_prime_power
{P : α → Prop} (s : finset α) (i : α → ℕ)
(is_prime : ∀ p ∈ s, prime p) (is_coprime : ∀ p q ∈ s, p ∣ q → p = q)
(h1 : ∀ {x}, is_unit x → P x) (hpr : ∀ {p} (i : ℕ), prime p → P (p ^ i))
(hcp : ∀ {x y}, (∀ p, p ∣ x → p ∣ y → is_unit p) → P x → P y → P (x * y)) :
P (∏ p in s, p ^ (i p)) | begin
letI := classical.dec_eq α,
induction s using finset.induction_on with p f' hpf' ih,
{ simpa using h1 is_unit_one },
rw finset.prod_insert hpf',
exact hcp
(prime_pow_coprime_prod_of_coprime_insert i p hpf' is_prime is_coprime)
(hpr (i p) (is_prime _ (finset.mem_insert_self _ _)))
(ih (λ q hq... | theorem | unique_factorization_monoid.induction_on_prime_power | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"classical.dec_eq",
"finset",
"finset.induction_on",
"finset.mem_insert_of_mem",
"finset.mem_insert_self",
"finset.prod_insert",
"ih",
"is_coprime",
"is_unit",
"is_unit_one",
"prime"
] | If `P` holds for units and powers of primes,
and `P x ∧ P y` for coprime `x, y` implies `P (x * y)`,
then `P` holds on a product of powers of distinct primes. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
induction_on_coprime
{P : α → Prop} (a : α) (h0 : P 0) (h1 : ∀ {x}, is_unit x → P x)
(hpr : ∀ {p} (i : ℕ), prime p → P (p ^ i))
(hcp : ∀ {x y}, (∀ p, p ∣ x → p ∣ y → is_unit p) → P x → P y → P (x * y)) :
P a | begin
letI := classical.dec_eq α,
have P_of_associated : ∀ {x y}, associated x y → P x → P y,
{ rintros x y ⟨u, rfl⟩ hx,
exact hcp (λ p _ hpx, is_unit_of_dvd_unit hpx u.is_unit) hx (h1 u.is_unit) },
by_cases ha0 : a = 0, { rwa ha0 },
haveI : nontrivial α := ⟨⟨_, _, ha0⟩⟩,
letI : normalization_monoid α :... | theorem | unique_factorization_monoid.induction_on_coprime | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated",
"classical.dec_eq",
"finset.prod_multiset_map_count",
"is_unit",
"is_unit_of_dvd_unit",
"map_id",
"multiset.mem_to_finset",
"nontrivial",
"normalization_monoid",
"prime",
"unique_factorization_monoid.normalization_monoid"
] | If `P` holds for `0`, units and powers of primes,
and `P x ∧ P y` for coprime `x, y` implies `P (x * y)`,
then `P` holds on all `a : α`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
multiplicative_prime_power
{f : α → β} (s : finset α) (i j : α → ℕ)
(is_prime : ∀ p ∈ s, prime p) (is_coprime : ∀ p q ∈ s, p ∣ q → p = q)
(h1 : ∀ {x y}, is_unit y → f (x * y) = f x * f y)
(hpr : ∀ {p} (i : ℕ), prime p → f (p ^ i) = (f p) ^ i)
(hcp : ∀ {x y}, (∀ p, p ∣ x → p ∣ y → is_unit p) → f (x * y) = f x ... | begin
letI := classical.dec_eq α,
induction s using finset.induction_on with p s hps ih,
{ simpa using h1 is_unit_one },
have hpr_p := is_prime _ (finset.mem_insert_self _ _),
have hpr_s : ∀ p ∈ s, prime p := λ p hp, is_prime _ (finset.mem_insert_of_mem hp),
have hcp_p := λ i, (prime_pow_coprime_prod_of_cop... | theorem | unique_factorization_monoid.multiplicative_prime_power | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"classical.dec_eq",
"finset",
"finset.induction_on",
"finset.mem_insert_of_mem",
"finset.mem_insert_self",
"finset.prod_insert",
"ih",
"is_coprime",
"is_unit",
"is_unit_one",
"mul_assoc",
"mul_left_comm",
"pow_add",
"prime"
] | If `f` maps `p ^ i` to `(f p) ^ i` for primes `p`, and `f`
is multiplicative on coprime elements, then `f` is multiplicative on all products of primes. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
multiplicative_of_coprime
(f : α → β) (a b : α) (h0 : f 0 = 0) (h1 : ∀ {x y}, is_unit y → f (x * y) = f x * f y)
(hpr : ∀ {p} (i : ℕ), prime p → f (p ^ i) = (f p) ^ i)
(hcp : ∀ {x y}, (∀ p, p ∣ x → p ∣ y → is_unit p) → f (x * y) = f x * f y) :
f (a * b) = f a * f b | begin
letI := classical.dec_eq α,
by_cases ha0 : a = 0, { rw [ha0, zero_mul, h0, zero_mul] },
by_cases hb0 : b = 0, { rw [hb0, mul_zero, h0, mul_zero] },
by_cases hf1 : f 1 = 0,
{ calc f (a * b) = f ((a * b) * 1) : by rw mul_one
... = 0 : by simp only [h1 is_unit_one, hf1, mul_zero]
... | theorem | unique_factorization_monoid.multiplicative_of_coprime | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"classical.dec_eq",
"finset.mem_union",
"finset.prod_mul_distrib",
"finset.prod_multiset_map_count",
"finset.prod_subset",
"finset.subset_union_left",
"finset.subset_union_right",
"irreducible",
"irreducible.dvd_symm",
"is_unit",
"is_unit_one",
"map_id",
"mul_assoc",
"mul_left_inj'",
"mu... | If `f` maps `p ^ i` to `(f p) ^ i` for primes `p`, and `f`
is multiplicative on coprime elements, then `f` is multiplicative everywhere. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
{u} factor_set (α : Type u) [cancel_comm_monoid_with_zero α] :
Type u | with_top (multiset { a : associates α // irreducible a }) | def | associates.factor_set | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"cancel_comm_monoid_with_zero",
"irreducible",
"multiset",
"with_top"
] | `factor_set α` representation elements of unique factorization domain as multisets.
`multiset α` produced by `normalized_factors` are only unique up to associated elements, while the
multisets in `factor_set α` are unique by equality and restricted to irreducible elements. This
gives us a representation of each element... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
factor_set.coe_add {a b : multiset { a : associates α // irreducible a }} :
(↑(a + b) : factor_set α) = a + b | by norm_cast | theorem | associates.factor_set.coe_add | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factor_set.sup_add_inf_eq_add [decidable_eq (associates α)] :
∀(a b : factor_set α), a ⊔ b + a ⊓ b = a + b | | none b := show ⊤ ⊔ b + ⊤ ⊓ b = ⊤ + b, by simp
| a none := show a ⊔ ⊤ + a ⊓ ⊤ = a + ⊤, by simp
| (some a) (some b) := show (a : factor_set α) ⊔ b + a ⊓ b = a + b, from
begin
rw [← with_top.coe_sup, ← with_top.coe_inf, ← with_top.coe_add, ← with_top.coe_add,
with_top.coe_eq_coe],
e... | lemma | associates.factor_set.sup_add_inf_eq_add | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"multiset.union_add_inter",
"with_top.coe_add",
"with_top.coe_eq_coe",
"with_top.coe_inf",
"with_top.coe_sup"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factor_set.prod : factor_set α → associates α | | none := 0
| (some s) := (s.map coe).prod | def | associates.factor_set.prod | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | Evaluates the product of a `factor_set` to be the product of the corresponding multiset,
or `0` if there is none. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
prod_top : (⊤ : factor_set α).prod = 0 | rfl | theorem | associates.prod_top | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prod_coe {s : multiset { a : associates α // irreducible a }} :
(s : factor_set α).prod = (s.map coe).prod | rfl | theorem | associates.prod_coe | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prod_add : ∀(a b : factor_set α), (a + b).prod = a.prod * b.prod | | none b := show (⊤ + b).prod = (⊤:factor_set α).prod * b.prod, by simp
| a none := show (a + ⊤).prod = a.prod * (⊤:factor_set α).prod, by simp
| (some a) (some b) :=
show (↑a + ↑b:factor_set α).prod = (↑a:factor_set α).prod * (↑b:factor_set α).prod,
by rw [← factor_set.coe_add, prod_coe, prod_coe, prod_coe... | theorem | associates.prod_add | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"multiset.map_add",
"multiset.prod_add"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prod_mono : ∀{a b : factor_set α}, a ≤ b → a.prod ≤ b.prod | | none b h := have b = ⊤, from top_unique h, by rw [this, prod_top]; exact le_rfl
| a none h := show a.prod ≤ (⊤ : factor_set α).prod, by simp; exact le_top
| (some a) (some b) h := prod_le_prod $ multiset.map_le_map $ with_top.coe_le_coe.1 $ h | theorem | associates.prod_mono | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"le_rfl",
"le_top",
"multiset.map_le_map",
"top_unique"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factor_set.prod_eq_zero_iff [nontrivial α] (p : factor_set α) :
p.prod = 0 ↔ p = ⊤ | begin
induction p using with_top.rec_top_coe,
{ simp only [iff_self, eq_self_iff_true, associates.prod_top] },
simp only [prod_coe, with_top.coe_ne_top, iff_false, prod_eq_zero_iff, multiset.mem_map],
rintro ⟨⟨a, ha⟩, -, eq⟩,
rw [subtype.coe_mk] at eq,
exact ha.ne_zero eq,
end | theorem | associates.factor_set.prod_eq_zero_iff | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates.prod_top",
"multiset.mem_map",
"nontrivial",
"subtype.coe_mk",
"with_top.coe_ne_top",
"with_top.rec_top_coe"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
bcount [decidable_eq (associates α)] (p : {a : associates α // irreducible a}) :
factor_set α → ℕ | | none := 0
| (some s) := s.count p | def | associates.bcount | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | `bcount p s` is the multiplicity of `p` in the factor_set `s` (with bundled `p`) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
count [decidable_eq (associates α)] (p : associates α) :
factor_set α → ℕ | if hp : irreducible p then bcount ⟨p, hp⟩ else 0 | def | associates.count | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | `count p s` is the multiplicity of the irreducible `p` in the factor_set `s`.
If `p` is not irreducible, `count p s` is defined to be `0`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
count_some [decidable_eq (associates α)] {p : associates α} (hp : irreducible p)
(s : multiset _) : count p (some s) = s.count ⟨p, hp⟩ | by { dunfold count, split_ifs, refl } | lemma | associates.count_some | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
count_zero [decidable_eq (associates α)] {p : associates α} (hp : irreducible p) :
count p (0 : factor_set α) = 0 | by { dunfold count, split_ifs, refl } | lemma | associates.count_zero | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
count_reducible [decidable_eq (associates α)] {p : associates α} (hp : ¬ irreducible p) :
count p = 0 | dif_neg hp | lemma | associates.count_reducible | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
bfactor_set_mem : {a : associates α // irreducible a} → (factor_set α) → Prop | | _ ⊤ := true
| p (some l) := p ∈ l | def | associates.bfactor_set_mem | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | membership in a factor_set (bundled version) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
factor_set_mem (p : associates α) (s : factor_set α) : Prop | if hp : irreducible p then bfactor_set_mem ⟨p, hp⟩ s else false | def | associates.factor_set_mem | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | `factor_set_mem p s` is the predicate that the irreducible `p` is a member of
`s : factor_set α`.
If `p` is not irreducible, `p` is not a member of any `factor_set`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
factor_set_mem_eq_mem (p : associates α) (s : factor_set α) :
factor_set_mem p s = (p ∈ s) | rfl | lemma | associates.factor_set_mem_eq_mem | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_factor_set_top {p : associates α} {hp : irreducible p} :
p ∈ (⊤ : factor_set α) | begin
dunfold has_mem.mem, dunfold factor_set_mem, split_ifs, exact trivial
end | lemma | associates.mem_factor_set_top | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_factor_set_some {p : associates α} {hp : irreducible p}
{l : multiset {a : associates α // irreducible a }} :
p ∈ (l : factor_set α) ↔ subtype.mk p hp ∈ l | begin
dunfold has_mem.mem, dunfold factor_set_mem, split_ifs, refl
end | lemma | associates.mem_factor_set_some | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
reducible_not_mem_factor_set {p : associates α} (hp : ¬ irreducible p)
(s : factor_set α) : ¬ p ∈ s | λ (h : if hp : irreducible p then bfactor_set_mem ⟨p, hp⟩ s else false),
by rwa [dif_neg hp] at h | lemma | associates.reducible_not_mem_factor_set | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
unique' {p q : multiset (associates α)} :
(∀a∈p, irreducible a) → (∀a∈q, irreducible a) → p.prod = q.prod → p = q | begin
apply multiset.induction_on_multiset_quot p,
apply multiset.induction_on_multiset_quot q,
assume s t hs ht eq,
refine multiset.map_mk_eq_map_mk_of_rel (unique_factorization_monoid.factors_unique _ _ _),
{ exact assume a ha, ((irreducible_mk _).1 $ hs _ $ multiset.mem_map_of_mem _ ha) },
{ exact assume... | theorem | associates.unique' | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset",
"multiset.induction_on_multiset_quot",
"multiset.map_mk_eq_map_mk_of_rel",
"multiset.mem_map_of_mem",
"unique_factorization_monoid.factors_unique"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factor_set.unique [nontrivial α] {p q : factor_set α} (h : p.prod = q.prod) : p = q | begin
induction p using with_top.rec_top_coe;
induction q using with_top.rec_top_coe,
{ refl },
{ rw [eq_comm, ←factor_set.prod_eq_zero_iff, ←h, associates.prod_top] },
{ rw [←factor_set.prod_eq_zero_iff, h, associates.prod_top] },
{ congr' 1,
rw ←multiset.map_eq_map subtype.coe_injective,
apply un... | theorem | associates.factor_set.unique | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates.prod_top",
"nontrivial",
"subtype.coe_injective",
"subtype.coe_mk",
"with_top.rec_top_coe"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prod_le_prod_iff_le [nontrivial α] {p q : multiset (associates α)}
(hp : ∀a∈p, irreducible a) (hq : ∀a∈q, irreducible a) :
p.prod ≤ q.prod ↔ p ≤ q | iff.intro
begin
classical,
rintros ⟨c, eqc⟩,
refine multiset.le_iff_exists_add.2 ⟨factors c, unique' hq (λ x hx, _) _⟩,
{ obtain h|h := multiset.mem_add.1 hx,
{ exact hp x h },
{ exact irreducible_of_factor _ h } },
{ rw [eqc, multiset.prod_add],
congr,
refine associated_if... | theorem | associates.prod_le_prod_iff_le | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"mul_zero",
"multiset",
"multiset.prod_add",
"nontrivial",
"not_irreducible_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors' (a : α) :
multiset { a : associates α // irreducible a } | (factors a).pmap (λa ha, ⟨associates.mk a, (irreducible_mk _).2 ha⟩)
(irreducible_of_factor) | def | associates.factors' | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset"
] | This returns the multiset of irreducible factors as a `factor_set`,
a multiset of irreducible associates `with_top`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_subtype_coe_factors' {a : α} :
(factors' a).map coe = (factors a).map associates.mk | by simp [factors', multiset.map_pmap, multiset.pmap_eq_map] | theorem | associates.map_subtype_coe_factors' | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates.mk",
"multiset.map_pmap",
"multiset.pmap_eq_map"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors'_cong {a b : α} (h : a ~ᵤ b) :
factors' a = factors' b | begin
obtain rfl|hb := eq_or_ne b 0,
{ rw associated_zero_iff_eq_zero at h, rw h },
have ha : a ≠ 0,
{ contrapose! hb with ha,
rw [←associated_zero_iff_eq_zero, ←ha],
exact h.symm },
rw [←multiset.map_eq_map subtype.coe_injective, map_subtype_coe_factors',
map_subtype_coe_factors', ←rel_associated... | theorem | associates.factors'_cong | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated_zero_iff_eq_zero",
"eq_or_ne",
"subtype.coe_injective"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors (a : associates α) :
factor_set α | begin
refine (if h : a = 0 then ⊤ else
quotient.hrec_on a (λx h, some $ factors' x) _ h),
assume a b hab,
apply function.hfunext,
{ have : a ~ᵤ 0 ↔ b ~ᵤ 0, from
iff.intro (assume ha0, hab.symm.trans ha0) (assume hb0, hab.trans hb0),
simp only [associated_zero_iff_eq_zero] at this,
simp only [q... | def | associates.factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associated_zero_iff_eq_zero",
"associates",
"function.hfunext"
] | This returns the multiset of irreducible factors of an associate as a `factor_set`,
a multiset of irreducible associates `with_top`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
factors_0 : (0 : associates α).factors = ⊤ | dif_pos rfl | theorem | associates.factors_0 | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_mk (a : α) (h : a ≠ 0) :
(associates.mk a).factors = factors' a | by { classical, apply dif_neg, apply (mt mk_eq_zero.1 h) } | theorem | associates.factors_mk | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates.mk"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_prod (a : associates α) : a.factors.prod = a | quotient.induction_on a $ assume a, decidable.by_cases
(assume : associates.mk a = 0, by simp [quotient_mk_eq_mk, this])
(assume : associates.mk a ≠ 0,
have a ≠ 0, by simp * at *,
by simp [this, quotient_mk_eq_mk, prod_mk,
mk_eq_mk_iff_associated.2 (factors_prod this)]) | theorem | associates.factors_prod | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"associates.mk"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prod_factors [nontrivial α] (s : factor_set α) : s.prod.factors = s | factor_set.unique $ factors_prod _ | theorem | associates.prod_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"nontrivial"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_subsingleton [subsingleton α] {a : associates α} :
a.factors = option.none | by { convert factors_0; apply_instance } | lemma | associates.factors_subsingleton | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_eq_none_iff_zero {a : associates α} :
a.factors = option.none ↔ a = 0 | begin
nontriviality α,
exact ⟨λ h, by rwa [← factors_prod a, factor_set.prod_eq_zero_iff], λ h, h.symm ▸ factors_0⟩
end | lemma | associates.factors_eq_none_iff_zero | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_eq_some_iff_ne_zero {a : associates α} :
(∃ (s : multiset {p : associates α // irreducible p}), a.factors = some s) ↔ a ≠ 0 | by rw [← option.is_some_iff_exists, ← option.ne_none_iff_is_some, ne.def, ne.def,
factors_eq_none_iff_zero] | lemma | associates.factors_eq_some_iff_ne_zero | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset",
"option.is_some_iff_exists",
"option.ne_none_iff_is_some"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
eq_of_factors_eq_factors {a b : associates α} (h : a.factors = b.factors) : a = b | have a.factors.prod = b.factors.prod, by rw h,
by rwa [factors_prod, factors_prod] at this | theorem | associates.eq_of_factors_eq_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
eq_of_prod_eq_prod [nontrivial α] {a b : factor_set α} (h : a.prod = b.prod) : a = b | begin
classical,
have : a.prod.factors = b.prod.factors, by rw h,
rwa [prod_factors, prod_factors] at this
end | theorem | associates.eq_of_prod_eq_prod | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"nontrivial"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
eq_factors_of_eq_counts {a b : associates α} (ha : a ≠ 0) (hb : b ≠ 0)
(h : ∀ (p : associates α) (hp : irreducible p), p.count a.factors = p.count b.factors) :
a.factors = b.factors | begin
obtain ⟨sa, h_sa⟩ := factors_eq_some_iff_ne_zero.mpr ha,
obtain ⟨sb, h_sb⟩ := factors_eq_some_iff_ne_zero.mpr hb,
rw [h_sa, h_sb] at h ⊢,
rw option.some_inj,
have h_count : ∀ (p : associates α) (hp : irreducible p), sa.count ⟨p, hp⟩ = sb.count ⟨p, hp⟩,
{ intros p hp, rw [← count_some, ← count_some, h ... | theorem | associates.eq_factors_of_eq_counts | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset.to_finsupp_apply",
"option.some_inj"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
eq_of_eq_counts {a b : associates α} (ha : a ≠ 0) (hb : b ≠ 0)
(h : ∀ (p : associates α), irreducible p → p.count a.factors = p.count b.factors) : a = b | eq_of_factors_eq_factors (eq_factors_of_eq_counts ha hb h) | theorem | associates.eq_of_eq_counts | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
count_le_count_of_factors_le {a b p : associates α} (hb : b ≠ 0)
(hp : irreducible p) (h : a.factors ≤ b.factors) : p.count a.factors ≤ p.count b.factors | begin
by_cases ha : a = 0,
{ simp [*] at *, },
obtain ⟨sa, h_sa⟩ := factors_eq_some_iff_ne_zero.mpr ha,
obtain ⟨sb, h_sb⟩ := factors_eq_some_iff_ne_zero.mpr hb,
rw [h_sa, h_sb] at h ⊢,
rw [count_some hp, count_some hp], rw with_top.some_le_some at h,
exact multiset.count_le_of_le _ h
end | lemma | associates.count_le_count_of_factors_le | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible",
"multiset.count_le_of_le",
"with_top.some_le_some"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_mul (a b : associates α) :
(a * b).factors = a.factors + b.factors | begin
casesI subsingleton_or_nontrivial α,
{ simp [subsingleton.elim a 0], },
refine (eq_of_prod_eq_prod (eq_of_factors_eq_factors _)),
rw [prod_add, factors_prod, factors_prod, factors_prod],
end | theorem | associates.factors_mul | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"subsingleton_or_nontrivial"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_mono : ∀{a b : associates α}, a ≤ b → a.factors ≤ b.factors | | s t ⟨d, rfl⟩ := by rw [factors_mul] ; exact le_add_of_nonneg_right bot_le | theorem | associates.factors_mono | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"bot_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
factors_le {a b : associates α} : a.factors ≤ b.factors ↔ a ≤ b | iff.intro
(assume h, have a.factors.prod ≤ b.factors.prod, from prod_mono h,
by rwa [factors_prod, factors_prod] at this)
factors_mono | theorem | associates.factors_le | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
count_le_count_of_le {a b p : associates α} (hb : b ≠ 0)
(hp : irreducible p) (h : a ≤ b) : p.count a.factors ≤ p.count b.factors | count_le_count_of_factors_le hb hp $ factors_mono h | lemma | associates.count_le_count_of_le | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"irreducible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
prod_le [nontrivial α] {a b : factor_set α} : a.prod ≤ b.prod ↔ a ≤ b | begin
classical,
exact iff.intro
(assume h, have a.prod.factors ≤ b.prod.factors, from factors_mono h,
by rwa [prod_factors, prod_factors] at this)
prod_mono
end | theorem | associates.prod_le | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"nontrivial"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
sup_mul_inf (a b : associates α) : (a ⊔ b) * (a ⊓ b) = a * b | show (a.factors ⊔ b.factors).prod * (a.factors ⊓ b.factors).prod = a * b,
begin
nontriviality α,
refine eq_of_factors_eq_factors _,
rw [← prod_add, prod_factors, factors_mul, factor_set.sup_add_inf_eq_add]
end | lemma | associates.sup_mul_inf | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dvd_of_mem_factors {a p : associates α} {hp : irreducible p}
(hm : p ∈ factors a) : p ∣ a | begin
by_cases ha0 : a = 0, { rw ha0, exact dvd_zero p },
obtain ⟨a0, nza, ha'⟩ := exists_non_zero_rep ha0,
rw [← associates.factors_prod a],
rw [← ha', factors_mk a0 nza] at hm ⊢,
erw prod_coe,
apply multiset.dvd_prod, apply multiset.mem_map.mpr,
exact ⟨⟨p, hp⟩, mem_factor_set_some.mp hm, rfl⟩
end | lemma | associates.dvd_of_mem_factors | ring_theory | src/ring_theory/unique_factorization_domain.lean | [
"algebra.big_operators.associated",
"algebra.gcd_monoid.basic",
"data.finsupp.multiset",
"ring_theory.noetherian",
"ring_theory.multiplicity"
] | [
"associates",
"associates.factors_prod",
"dvd_zero",
"irreducible",
"multiset.dvd_prod"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.