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;
reserve Rtfsm1, Rtfsm2 for reduced non empty Mealy-FSM over IAlph, OAlph;

theorem Th56:
  tfsm = Rtfsm1-Mealy_union Rtfsm2 & the carrier of Rtfsm1 misses
the carrier of Rtfsm2 & Rtfsm1, Rtfsm2-are_equivalent implies ex Q being State
of the_reduction_of tfsm st the InitS of Rtfsm1 in Q & the InitS of Rtfsm2 in Q
  & Q = the InitS of the_reduction_of tfsm
proof
  set rtfsm1 = Rtfsm1;
  set rtfsm2 = Rtfsm2;
  assume that
A1: tfsm = rtfsm1-Mealy_union rtfsm2 and
A2: (the carrier of rtfsm1) misses (the carrier of rtfsm2) and
A3: rtfsm1, rtfsm2-are_equivalent;
  set Srtfsm2 = the carrier of rtfsm2;
  set Stfsm = the carrier of tfsm, Srtfsm1 = the carrier of rtfsm1;
  Stfsm = Srtfsm1 \/ Srtfsm2 by A1,Def24;
  then reconsider IS2 = the InitS of rtfsm2 as Element of Stfsm by
XBOOLE_0:def 3;
  reconsider IS1 = the InitS of rtfsm1 as Element of Stfsm by A1,Def24;
  now
    let w be FinSequence of IAlph;
    (the InitS of rtfsm1,w)-response = (the InitS of rtfsm2,w)-response by A3;
    hence (IS1, w)-response = (the InitS of rtfsm2,w)-response by A1,A2,Th53
      .= (IS2, w)-response by A1,Th55;
  end;
  then
A4: IS1,IS2-are_equivalent;
  set RUN = the_reduction_of tfsm;
  the InitS of tfsm = the InitS of rtfsm1 by A1,Def24;
  then
A5: the InitS of rtfsm1 in the InitS of RUN by Def18;
  set SRUN = the carrier of RUN;
A6: SRUN = final_states_partition tfsm by Def18;
  final_states_partition tfsm is final by Def15;
  then consider X being Element of SRUN such that
A7: IS1 in X and
A8: IS2 in X by A6,A4;
  take X;
  thus the InitS of rtfsm1 in X & the InitS of rtfsm2 in X by A7,A8;
  X is Subset of Stfsm & the InitS of RUN is Subset of Stfsm by A6,TARSKI:def 3
;
  then X = the InitS of RUN or X misses the InitS of RUN by A6,EQREL_1:def 4;
  hence thesis by A7,A5,XBOOLE_0:3;
end;
