Article FSM_1, MML version 4.99.1005

:: FSM_1:th 1
theorem
for b1, b2 being natural set
      st b1 < b2
   holds ex b3 being Element of NAT st
      b2 = b1 + b3 & 1 <= b3;

:: FSM_1:th 7
theorem
for b1 being set
for b2, b3 being non empty set
for b4 being Function-like quasi_total Relation of b1,b2
for b5 being Function-like quasi_total Relation of b2,b3
      st b4 is bijective(b1, b2) & b5 is bijective(b2, b3)
   holds b5 * b4 is bijective(b1, b3);

:: FSM_1:th 8
theorem
for b1 being set
for b2, b3 being symmetric transitive total Relation of b1,b1
      st Class b2 = Class b3
   holds b2 = b3;

:: FSM_1:th 9
theorem
for b1 being non empty set
for b2 being a_partition of b1 holds
   b2 is not empty;

:: FSM_1:th 10
theorem
for b1 being finite set
for b2 being a_partition of b1 holds
   b2 is finite;

:: FSM_1:condreg 1
registration
  let a1 be finite set;
  cluster -> finite (a_partition of a1);
end;

:: FSM_1:exreg 1
registration
  let a1 be non empty finite set;
  cluster non empty with_non-empty_elements finite a_partition of a1;
end;

:: FSM_1:th 11
theorem
for b1 being non empty set
for b2 being a_partition of b1
for b3 being set
      st b3 in b2
   holds ex b4 being Element of b1 st
      b4 in b3;

:: FSM_1:th 12
theorem
for b1 being non empty finite set
for b2 being a_partition of b1 holds
   card b2 <= card b1;

:: FSM_1:th 13
theorem
for b1 being non empty finite set
for b2, b3 being a_partition of b1
      st b2 is_finer_than b3
   holds card b3 <= card b2;

:: FSM_1:th 14
theorem
for b1 being non empty finite set
for b2, b3 being a_partition of b1
   st b2 is_finer_than b3
for b4 being Element of b3 holds
   ex b5 being Element of b2 st
      b5 c= b4;

:: FSM_1:th 15
theorem
for b1 being non empty finite set
for b2, b3 being a_partition of b1
      st b2 is_finer_than b3 & card b2 = card b3
   holds b2 = b3;

