Skip to content

Commit

Permalink
refactor(data/polynomial/degree/definitions): Remove hypothesis of na…
Browse files Browse the repository at this point in the history
…t_degree_X_pow_sub_C (#6628)

The lemma `nat_degree_X_pow_sub_C ` had an unnecessary hypothesis.
  • Loading branch information
tb65536 committed Mar 11, 2021
1 parent 41f1196 commit 57fda28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/data/polynomial/degree/definitions.lean
Expand Up @@ -866,9 +866,13 @@ theorem zero_nmem_multiset_map_X_sub_C {α : Type*} (m : multiset α) (f : α
(0 : polynomial R) ∉ m.map (λ a, X - C (f a)) :=
λ mem, let ⟨a, _, ha⟩ := multiset.mem_map.mp mem in X_sub_C_ne_zero _ ha

lemma nat_degree_X_pow_sub_C {n : ℕ} (hn : 0 < n) {r : R} :
lemma nat_degree_X_pow_sub_C {n : ℕ} {r : R} :
(X ^ n - C r).nat_degree = n :=
by { apply nat_degree_eq_of_degree_eq_some, simp [degree_X_pow_sub_C hn], }
begin
by_cases hn : n = 0,
{ rw [hn, pow_zero, ←C_1, ←ring_hom.map_sub, nat_degree_C] },
{ exact nat_degree_eq_of_degree_eq_some (degree_X_pow_sub_C (pos_iff_ne_zero.mpr hn) r) },
end

end nonzero_ring

Expand Down
3 changes: 1 addition & 2 deletions src/ring_theory/polynomial/cyclotomic.lean
Expand Up @@ -145,7 +145,7 @@ begin
have hmonic : (X ^ n - C (1 : K)).monic := monic_X_pow_sub_C (1 : K) (ne_of_lt hpos).symm,
symmetry,
apply prod_multiset_X_sub_C_of_monic_of_roots_card_eq hmonic,
rw [@nat_degree_X_pow_sub_C K _ _ n hpos 1, ← nth_roots],
rw [@nat_degree_X_pow_sub_C K _ _ n 1, ← nth_roots],
exact is_primitive_root.card_nth_roots h
end

Expand All @@ -165,7 +165,6 @@ begin
{ simp only [hzero, ring_hom.map_one, splits_zero, pow_zero, sub_self] },
rw [splits_iff_card_roots, ← nth_roots, is_primitive_root.card_nth_roots h,
nat_degree_X_pow_sub_C],
exact nat.pos_of_ne_zero hzero
end

/-- If there is a primitive `n`-th root of unity in `K`, then
Expand Down

0 comments on commit 57fda28

Please sign in to comment.