:: FSM_2 semantic presentation
theorem Th1: :: FSM_2:1
theorem Th2: :: FSM_2:2
theorem Th3: :: FSM_2:3
for
b1 being non
empty set for
b2,
b3,
b4 being
Element of
b1 for
b5 being non
empty FSM of
b1 for
b6 being
State of
b5 holds
GEN <*b2,b3,b4*>,
b6 = <*b6,(the Tran of b5 . [b6,b2]),(the Tran of b5 . [(the Tran of b5 . [b6,b2]),b3]),(the Tran of b5 . [(the Tran of b5 . [(the Tran of b5 . [b6,b2]),b3]),b4])*>
:: deftheorem Def1 defines calculating_type FSM_2:def 1 :
theorem Th4: :: FSM_2:4
theorem Th5: :: FSM_2:5
theorem Th6: :: FSM_2:6
E6:
now
let c1 be non
empty set ;
let c2 be non
empty FSM of
c1;
let c3 be
FinSequence of
c1;
let c4 be
State of
c2;
E7:
dom (GEN c3,c4) =
Seg (len (GEN c3,c4))
by FINSEQ_1:def 3
.=
Seg ((len c3) + 1)
by FSM_1:def 2
;
( 1
<= 1 & 1
<= (len c3) + 1 )
by NAT_1:29;
then
( 1
in dom (GEN c3,c4) &
(GEN c3,c4) . 1
= c4 )
by E7, FINSEQ_1:3, FSM_1:def 2;
then
[1,c4] in GEN c3,
c4
by FUNCT_1:def 4;
then
{[1,c4]} c= GEN c3,
c4
by ZFMISC_1:37;
then
<*c4*> c= GEN c3,
c4
by FINSEQ_1:def 5;
then
GEN (<*> c1),
c4 c= GEN c3,
c4
by FSM_1:16;
hence
GEN (<*> c1),
c4,
GEN c3,
c4 are_c=-comparable
by XBOOLE_0:def 9;
end;
E7:
now
let c1,
c2 be
FinSequence;
assume that E8:
c1 <> {}
and E9:
c2 <> {}
and E10:
c1 . (len c1) = c2 . 1
;
consider c3 being
FinSequence,
c4 being
set such that E11:
c1 = c3 ^ <*c4*>
by E8, FINSEQ_1:63;
consider c5 being
set ,
c6 being
FinSequence such that E12:
(
c2 = <*c5*> ^ c6 &
len c2 = (len c6) + 1 )
by E9, REWRITE1:5;
E13:
len c1 =
(len c3) + (len <*c4*>)
by E11, FINSEQ_1:35
.=
(len c3) + 1
by FINSEQ_1:56
;
then E14:
(
c1 . (len c1) = c4 &
c2 . 1
= c5 )
by E11, E12, FINSEQ_1:58, FINSEQ_1:59;
(Del c1,(len c1)) ^ c2 =
c3 ^ (<*c5*> ^ c6)
by E11, E12, E13, WSIERP_1:48
.=
c1 ^ c6
by E10, E11, E14, FINSEQ_1:45
;
hence
(Del c1,(len c1)) ^ c2 = c1 ^ (Del c2,1)
by E12, WSIERP_1:48;
end;
theorem Th7: :: FSM_2:7
:: deftheorem Def2 defines is_accessible_via FSM_2:def 2 :
:: deftheorem Def3 defines accessible FSM_2:def 3 :
theorem Th8: :: FSM_2:8
theorem Th9: :: FSM_2:9
theorem Th10: :: FSM_2:10
theorem Th11: :: FSM_2:11
:: deftheorem Def4 defines regular FSM_2:def 4 :
theorem Th12: :: FSM_2:12
theorem Th13: :: FSM_2:13
theorem Th14: :: FSM_2:14
theorem Th15: :: FSM_2:15
theorem Th16: :: FSM_2:16
:: deftheorem Def5 defines leads_to_final_state_of FSM_2:def 5 :
:: deftheorem Def6 defines halting FSM_2:def 6 :
definition
let c1,
c2 be non
empty set ;
let c3,
c4 be
set ;
let c5 be
Function of
{c3,c4},
c2;
func c1 -TwoStatesMooreSM c3,
c4,
c5 -> non
empty strict Moore-SM_Final of
a1,
a2 means :
Def7:
:: FSM_2:def 7
( the
carrier of
a6 = {a3,a4} & the
Tran of
a6 = [:{a3,a4},a1:] --> a4 & the
OFun of
a6 = a5 & the
InitS of
a6 = a3 & the
FinalS of
a6 = {a4} );
uniqueness
for b1, b2 being non empty strict Moore-SM_Final of c1,c2 st the carrier of b1 = {c3,c4} & the Tran of b1 = [:{c3,c4},c1:] --> c4 & the OFun of b1 = c5 & the InitS of b1 = c3 & the FinalS of b1 = {c4} & the carrier of b2 = {c3,c4} & the Tran of b2 = [:{c3,c4},c1:] --> c4 & the OFun of b2 = c5 & the InitS of b2 = c3 & the FinalS of b2 = {c4} holds
b1 = b2
;
existence
ex b1 being non empty strict Moore-SM_Final of c1,c2 st
( the carrier of b1 = {c3,c4} & the Tran of b1 = [:{c3,c4},c1:] --> c4 & the OFun of b1 = c5 & the InitS of b1 = c3 & the FinalS of b1 = {c4} )
end;
:: deftheorem Def7 defines -TwoStatesMooreSM FSM_2:def 7 :
for
b1,
b2 being non
empty set for
b3,
b4 being
set for
b5 being
Function of
{b3,b4},
b2 for
b6 being non
empty strict Moore-SM_Final of
b1,
b2 holds
(
b6 = b1 -TwoStatesMooreSM b3,
b4,
b5 iff ( the
carrier of
b6 = {b3,b4} & the
Tran of
b6 = [:{b3,b4},b1:] --> b4 & the
OFun of
b6 = b5 & the
InitS of
b6 = b3 & the
FinalS of
b6 = {b4} ) );
theorem Th17: :: FSM_2:17
theorem Th18: :: FSM_2:18
:: deftheorem Def8 defines is_result_of FSM_2:def 8 :
theorem Th19: :: FSM_2:19
theorem Th20: :: FSM_2:20
theorem Th21: :: FSM_2:21
theorem Th22: :: FSM_2:22
for
b1 being non
empty set for
b2 being
BinOp of
b1 for
b3 being non
empty Moore-SM_Final of
[:b1,b1:],
b1 \/ {b1} st
b3 is
calculating_type & the
carrier of
b3 = b1 \/ {b1} & the
FinalS of
b3 = b1 & the
InitS of
b3 = b1 & the
OFun of
b3 = id the
carrier of
b3 & ( for
b4,
b5 being
Element of
b1 holds the
Tran of
b3 . [the InitS of b3,[b4,b5]] = b2 . b4,
b5 ) holds
(
b3 is
halting & ( for
b4,
b5 being
Element of
b1 holds
b2 . b4,
b5 is_result_of [b4,b5],
b3 ) )
theorem Th23: :: FSM_2:23
for
b1 being non
empty Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } st
b1 is
calculating_type & the
carrier of
b1 = REAL \/ {REAL } & the
FinalS of
b1 = REAL & the
InitS of
b1 = REAL & the
OFun of
b1 = id the
carrier of
b1 & ( for
b2,
b3 being
Real st
b2 >= b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b2 ) & ( for
b2,
b3 being
Real st
b2 < b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b3 ) holds
for
b2,
b3 being
Element of
REAL holds
max b2,
b3 is_result_of [b2,b3],
b1
theorem Th24: :: FSM_2:24
for
b1 being non
empty Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } st
b1 is
calculating_type & the
carrier of
b1 = REAL \/ {REAL } & the
FinalS of
b1 = REAL & the
InitS of
b1 = REAL & the
OFun of
b1 = id the
carrier of
b1 & ( for
b2,
b3 being
Real st
b2 < b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b2 ) & ( for
b2,
b3 being
Real st
b2 >= b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b3 ) holds
for
b2,
b3 being
Element of
REAL holds
min b2,
b3 is_result_of [b2,b3],
b1
theorem Th25: :: FSM_2:25
theorem Th26: :: FSM_2:26
for
b1 being non
empty Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } st
b1 is
calculating_type & the
carrier of
b1 = REAL \/ {REAL } & the
FinalS of
b1 = REAL & the
InitS of
b1 = REAL & the
OFun of
b1 = id the
carrier of
b1 & ( for
b2,
b3 being
Real st (
b2 > 0 or
b3 > 0 ) holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = 1 ) & ( for
b2,
b3 being
Real st (
b2 = 0 or
b3 = 0 ) &
b2 <= 0 &
b3 <= 0 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = 0 ) & ( for
b2,
b3 being
Real st
b2 < 0 &
b3 < 0 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = - 1 ) holds
for
b2,
b3 being
Element of
REAL holds
max (sgn b2),
(sgn b3) is_result_of [b2,b3],
b1
:: deftheorem Def9 defines Result FSM_2:def 9 :
theorem Th27: :: FSM_2:27
theorem Th28: :: FSM_2:28
for
b1 being non
empty calculating_type halting Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } st the
carrier of
b1 = REAL \/ {REAL } & the
FinalS of
b1 = REAL & the
InitS of
b1 = REAL & the
OFun of
b1 = id the
carrier of
b1 & ( for
b2,
b3 being
Real st
b2 >= b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b2 ) & ( for
b2,
b3 being
Real st
b2 < b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b3 ) holds
for
b2,
b3 being
Element of
REAL holds
Result [b2,b3],
b1 = max b2,
b3
theorem Th29: :: FSM_2:29
for
b1 being non
empty calculating_type halting Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } st the
carrier of
b1 = REAL \/ {REAL } & the
FinalS of
b1 = REAL & the
InitS of
b1 = REAL & the
OFun of
b1 = id the
carrier of
b1 & ( for
b2,
b3 being
Real st
b2 < b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b2 ) & ( for
b2,
b3 being
Real st
b2 >= b3 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = b3 ) holds
for
b2,
b3 being
Element of
REAL holds
Result [b2,b3],
b1 = min b2,
b3
theorem Th30: :: FSM_2:30
theorem Th31: :: FSM_2:31
for
b1 being non
empty calculating_type halting Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } st the
carrier of
b1 = REAL \/ {REAL } & the
FinalS of
b1 = REAL & the
InitS of
b1 = REAL & the
OFun of
b1 = id the
carrier of
b1 & ( for
b2,
b3 being
Real st (
b2 > 0 or
b3 > 0 ) holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = 1 ) & ( for
b2,
b3 being
Real st (
b2 = 0 or
b3 = 0 ) &
b2 <= 0 &
b3 <= 0 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = 0 ) & ( for
b2,
b3 being
Real st
b2 < 0 &
b3 < 0 holds
the
Tran of
b1 . [the InitS of b1,[b2,b3]] = - 1 ) holds
for
b2,
b3 being
Element of
REAL holds
Result [b2,b3],
b1 = max (sgn b2),
(sgn b3)