Skip to content

Commit 3cbc3b2

Browse files
authored
Merge pull request #149 from Ruben-VandeVelde/M_monic
Prove F_degree, M_deg_eq_F_deg, M_monic
2 parents d56dd12 + 03c3f5d commit 3cbc3b2

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

FLT/MathlibExperiments/FrobeniusRiou.lean

+18-18
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,16 @@ theorem F_monic [Nontrivial B] (b : B) : (F G b).Monic := by
138138
have := Fintype.ofFinite G
139139
rw [Monic, F_spec, finprod_eq_prod_of_fintype, leadingCoeff_prod'] <;> simp
140140

141-
variable (G) in
142-
theorem F_degree (b : B) [Nontrivial B] : (F G b).degree = Nat.card G := by
143-
unfold F
144-
-- need (∏ᶠ fᵢ).degree = ∑ᶠ (fᵢ.degree)
145-
-- then it should be easy
146-
sorry
147-
148141
theorem F_natdegree [Nontrivial B] (b : B) : (F G b).natDegree = Nat.card G := by
149-
rw [← degree_eq_iff_natDegree_eq_of_pos Nat.card_pos]
150-
exact F_degree G b
142+
have := Fintype.ofFinite G
143+
rw [F_spec, finprod_eq_prod_of_fintype, natDegree_prod_of_monic _ _ (fun _ _ => monic_X_sub_C _)]
144+
simp only [natDegree_X_sub_C, Finset.sum_const, Finset.card_univ, Fintype.card_eq_nat_card,
145+
nsmul_eq_mul, mul_one, Nat.cast_id]
146+
147+
variable (G) in
148+
theorem F_degree [Nontrivial B] (b : B) : (F G b).degree = Nat.card G := by
149+
have := Fintype.ofFinite G
150+
rw [degree_eq_iff_natDegree_eq_of_pos Nat.card_pos, F_natdegree]
151151

152152
theorem F_smul_eq_self (σ : G) (b : B) : σ • (F G b) = F G b := calc
153153
σ • F G b = σ • ∏ᶠ τ : G, (X - C (τ • b)) := by rw [F_spec]
@@ -242,12 +242,15 @@ theorem M_coeff_card (b : B) :
242242
exact coeff_monomial_of_ne (splitting_of_full hFull ((F G b).coeff d)) hd
243243

244244
-- **IMPORTANT** `M` should be refactored before proving this. See commented out code below.
245-
theorem M_deg_eq_F_deg (b : B) : (M hFull b).degree = (F G b).degree := by
245+
theorem M_deg_eq_F_deg [Nontrivial A] (b : B) : (M hFull b).degree = (F G b).degree := by
246246
apply le_antisymm (M_deg_le hFull b)
247-
-- hopefully not too hard from previous two lemmas
248-
sorry
247+
rw [F_degree]
248+
have := M_coeff_card hFull b
249+
refine le_degree_of_ne_zero ?h
250+
rw [this]
251+
exact one_ne_zero
249252

250-
theorem M_deg (b : B) : (M hFull b).degree = Nat.card G := by
253+
theorem M_deg [Nontrivial A] (b : B) : (M hFull b).degree = Nat.card G := by
251254
rw [M_deg_eq_F_deg hFull b]
252255
exact F_degree G b
253256

@@ -259,10 +262,7 @@ theorem M_monic (b : B) : (M hFull b).Monic := by
259262
rw [← F_natdegree b] at this2 this3
260263
-- then the hypos say deg(M)<=n, coefficient of X^n is 1 in M
261264
have this4 : (M hFull b).natDegree ≤ (F G b).natDegree := natDegree_le_natDegree this1
262-
clear this1
263-
-- Now it's just a logic puzzle. If deg(F)=n>0 then we
264-
-- know deg(M)<=n and the coefficient of X^n is 1 in M
265-
sorry
265+
exact Polynomial.monic_of_natDegree_le_of_coeff_eq_one _ this4 this2
266266

267267
omit [Nontrivial B] in
268268
theorem M_spec (b : B) : ((M hFull b : A[X]) : B[X]) = F G b := by
@@ -294,7 +294,7 @@ theorem M_spec' (b : B) : (map (algebraMap A B) (M G hFull b)) = F G b :=
294294
(F_descent_monic hFull b).choose_spec.1
295295
296296
theorem M_monic (b : B) : (M G hFull b).Monic := (F_descent_monic hFull b).choose_spec.2
297-
--/
297+
-/
298298

299299
omit [Nontrivial B] in
300300
theorem coe_poly_as_map (p : A[X]) : (p : B[X]) = map (algebraMap A B) p := rfl

blueprint/src/chapter/FrobeniusProject.tex

+6-1
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,22 @@ \section{The extension $B/A$.}
174174
\label{MulSemiringAction.CharacteristicPolynomial.M_deg}
175175
\lean{MulSemiringAction.CharacteristicPolynomial.M_deg}
176176
\uses{MulSemiringAction.CharacteristicPolynomial.M}
177+
\leanok
177178
$M_b$ has degree $n$.
178179
\end{lemma}
179-
\begin{proof} Exercise.
180+
\begin{proof}
181+
\leanok
182+
Exercise.
180183
\end{proof}
181184
\begin{lemma}
182185
\lean{MulSemiringAction.CharacteristicPolynomial.M_monic}
183186
\label{MulSemiringAction.CharacteristicPolynomial.M_monic}
184187
\uses{MulSemiringAction.CharacteristicPolynomial.M}
188+
\leanok
185189
$M_b$ is monic.
186190
\end{lemma}
187191
\begin{proof}
192+
\leanok
188193
Exercise.
189194
\end{proof}
190195

0 commit comments

Comments
 (0)