let IAlph, OAlph be non empty set ; :: thesis: for tfsm being non empty Mealy-FSM over IAlph,OAlph
for qa, qb being State of tfsm holds
( qa,qb -are_equivalent iff for s being Element of IAlph holds
( the OFun of tfsm . [qa,s] = the OFun of tfsm . [qb,s] & the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent ) )

let tfsm be non empty Mealy-FSM over IAlph,OAlph; :: thesis: for qa, qb being State of tfsm holds
( qa,qb -are_equivalent iff for s being Element of IAlph holds
( the OFun of tfsm . [qa,s] = the OFun of tfsm . [qb,s] & the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent ) )

let qa, qb be State of tfsm; :: thesis: ( qa,qb -are_equivalent iff for s being Element of IAlph holds
( the OFun of tfsm . [qa,s] = the OFun of tfsm . [qb,s] & the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent ) )

set OF = the OFun of tfsm;
hereby :: thesis: ( ( for s being Element of IAlph holds
( the OFun of tfsm . [qa,s] = the OFun of tfsm . [qb,s] & the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent ) ) implies qa,qb -are_equivalent )
assume A1: qa,qb -are_equivalent ; :: thesis: for s being Element of IAlph holds
( the OFun of tfsm . [qa,s] = the OFun of tfsm . [qb,s] & the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent )

let s be Element of IAlph; :: thesis: ( the OFun of tfsm . [qa,s] = the OFun of tfsm . [qb,s] & the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent )
set qa9 = the Tran of tfsm . [qa,s];
set qb9 = the Tran of tfsm . [qb,s];
len <*s*> = 1 by FINSEQ_1:40;
then A2: 1 in dom <*s*> by FINSEQ_3:25;
thus A3: the OFun of tfsm . [qa,s] = the OFun of tfsm . [(((qa,<*s*>) -admissible) . 1),s] by Def2
.= the OFun of tfsm . [(((qa,<*s*>) -admissible) . 1),(<*s*> . 1)]
.= ((qa,<*s*>) -response) . 1 by A2, Def6
.= ((qb,<*s*>) -response) . 1 by A1
.= the OFun of tfsm . [(((qb,<*s*>) -admissible) . 1),(<*s*> . 1)] by A2, Def6
.= the OFun of tfsm . [(((qb,<*s*>) -admissible) . 1),s]
.= the OFun of tfsm . [qb,s] by Def2 ; :: thesis: the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent
now :: thesis: for w being FinSequence of IAlph holds (( the Tran of tfsm . [qa,s]),w) -response = (( the Tran of tfsm . [qb,s]),w) -response
let w be FinSequence of IAlph; :: thesis: (( the Tran of tfsm . [qa,s]),w) -response = (( the Tran of tfsm . [qb,s]),w) -response
A4: ( (qa,(<*s*> ^ w)) -response = <*( the OFun of tfsm . [qa,s])*> ^ ((( the Tran of tfsm . [qa,s]),w) -response) & (qb,(<*s*> ^ w)) -response = <*( the OFun of tfsm . [qb,s])*> ^ ((( the Tran of tfsm . [qb,s]),w) -response) ) by Th18;
(qa,(<*s*> ^ w)) -response = (qb,(<*s*> ^ w)) -response by A1;
hence (( the Tran of tfsm . [qa,s]),w) -response = (( the Tran of tfsm . [qb,s]),w) -response by A3, A4, FINSEQ_1:33; :: thesis: verum
end;
hence the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent ; :: thesis: verum
end;
assume A5: for s being Element of IAlph holds
( the OFun of tfsm . [qa,s] = the OFun of tfsm . [qb,s] & the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent ) ; :: thesis: qa,qb -are_equivalent
let w be FinSequence of IAlph; :: according to FSM_1:def 10 :: thesis: (qa,w) -response = (qb,w) -response
per cases ( w = <*> IAlph or w <> {} ) ;
suppose A6: w = <*> IAlph ; :: thesis: (qa,w) -response = (qb,w) -response
hence (qa,w) -response = <*> OAlph by Th9
.= (qb,w) -response by A6, Th9 ;
:: thesis: verum
end;
suppose w <> {} ; :: thesis: (qa,w) -response = (qb,w) -response
then consider s being Element of IAlph, wt being FinSequence of IAlph such that
s = w . 1 and
A7: w = <*s*> ^ wt by FINSEQ_3:102;
set bsresp = the OFun of tfsm . [qb,s];
set asresp = the OFun of tfsm . [qa,s];
set qb9 = the Tran of tfsm . [qb,s];
set qa9 = the Tran of tfsm . [qa,s];
the Tran of tfsm . [qa,s], the Tran of tfsm . [qb,s] -are_equivalent by A5;
then A8: (( the Tran of tfsm . [qa,s]),wt) -response = (( the Tran of tfsm . [qb,s]),wt) -response ;
thus (qa,w) -response = <*( the OFun of tfsm . [qa,s])*> ^ ((( the Tran of tfsm . [qa,s]),wt) -response) by A7, Th18
.= <*( the OFun of tfsm . [qb,s])*> ^ ((( the Tran of tfsm . [qb,s]),wt) -response) by A5, A8
.= (qb,w) -response by A7, Th18 ; :: thesis: verum
end;
end;