
theorem Th8:
  for n being Ordinal, L being right_zeroed add-associative
  right_complementable well-unital distributive Abelian non trivial commutative
  associative non empty doubleLoopStr, b1,b2 being bag of n, x being Function
  of n, L holds eval(b1+b2,x) = eval(b1,x) * eval(b2,x)
proof
  let n be Ordinal, L be right_zeroed add-associative right_complementable
well-unital distributive Abelian commutative associative non trivial
  doubleLoopStr, b1,b2 be bag of n, x be Function of n, L;
  defpred P[Nat] means for b1 being bag of n st card(support b1) =
  $1 holds eval(b1+b2,x) = eval(b1,x) * eval(b2,x);
A1: ex k being Element of NAT st card(support b1) = k;
A2: for k being Nat st P[k] holds P[k + 1]
  proof
    let k be Nat;
    assume
A3: P[k];
    let b1 be bag of n;
    assume
A4: card(support b1) = k + 1;
    set sgb1 = SgmX(RelIncl n, support b1);
    set bg = sgb1/.(len sgb1);
A5: RelIncl n linearly_orders support b1 by PRE_POLY:82;
    then sgb1 <> {} by A4,CARD_1:27,PRE_POLY:def 2,RELAT_1:38;
    then 1 <= len sgb1 by NAT_1:14;
    then len sgb1 in Seg(len sgb1) by FINSEQ_1:1;
    then
A6: len sgb1 in dom sgb1 by FINSEQ_1:def 3;
    then sgb1/.(len sgb1) = sgb1.(len sgb1) by PARTFUN1:def 6;
    then bg in rng sgb1 by A6,FUNCT_1:def 3;
    then
A7: bg in support b1 by A5,PRE_POLY:def 2;
    set b19 = b1+*(bg,0);
    support b1 c= dom b1 by PRE_POLY:37;
    then
A8: b19 = b1+*(bg.-->0) by A7,FUNCT_7:def 3;
A9: for u being object holds u in support b1 implies u in support b19 \/ {bg }
    proof
      let u be object;
      assume u in support b1;
      then
A10:  b1.u <> 0 by PRE_POLY:def 7;
      per cases;
      suppose
        u = bg;
        then u in {bg} by TARSKI:def 1;
        hence thesis by XBOOLE_0:def 3;
      end;
      suppose
        u <> bg;
        then not u in {bg} by TARSKI:def 1;
        then not u in dom(bg.-->0);
        then b19.u = b1.u by A8,FUNCT_4:11;
        then u in support b19 by A10,PRE_POLY:def 7;
        hence thesis by XBOOLE_0:def 3;
      end;
    end;
    bg in {bg} by TARSKI:def 1;
    then bg in dom(bg.-->0);
    then b19.bg = (bg.-->0).bg by A8,FUNCT_4:13;
    then
A11: b19.bg = 0 by FUNCOP_1:72;
    then
A12: not bg in support b19 by PRE_POLY:def 7;
    for u being object holds u in support b19 \/ {bg} implies u in support b1
    proof
      let u be object;
      assume
A13:  u in support b19 \/ {bg};
      per cases by A13,XBOOLE_0:def 3;
      suppose
A14:    u in support b19;
        then u <> bg by A11,PRE_POLY:def 7;
        then not u in {bg} by TARSKI:def 1;
        then not u in dom(bg.-->0);
        then
A15:    b19.u = b1.u by A8,FUNCT_4:11;
        b19.u <> 0 by A14,PRE_POLY:def 7;
        hence thesis by A15,PRE_POLY:def 7;
      end;
      suppose
        u in {bg};
        hence thesis by A7,TARSKI:def 1;
      end;
    end;
    then support b1 = support b19 \/ {bg} by A9,TARSKI:2;
    then
A16: k + 1 = card(support b19) + 1 by A4,A12,CARD_2:41;
    set m = (EmptyBag n)+*(bg,b1.bg);
