Section MoreFieldOver.
Variables (F0 : fieldType) (L : fieldExtType F0) (F : {subfield L}).
Let nz_p0 : p0 != 0. Proof. by rewrite monic_neq0 // p0_mon. Qed.
Let p0z0 : root p0^iota z0.
Let n_gt0: 0 < n.
Let z0Ciota : commr_rmorph iota z0. Proof. by move=> x; apply: mulrC. Qed.
Local Notation iotaPz := (horner_morph z0Ciota).
Let iotaFz (x : 'rV[F]_n) := iotaPz (rVpoly x).
Definition equiv_subfext x y := (iotaFz x == iotaFz y).
Fact equiv_subfext_is_equiv : equiv_class_of equiv_subfext.
Canonical pi_subfx_inj_morph := PiMono1 pi_subfx_inj.
Let iotaPz_repr x : iotaPz (rVpoly (repr (\pi_(subFExtend) x))) = iotaFz x.
Canonical pi_subfx_add_morph := PiMorph2 pi_subfext_add.
Definition subfext_opp := lift_op1 subFExtend -%R.
Fact pi_subfext_opp : {morph \pi : x / - x >-> subfext_opp x}.
Canonical pi_subfext_opp_morph := PiMorph1 pi_subfext_opp.
Fact addfxA : associative subfext_add.
Definition subfx_mul_rep (x y : 'rV[F]_n) : 'rV[F]_n :=
poly_rV ((rVpoly x) * (rVpoly y) %% p0).
Definition subfext_mul := lift_op2 subFExtend subfx_mul_rep.
Fact pi_subfext_mul :
{morph \pi : x y / subfx_mul_rep x y >-> subfext_mul x y}.
Canonical pi_subfext_mul_morph := PiMorph2 pi_subfext_mul.
Definition subfext1 := lift_cst subFExtend (poly_rV 1).
Canonical subfext1_morph := PiConst subfext1.
Fact mulfxA : associative (subfext_mul).
Fact mulfxC : commutative subfext_mul.
Fact mul1fx : left_id subfext1 subfext_mul.
Fact mulfx_addl : left_distributive subfext_mul subfext_add.
Fact nonzero1fx : subfext1 != subfext0.
Definition subfext_comRingMixin :=
ComRingMixin mulfxA mulfxC mul1fx mulfx_addl nonzero1fx.
Canonical subfext_Ring := Eval hnf in RingType subFExtend subfext_comRingMixin.
Canonical subfext_comRing := Eval hnf in ComRingType subFExtend mulfxC.
Definition subfx_poly_inv (q : {poly F}) : {poly F} :=
if iotaPz q == 0 then 0 else
let r := gdcop q p0 in let: (u, v) := egcdp q r in
((u * q + v * r)`_0)^-1 *: u.
Let subfx_poly_invE q : iotaPz (subfx_poly_inv q) = (iotaPz q)^-1.
Definition subfx_inv_rep (x : 'rV[F]_n) : 'rV[F]_n :=
poly_rV (subfx_poly_inv (rVpoly x) %% p0).
Definition subfext_inv := lift_op1 subFExtend subfx_inv_rep.
Fact pi_subfext_inv : {morph \pi : x / subfx_inv_rep x >-> subfext_inv x}.
Canonical pi_subfext_inv_morph := PiMorph1 pi_subfext_inv.
Fact subfx_fieldAxiom :
GRing.Field.axiom (subfext_inv : subFExtend -> subFExtend).
Fact subfx_inv0 : subfext_inv (0 : subFExtend) = (0 : subFExtend).
Definition subfext_unitRingMixin := FieldUnitMixin subfx_fieldAxiom subfx_inv0.
Canonical subfext_unitRingType :=
Eval hnf in UnitRingType subFExtend subfext_unitRingMixin.
Canonical subfext_comUnitRing := Eval hnf in [comUnitRingType of subFExtend].
Definition subfext_fieldMixin := @FieldMixin _ _ subfx_fieldAxiom subfx_inv0.
Definition subfext_idomainMixin := FieldIdomainMixin subfext_fieldMixin.
Canonical subfext_idomainType :=
Eval hnf in IdomainType subFExtend subfext_idomainMixin.
Canonical subfext_fieldType :=
Eval hnf in FieldType subFExtend subfext_fieldMixin.
Fact subfx_inj_is_rmorphism : rmorphism subfx_inj.
Canonical subfx_inj_additive := Additive subfx_inj_is_rmorphism.
Canonical subfx_inj_rmorphism := RMorphism subfx_inj_is_rmorphism.
Definition subfx_eval := lift_embed subFExtend (fun q => poly_rV (q %% p0)).
Canonical subfx_eval_morph := PiEmbed subfx_eval.
Definition subfx_root := subfx_eval 'X.
Canonical subfx_eval_additive := Additive subfx_eval_is_rmorphism.
Canonical subfx_eval_rmorphism := AddRMorphism subfx_eval_is_rmorphism.
Definition inj_subfx := (subfx_eval \o polyC).
Canonical inj_subfx_addidive := [additive of inj_subfx].
Canonical inj_subfx_rmorphism := [rmorphism of inj_subfx].
Definition subfx_scale a x := inj_subfx a * x.
Fact subfx_scalerA a b x :
subfx_scale a (subfx_scale b x) = subfx_scale (a * b) x.

Lemma subfx_irreducibleP :
(forall q, root q^iota z -> q != 0 -> size p <= size q) <-> irreducible_poly p.