
theorem
  for S1,S2,S3 being non empty ManySortedSign, A1 being non-empty
  MSAlgebra over S1, A2 being non-empty MSAlgebra over S2, A3 being non-empty
  MSAlgebra over S3 st the Sorts of A1 tolerates the Sorts of A2 & the Sorts of
A2 tolerates the Sorts of A3 & the Sorts of A3 tolerates the Sorts of A1 holds
  (A1+*A2)+*A3 = A1+*(A2+*A3)
proof
  let S1,S2,S3 be non empty ManySortedSign, A1 be non-empty MSAlgebra over S1,
A2 be non-empty MSAlgebra over S2, A3 be non-empty MSAlgebra over S3 such that
A1: the Sorts of A1 tolerates the Sorts of A2 and
A2: the Sorts of A2 tolerates the Sorts of A3 and
A3: the Sorts of A3 tolerates the Sorts of A1;
  set A12 = A1+*A2, A23 = A2+*A3;
A4: the Charact of A12 = (the Charact of A1) +* (the Charact of A2) by A1,Def4;
  set A1293 = A12+*A3, A1923 = A1+*A23;
  set s1 = the Sorts of A1, s2 = the Sorts of A2, s3 = the Sorts of A3;
A5: the Sorts of A23 = (the Sorts of A2) +* (the Sorts of A3) by A2,Def4;
A6: the Sorts of A1 tolerates the Sorts of A23
  proof
    let x be object;
    assume
A7: x in (dom s1) /\ dom the Sorts of A23;
    then x in dom the Sorts of A23 by XBOOLE_0:def 4;
    then
A8: x in dom s2 or x in dom s3 by A5,FUNCT_4:12;
    x in dom s1 by A7,XBOOLE_0:def 4;
    then x in (dom s1) /\ dom s2 & (s2+*s3).x = s2.x or x in (dom s3) /\ dom
    s1 & (s2+*s3).x = s3.x by A2,A8,FUNCT_4:13,15,XBOOLE_0:def 4;
    hence thesis by A1,A3,A5;
  end;
  then
A9: the Sorts of A1923 = (the Sorts of A1) +* (the Sorts of A23) by Def4;
A10: the Charact of A23 = (the Charact of A2) +* (the Charact of A3) by A2,Def4
;
A11: the Charact of A1923 = (the Charact of A1) +* (the Charact of A23) by A6
,Def4;
A12: the Sorts of A12 = (the Sorts of A1) +* (the Sorts of A2) by A1,Def4;
A13: the Sorts of A12 tolerates the Sorts of A3
  proof
    let x be object;
    assume
A14: x in (dom the Sorts of A12) /\ dom s3;
    then x in dom the Sorts of A12 by XBOOLE_0:def 4;
    then
A15: x in dom s1 or x in dom s2 by A12,FUNCT_4:12;
    x in dom s3 by A14,XBOOLE_0:def 4;
    then x in (dom s3) /\ dom s1 & (s1+*s2).x = s1.x or x in (dom s2) /\ dom
    s3 & (s1+*s2).x = s2.x by A1,A15,FUNCT_4:13,15,XBOOLE_0:def 4;
    hence thesis by A2,A3,A12;
  end;
  then the Charact of A1293 = (the Charact of A12) +* (the Charact of A3) by
Def4;
  then
A16: the Charact of A1293 = the Charact of A1923 by A4,A10,A11,FUNCT_4:14;
  the Sorts of A1293 = (the Sorts of A12) +* (the Sorts of A3) by A13,Def4;
  then the Sorts of A1293 = the Sorts of A1923 by A12,A5,A9,FUNCT_4:14;
  hence thesis by A16;
end;
