Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(field_theory/separable): X^n - 1 is separable iff ↑n ≠ 0. #9779

Closed
wants to merge 6 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/field_theory/separable.lean
Expand Up @@ -513,6 +513,26 @@ begin
... = (1 : polynomial F) : by rw [← C_mul, inv_mul_cancel ha, C_1]
end

-- further work: 90% sure that in a nontrivial comm_ring, X^n - 1 ↔ is_unit ↑n
Vierkantor marked this conversation as resolved.
Show resolved Hide resolved
Vierkantor marked this conversation as resolved.
Show resolved Hide resolved
lemma X_pow_sub_one_separable_iff {n : ℕ} : (X ^ n - 1 : polynomial F).separable ↔ (n : F) ≠ 0 :=
begin
refine ⟨_, λ h, separable_X_pow_sub_C 1 h one_ne_zero⟩,
rw [separable_def', derivative_sub, derivative_X_pow, derivative_one, sub_zero],
rintro ⟨a, b, h⟩ hn',
obtain rfl | hn := eq_or_ne n 0,
{ simpa only [add_zero, nat.cast_zero, zero_mul,
zero_ne_one, mul_zero, pow_zero, sub_self] using h },
rw [←C_eq_nat_cast, ←smul_eq_C_mul, hn', zero_smul, mul_zero, add_zero] at h,
obtain rfl | ha := eq_or_ne a 0,
{ simpa only [zero_mul, coeff_one_zero, zero_ne_one, coeff_zero] using ext_iff.mp h 0 },
replace h := congr_arg polynomial.degree h,
rw [degree_mul, degree_one] at h,
refine absurd (nat.with_bot.add_eq_zero_iff.mp h).2 _,
rw [←C_1, degree_X_pow_sub_C hn.bot_lt],
exact_mod_cast hn,
apply_instance
end

/--If `n ≠ 0` in `F`, then ` X ^ n - a` is squarefree for any `a ≠ 0`. -/
lemma squarefree_X_pow_sub_C {n : ℕ} (a : F) (hn : (n : F) ≠ 0) (ha : a ≠ 0) :
squarefree (X ^ n - C a) :=
Expand Down