
theorem Th11:
for R,S being non degenerated comRing
for n being Ordinal
for p being Polynomial of n,R
for b being bag of n st Support p = {b}
for x being Function of n,S holds Ext_eval(p,x) = In(p.b,S) * eval(b,x)
proof
  let R,S be non degenerated comRing;
  let n be Ordinal, p be Polynomial of n,R;
  let b be bag of n;
assume A0: Support p = {b};
  let x be Function of n,S;
  reconsider sp = Support p as finite Subset of Bags n;
  set sg = SgmX(BagOrder n, sp);
A3: BagOrder n linearly_orders sp by POLYNOM2:18;
A4: rng sg = {b} by A0,A3,PRE_POLY:def 2;
  then
A5: b in rng sg by TARSKI:def 1;
  then
A6: 1 in dom sg by FINSEQ_3:31;
  then
A7: sg/.1 = sg.1 by PARTFUN1:def 6;
A8: for u being object holds u in dom sg implies u in {1}
  proof
    let u be object;
    assume
A9: u in dom sg;
    assume
A10: not u in {1};
    reconsider u as Element of NAT by A9;
    sg/.u = sg.u by A9,PARTFUN1:def 6;
    then
A11: sg/.u in rng sg by A9,FUNCT_1:def 3;
A12: u <> 1 by A10,TARSKI:def 1;
A13: 1 < u
    proof
      consider k being Nat such that
A14:  dom sg = Seg k by FINSEQ_1:def 2;
      ex m9 being Nat st m9 = u & 1 <= m9 & m9 <= k by A9,A14;
      hence thesis by A12,XXREAL_0:1;
    end;
    sg/.1 = sg.1 by A5,A9,FINSEQ_3:31,PARTFUN1:def 6;
    then sg/.1 in rng sg by A6,FUNCT_1:def 3;
    then sg/.1 = b by A4,TARSKI:def 1
      .= sg/.u by A4,A11,TARSKI:def 1;
    hence thesis by A3,A6,A9,A13,PRE_POLY:def 2;
  end;
Z:for u being object holds u in {1} implies u in dom sg by A6,TARSKI:def 1;
  then
A15: dom sg = Seg 1 by A8,FINSEQ_1:2,TARSKI:2;
A16: len sg = 1 by Z,A8,FINSEQ_1:2,TARSKI:2,FINSEQ_1:def 3;
A17: sg.1 in rng sg by A6,FUNCT_1:def 3;
A18: (p * sg).1 = p.(sg.1) by A6,FUNCT_1:13
    .= p.b by A4,A17,TARSKI:def 1;
  1 in dom sg by A15;
  then
A19: sg/.1 in rng sg by A7,FUNCT_1:def 3;
  consider y being FinSequence of the carrier of S such that
A21: Ext_eval(p,x) = Sum y and
A20: len y = len SgmX(BagOrder n, Support p) and
A22: for i being Element of NAT st 1 <= i & i <= len y
     holds y.i = In( (p * SgmX(BagOrder n, sp)).i ,S) *
                 eval(((SgmX(BagOrder n, sp))/.i),x)
  by defeval;
  y.1 = In((p * sg).1,S) * eval((sg/.1),x) by A20,A22,A16
     .= In((p * sg).1,S) * eval(b,x) by A4,A19,TARSKI:def 1;
  then y = <* In(p.b,S) * eval(b,x) *> by A20,A16,A18,FINSEQ_1:40;
  hence thesis by A21,RLVECT_1:44;
end;
