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 Th54:
  tfsm = tfsm1-Mealy_union tfsm2 & q21 = q implies (q21,w)
  -admissible = (q,w)-admissible
proof
  set q9 = q21;
  assume that
A1: tfsm = tfsm1-Mealy_union tfsm2 and
A2: q9 = q;
  set ad9 = (q9,w)-admissible, ad = (q,w)-admissible;
  defpred P[Nat] means 1<=$1 & $1 <= len ad9 implies ad9.$1= ad.$1;
A3: for k being Nat st P[k] holds P[k + 1]
  proof
    let k be Nat;
    assume
A4: 1 <= k & k <= len ad9 implies ad9.k = ad.k;
    assume that
    1 <= (k+1) and
A5: (k+1) <= len ad9;
A6: k = 0 or 0 < k & 0 + 1 = 1;
    per cases by A6,NAT_1:13;
    suppose
A7:   k = 0;
      hence ad9.(k+1) = q9 by Def2
        .= ad.(k+1) by A2,A7,Def2;
    end;
    suppose
A8:   1 <= k;
      k+1 <= len w + 1 by A5,Def2;
      then
A9:   k <= len w by XREAL_1:6;
      then consider
      w9k being Element of IAlph, q9k, q9k1 being Element of tfsm2
      such that
A10:  w9k = w.k & q9k = ad9.k and
A11:  q9k1 = ad9.(k+1) & w9k-succ_of q9k = q9k1 by A8,Def2;
A12:  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 A8,A9,Def2;
      len w <= len w + 1 by NAT_1:11;
      then
A13:  k <= len w + 1 by A9,XXREAL_0:2;
      dom (the Tran of tfsm2) = [:the carrier of tfsm2,IAlph:]by FUNCT_2:def 1;
      hence ad9.(k+1) = ((the Tran of tfsm1) +* (the Tran of tfsm2)).[q9k,w9k]
      by A11,FUNCT_4:13
        .= ad.(k+1) by A1,A4,A8,A10,A12,A13,Def2,Def24;
    end;
  end;
A14: P[0];
A15: for k being Nat holds P[k] from NAT_1:sch 2(A14, A3);
  len ad9 = len w + 1 by Def2
    .= len ad by Def2;
  hence thesis by A15,FINSEQ_1:14;
end;
