
theorem Th14:
  for L being add-associative right_zeroed right_complementable
  non empty addLoopStr, F being FinSequence of (the carrier of L)* holds Sum
  FlattenSeq F = Sum Sum F
proof
  let L be add-associative right_zeroed right_complementable non empty
  addLoopStr;
  defpred P[FinSequence of (the carrier of L)*] means Sum FlattenSeq $1 = Sum
  Sum $1;
A1: for f being FinSequence of (the carrier of L)*, p being Element of (the
  carrier of L)* st P[f] holds P[f^<*p*>]
  proof
    let f be FinSequence of (the carrier of L)*, p be Element of (the carrier
    of L)* such that
A2: Sum FlattenSeq f = Sum Sum f;
    thus Sum FlattenSeq(f^<*p*>) = Sum((FlattenSeq f)^FlattenSeq <*p*>) by
PRE_POLY:3
      .= Sum((FlattenSeq f)^p) by PRE_POLY:1
      .= Sum Sum f +Sum p by A2,RLVECT_1:41
      .= Sum Sum f+Sum<*Sum p*> by RLVECT_1:44
      .= Sum(Sum f^<*Sum p*>) by RLVECT_1:41
      .= Sum(Sum f^Sum<*p*>) by Th4
      .= Sum Sum(f^<*p*>) by Th5;
  end;
  Sum FlattenSeq(<*>((the carrier of L)*)) = Sum <*>(the carrier of L);
  then
A3: P[<*>((the carrier of L)*)] by Th3;
  thus for f be FinSequence of (the carrier of L)* holds P[f] from FINSEQ_2:
  sch 2(A3,A1);
end;
