reserve i,j for Nat;
reserve A,B for Ring;

theorem Th15:
  for B be comRing
  for p,q be Polynomial of A for x be Element of B st A is Subring of B holds
  Ext_eval((Leading-Monomial p)*'q,x)
  = Ext_eval(Leading-Monomial(p),x) * Ext_eval(q,x)
proof
  let B be comRing;
  let p1,q be Polynomial of A;
  let x be Element of B;
  assume
A0: A is Subring of B;
  set p=Leading-Monomial(p1);
  defpred P[Nat] means for q be Polynomial of A holds len q = $1 implies
  Ext_eval(p*'q,x) = Ext_eval(p,x)*Ext_eval(q,x);
A1: for k be Nat st for n be Nat st n < k holds P[n] holds P[k]
  proof
    let k be Nat;
    assume
A2: for n be Nat st n < k holds for q be Polynomial of A holds len q = n
    implies Ext_eval(p*'q,x) = Ext_eval(p,x) * Ext_eval(q,x);
    let q be Polynomial of A;
    assume
A3: len q = k;
    per cases;
    suppose
A4:   len q <> 0;
      set LMq = Leading-Monomial(q);
      consider r be Polynomial of A such that
A5:   len r < len q and
A6:   q = r+Leading-Monomial(q) and
      for n be Element of NAT st n < len q-1 holds r.n = q.n
      by A4,POLYNOM4:16;
      thus Ext_eval(p*'q,x)=Ext_eval(p*'r+p*'LMq,x) by A6,POLYNOM3:31
        .= Ext_eval(p*'r,x) + Ext_eval(p*'LMq,x) by A0,Th19
        .= Ext_eval(p,x)*Ext_eval(r,x)+Ext_eval(p*'LMq,x) by A2,A3,A5
        .= Ext_eval(p,x)*Ext_eval(r,x) + Ext_eval(p,x)*Ext_eval(LMq,x)
           by A0,Th22
        .= Ext_eval(p,x)*(Ext_eval(r,x) + Ext_eval(LMq,x))
           by VECTSP_1:def 7
        .= Ext_eval(p,x) * Ext_eval(q,x) by A0,A6,Th19;
    end;
    suppose
      len q = 0; then
A7:   q = 0_.A by POLYNOM4:5;
      hence Ext_eval(p*'q,x) = Ext_eval(0_.A,x) by POLYNOM3:34
        .= Ext_eval(p,x) * 0.B by Th17
        .= Ext_eval(p,x) * Ext_eval(q,x) by A7,Th17;
    end;
  end;
A8: for n be Nat holds P[n] from NAT_1:sch 4(A1);
  len q = len q;
  hence thesis by A8;
end;
