reserve i for Nat,
  j for Element of NAT,
  X,Y,x,y,z for set;
reserve C for initialized ConstructorSignature,
  s for SortSymbol of C,
  o for OperSymbol of C,
  c for constructor OperSymbol of C;
reserve a,b for expression of C, an_Adj C;

theorem Th45:
  for o st len the_arity_of o = 2 for a,b being expression of C st
  ex s1,s2 being SortSymbol of C st
  s1 = (the_arity_of o).1 & s2 = (the_arity_of o).2 &
  a is expression of C, s1 & b is expression of C, s2
  holds
  [o, the carrier of C]-tree <*a,b*> is expression of C, the_result_sort_of o
proof
  let o be OperSymbol of C such that
A1: len the_arity_of o = 2;
  set X = MSVars C;
  set Y = X (\/) ((the carrier of C)-->{0});
  let a,b be expression of C;
  given s1,s2 being SortSymbol of C such that
A2: s1 = (the_arity_of o).1 and
A3: s2 = (the_arity_of o).2 and
A4: a is expression of C, s1 and
A5: b is expression of C, s2;
  reconsider ta = a, tb = b as Term of C,Y by MSAFREE3:8;
A6: dom <*ta,tb*> = Seg 2 by FINSEQ_1:89;
A7: dom <*s1,s2*> = Seg 2 by FINSEQ_1:89;
A8: the_arity_of o = <*s1,s2*> by A1,A2,A3,FINSEQ_1:44;
A9: the Sorts of Free(C, X) = C-Terms(X, Y) by MSAFREE3:24;
  now
    let i be Nat;
    assume i in dom <*ta,tb*>;
    then
A10: i = 1 or i = 2 by A6,FINSEQ_1:2,TARSKI:def 2;
    let t be Term of C, Y;
    assume
A11: t = <*ta,tb*>.i;
A12: the Sorts of Free(C, X) c= the Sorts of FreeMSA Y by A9,PBOOLE:def 18;
A13: i = 1 & t = a or i = 2 & t = b by A10,A11;
A14: (the Sorts of Free(C, X)).s1 c= (the Sorts of FreeMSA Y).s1 by A12;
A15: (the Sorts of Free(C, X)).s2 c= (the Sorts of FreeMSA Y).s2 by A12;
    i = 1 & t in (the Sorts of Free(C, X)).s1 or i = 2 & t in (the Sorts
    of Free(C, X)).s2 by A4,A5,A13,Th41;
    hence the_sort_of t = (the_arity_of o).i by A2,A3,A14,A15,MSAFREE3:7;
  end;
  then reconsider p = <*ta,tb*> as ArgumentSeq of Sym(o, Y) by A6,A7,A8,
MSATERM:25;
A16: variables_in (Sym(o, Y)-tree p) c= X
  proof
    let s be object;
    assume s in the carrier of C;
    then reconsider s9 = s as SortSymbol of C;
    let x be object;
    assume x in (variables_in (Sym(o, Y)-tree p)).s;
    then consider t being DecoratedTree such that
A17: t in rng p and
A18: x in (C variables_in t).s9 by MSAFREE3:11;
A19: C variables_in a c= X by MSAFREE3:27;
A20: C variables_in b c= X by MSAFREE3:27;
A21: rng p = {a,b} by FINSEQ_2:127;
A22: (C variables_in a).s9 c= X.s9 by A19;
A23: (C variables_in b).s9 c= X.s9 by A20;
    t = a or t = b by A17,A21,TARSKI:def 2;
    hence thesis by A18,A22,A23;
  end;
  set s9 = the_result_sort_of o;
A24: the_sort_of (Sym(o, Y)-tree p) = the_result_sort_of o by MSATERM:20;
  (the Sorts of Free(C, X)).s9 =
  {t where t is Term of C,Y: the_sort_of t = s9 & variables_in t c= X}
  by A9,MSAFREE3:def 5;
  then [o, the carrier of C]-tree <*a,b*> in (the Sorts of Free(C, X)).s9
  by A16,A24;
  hence thesis by Th41;
end;