:: FSM_1:structnot 1 => FSM_1:struct 1
definition
  let a1 be set;
  struct(1-sorted) FSM(#
    carrier -> set,
    Tran -> Function-like quasi_total Relation of [:the carrier of it,A1:],the carrier of it,
    InitS -> Element of the carrier of it
  #);
end;

:: FSM_1:attrnot 1 => FSM_1:attr 1
definition
  let a1 be set;
  let a2 be FSM over a1;
  attr a2 is strict;
end;

:: FSM_1:exreg 2
registration
  let a1 be set;
  cluster strict FSM over a1;
end;

:: FSM_1:aggrnot 1 => FSM_1:aggr 1
definition
  let a1, a2 be set;
  let a3 be Function-like quasi_total Relation of [:a2,a1:],a2;
  let a4 be Element of a2;
  aggr FSM(#a2,a3,a4#) -> strict FSM over a1;
end;

:: FSM_1:selnot 1 => FSM_1:sel 1
definition
  let a1 be set;
  let a2 be FSM over a1;
  sel the Tran of a2 -> Function-like quasi_total Relation of [:the carrier of a2,a1:],the carrier of a2;
end;

:: FSM_1:selnot 2 => FSM_1:sel 2
definition
  let a1 be set;
  let a2 be FSM over a1;
  sel the InitS of a2 -> Element of the carrier of a2;
end;

:: FSM_1:modenot 1
definition
  let a1 be set;
  let a2 be FSM over a1;
  mode State of a2 is Element of the carrier of a2;
end;

:: FSM_1:exreg 3
registration
  let a1 be set;
  cluster non empty finite FSM over a1;
end;

:: FSM_1:funcnot 1 => FSM_1:func 1
definition
  let a1 be non empty set;
  let a2 be non empty FSM over a1;
  let a3 be Element of a1;
  let a4 be Element of the carrier of a2;
  func A3 -succ_of A4 -> Element of the carrier of a2 equals
    (the Tran of a2) . [a4,a3];
end;

:: FSM_1:def 1
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being Element of b1
for b4 being Element of the carrier of b2 holds
   b3 -succ_of b4 = (the Tran of b2) . [b4,b3];

:: FSM_1:funcnot 2 => FSM_1:func 2
definition
  let a1 be non empty set;
  let a2 be non empty FSM over a1;
  let a3 be Element of the carrier of a2;
  let a4 be FinSequence of a1;
  func (A3,A4)-admissible -> FinSequence of the carrier of a2 means
    it . 1 = a3 &
     len it = (len a4) + 1 &
     (for b1 being natural set
           st 1 <= b1 & b1 <= len a4
        holds ex b2 being Element of a1 st
           ex b3, b4 being Element of the carrier of a2 st
              b2 = a4 . b1 & b3 = it . b1 & b4 = it . (b1 + 1) & b2 -succ_of b3 = b4);
end;

:: FSM_1:def 2
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being Element of the carrier of b2
for b4 being FinSequence of b1
for b5 being FinSequence of the carrier of b2 holds
      b5 = (b3,b4)-admissible
   iff
      b5 . 1 = b3 &
       len b5 = (len b4) + 1 &
       (for b6 being natural set
             st 1 <= b6 & b6 <= len b4
          holds ex b7 being Element of b1 st
             ex b8, b9 being Element of the carrier of b2 st
                b7 = b4 . b6 & b8 = b5 . b6 & b9 = b5 . (b6 + 1) & b7 -succ_of b8 = b9);

:: FSM_1:th 16
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being Element of the carrier of b2 holds
   (b3,<*> b1)-admissible = <*b3*>;

:: FSM_1:prednot 1 => FSM_1:pred 1
definition
  let a1 be non empty set;
  let a2 be non empty FSM over a1;
  let a3 be FinSequence of a1;
  let a4, a5 be Element of the carrier of a2;
  pred A4,A3 -leads_to A5 means
    (a4,a3)-admissible . ((len a3) + 1) = a5;
end;

:: FSM_1:dfs 3
definiens
  let a1 be non empty set;
  let a2 be non empty FSM over a1;
  let a3 be FinSequence of a1;
  let a4, a5 be Element of the carrier of a2;
To prove
     a4,a3 -leads_to a5
it is sufficient to prove
  thus (a4,a3)-admissible . ((len a3) + 1) = a5;

:: FSM_1:def 3
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being FinSequence of b1
for b4, b5 being Element of the carrier of b2 holds
   b4,b3 -leads_to b5
iff
   (b4,b3)-admissible . ((len b3) + 1) = b5;

:: FSM_1:th 17
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being Element of the carrier of b2 holds
   b3,<*> b1 -leads_to b3;

:: FSM_1:prednot 2 => FSM_1:pred 2
definition
  let a1 be non empty set;
  let a2 be non empty FSM over a1;
  let a3 be FinSequence of a1;
  let a4 be FinSequence of the carrier of a2;
  pred A4 is_admissible_for A3 means
    ex b1 being Element of the carrier of a2 st
       b1 = a4 . 1 & (b1,a3)-admissible = a4;
end;

:: FSM_1:dfs 4
definiens
  let a1 be non empty set;
  let a2 be non empty FSM over a1;
  let a3 be FinSequence of a1;
  let a4 be FinSequence of the carrier of a2;
To prove
     a4 is_admissible_for a3
it is sufficient to prove
  thus ex b1 being Element of the carrier of a2 st
       b1 = a4 . 1 & (b1,a3)-admissible = a4;

:: FSM_1:def 4
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being FinSequence of b1
for b4 being FinSequence of the carrier of b2 holds
      b4 is_admissible_for b3
   iff
      ex b5 being Element of the carrier of b2 st
         b5 = b4 . 1 & (b5,b3)-admissible = b4;

:: FSM_1:th 18
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being Element of the carrier of b2 holds
   <*b3*> is_admissible_for <*> b1;

:: FSM_1:funcnot 3 => FSM_1:func 3
definition
  let a1 be non empty set;
  let a2 be non empty FSM over a1;
  let a3 be Element of the carrier of a2;
  let a4 be FinSequence of a1;
  func A3 leads_to_under A4 -> Element of the carrier of a2 means
    a3,a4 -leads_to it;
end;

:: FSM_1:def 5
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being Element of the carrier of b2
for b4 being FinSequence of b1
for b5 being Element of the carrier of b2 holds
      b5 = b3 leads_to_under b4
   iff
      b3,b4 -leads_to b5;

:: FSM_1:th 19
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3 being FinSequence of b1
for b4, b5 being Element of the carrier of b2 holds
   (b4,b3)-admissible . len ((b4,b3)-admissible) = b5
iff
   b4,b3 -leads_to b5;

:: FSM_1:th 20
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3, b4 being FinSequence of b1
for b5 being Element of the carrier of b2
for b6 being Element of NAT
      st 1 <= b6 & b6 <= len b3
   holds (b5,b3 ^ b4)-admissible . b6 = (b5,b3)-admissible . b6;

:: FSM_1:th 21
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3, b4 being FinSequence of b1
for b5, b6 being Element of the carrier of b2
      st b5,b3 -leads_to b6
   holds (b5,b3 ^ b4)-admissible . ((len b3) + 1) = b6;

:: FSM_1:th 22
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3, b4 being FinSequence of b1
for b5, b6 being Element of the carrier of b2
   st b5,b3 -leads_to b6
for b7 being Element of NAT
      st 1 <= b7 & b7 <= (len b4) + 1
   holds (b5,b3 ^ b4)-admissible . ((len b3) + b7) = (b6,b4)-admissible . b7;

:: FSM_1:th 23
theorem
for b1 being non empty set
for b2 being non empty FSM over b1
for b3, b4 being FinSequence of b1
for b5, b6 being Element of the carrier of b2
      st b5,b3 -leads_to b6
   holds (b5,b3 ^ b4)-admissible = (Del((b5,b3)-admissible,(len b3) + 1)) ^ ((b6,b4)-admissible);

:: FSM_1:structnot 2 => FSM_1:struct 2
definition
  let a1 be set;
  let a2 be non empty set;
  struct(FSM over a1) Mealy-FSM(#
    carrier -> set,
    Tran -> Function-like quasi_total Relation of [:the carrier of it,A1:],the carrier of it,
    OFun -> Function-like quasi_total Relation of [:the carrier of it,A1:],A2,
    InitS -> Element of the carrier of it
  #);
end;

:: FSM_1:attrnot 2 => FSM_1:attr 2
definition
  let a1 be set;
  let a2 be non empty set;
  let a3 be Mealy-FSM over a1,a2;
  attr a3 is strict;
end;

:: FSM_1:exreg 4
registration
  let a1 be set;
  let a2 be non empty set;
  cluster strict Mealy-FSM over a1,a2;
end;

:: FSM_1:aggrnot 2 => FSM_1:aggr 2
definition
  let a1 be set;
  let a2 be non empty set;
  let a3 be set;
  let a4 be Function-like quasi_total Relation of [:a3,a1:],a3;
  let a5 be Function-like quasi_total Relation of [:a3,a1:],a2;
  let a6 be Element of a3;
  aggr Mealy-FSM(#a3,a4,a5,a6#) -> strict Mealy-FSM over a1,a2;
end;

:: FSM_1:selnot 3 => FSM_1:sel 3
definition
  let a1 be set;
  let a2 be non empty set;
  let a3 be Mealy-FSM over a1,a2;
  sel the OFun of a3 -> Function-like quasi_total Relation of [:the carrier of a3,a1:],a2;
end;

:: FSM_1:structnot 3 => FSM_1:struct 3
definition
  let a1 be set;
  let a2 be non empty set;
  struct(FSM over a1) Moore-FSM(#
    carrier -> set,
    Tran -> Function-like quasi_total Relation of [:the carrier of it,A1:],the carrier of it,
    OFun -> Function-like quasi_total Relation of the carrier of it,A2,
    InitS -> Element of the carrier of it
  #);
end;

:: FSM_1:attrnot 3 => FSM_1:attr 3
definition
  let a1 be set;
  let a2 be non empty set;
  let a3 be Moore-FSM over a1,a2;
  attr a3 is strict;
end;

:: FSM_1:exreg 5
registration
  let a1 be set;
  let a2 be non empty set;
  cluster strict Moore-FSM over a1,a2;
end;

:: FSM_1:aggrnot 3 => FSM_1:aggr 3
definition
  let a1 be set;
  let a2 be non empty set;
  let a3 be set;
  let a4 be Function-like quasi_total Relation of [:a3,a1:],a3;
  let a5 be Function-like quasi_total Relation of a3,a2;
  let a6 be Element of a3;
  aggr Moore-FSM(#a3,a4,a5,a6#) -> strict Moore-FSM over a1,a2;
end;

:: FSM_1:selnot 4 => FSM_1:sel 4
definition
  let a1 be set;
  let a2 be non empty set;
  let a3 be Moore-FSM over a1,a2;
  sel the OFun of a3 -> Function-like quasi_total Relation of the carrier of a3,a2;
end;

:: FSM_1:funcreg 1
registration
  let a1 be set;
  let a2 be non empty finite set;
  let a3 be Function-like quasi_total Relation of [:a2,a1:],a2;
  let a4 be Element of a2;
  cluster FSM(#a2,a3,a4#) -> non empty finite strict;
end;

:: FSM_1:funcreg 2
registration
  let a1 be set;
  let a2 be non empty set;
  let a3 be non empty finite set;
  let a4 be Function-like quasi_total Relation of [:a3,a1:],a3;
  let a5 be Function-like quasi_total Relation of [:a3,a1:],a2;
  let a6 be Element of a3;
  cluster Mealy-FSM(#a3,a4,a5,a6#) -> non empty finite strict;
end;

:: FSM_1:funcreg 3
registration
  let a1 be set;
  let a2 be non empty set;
  let a3 be non empty finite set;
  let a4 be Function-like quasi_total Relation of [:a3,a1:],a3;
  let a5 be Function-like quasi_total Relation of a3,a2;
  let a6 be Element of a3;
  cluster Moore-FSM(#a3,a4,a5,a6#) -> non empty finite strict;
end;

:: FSM_1:exreg 6
registration
  let a1 be set;
  let a2 be non empty set;
  cluster non empty finite Mealy-FSM over a1,a2;
end;

:: FSM_1:exreg 7
registration
  let a1 be set;
  let a2 be non empty set;
  cluster non empty finite Moore-FSM over a1,a2;
end;

:: FSM_1:funcnot 4 => FSM_1:func 4
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be Element of the carrier of a3;
  let a5 be FinSequence of a1;
  func (A4,A5)-response -> FinSequence of a2 means
    len it = len a5 &
     (for b1 being Element of NAT
           st b1 in dom a5
        holds it . b1 = (the OFun of a3) . [(a4,a5)-admissible . b1,a5 . b1]);
end;

:: FSM_1:def 6
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being Element of the carrier of b3
for b5 being FinSequence of b1
for b6 being FinSequence of b2 holds
      b6 = (b4,b5)-response
   iff
      len b6 = len b5 &
       (for b7 being Element of NAT
             st b7 in dom b5
          holds b6 . b7 = (the OFun of b3) . [(b4,b5)-admissible . b7,b5 . b7]);

:: FSM_1:th 24
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being Element of the carrier of b3 holds
   (b4,<*> b1)-response = <*> b2;

:: FSM_1:funcnot 5 => FSM_1:func 5
definition
  let a1, a2 be non empty set;
  let a3 be non empty Moore-FSM over a1,a2;
  let a4 be Element of the carrier of a3;
  let a5 be FinSequence of a1;
  func (A4,A5)-response -> FinSequence of a2 means
    len it = (len a5) + 1 &
     (for b1 being Element of NAT
           st b1 in Seg ((len a5) + 1)
        holds it . b1 = (the OFun of a3) . ((a4,a5)-admissible . b1));
end;

:: FSM_1:def 7
theorem
for b1, b2 being non empty set
for b3 being non empty Moore-FSM over b1,b2
for b4 being Element of the carrier of b3
for b5 being FinSequence of b1
for b6 being FinSequence of b2 holds
      b6 = (b4,b5)-response
   iff
      len b6 = (len b5) + 1 &
       (for b7 being Element of NAT
             st b7 in Seg ((len b5) + 1)
          holds b6 . b7 = (the OFun of b3) . ((b4,b5)-admissible . b7));

:: FSM_1:th 25
theorem
for b1, b2 being non empty set
for b3 being FinSequence of b1
for b4 being non empty Moore-FSM over b1,b2
for b5 being Element of the carrier of b4 holds
   (b5,b3)-response . 1 = (the OFun of b4) . b5;

:: FSM_1:th 26
theorem
for b1, b2 being non empty set
for b3, b4 being FinSequence of b1
for b5 being non empty Mealy-FSM over b1,b2
for b6, b7 being Element of the carrier of b5
      st b6,b3 -leads_to b7
   holds (b6,b3 ^ b4)-response = (b6,b3)-response ^ ((b7,b4)-response);

:: FSM_1:th 27
theorem
for b1, b2 being non empty set
for b3, b4 being FinSequence of b1
for b5, b6 being non empty Mealy-FSM over b1,b2
for b7, b8 being Element of the carrier of b5
for b9, b10 being Element of the carrier of b6
      st b7,b3 -leads_to b8 & b9,b3 -leads_to b10 & (b8,b4)-response <> (b10,b4)-response
   holds (b7,b3 ^ b4)-response <> (b9,b3 ^ b4)-response;

:: FSM_1:prednot 3 => FSM_1:pred 3
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be non empty Moore-FSM over a1,a2;
  pred A3 is_similar_to A4 means
    for b1 being FinSequence of a1 holds
       <*(the OFun of a4) . the InitS of a4*> ^ ((the InitS of a3,b1)-response) = (the InitS of a4,b1)-response;
end;

:: FSM_1:dfs 8
definiens
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be non empty Moore-FSM over a1,a2;
To prove
     a3 is_similar_to a4
it is sufficient to prove
  thus for b1 being FinSequence of a1 holds
       <*(the OFun of a4) . the InitS of a4*> ^ ((the InitS of a3,b1)-response) = (the InitS of a4,b1)-response;

:: FSM_1:def 8
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being non empty Moore-FSM over b1,b2 holds
      b3 is_similar_to b4
   iff
      for b5 being FinSequence of b1 holds
         <*(the OFun of b4) . the InitS of b4*> ^ ((the InitS of b3,b5)-response) = (the InitS of b4,b5)-response;

:: FSM_1:th 28
theorem
for b1, b2 being non empty set
for b3 being non empty finite Moore-FSM over b1,b2 holds
   ex b4 being non empty finite Mealy-FSM over b1,b2 st
      b4 is_similar_to b3;

:: FSM_1:th 29
theorem
for b1 being non empty set
for b2 being non empty finite set
for b3 being non empty finite Mealy-FSM over b1,b2 holds
   ex b4 being non empty finite Moore-FSM over b1,b2 st
      b3 is_similar_to b4;

:: FSM_1:prednot 4 => FSM_1:pred 4
definition
  let a1, a2 be non empty set;
  let a3, a4 be non empty Mealy-FSM over a1,a2;
  pred A3,A4 -are_equivalent means
    for b1 being FinSequence of a1 holds
       (the InitS of a3,b1)-response = (the InitS of a4,b1)-response;
  symmetry;
::  for a1, a2 being non empty set
::  for a3, a4 being non empty Mealy-FSM over a1,a2
::        st a3,a4 -are_equivalent
::     holds a4,a3 -are_equivalent;
  reflexivity;
::  for a1, a2 being non empty set
::  for a3 being non empty Mealy-FSM over a1,a2 holds
::     a3,a3 -are_equivalent;
end;

:: FSM_1:dfs 9
definiens
  let a1, a2 be non empty set;
  let a3, a4 be non empty Mealy-FSM over a1,a2;
To prove
     a3,a4 -are_equivalent
it is sufficient to prove
  thus for b1 being FinSequence of a1 holds
       (the InitS of a3,b1)-response = (the InitS of a4,b1)-response;

:: FSM_1:def 9
theorem
for b1, b2 being non empty set
for b3, b4 being non empty Mealy-FSM over b1,b2 holds
   b3,b4 -are_equivalent
iff
   for b5 being FinSequence of b1 holds
      (the InitS of b3,b5)-response = (the InitS of b4,b5)-response;

:: FSM_1:th 30
theorem
for b1, b2 being non empty set
for b3, b4, b5 being non empty Mealy-FSM over b1,b2
      st b3,b4 -are_equivalent & b4,b5 -are_equivalent
   holds b3,b5 -are_equivalent;

:: FSM_1:prednot 5 => FSM_1:pred 5
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4, a5 be Element of the carrier of a3;
  pred A4,A5 -are_equivalent means
    for b1 being FinSequence of a1 holds
       (a4,b1)-response = (a5,b1)-response;
  symmetry;
::  for a1, a2 being non empty set
::  for a3 being non empty Mealy-FSM over a1,a2
::  for a4, a5 being Element of the carrier of a3
::        st a4,a5 -are_equivalent
::     holds a5,a4 -are_equivalent;
  reflexivity;
::  for a1, a2 being non empty set
::  for a3 being non empty Mealy-FSM over a1,a2
::  for a4 being Element of the carrier of a3 holds
::     a4,a4 -are_equivalent;
end;

:: FSM_1:dfs 10
definiens
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4, a5 be Element of the carrier of a3;
To prove
     a4,a5 -are_equivalent
it is sufficient to prove
  thus for b1 being FinSequence of a1 holds
       (a4,b1)-response = (a5,b1)-response;

:: FSM_1:def 10
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4, b5 being Element of the carrier of b3 holds
   b4,b5 -are_equivalent
iff
   for b6 being FinSequence of b1 holds
      (b4,b6)-response = (b5,b6)-response;

:: FSM_1:th 33
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4, b5, b6 being Element of the carrier of b3
      st b4,b5 -are_equivalent & b5,b6 -are_equivalent
   holds b4,b6 -are_equivalent;

:: FSM_1:th 34
theorem
for b1, b2 being non empty set
for b3 being Element of b1
for b4 being FinSequence of b1
for b5 being non empty Mealy-FSM over b1,b2
for b6, b7 being Element of the carrier of b5
   st b6 = (the Tran of b5) . [b7,b3]
for b8 being Element of NAT
      st b8 in Seg ((len b4) + 1)
   holds (b7,<*b3*> ^ b4)-admissible . (b8 + 1) = (b6,b4)-admissible . b8;

:: FSM_1:th 35
theorem
for b1, b2 being non empty set
for b3 being Element of b1
for b4 being FinSequence of b1
for b5 being non empty Mealy-FSM over b1,b2
for b6, b7 being Element of the carrier of b5
      st b6 = (the Tran of b5) . [b7,b3]
   holds (b7,<*b3*> ^ b4)-response = <*(the OFun of b5) . [b7,b3]*> ^ ((b6,b4)-response);

:: FSM_1:th 36
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b2,b1
for b4, b5 being Element of the carrier of b3 holds
   b4,b5 -are_equivalent
iff
   for b6 being Element of b2 holds
      (the OFun of b3) . [b4,b6] = (the OFun of b3) . [b5,b6] &
       (the Tran of b3) . [b4,b6],(the Tran of b3) . [b5,b6] -are_equivalent;

:: FSM_1:th 37
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b2,b1
for b4, b5 being Element of the carrier of b3
   st b4,b5 -are_equivalent
for b6 being FinSequence of b2
for b7 being Element of NAT
      st b7 in dom b6
   holds ex b8, b9 being Element of the carrier of b3 st
      b8 = (b4,b6)-admissible . b7 & b9 = (b5,b6)-admissible . b7 & b8,b9 -are_equivalent;

:: FSM_1:prednot 6 => FSM_1:pred 6
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4, a5 be Element of the carrier of a3;
  let a6 be natural set;
  pred A6 -equivalent A4,A5 means
    for b1 being FinSequence of a1
          st len b1 <= a6
       holds (a4,b1)-response = (a5,b1)-response;
end;

:: FSM_1:dfs 11
definiens
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4, a5 be Element of the carrier of a3;
  let a6 be natural set;
To prove
     a6 -equivalent a4,a5
it is sufficient to prove
  thus for b1 being FinSequence of a1
          st len b1 <= a6
       holds (a4,b1)-response = (a5,b1)-response;

:: FSM_1:def 11
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4, b5 being Element of the carrier of b3
for b6 being natural set holds
      b6 -equivalent b4,b5
   iff
      for b7 being FinSequence of b1
            st len b7 <= b6
         holds (b4,b7)-response = (b5,b7)-response;

:: FSM_1:th 38
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being Element of the carrier of b3
for b5 being natural set holds
   b5 -equivalent b4,b4;

:: FSM_1:th 39
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4, b5 being Element of the carrier of b3
for b6 being natural set
      st b6 -equivalent b4,b5
   holds b6 -equivalent b5,b4;

:: FSM_1:th 40
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4, b5, b6 being Element of the carrier of b3
for b7 being natural set
      st b7 -equivalent b4,b5 & b7 -equivalent b5,b6
   holds b7 -equivalent b4,b6;

:: FSM_1:th 41
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty Mealy-FSM over b2,b3
for b5, b6 being Element of the carrier of b4
      st b5,b6 -are_equivalent
   holds b1 -equivalent b5,b6;

:: FSM_1:th 42
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4, b5 being Element of the carrier of b3 holds
0 -equivalent b4,b5;

:: FSM_1:th 43
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4, b5 being Element of the carrier of b3
for b6, b7 being natural set
      st b6 + b7 -equivalent b4,b5
   holds b6 -equivalent b4,b5;

:: FSM_1:th 44
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b2,b1
for b4, b5 being Element of the carrier of b3
for b6 being natural set
      st 1 <= b6
   holds    b6 -equivalent b4,b5
   iff
      1 -equivalent b4,b5 &
       (for b7 being Element of b2
       for b8 being Element of NAT
             st b8 = b6 - 1
          holds b8 -equivalent (the Tran of b3) . [b4,b7],(the Tran of b3) . [b5,b7]);

:: FSM_1:funcnot 6 => FSM_1:func 6
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be natural set;
  func A4 -eq_states_EqR A3 -> symmetric transitive total Relation of the carrier of a3,the carrier of a3 means
    for b1, b2 being Element of the carrier of a3 holds
       [b1,b2] in it
    iff
       a4 -equivalent b1,b2;
end;

:: FSM_1:def 12
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being natural set
for b5 being symmetric transitive total Relation of the carrier of b3,the carrier of b3 holds
      b5 = b4 -eq_states_EqR b3
   iff
      for b6, b7 being Element of the carrier of b3 holds
         [b6,b7] in b5
      iff
         b4 -equivalent b6,b7;

:: FSM_1:funcnot 7 => FSM_1:func 7
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be natural set;
  func A4 -eq_states_partition A3 -> non empty a_partition of the carrier of a3 equals
    Class (a4 -eq_states_EqR a3);
end;

:: FSM_1:def 13
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being natural set holds
   b4 -eq_states_partition b3 = Class (b4 -eq_states_EqR b3);

:: FSM_1:th 45
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty Mealy-FSM over b2,b3 holds
   (b1 + 1) -eq_states_partition b4 is_finer_than b1 -eq_states_partition b4;

:: FSM_1:th 46
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being natural set
   st Class (b4 -eq_states_EqR b3) = Class ((b4 + 1) -eq_states_EqR b3)
for b5 being natural set holds
   Class ((b4 + b5) -eq_states_EqR b3) = Class (b4 -eq_states_EqR b3);

:: FSM_1:th 47
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty Mealy-FSM over b2,b3
   st b1 -eq_states_partition b4 = (b1 + 1) -eq_states_partition b4
for b5 being Element of NAT holds
   (b1 + b5) -eq_states_partition b4 = b1 -eq_states_partition b4;

:: FSM_1:th 48
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty Mealy-FSM over b2,b3
   st (b1 + 1) -eq_states_partition b4 <> b1 -eq_states_partition b4
for b5 being Element of NAT
      st b5 <= b1
   holds (b5 + 1) -eq_states_partition b4 <> b5 -eq_states_partition b4;

:: FSM_1:th 49
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty finite Mealy-FSM over b2,b3
      st b1 -eq_states_partition b4 <> (b1 + 1) -eq_states_partition b4
   holds card (b1 -eq_states_partition b4) < card ((b1 + 1) -eq_states_partition b4);

:: FSM_1:th 50
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being Element of the carrier of b3 holds
   Class(0 -eq_states_EqR b3,b4) = the carrier of b3;

:: FSM_1:th 51
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2 holds
   0 -eq_states_partition b3 = {the carrier of b3};

:: FSM_1:th 52
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty finite Mealy-FSM over b2,b3
      st b1 + 1 = card the carrier of b4
   holds (b1 + 1) -eq_states_partition b4 = b1 -eq_states_partition b4;

:: FSM_1:attrnot 4 => FSM_1:attr 4
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be a_partition of the carrier of a3;
  attr a4 is final means
    for b1, b2 being Element of the carrier of a3 holds
       b1,b2 -are_equivalent
    iff
       ex b3 being Element of a4 st
          b1 in b3 & b2 in b3;
end;

:: FSM_1:dfs 14
definiens
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be a_partition of the carrier of a3;
To prove
     a4 is final
it is sufficient to prove
  thus for b1, b2 being Element of the carrier of a3 holds
       b1,b2 -are_equivalent
    iff
       ex b3 being Element of a4 st
          b1 in b3 & b2 in b3;

:: FSM_1:def 14
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being a_partition of the carrier of b3 holds
      b4 is final(b1, b2, b3)
   iff
      for b5, b6 being Element of the carrier of b3 holds
         b5,b6 -are_equivalent
      iff
         ex b7 being Element of b4 st
            b5 in b7 & b6 in b7;

:: FSM_1:th 53
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty Mealy-FSM over b2,b3
      st b1 -eq_states_partition b4 is final(b2, b3, b4)
   holds (b1 + 1) -eq_states_EqR b4 = b1 -eq_states_EqR b4;

:: FSM_1:th 54
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty Mealy-FSM over b2,b3
      st b1 -eq_states_partition b4 = (b1 + 1) -eq_states_partition b4
   holds b1 -eq_states_partition b4 is final(b2, b3, b4);

:: FSM_1:th 55
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty finite Mealy-FSM over b2,b3
      st b1 + 1 = card the carrier of b4
   holds ex b5 being Element of NAT st
      b5 <= b1 & b5 -eq_states_partition b4 is final(b2, b3, b4);

:: FSM_1:funcnot 8 => FSM_1:func 8
definition
  let a1, a2 be non empty set;
  let a3 be non empty finite Mealy-FSM over a1,a2;
  func final_states_partition A3 -> a_partition of the carrier of a3 means
    it is final(a1, a2, a3);
end;

:: FSM_1:def 15
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4 being a_partition of the carrier of b3 holds
      b4 = final_states_partition b3
   iff
      b4 is final(b1, b2, b3);

:: FSM_1:th 56
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being non empty finite Mealy-FSM over b2,b3
      st b1 + 1 = card the carrier of b4
   holds final_states_partition b4 = b1 -eq_states_partition b4;

:: FSM_1:funcnot 9 => FSM_1:func 9
definition
  let a1, a2 be non empty set;
  let a3 be non empty finite Mealy-FSM over a1,a2;
  let a4 be Element of final_states_partition a3;
  let a5 be Element of a1;
  func (A5,A4)-succ_class -> Element of final_states_partition a3 means
    ex b1 being Element of the carrier of a3 st
       ex b2 being Element of NAT st
          b1 in a4 &
           b2 + 1 = card the carrier of a3 &
           it = Class(b2 -eq_states_EqR a3,(the Tran of a3) . [b1,a5]);
end;

:: FSM_1:def 16
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4 being Element of final_states_partition b3
for b5 being Element of b1
for b6 being Element of final_states_partition b3 holds
      b6 = (b5,b4)-succ_class
   iff
      ex b7 being Element of the carrier of b3 st
         ex b8 being Element of NAT st
            b7 in b4 &
             b8 + 1 = card the carrier of b3 &
             b6 = Class(b8 -eq_states_EqR b3,(the Tran of b3) . [b7,b5]);

:: FSM_1:funcnot 10 => FSM_1:func 10
definition
  let a1, a2 be non empty set;
  let a3 be non empty finite Mealy-FSM over a1,a2;
  let a4 be Element of final_states_partition a3;
  let a5 be Element of a1;
  func (A4,A5)-class_response -> Element of a2 means
    ex b1 being Element of the carrier of a3 st
       b1 in a4 & it = (the OFun of a3) . [b1,a5];
end;

:: FSM_1:def 17
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4 being Element of final_states_partition b3
for b5 being Element of b1
for b6 being Element of b2 holds
      b6 = (b4,b5)-class_response
   iff
      ex b7 being Element of the carrier of b3 st
         b7 in b4 & b6 = (the OFun of b3) . [b7,b5];

:: FSM_1:funcnot 11 => FSM_1:func 11
definition
  let a1, a2 be non empty set;
  let a3 be non empty finite Mealy-FSM over a1,a2;
  func the_reduction_of A3 -> strict Mealy-FSM over a1,a2 means
    the carrier of it = final_states_partition a3 &
     (for b1 being Element of the carrier of it
     for b2 being Element of a1
     for b3 being Element of the carrier of a3
           st b3 in b1
        holds (the Tran of a3) .(b3,b2) in (the Tran of it) .(b1,b2) &
         (the OFun of a3) .(b3,b2) = (the OFun of it) .(b1,b2)) &
     the InitS of a3 in the InitS of it;
end;

:: FSM_1:def 18
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4 being strict Mealy-FSM over b1,b2 holds
      b4 = the_reduction_of b3
   iff
      the carrier of b4 = final_states_partition b3 &
       (for b5 being Element of the carrier of b4
       for b6 being Element of b1
       for b7 being Element of the carrier of b3
             st b7 in b5
          holds (the Tran of b3) .(b7,b6) in (the Tran of b4) .(b5,b6) &
           (the OFun of b3) .(b7,b6) = (the OFun of b4) .(b5,b6)) &
       the InitS of b3 in the InitS of b4;

:: FSM_1:funcreg 4
registration
  let a1, a2 be non empty set;
  let a3 be non empty finite Mealy-FSM over a1,a2;
  cluster the_reduction_of a3 -> non empty finite strict;
end;

:: FSM_1:th 57
theorem
for b1, b2 being non empty set
for b3 being FinSequence of b1
for b4, b5 being non empty finite Mealy-FSM over b1,b2
for b6 being Element of the carrier of b5
for b7 being Element of the carrier of b4
   st b4 = the_reduction_of b5 & b6 in b7
for b8 being Element of NAT
      st b8 in Seg ((len b3) + 1)
   holds (b6,b3)-admissible . b8 in (b7,b3)-admissible . b8;

:: FSM_1:th 58
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2 holds
   b3,the_reduction_of b3 -are_equivalent;

:: FSM_1:prednot 7 => FSM_1:pred 7
definition
  let a1, a2 be non empty set;
  let a3, a4 be non empty Mealy-FSM over a1,a2;
  pred A3,A4 -are_isomorphic means
    ex b1 being Function-like quasi_total Relation of the carrier of a3,the carrier of a4 st
       b1 is bijective(the carrier of a3, the carrier of a4) &
        b1 . the InitS of a3 = the InitS of a4 &
        (for b2 being Element of the carrier of a3
        for b3 being Element of a1 holds
           b1 . ((the Tran of a3) .(b2,b3)) = (the Tran of a4) .(b1 . b2,b3) &
            (the OFun of a3) .(b2,b3) = (the OFun of a4) .(b1 . b2,b3));
  symmetry;
::  for a1, a2 being non empty set
::  for a3, a4 being non empty Mealy-FSM over a1,a2
::        st a3,a4 -are_isomorphic
::     holds a4,a3 -are_isomorphic;
  reflexivity;
::  for a1, a2 being non empty set
::  for a3 being non empty Mealy-FSM over a1,a2 holds
::     a3,a3 -are_isomorphic;
end;

:: FSM_1:dfs 19
definiens
  let a1, a2 be non empty set;
  let a3, a4 be non empty Mealy-FSM over a1,a2;
To prove
     a3,a4 -are_isomorphic
it is sufficient to prove
  thus ex b1 being Function-like quasi_total Relation of the carrier of a3,the carrier of a4 st
       b1 is bijective(the carrier of a3, the carrier of a4) &
        b1 . the InitS of a3 = the InitS of a4 &
        (for b2 being Element of the carrier of a3
        for b3 being Element of a1 holds
           b1 . ((the Tran of a3) .(b2,b3)) = (the Tran of a4) .(b1 . b2,b3) &
            (the OFun of a3) .(b2,b3) = (the OFun of a4) .(b1 . b2,b3));

:: FSM_1:def 19
theorem
for b1, b2 being non empty set
for b3, b4 being non empty Mealy-FSM over b1,b2 holds
   b3,b4 -are_isomorphic
iff
   ex b5 being Function-like quasi_total Relation of the carrier of b3,the carrier of b4 st
      b5 is bijective(the carrier of b3, the carrier of b4) &
       b5 . the InitS of b3 = the InitS of b4 &
       (for b6 being Element of the carrier of b3
       for b7 being Element of b1 holds
          b5 . ((the Tran of b3) .(b6,b7)) = (the Tran of b4) .(b5 . b6,b7) &
           (the OFun of b3) .(b6,b7) = (the OFun of b4) .(b5 . b6,b7));

:: FSM_1:th 59
theorem
for b1, b2 being non empty set
for b3, b4, b5 being non empty Mealy-FSM over b1,b2
      st b3,b4 -are_isomorphic & b4,b5 -are_isomorphic
   holds b3,b5 -are_isomorphic;

:: FSM_1:th 60
theorem
for b1, b2 being non empty set
for b3 being FinSequence of b2
for b4, b5 being non empty Mealy-FSM over b2,b1
for b6 being Element of the carrier of b4
for b7 being Function-like quasi_total Relation of the carrier of b4,the carrier of b5
   st for b8 being Element of the carrier of b4
     for b9 being Element of b2 holds
        b7 . ((the Tran of b4) .(b8,b9)) = (the Tran of b5) .(b7 . b8,b9)
for b8 being Element of NAT
      st 1 <= b8 & b8 <= (len b3) + 1
   holds b7 . ((b6,b3)-admissible . b8) = (b7 . b6,b3)-admissible . b8;

:: FSM_1:th 61
theorem
for b1, b2 being non empty set
for b3, b4 being non empty Mealy-FSM over b2,b1
for b5, b6 being Element of the carrier of b3
for b7 being Function-like quasi_total Relation of the carrier of b3,the carrier of b4
      st b7 . the InitS of b3 = the InitS of b4 &
         (for b8 being Element of the carrier of b3
         for b9 being Element of b2 holds
            b7 . ((the Tran of b3) .(b8,b9)) = (the Tran of b4) .(b7 . b8,b9) &
             (the OFun of b3) .(b8,b9) = (the OFun of b4) .(b7 . b8,b9))
   holds    b5,b6 -are_equivalent
   iff
      b7 . b5,b7 . b6 -are_equivalent;

:: FSM_1:th 62
theorem
for b1, b2 being non empty set
for b3, b4 being non empty finite Mealy-FSM over b1,b2
for b5, b6 being Element of the carrier of b3
      st b3 = the_reduction_of b4 & b5 <> b6
   holds not b5,b6 -are_equivalent;

:: FSM_1:attrnot 5 => FSM_1:attr 5
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  attr a3 is reduced means
    for b1, b2 being Element of the carrier of a3
          st b1 <> b2
       holds not b1,b2 -are_equivalent;
end;

:: FSM_1:dfs 20
definiens
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
To prove
     a3 is reduced
it is sufficient to prove
  thus for b1, b2 being Element of the carrier of a3
          st b1 <> b2
       holds not b1,b2 -are_equivalent;

:: FSM_1:def 20
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2 holds
      b3 is reduced(b1, b2)
   iff
      for b4, b5 being Element of the carrier of b3
            st b4 <> b5
         holds not b4,b5 -are_equivalent;

:: FSM_1:th 63
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2 holds
   the_reduction_of b3 is reduced(b1, b2);

:: FSM_1:exreg 8
registration
  let a1, a2 be non empty set;
  cluster non empty finite reduced Mealy-FSM over a1,a2;
end;

:: FSM_1:th 64
theorem
for b1, b2 being non empty set
for b3 being non empty finite reduced Mealy-FSM over b1,b2 holds
   b3,the_reduction_of b3 -are_isomorphic;

:: FSM_1:th 65
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2 holds
      b3 is reduced(b1, b2)
   iff
      ex b4 being non empty finite Mealy-FSM over b1,b2 st
         b3,the_reduction_of b4 -are_isomorphic;

:: FSM_1:attrnot 6 => FSM_1:attr 6
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be Element of the carrier of a3;
  attr a4 is accessible means
    ex b1 being FinSequence of a1 st
       the InitS of a3,b1 -leads_to a4;
end;

:: FSM_1:dfs 21
definiens
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  let a4 be Element of the carrier of a3;
To prove
     a4 is accessible
it is sufficient to prove
  thus ex b1 being FinSequence of a1 st
       the InitS of a3,b1 -leads_to a4;

:: FSM_1:def 21
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2
for b4 being Element of the carrier of b3 holds
      b4 is accessible(b1, b2, b3)
   iff
      ex b5 being FinSequence of b1 st
         the InitS of b3,b5 -leads_to b4;

:: FSM_1:attrnot 7 => FSM_1:attr 7
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  attr a3 is connected means
    for b1 being Element of the carrier of a3 holds
       b1 is accessible(a1, a2, a3);
end;

:: FSM_1:dfs 22
definiens
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
To prove
     a3 is connected
it is sufficient to prove
  thus for b1 being Element of the carrier of a3 holds
       b1 is accessible(a1, a2, a3);

:: FSM_1:def 22
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2 holds
      b3 is connected(b1, b2)
   iff
      for b4 being Element of the carrier of b3 holds
         b4 is accessible(b1, b2, b3);

:: FSM_1:exreg 9
registration
  let a1, a2 be non empty set;
  cluster non empty finite connected Mealy-FSM over a1,a2;
end;

:: FSM_1:th 66
theorem
for b1, b2 being non empty set
for b3 being non empty finite connected Mealy-FSM over b1,b2 holds
   the_reduction_of b3 is connected(b1, b2);

:: FSM_1:exreg 10
registration
  let a1, a2 be non empty set;
  cluster non empty finite reduced connected Mealy-FSM over a1,a2;
end;

:: FSM_1:funcnot 12 => FSM_1:func 12
definition
  let a1, a2 be non empty set;
  let a3 be non empty Mealy-FSM over a1,a2;
  func accessibleStates A3 -> set equals
    {b1 where b1 is Element of the carrier of a3: b1 is accessible(a1, a2, a3)};
end;

:: FSM_1:def 23
theorem
for b1, b2 being non empty set
for b3 being non empty Mealy-FSM over b1,b2 holds
   accessibleStates b3 = {b4 where b4 is Element of the carrier of b3: b4 is accessible(b1, b2, b3)};

:: FSM_1:funcreg 5
registration
  let a1, a2 be non empty set;
  let a3 be non empty finite Mealy-FSM over a1,a2;
  cluster accessibleStates a3 -> non empty finite;
end;

:: FSM_1:th 67
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b2,b1 holds
   accessibleStates b3 c= the carrier of b3 &
    (for b4 being Element of the carrier of b3 holds
          b4 in accessibleStates b3
       iff
          b4 is accessible(b2, b1, b3));

:: FSM_1:th 68
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b2,b1 holds
   (the Tran of b3) | [:accessibleStates b3,b2:] is Function-like quasi_total Relation of [:accessibleStates b3,b2:],accessibleStates b3;

:: FSM_1:th 69
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4 being Function-like quasi_total Relation of [:accessibleStates b3,b1:],accessibleStates b3
for b5 being Function-like quasi_total Relation of [:accessibleStates b3,b1:],b2
for b6 being Element of accessibleStates b3
      st b4 = (the Tran of b3) | [:accessibleStates b3,b1:] &
         b5 = (the OFun of b3) | [:accessibleStates b3,b1:] &
         b6 = the InitS of b3
   holds b3,Mealy-FSM(#accessibleStates b3,b4,b5,b6#) -are_equivalent;

:: FSM_1:th 70
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b2,b1 holds
   ex b4 being non empty finite connected Mealy-FSM over b2,b1 st
      the Tran of b4 = (the Tran of b3) | [:accessibleStates b3,b2:] &
       the OFun of b4 = (the OFun of b3) | [:accessibleStates b3,b2:] &
       the InitS of b4 = the InitS of b3 &
       b3,b4 -are_equivalent;

:: FSM_1:funcnot 13 => FSM_1:func 13
definition
  let a1 be set;
  let a2 be non empty set;
  let a3, a4 be non empty Mealy-FSM over a1,a2;
  func A3 -Mealy_union A4 -> strict Mealy-FSM over a1,a2 means
    the carrier of it = (the carrier of a3) \/ the carrier of a4 &
     the Tran of it = (the Tran of a3) +* the Tran of a4 &
     the OFun of it = (the OFun of a3) +* the OFun of a4 &
     the InitS of it = the InitS of a3;
end;

:: FSM_1:def 24
theorem
for b1 being set
for b2 being non empty set
for b3, b4 being non empty Mealy-FSM over b1,b2
for b5 being strict Mealy-FSM over b1,b2 holds
      b5 = b3 -Mealy_union b4
   iff
      the carrier of b5 = (the carrier of b3) \/ the carrier of b4 &
       the Tran of b5 = (the Tran of b3) +* the Tran of b4 &
       the OFun of b5 = (the OFun of b3) +* the OFun of b4 &
       the InitS of b5 = the InitS of b3;

:: FSM_1:funcreg 6
registration
  let a1 be set;
  let a2 be non empty set;
  let a3, a4 be non empty finite Mealy-FSM over a1,a2;
  cluster a3 -Mealy_union a4 -> non empty finite strict;
end;

:: FSM_1:th 71
theorem
for b1, b2 being non empty set
for b3 being FinSequence of b1
for b4, b5 being non empty Mealy-FSM over b1,b2
for b6 being Element of the carrier of b4
for b7 being non empty finite Mealy-FSM over b1,b2
for b8 being Element of the carrier of b7
      st b7 = b4 -Mealy_union b5 & the carrier of b4 misses the carrier of b5 & b6 = b8
   holds (b6,b3)-admissible = (b8,b3)-admissible;

:: FSM_1:th 72
theorem
for b1, b2 being non empty set
for b3 being FinSequence of b1
for b4, b5 being non empty Mealy-FSM over b1,b2
for b6 being Element of the carrier of b4
for b7 being non empty finite Mealy-FSM over b1,b2
for b8 being Element of the carrier of b7
      st b7 = b4 -Mealy_union b5 & the carrier of b4 misses the carrier of b5 & b6 = b8
   holds (b6,b3)-response = (b8,b3)-response;

:: FSM_1:th 73
theorem
for b1, b2 being non empty set
for b3 being FinSequence of b1
for b4, b5 being non empty Mealy-FSM over b1,b2
for b6 being Element of the carrier of b5
for b7 being non empty finite Mealy-FSM over b1,b2
for b8 being Element of the carrier of b7
      st b7 = b4 -Mealy_union b5 & the carrier of b4 misses the carrier of b5 & b6 = b8
   holds (b6,b3)-admissible = (b8,b3)-admissible;

:: FSM_1:th 74
theorem
for b1, b2 being non empty set
for b3 being FinSequence of b1
for b4, b5 being non empty Mealy-FSM over b1,b2
for b6 being Element of the carrier of b5
for b7 being non empty finite Mealy-FSM over b1,b2
for b8 being Element of the carrier of b7
      st b7 = b4 -Mealy_union b5 & the carrier of b4 misses the carrier of b5 & b6 = b8
   holds (b6,b3)-response = (b8,b3)-response;

:: FSM_1:th 75
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4, b5 being non empty reduced Mealy-FSM over b1,b2
      st b3 = b4 -Mealy_union b5 & the carrier of b4 misses the carrier of b5 & b4,b5 -are_equivalent
   holds ex b6 being Element of the carrier of the_reduction_of b3 st
      the InitS of b4 in b6 & the InitS of b5 in b6 & b6 = the InitS of the_reduction_of b3;

:: FSM_1:th 76
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4, b5 being non empty reduced connected Mealy-FSM over b1,b2
for b6, b7 being Element of the carrier of b3
for b8, b9 being Element of the carrier of b4
      st b8 = b6 & b9 = b7 & the carrier of b4 misses the carrier of b5 & b4,b5 -are_equivalent & b3 = b4 -Mealy_union b5 & not b8,b9 -are_equivalent
   holds not b6,b7 -are_equivalent;

:: FSM_1:th 77
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4, b5 being non empty reduced connected Mealy-FSM over b1,b2
for b6, b7 being Element of the carrier of b3
for b8, b9 being Element of the carrier of b4
      st b8 = b6 & b9 = b7 & the carrier of b5 misses the carrier of b4 & b5,b4 -are_equivalent & b3 = b5 -Mealy_union b4 & not b8,b9 -are_equivalent
   holds not b6,b7 -are_equivalent;

:: FSM_1:th 78
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4, b5 being non empty finite reduced connected Mealy-FSM over b1,b2
   st the carrier of b4 misses the carrier of b5 & b4,b5 -are_equivalent & b3 = b4 -Mealy_union b5
for b6 being Element of the carrier of the_reduction_of b3
for b7, b8 being Element of b6
      st b7 in the carrier of b4 & b8 in the carrier of b4
   holds b7 = b8;

:: FSM_1:th 79
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4, b5 being non empty finite reduced connected Mealy-FSM over b1,b2
   st the carrier of b4 misses the carrier of b5 & b4,b5 -are_equivalent & b3 = b4 -Mealy_union b5
for b6 being Element of the carrier of the_reduction_of b3
for b7, b8 being Element of b6
      st b7 in the carrier of b5 & b8 in the carrier of b5
   holds b7 = b8;

:: FSM_1:th 80
theorem
for b1, b2 being non empty set
for b3 being non empty finite Mealy-FSM over b1,b2
for b4, b5 being non empty finite reduced connected Mealy-FSM over b1,b2
   st the carrier of b4 misses the carrier of b5 & b4,b5 -are_equivalent & b3 = b4 -Mealy_union b5
for b6 being Element of the carrier of the_reduction_of b3 holds
   ex b7, b8 being Element of b6 st
      b7 in the carrier of b4 &
       b8 in the carrier of b5 &
       (for b9 being Element of b6
             st b9 <> b7
          holds b9 = b8);

:: FSM_1:th 81
theorem
for b1, b2 being non empty set
for b3, b4 being non empty finite Mealy-FSM over b1,b2 holds
ex b5, b6 being non empty finite Mealy-FSM over b1,b2 st
   the carrier of b5 misses the carrier of b6 & b5,b3 -are_isomorphic & b6,b4 -are_isomorphic;

:: FSM_1:th 82
theorem
for b1, b2 being non empty set
for b3, b4 being non empty Mealy-FSM over b1,b2
      st b3,b4 -are_isomorphic
   holds b3,b4 -are_equivalent;

:: FSM_1:th 83
theorem
for b1, b2 being non empty set
for b3, b4 being non empty finite reduced connected Mealy-FSM over b1,b2
      st the carrier of b3 misses the carrier of b4 & b3,b4 -are_equivalent
   holds b3,b4 -are_isomorphic;

:: FSM_1:th 84
theorem
for b1, b2 being non empty set
for b3, b4 being non empty finite connected Mealy-FSM over b1,b2
      st b3,b4 -are_equivalent
   holds the_reduction_of b3,the_reduction_of b4 -are_isomorphic;

:: FSM_1:th 85
theorem
for b1, b2 being non empty set
for b3, b4 being non empty finite reduced connected Mealy-FSM over b1,b2 holds
   b3,b4 -are_isomorphic
iff
   b3,b4 -are_equivalent;