Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit da3ec50

Browse files
committed
refactor(algebra/associated): rename nonzero_of_irreducible to ne_zero_of_irreducible
1 parent 96d748e commit da3ec50

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/algebra/associated.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ by simp [irreducible]
136136
| ⟨hn0, h⟩ := have is_unit (0:α) ∨ is_unit (0:α), from h 0 0 ((mul_zero 0).symm),
137137
this.elim hn0 hn0
138138

139-
theorem nonzero_of_irreducible [semiring α] : ∀ {p:α}, irreducible p → p ≠ 0
139+
theorem ne_zero_of_irreducible [semiring α] : ∀ {p:α}, irreducible p → p ≠ 0
140140
| _ hp rfl := not_irreducible_zero hp
141141

142142
theorem of_irreducible_mul {α} [monoid α] {x y : α} :

src/field_theory/splitting_field.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,18 @@ is_noetherian_ring.irreducible_induction_on (f.map i)
9898
by conv_lhs { rw eq_C_of_degree_eq_zero (is_unit_iff_degree_eq_zero.1 hu) };
9999
simp [leading_coeff, nat_degree_eq_of_degree_eq_some (is_unit_iff_degree_eq_zero.1 hu)]⟩)
100100
(λ f p hf0 hp ih hfs,
101-
have hpf0 : p * f ≠ 0, from mul_ne_zero (nonzero_of_irreducible hp) hf0,
101+
have hpf0 : p * f ≠ 0, from mul_ne_zero (ne_zero_of_irreducible hp) hf0,
102102
let ⟨s, hs⟩ := ih (splits_of_splits_mul _ hpf0 hfs).2 in
103103
⟨-(p * norm_unit p).coeff 0 :: s,
104104
have hp1 : degree p = 1, from hfs.resolve_left hpf0 hp (by simp),
105105
begin
106106
rw [multiset.map_cons, multiset.prod_cons, leading_coeff_mul, C_mul, mul_assoc,
107107
mul_left_comm (C f.leading_coeff), ← hs, ← mul_assoc, domain.mul_right_inj hf0],
108108
conv_lhs {rw eq_X_add_C_of_degree_eq_one hp1},
109-
simp only [mul_add, coe_norm_unit (nonzero_of_irreducible hp), mul_comm p, coeff_neg,
109+
simp only [mul_add, coe_norm_unit (ne_zero_of_irreducible hp), mul_comm p, coeff_neg,
110110
C_neg, sub_eq_add_neg, neg_neg, coeff_C_mul, (mul_assoc _ _ _).symm, C_mul.symm,
111111
mul_inv_cancel (show p.leading_coeff ≠ 0, from mt leading_coeff_eq_zero.1
112-
(nonzero_of_irreducible hp)), one_mul],
112+
(ne_zero_of_irreducible hp)), one_mul],
113113
end⟩)
114114

115115
section UFD

src/ring_theory/principal_ideal_domain.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ lemma is_maximal_of_irreducible {p : α} (hp : irreducible p) :
127127
end
128128

129129
lemma irreducible_iff_prime {p : α} : irreducible p ↔ prime p :=
130-
⟨λ hp, (span_singleton_prime $ nonzero_of_irreducible hp).1 $
130+
⟨λ hp, (span_singleton_prime $ ne_zero_of_irreducible hp).1 $
131131
(is_maximal_of_irreducible hp).is_prime,
132132
irreducible_of_prime⟩
133133

src/ring_theory/unique_factorization_domain.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ multiset.induction_on (factors a)
7070
mt is_unit_of_mul_is_unit_left $ mt is_unit_of_mul_is_unit_left
7171
(hs p (multiset.mem_cons_self _ _)).2.1),
7272
⟨associated.symm (by clear _let_match; simp * at *), hs0 ▸ rfl⟩⟩)
73-
(factors_prod (nonzero_of_irreducible ha))
74-
(prime_factors (nonzero_of_irreducible ha))
73+
(factors_prod (ne_zero_of_irreducible ha))
74+
(prime_factors (ne_zero_of_irreducible ha))
7575

7676
lemma irreducible_iff_prime {p : α} : irreducible p ↔ prime p :=
7777
by letI := classical.dec_eq α; exact
@@ -110,7 +110,7 @@ by haveI := classical.dec_eq α; exact
110110
(λ q (hq : q ∈ g.erase b), hg q (multiset.mem_of_mem_erase hq))
111111
(associated_mul_left_cancel
112112
(by rwa [← multiset.prod_cons, ← multiset.prod_cons, multiset.cons_erase hbg]) hb
113-
(nonzero_of_irreducible (hf p (by simp)))))
113+
(ne_zero_of_irreducible (hf p (by simp)))))
114114
end)
115115

116116
end unique_factorization_domain
@@ -148,7 +148,7 @@ def of_unique_irreducible_factorization {α : Type*} [integral_domain α]
148148
by letI := classical.dec_eq α; exact
149149
{ prime_factors := λ a h p (hpa : p ∈ o.factors a),
150150
have hpi : irreducible p, from o.irreducible_factors h _ hpa,
151-
nonzero_of_irreducible hpi, hpi.1,
151+
ne_zero_of_irreducible hpi, hpi.1,
152152
λ a b ⟨x, hx⟩,
153153
if hab0 : a * b = 0
154154
then (eq_zero_or_eq_zero_of_mul_eq_zero hab0).elim

0 commit comments

Comments
 (0)