
theorem Th5:
  for S being non void non empty ManySortedSign, o being OperSymbol
  of S, A1 be non-empty disjoint_valued MSAlgebra over S, A2 be non-empty
MSAlgebra over S, f be ManySortedFunction of A1,A2, a be Element of Args(o,A1)
  holds (Flatten f)*a = f#a
proof
  let S be non void non empty ManySortedSign, o be OperSymbol of S, A1 be
non-empty disjoint_valued MSAlgebra over S, A2 be non-empty MSAlgebra over S, f
  be ManySortedFunction of A1,A2, a be Element of Args(o,A1);
A1: dom(the Arity of S) = the carrier' of S by FUNCT_2:def 1;
  set s = the_arity_of o;
  a in ((the Sorts of A1)# * the Arity of S).o;
  then a in (the Sorts of A1)#.((the Arity of S).o) by A1,FUNCT_1:13;
  then
A2: a in product((the Sorts of A1)*s) by FINSEQ_2:def 5;
  then rng a c= Union ((the Sorts of A1)*s) by Th1;
  then union rng((the Sorts of A1)*s) c= union rng the Sorts of A1 & rng a c=
  union rng ((the Sorts of A1)*s) by CARD_3:def 4,RELAT_1:26,ZFMISC_1:77;
  then rng a c= union rng the Sorts of A1;
  then rng a c= Union the Sorts of A1 by CARD_3:def 4;
  then rng a c= dom(Flatten f) by FUNCT_2:def 1;
  then
A3: dom((Flatten f)*a) = dom a by RELAT_1:27;
A4: rng s c= the carrier of S by FINSEQ_1:def 4;
  dom the Sorts of A1 = the carrier of S by PARTFUN1:def 2;
  then
A5: dom((the Sorts of A1)*s) = dom s by A4,RELAT_1:27;
A6: dom a = dom((the Sorts of A1)*s) by A2,CARD_3:9;
A7: now
    let x be object;
    assume
A8: x in dom((the Sorts of A2)*s);
A9: dom((the Sorts of A2)*s) c= dom s by RELAT_1:25;
    then
A10: (the Sorts of A2).(s.x) = ((the Sorts of A2)*s).x by A8,FUNCT_1:13;
    s.x in rng s by A9,A8,FUNCT_1:def 3;
    then reconsider z = s.x as SortSymbol of S by A4;
    (the Sorts of A1).(s.x) = ((the Sorts of A1)*s).x by A9,A8,FUNCT_1:13;
    then
A11: a.x in (the Sorts of A1).z by A2,A5,A9,A8,CARD_3:9;
    ((Flatten f)*a).x = (Flatten f).(a.x) by A6,A5,A9,A8,FUNCT_1:13
      .=f.z.(a.x) by A11,Def1;
    hence ((Flatten f)*a).x in ((the Sorts of A2)*s).x by A10,A11,FUNCT_2:5;
  end;
  dom the Sorts of A2 = the carrier of S by PARTFUN1:def 2;
  then dom s = dom((the Sorts of A2)*s) by A4,RELAT_1:27;
  then (Flatten f)*a in product((the Sorts of A2)*s) by A3,A6,A5,A7,CARD_3:9;
  then (Flatten f)*a in (the Sorts of A2)#.((the Arity of S).o) by
FINSEQ_2:def 5;
  then reconsider x = (Flatten f)*a as Element of Args(o,A2) by A1,FUNCT_1:13;
  now
    let n be Nat;
    assume
A12: n in dom a;
    then
    (the_arity_of o)/.n = s.n & a.n in ((the Sorts of A1)*s).n by A2,A6,A5,
CARD_3:9,PARTFUN1:def 6;
    then
A13: a.n in (the Sorts of A1).((the_arity_of o)/.n) by A6,A5,A12,FUNCT_1:13;
    thus x.n =(Flatten f).(a.n) by A12,FUNCT_1:13
      .= (f.((the_arity_of o)/.n)).(a.n) by A13,Def1;
  end;
  hence thesis by MSUALG_3:def 6;
end;