A17: dom b1 = n by PARTFUN1:def 2;
    dom(EmptyBag n) = n by PARTFUN1:def 2;
    then
A18: m = (EmptyBag n)+*(bg.-->b1.bg) by A7,FUNCT_7:def 3;
A19: for u being object holds u in support m implies u in {bg}
    proof
      let u be object;
      assume u in support m;
      then
A20:  m.u <> 0 by PRE_POLY:def 7;
      now
        assume u <> bg;
        then not u in {bg} by TARSKI:def 1;
        then not u in dom(bg.-->b1.bg);
        then m.u = (EmptyBag n).u by A18,FUNCT_4:11;
        hence contradiction by A20;
      end;
      hence thesis by TARSKI:def 1;
    end;
A21: b1.bg <> 0 by A7,PRE_POLY:def 7;
    for u being object holds u in {bg} implies u in support m
    proof
      let u be object;
      bg in {bg} by TARSKI:def 1;
      then bg in dom(bg.-->b1.bg);
      then m.bg = (bg.-->b1.bg).bg by A18,FUNCT_4:13;
      then
A22:  m.bg = b1.bg by FUNCOP_1:72;
      assume u in {bg};
      then u = bg by TARSKI:def 1;
      hence thesis by A21,A22,PRE_POLY:def 7;
    end;
    then
A23: support m = {bg} by A19,TARSKI:2;
A24: for u being object st u in n holds (b19+m).u = b1.u
    proof
      let u be object;
      assume u in n;
      per cases;
      suppose
A25:    u = bg;
        bg in {bg} by TARSKI:def 1;
        then bg in dom(bg.-->b1.bg);
        then m.bg = (bg.-->b1.bg).bg by A18,FUNCT_4:13;
        then
A26:    m.bg = b1.bg by FUNCOP_1:72;
        u in {bg} by A25,TARSKI:def 1;
        then u in dom(bg.-->0);
        then
A27:    b19.u = (bg.-->0).bg by A8,A25,FUNCT_4:13;
        (b19+m).u = b19.u + m.u by PRE_POLY:def 5
          .= 0 + b1.bg by A25,A27,A26,FUNCOP_1:72
          .= b1.bg;
        hence thesis by A25;
      end;
      suppose
        u <> bg;
        then
A28:    not u in {bg} by TARSKI:def 1;
        then
A29:    not u in dom(bg.-->0);
        not u in dom(bg.-->b1.bg) by A28;
        then m.u = (EmptyBag n).u by A18,FUNCT_4:11;
        then
A30:    m.u = 0;
        (b19+m).u = b19.u + m.u by PRE_POLY:def 5
          .= b1.u by A8,A29,A30,FUNCT_4:11;
        hence thesis;
      end;
    end;
A31: dom(b19 + m) = n by PARTFUN1:def 2;
    then eval(b1,x) = eval(m+b19,x) by A17,A24,FUNCT_1:2
      .= eval(b19,x) * eval(m,x) by A23,Lm5;
    hence eval(b1,x) * eval(b2,x) = (eval(b19,x) * eval(b2,x)) * eval(m,x) by
GROUP_1:def 3
      .= eval(b19+b2,x) * eval(m,x) by A3,A16
      .= eval(m+(b19+b2),x) by A23,Lm5
      .= eval((b19+m)+b2,x) by PRE_POLY:35
      .= eval(b1+b2,x) by A31,A17,A24,FUNCT_1:2;
  end;
A32: P[0]
  proof
    let b1 be bag of n;
    assume card(support b1) = 0;
    then support b1 = {};
    then
A33: b1 = EmptyBag n by PRE_POLY:81;
    hence eval(b1+b2,x) = 1.L * eval(b2,x) by PRE_POLY:53
      .= eval(b1,x) * eval(b2,x) by A33,Th6;
  end;
  for k being Nat holds P[k] from NAT_1:sch 2(A32,A2);
  hence thesis by A1;
end;
