
theorem Th12:
  for n being Ordinal, L being right_zeroed right-distributive
non empty doubleLoopStr, p,q being Series of n,L, b being bag of n holds b *'
  (p + q) = b *' p + b *' q
proof
  let n be Ordinal, L be right_zeroed right-distributive non empty
  doubleLoopStr, p1,p2 be Series of n,L, b be bag of n;
  set q1 = b *' (p1 + p2), q2 = b *' p1 + b *' p2;
A1: now
    let x be object;
    assume x in dom q1;
    then reconsider u = x as bag of n;
    now
      per cases;
      case
A2:     b divides u;
        hence q1.u = (p1+p2).(u -' b) by POLYRED:def 1
          .= p1.(u -' b) + p2.(u -' b) by POLYNOM1:15
          .= (b*'p1).u + p2.(u -' b) by A2,POLYRED:def 1
          .= (b*'p1).u + (b*'p2).u by A2,POLYRED:def 1
          .= q2.u by POLYNOM1:15;
      end;
      case
A3:     not b divides u;
        hence q1.u = 0.L by POLYRED:def 1
          .= 0.L + 0.L by RLVECT_1:def 4
          .= (b*'p1).u + 0.L by A3,POLYRED:def 1
          .= (b*'p1).u + (b*'p2).u by A3,POLYRED:def 1
          .= q2.u by POLYNOM1:15;
      end;
    end;
    hence q1.x = q2.x;
  end;
  dom q1 = Bags n by FUNCT_2:def 1
    .= dom q2 by FUNCT_2:def 1;
  hence thesis by A1,FUNCT_1:2;
end;
