
theorem Th51:
  for S1,S2 being non empty ManySortedSign st S1 is
  gate`2isBoolean & S2 is gate`2isBoolean holds S1+*S2 is gate`2isBoolean
proof
  let S1,S2 be non empty ManySortedSign;
  set S = S1+*S2;
  assume that
A1: S1 is gate`2isBoolean and
A2: S2 is gate`2isBoolean;
  let g be set;
  assume
A3: g in the carrier' of S;
  let p be FinSequence such that
A4: p = (the Arity of S).g;
  reconsider g as Gate of S by A3;
A5: dom the Arity of S1 = the carrier' of S1 by FUNCT_2:def 1;
A6: the Arity of S = (the Arity of S1)+*the Arity of S2 by Def2;
A7: dom the Arity of S2 = the carrier' of S2 by FUNCT_2:def 1;
A8: the carrier' of S = (the carrier' of S1) \/ the carrier' of S2 by Def2;
  then
A9: g in the carrier' of S1 or g in the carrier' of S2 by A3,XBOOLE_0:def 3;
A10: now
    assume
A11: not g in the carrier' of S2;
    then reconsider g1 = g as Gate of S1 by A8,A3,XBOOLE_0:def 3;
    (the Arity of S1).g1 = p by A8,A6,A3,A4,A5,A7,A11,FUNCT_4:def 1;
    hence thesis by A1,A9,A11;
  end;
  now
    assume
A12: g in the carrier' of S2;
    then reconsider g2 = g as Gate of S2;
    (the Arity of S2).g2 = p by A8,A6,A4,A5,A7,A12,FUNCT_4:def 1;
    hence thesis by A2,A12;
  end;
  hence thesis by A10;
end;
