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 Th53:
  tfsm = tfsm1-Mealy_union tfsm2 & the carrier of tfsm1 misses the
  carrier of tfsm2 & q11 = q implies (q11,w)-response = (q,w)-response
proof
  set q1 = q11;
  assume that
A1: tfsm = tfsm1-Mealy_union tfsm2 and
A2: (the carrier of tfsm1) misses (the carrier of tfsm2) and
A3: q1 = q;
  set ad1 = (q1,w)-admissible;
  set res = (q,w)-response, res1 = (q1,w)-response;
A4: len res1 = len w by Def6;
A5: now
    let k be Nat;
A6: [:the carrier of tfsm1,IAlph :] misses [:the carrier of tfsm2,IAlph:]
    by A2,ZFMISC_1:104;
    assume 1 <= k & k <= len res1;
    then
A7: k in Seg len w by A4,FINSEQ_1:1;
    then
A8: k in dom w by FINSEQ_1:def 3;
    k in Seg (len w + 1) by A7,FINSEQ_2:8;
    then k in Seg len ad1 by Def2;
    then k in dom ad1 by FINSEQ_1:def 3;
    then
A9: ad1.k in the carrier of tfsm1 by FINSEQ_2:11;
    w.k in IAlph by A8,FINSEQ_2:11;
    then [ad1.k,w.k] in [: the carrier of tfsm1, IAlph :] by A9,ZFMISC_1:87;
    then
A10: dom (the OFun of tfsm2) = [:the carrier of tfsm2,IAlph :] & not [ad1.
    k,w.k] in [: the carrier of tfsm2, IAlph :] by A6,FUNCT_2:def 1,XBOOLE_0:3;
    res1.k = (the OFun of tfsm1).[(q1,w)-admissible.k,w.k] by A8,Def6
      .= ((the OFun of tfsm1) +* (the OFun of tfsm2)).[ad1.k,w.k] by A10,
FUNCT_4:11
      .= ((the OFun of tfsm1) +* (the OFun of tfsm2)). [(q,w)-admissible.k,w
    .k] by A1,A2,A3,Th52
      .= (the OFun of tfsm).[(q,w)-admissible.k, w.k] by A1,Def24
      .= res.k by A8,Def6;
    hence res1.k = res.k;
  end;
  len res1 = len w by Def6
    .= len res by Def6;
  hence thesis by A5,FINSEQ_1:14;
end;
