reserve m, n, i, k for Nat;
reserve IAlph, OAlph for non empty set,
  fsm for non empty FSM over IAlph,
  s for Element of IAlph,
  w, w1, w2 for FinSequence of IAlph,
  q, q9, q1, q2 for State of fsm;
reserve tfsm, tfsm1, tfsm2, tfsm3 for non empty Mealy-FSM over IAlph, OAlph,
  sfsm for non empty Moore-FSM over IAlph, OAlph,
  qs for State of sfsm,
  q, q1, q2 , q3, qa, qb, qc, qa9, qt, q1t, q2t for State of tfsm,
  q11, q12 for State of tfsm1,
  q21, q22 for State of tfsm2;
reserve OAlphf for finite non empty set,
  tfsmf for finite non empty Mealy-FSM over IAlph, OAlphf,
  sfsmf for finite non empty Moore-FSM over IAlph, OAlphf;
reserve tfsm, rtfsm for finite non empty Mealy-FSM over IAlph, OAlph,
  q for State of tfsm;
reserve qr1, qr2 for State of rtfsm,
  Tf for Function of the carrier of tfsm1, the carrier of tfsm2;
reserve Rtfsm for reduced finite non empty Mealy-FSM over IAlph, OAlph;
reserve Ctfsm, Ctfsm1, Ctfsm2 for connected finite non empty Mealy-FSM over
  IAlph, OAlph;

theorem Th52:
  tfsm = tfsm1-Mealy_union tfsm2 & the carrier of tfsm1 misses the
  carrier of tfsm2 & q11 = q implies (q11,w)-admissible = (q,w)-admissible
proof
  assume that
A1: tfsm = tfsm1-Mealy_union tfsm2 and
A2: (the carrier of tfsm1) misses (the carrier of tfsm2) and
A3: q11 = q;
  set ad1 = (q11,w)-admissible, ad = (q,w)-admissible;
  defpred P[Nat] means 1 <= $1 & $1 <= len ad1 implies ad1.$1 = ad.$1;
A4: for k being Nat st P[k] holds P[k + 1]
  proof
    let k be Nat;
    assume
A5: 1 <= k & k <= len ad1 implies ad1.k = ad.k;
    assume that
    1 <= (k+1) and
A6: (k+1) <= len ad1;
A7: k = 0 or 0 < k & 0 + 1 = 1;
    per cases by A7,NAT_1:13;
    suppose
A8:   k = 0;
      hence ad1.(k+1) = q11 by Def2
        .= ad.(k+1) by A3,A8,Def2;
    end;
    suppose
A9:   1 <= k;
      (k+1) <= len w + 1 by A6,Def2;
      then
A10:  k <= len w by XREAL_1:6;
      then consider
      w1k being Element of IAlph, q1k, q1k1 being Element of tfsm1
      such that
A11:  w1k = w.k & q1k = ad1.k and
A12:  q1k1 = ad1.(k+1) & w1k-succ_of q1k = q1k1 by A9,Def2;
A13:  ex wk being Element of IAlph, qk, qk1 being Element of tfsm st wk =
      w.k & qk = ad.k & qk1 = ad.(k+1) & wk-succ_of qk = qk1 by A9,A10,Def2;
      len w <= len w + 1 by NAT_1:11;
      then
A14:  k <= len w + 1 by A10,XXREAL_0:2;
      [:the carrier of tfsm1, IAlph :] misses [:the carrier of tfsm2,
      IAlph :] by A2,ZFMISC_1:104;
      then
      dom (the Tran of tfsm2) = [:the carrier of tfsm2,IAlph:] & not [q1k
      ,w1k] in [:the carrier of tfsm2,IAlph:] by FUNCT_2:def 1,XBOOLE_0:3;
      hence ad1.(k+1) = ((the Tran of tfsm1) +* (the Tran of tfsm2)).[q1k,w1k]
      by A12,FUNCT_4:11
        .= ad.(k+1) by A1,A5,A9,A11,A13,A14,Def2,Def24;
    end;
  end;
A15: P[0];
A16: for k being Nat holds P[k] from NAT_1:sch 2(A15, A4);
  len ad1 = len w + 1 by Def2
    .= len ad by Def2;
  hence thesis by A16,FINSEQ_1:14;
end;
