@@ -139,26 +139,72 @@ theorem splits_X_pow (n : ℕ) : (X ^ n).Splits i :=
139
139
theorem splits_id_iff_splits {f : K[X]} : (f.map i).Splits (RingHom.id L) ↔ f.Splits i := by
140
140
rw [splits_map_iff, RingHom.id_comp]
141
141
142
- theorem Splits.comp_X_sub_C {i : L →+* F} (a : L) {f : L[X]}
143
- (h : f.Splits i) : (f.comp (X - C a)).Splits i := by
142
+ variable {i}
143
+
144
+ theorem Splits.comp_of_map_degree_le_one {f : K[X]} {p : K[X]} (hd : (p.map i).degree ≤ 1 )
145
+ (h : f.Splits i) : (f.comp p).Splits i := by
146
+ by_cases hzero : map i (f.comp p) = 0
147
+ · exact Or.inl hzero
144
148
cases h with
145
149
| inl h0 =>
146
- left
147
- simp only [map_eq_zero] at h0 ⊢
148
- exact h0.symm ▸ zero_comp
150
+ exact Or.inl <| map_comp i _ _ ▸ h0.symm ▸ zero_comp
149
151
| inr h =>
150
152
right
151
153
intro g irr dvd
152
- rw [map_comp, Polynomial.map_sub, map_X, map_C, dvd_comp_X_sub_C_iff] at dvd
153
- have := h (irr.map (algEquivAevalXAddC _)) dvd
154
- rw [degree_eq_natDegree irr.ne_zero]
155
- rwa [algEquivAevalXAddC_apply, ← comp_eq_aeval,
156
- degree_eq_natDegree (fun h => WithBot.bot_ne_one (h ▸ this)),
157
- natDegree_comp, natDegree_X_add_C, mul_one] at this
158
-
159
- theorem Splits.comp_X_add_C {i : L →+* F} (a : L) {f : L[X]}
160
- (h : f.Splits i) : (f.comp (X + C a)).Splits i := by
161
- simpa only [map_neg, sub_neg_eq_add] using h.comp_X_sub_C (-a)
154
+ rw [map_comp] at dvd hzero
155
+ cases lt_or_eq_of_le hd with
156
+ | inl hd =>
157
+ rw [eq_C_of_degree_le_zero (Nat.WithBot.lt_one_iff_le_zero.mp hd), comp_C] at dvd hzero
158
+ refine False.elim (irr.1 (isUnit_of_dvd_unit dvd ?_))
159
+ simpa using hzero
160
+ | inr hd =>
161
+ let _ := invertibleOfNonzero (leadingCoeff_ne_zero.mpr
162
+ (ne_zero_of_degree_gt (n := ⊥) (by rw [hd]; decide)))
163
+ rw [eq_X_add_C_of_degree_eq_one hd, dvd_comp_C_mul_X_add_C_iff _ _] at dvd
164
+ have := h (irr.map (algEquivCMulXAddC _ _).symm) dvd
165
+ rw [degree_eq_natDegree irr.ne_zero]
166
+ rwa [algEquivCMulXAddC_symm_apply, ← comp_eq_aeval,
167
+ degree_eq_natDegree (fun h => WithBot.bot_ne_one (h ▸ this)),
168
+ natDegree_comp, natDegree_C_mul (invertibleInvOf.ne_zero),
169
+ natDegree_X_sub_C, mul_one] at this
170
+
171
+ theorem splits_iff_comp_splits_of_degree_eq_one {f : K[X]} {p : K[X]} (hd : (p.map i).degree = 1 ) :
172
+ f.Splits i ↔ (f.comp p).Splits i := by
173
+ rw [← splits_id_iff_splits, ← splits_id_iff_splits (f := f.comp p), map_comp]
174
+ refine ⟨fun h => Splits.comp_of_map_degree_le_one
175
+ (le_of_eq (map_id (R := L) ▸ hd)) h, fun h => ?_⟩
176
+ let _ := invertibleOfNonzero (leadingCoeff_ne_zero.mpr
177
+ (ne_zero_of_degree_gt (n := ⊥) (by rw [hd]; decide)))
178
+ have : (map i f) = ((map i f).comp (map i p)).comp ((C ⅟ (map i p).leadingCoeff *
179
+ (X - C ((map i p).coeff 0 )))) := by
180
+ rw [comp_assoc]
181
+ nth_rw 1 [eq_X_add_C_of_degree_eq_one hd]
182
+ simp only [coeff_map, invOf_eq_inv, mul_sub, ← C_mul, add_comp, mul_comp, C_comp, X_comp,
183
+ ← mul_assoc]
184
+ simp
185
+ refine this ▸ Splits.comp_of_map_degree_le_one ?_ h
186
+ simp [degree_C (inv_ne_zero (Invertible.ne_zero (a := (map i p).leadingCoeff)))]
187
+
188
+ /--
189
+ This is a weaker variant of `Splits.comp_of_map_degree_le_one`,
190
+ but its conditions are easier to check.
191
+ -/
192
+ theorem Splits.comp_of_degree_le_one {f : K[X]} {p : K[X]} (hd : p.degree ≤ 1 )
193
+ (h : f.Splits i) : (f.comp p).Splits i :=
194
+ Splits.comp_of_map_degree_le_one ((degree_map_le i _).trans hd) h
195
+
196
+ theorem Splits.comp_X_sub_C (a : K) {f : K[X]}
197
+ (h : f.Splits i) : (f.comp (X - C a)).Splits i :=
198
+ Splits.comp_of_degree_le_one (degree_X_sub_C_le _) h
199
+
200
+ theorem Splits.comp_X_add_C (a : K) {f : K[X]}
201
+ (h : f.Splits i) : (f.comp (X + C a)).Splits i :=
202
+ Splits.comp_of_degree_le_one (by simpa using degree_X_sub_C_le (-a)) h
203
+
204
+ theorem Splits.comp_neg_X {f : K[X]} (h : f.Splits i) : (f.comp (-X)).Splits i :=
205
+ Splits.comp_of_degree_le_one (by simpa using degree_X_sub_C_le (0 : K)) h
206
+
207
+ variable (i)
162
208
163
209
theorem exists_root_of_splits' {f : K[X]} (hs : Splits i f) (hf0 : degree (f.map i) ≠ 0 ) :
164
210
∃ x, eval₂ i x f = 0 :=
0 commit comments