
theorem
  for L being right_zeroed add-associative right_complementable
well-unital distributive non trivial doubleLoopStr, p being Polynomial of {},
  L, x being Function of {},L holds eval(p,x) = p.(EmptyBag{})
proof
  set n = {};
  let L be right_zeroed add-associative right_complementable well-unital
  distributive non trivial doubleLoopStr, p be Polynomial of {},L, x be
  Function of {},L;
A1: for b being bag of n holds b = {}
  proof
    let b be bag of n;
    b in Bags n by PRE_POLY:def 12;
    hence thesis by PRE_POLY:51,TARSKI:def 1;
  end;
  then
A2: EmptyBag n = {};
  consider a being Element of L such that
A3: p = {EmptyBag n} --> a by Lm1;
A4: p.(EmptyBag n) = a by A3;
A5: dom p = {EmptyBag n} by A3;
  now
    per cases;
    case
A6:   a = 0.L;
      Support p = {}
      proof
        set u = the Element of Support p;
        assume
A7:     Support p <> {};
        then u in Support p;
        then reconsider u as Element of Bags n;
        p.u <> 0.L by A7,POLYNOM1:def 4;
        hence thesis by A1,A2,A4,A6;
      end;
      then reconsider Sp = Support p as empty Subset of Bags n;
      consider y being FinSequence of the carrier of L such that
A8:   len y = len SgmX(BagOrder n, Support p) and
A9:  eval(p,x) = Sum y and
      for i being Element of NAT st 1 <= i & i <= len y holds y/.i = (p *
SgmX(BagOrder n, Support p))/.i * eval(((SgmX(BagOrder n, Support p))/.i),x)
      by POLYNOM2:def 4;
      SgmX(BagOrder n, Sp) = {} by POLYNOM2:18,PRE_POLY:76;
      then y = <*>(the carrier of L) by A8;
      hence eval(p,x) = a by A6,A9,RLVECT_1:43;
    end;
    case
A10:  a <> 0.L;
      reconsider sp = Support p as finite Subset of Bags n;
      set sg = SgmX(BagOrder n, sp);
A11:  BagOrder n linearly_orders sp by POLYNOM2:18;
A12:  for u being object holds u in Support p implies u in {{}}
      proof
        let u be object;
        assume u in Support p;
        then reconsider u as Element of Bags n;
        u = {} by A1;
        hence thesis by TARSKI:def 1;
      end;
      for u being object holds u in {{}} implies u in Support p
      proof
        let u be object;
        assume u in {{}};
        then u = EmptyBag n by A2,TARSKI:def 1;
        hence thesis by A4,A10,POLYNOM1:def 4;
      end;
      then Support p = {{}} by A12,TARSKI:2;
      then
A13:  rng sg = {{}} by A11,PRE_POLY:def 2;
      then
A14:  {} in rng sg by TARSKI:def 1;
      then
A15:  1 in dom sg by FINSEQ_3:31;
      then sg.1 in dom p by A2,A5,A13,FUNCT_1:3;
      then 1 in dom (p * sg) by A15,FUNCT_1:11;
      then
A16:  (p * sg)/.1 = (p * sg).1 by PARTFUN1:def 6
        .= p.(sg.1) by A15,FUNCT_1:13
        .= a by A2,A3,A13,A15,FUNCOP_1:7,FUNCT_1:3;
A17:  for u being object holds u in dom sg implies u in {1}
      proof
        let u be object;
        assume
A18:    u in dom sg;
        assume
A19:    not u in {1};
        reconsider u as Element of NAT by A18;
        sg/.u = sg.u by A18,PARTFUN1:def 6;
        then
A20:    sg/.u in rng sg by A18,FUNCT_1:3;
A21:    u <> 1 by A19,TARSKI:def 1;
A22:    1 < u
        proof
          consider k being Nat such that
A23:      dom sg = Seg k by FINSEQ_1:def 2;
          Seg k = {m where m is Nat : 1 <= m & m <= k} by FINSEQ_1:def 1;
          then
          ex m9 being Nat st m9 = u & 1 <= m9 & m9 <= k by A18,A23;
          hence thesis by A21,XXREAL_0:1;
        end;
        sg/.1 = sg.1 by A14,A18,FINSEQ_3:31,PARTFUN1:def 6;
        then sg/.1 in rng sg by A15,FUNCT_1:3;
        then sg/.1 = {} by A13,TARSKI:def 1
          .= sg/.u by A13,A20,TARSKI:def 1;
        hence thesis by A11,A15,A18,A22,PRE_POLY:def 2;
      end;
      for u being object holds u in {1} implies u in dom sg
          by A15,TARSKI:def 1;
      then dom sg = Seg 1 by A17,FINSEQ_1:2,TARSKI:2;
      then
A24:  len sg = 1 by FINSEQ_1:def 3;
      consider y being FinSequence of the carrier of L such that
A25:  len y = len sg and
A26:  Sum y = eval(p,x) and
A27:  for i being Element of NAT st 1 <= i & i <= len y holds y/.i =
      (p * sg)/.i * eval((sg/.i),x) by POLYNOM2:def 4;
      dom y = Seg(len y) by FINSEQ_1:def 3
        .= dom sg by A25,FINSEQ_1:def 3;
      then y.1 = y/.1 by A14,FINSEQ_3:31,PARTFUN1:def 6
        .= (p * sg)/.1 * eval((sg/.1),x) by A24,A25,A27
        .= (p * sg)/.1 * eval(EmptyBag n,x) by A1,A2
        .= (p * sg)/.1 * 1.L by POLYNOM2:14
        .= a by A16;
      then y = <* a *> by A24,A25,FINSEQ_1:40;
      hence eval(p,x) = a by A26,RLVECT_1:44;
    end;
  end;
  hence thesis by A3;
end;
