reserve i for Nat, x,y for set;
reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;

theorem Th54:
  for m being Nat st m > 0
  for s being set
  for B being non empty non void BoolSignature
  for C being non empty non void ConnectivesSignature
  st B is (m,s) integer & the carrier' of B misses the carrier' of C
  holds B+*C is (m,s) integer
  proof
    let m be Nat;
    assume A1: m > 0;
    let s be set;
    let B be non empty non void BoolSignature;
    let C be non empty non void ConnectivesSignature;
    assume A2: len the connectives of B >= m+6;
    given I being Element of B such that
A3: I = s & I <> the bool-sort of B &
    (the connectives of B).m is_of_type {},I &
    (the connectives of B).(m+1) is_of_type {},I &
    (the connectives of B).m <> (the connectives of B).(m+1) &
    (the connectives of B).(m+2) is_of_type <*I*>,I &
    (the connectives of B).(m+3) is_of_type <*I,I*>,I &
    (the connectives of B).(m+4) is_of_type <*I,I*>,I &
    (the connectives of B).(m+5) is_of_type <*I,I*>,I &
    (the connectives of B).(m+3) <> (the connectives of B).(m+4) &
    (the connectives of B).(m+3) <> (the connectives of B).(m+5) &
    (the connectives of B).(m+4) <> (the connectives of B).(m+5) &
    (the connectives of B).(m+6) is_of_type <*I,I*>,the bool-sort of B;
    assume A4: the carrier' of B misses the carrier' of C;
    set S = B+*C;
A5: the connectives of S = (the connectives of B)^the connectives of C
    by Def52; then
    len the connectives of S = (len the connectives of B)+
    len the connectives of C by FINSEQ_1:22;
    hence len the connectives of S >= m+6 by A2,NAT_1:12;
    the carrier of S = (the carrier of B)\/the carrier of C by Th51; then
    reconsider I as Element of S by XBOOLE_0:def 3;
    take I; thus I = s by A3;
    thus I <> the bool-sort of S by A3,Def52;
A6: now
      let i be Nat;
      assume 1 <= i & i <= len the connectives of B; then
A7:   i in dom the connectives of B by FINSEQ_3:25; then
      (the connectives of B).i in the carrier' of B by FUNCT_1:102; then
A8:   (the connectives of B).i nin the carrier' of C by A4,XBOOLE_0:3;
A9:   dom the Arity of C = the carrier' of C &
      dom the ResultSort of C = the carrier' of C by FUNCT_2:def 1;
      the Arity of S = (the Arity of B)+*the Arity of C &
      the ResultSort of S = (the ResultSort of B)+*the ResultSort of C
      by Th51; then
A10:   (the Arity of S).((the connectives of B).i) =
      (the Arity of B).((the connectives of B).i) &
      (the ResultSort of S).((the connectives of B).i) =
      (the ResultSort of B).((the connectives of B).i) by A8,A9,FUNCT_4:11;
      thus
A11:   (the connectives of S).i = (the connectives of B).i
      by A5,A7,FINSEQ_1:def 7;
      let x; let I be Element of B; let J be Element of S;
      assume
A12:   I = J & (the connectives of B).i is_of_type x,I;
      thus (the connectives of S).i is_of_type x,J
      by A10,A12,A11;
    end;
    m+0 <= m+6 by XREAL_1:6; then
A13: 0+1 <= m & m <= len the connectives of B by A1,A2,XXREAL_0:2,NAT_1:13;
    hence (the connectives of S).m is_of_type {},I by A6,A3;
    m+1 <= m+6 by XREAL_1:6; then
A14: 0+1 <= m+1 & m+1 <= len the connectives of B by A2,XXREAL_0:2,NAT_1:11;
    hence (the connectives of S).(m+1) is_of_type {},I by A6,A3;
    (the connectives of S).m = (the connectives of B).m &
    (the connectives of S).(m+1) = (the connectives of B).(m+1) by A13,A14,A6;
    hence (the connectives of S).m <> (the connectives of S).(m+1) by A3;
    m+2 <= m+6 by XREAL_1:6; then
    0+1 <= m+2 & m+2 <= len the connectives of B by A2,XXREAL_0:2,NAT_1:12;
    hence (the connectives of S).(m+2) is_of_type <*I*>,I by A6,A3;
    m+3 <= m+6 by XREAL_1:6; then
A15: 0+1 <= m+3 & m+3 <= len the connectives of B by A2,XXREAL_0:2,NAT_1:12;
    hence (the connectives of S).(m+3) is_of_type <*I,I*>,I by A3,A6;
    m+4 <= m+6 by XREAL_1:6; then
A16: 0+1 <= m+4 & m+4 <= len the connectives of B by A2,XXREAL_0:2,NAT_1:12;
    hence (the connectives of S).(m+4) is_of_type <*I,I*>,I by A3,A6;
    m+5 <= m+6 by XREAL_1:6; then
A17: 0+1 <= m+5 & m+5 <= len the connectives of B by A2,XXREAL_0:2,NAT_1:12;
    hence (the connectives of S).(m+5) is_of_type <*I,I*>,I by A3,A6;
    (the connectives of S).(m+3) = (the connectives of B).(m+3) &
    (the connectives of S).(m+5) = (the connectives of B).(m+5) &
    (the connectives of S).(m+4) = (the connectives of B).(m+4) by A15,A16,A17,
A6;
    hence (the connectives of S).(m+3) <> (the connectives of S).(m+4)&
    (the connectives of S).(m+3) <> (the connectives of S).(m+5)&
    (the connectives of S).(m+4) <> (the connectives of S).(m+5) by A3;
    0+1 <= m+6 & the bool-sort of S = the bool-sort of B by Def52,NAT_1:12;
    hence (the connectives of S).(m+6) is_of_type <*I,I*>,the bool-sort of S
    by A2,A3,A6;
  end;
