:: FSM_2 semantic presentation
theorem Th1: :: FSM_2:1
theorem Th2: :: FSM_2:2
theorem Th3: :: FSM_2:3
for b
1 being non
empty set for b
2, b
3, b
4 being
Element of b
1for b
5 being non
empty FSM of b
1for b
6 being
State of b
5 holds
GEN <*b2,b3,b4*>,b
6 = <*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 c
1 be non
empty set ;
let c
2 be non
empty FSM of c
1;
let c
3 be
FinSequence of c
1;
let c
4 be
State of c
2;
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
= c
4 )
by E7, FINSEQ_1:3, FSM_1:def 2;
then
[1,c4] in GEN c
3,c
4
by FUNCT_1:def 4;
then
{[1,c4]} c= GEN c
3,c
4
by ZFMISC_1:37;
then
<*c4*> c= GEN c
3,c
4
by FINSEQ_1:def 5;
then
GEN (<*> c1),c
4 c= GEN c
3,c
4
by FSM_1:16;
hence
GEN (<*> c1),c
4,
GEN c
3,c
4 are_c=-comparable
by XBOOLE_0:def 9;
end;
E7:
now
let c
1, c
2 be
FinSequence;
assume that E8:
c
1 <> {}
and E9:
c
2 <> {}
and E10:
c
1 . (len c1) = c
2 . 1
;
consider c
3 being
FinSequence, c
4 being
set such that E11:
c
1 = c
3 ^ <*c4*>
by E8, FINSEQ_1:63;
consider c
5 being
set , c
6 being
FinSequence such that E12:
( c
2 = <*c5*> ^ c
6 &
len c
2 = (len c6) + 1 )
by E9, REWRITE1:5;
E13:
len c
1 =
(len c3) + (len <*c4*>)
by E11, FINSEQ_1:35
.=
(len c3) + 1
by FINSEQ_1:56
;
then E14:
( c
1 . (len c1) = c
4 & c
2 . 1
= c
5 )
by E11, E12, FINSEQ_1:58, FINSEQ_1:59;
(Del c1,(len c1)) ^ c
2 =
c
3 ^ (<*c5*> ^ c6)
by E11, E12, E13, WSIERP_1:48
.=
c
1 ^ c
6
by E10, E11, E14, FINSEQ_1:45
;
hence
(Del c1,(len c1)) ^ c
2 = c
1 ^ (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 c
1, c
2 be non
empty set ;
let c
3, c
4 be
set ;
let c
5 be
Function of
{c3,c4},c
2;
func c
1 -TwoStatesMooreSM c
3,c
4,c
5 -> non
empty strict Moore-SM_Final of a
1,a
2 means :
Def7:
:: FSM_2:def 7
( the
carrier of a
6 = {a3,a4} & the
Tran of a
6 = [:{a3,a4},a1:] --> a
4 & the
OFun of a
6 = a
5 & the
InitS of a
6 = a
3 & the
FinalS of a
6 = {a4} );
uniqueness
for b1, b2 being non empty strict Moore-SM_Final of c1,c2 holds
( 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} implies 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 b
1, b
2 being non
empty set for b
3, b
4 being
set for b
5 being
Function of
{b3,b4},b
2for b
6 being non
empty strict Moore-SM_Final of b
1,b
2 holds
( b
6 = b
1 -TwoStatesMooreSM b
3,b
4,b
5 iff ( the
carrier of b
6 = {b3,b4} & the
Tran of b
6 = [:{b3,b4},b1:] --> b
4 & the
OFun of b
6 = b
5 & the
InitS of b
6 = b
3 & the
FinalS of b
6 = {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 b
1 being non
empty set for b
2 being
BinOp of b
1for b
3 being non
empty Moore-SM_Final of
[:b1,b1:],b
1 \/ {b1} holds
( b
3 is
calculating_type & the
carrier of b
3 = b
1 \/ {b1} & the
FinalS of b
3 = b
1 & the
InitS of b
3 = b
1 & the
OFun of b
3 = id the
carrier of b
3 & ( for b
4, b
5 being
Element of b
1 holds the
Tran of b
3 . [the InitS of b3,[b4,b5]] = b
2 . b
4,b
5 ) implies ( b
3 is
halting & ( for b
4, b
5 being
Element of b
1 holds b
2 . b
4,b
5 is_result_of [b4,b5],b
3 ) ) )
theorem Th23: :: FSM_2:23
for b
1 being non
empty Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } holds
( b
1 is
calculating_type & the
carrier of b
1 = REAL \/ {REAL } & the
FinalS of b
1 = REAL & the
InitS of b
1 = REAL & the
OFun of b
1 = id the
carrier of b
1 & ( for b
2, b
3 being
Real holds
( b
2 >= b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
2 ) ) & ( for b
2, b
3 being
Real holds
( b
2 < b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
3 ) ) implies for b
2, b
3 being
Element of
REAL holds
max b
2,b
3 is_result_of [b2,b3],b
1 )
theorem Th24: :: FSM_2:24
for b
1 being non
empty Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } holds
( b
1 is
calculating_type & the
carrier of b
1 = REAL \/ {REAL } & the
FinalS of b
1 = REAL & the
InitS of b
1 = REAL & the
OFun of b
1 = id the
carrier of b
1 & ( for b
2, b
3 being
Real holds
( b
2 < b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
2 ) ) & ( for b
2, b
3 being
Real holds
( b
2 >= b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
3 ) ) implies for b
2, b
3 being
Element of
REAL holds
min b
2,b
3 is_result_of [b2,b3],b
1 )
theorem Th25: :: FSM_2:25
theorem Th26: :: FSM_2:26
for b
1 being non
empty Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } holds
( b
1 is
calculating_type & the
carrier of b
1 = REAL \/ {REAL } & the
FinalS of b
1 = REAL & the
InitS of b
1 = REAL & the
OFun of b
1 = id the
carrier of b
1 & ( for b
2, b
3 being
Real holds
( not ( not b
2 > 0 & not b
3 > 0 ) implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = 1 ) ) & ( for b
2, b
3 being
Real holds
( ( b
2 = 0 or b
3 = 0 ) & b
2 <= 0 & b
3 <= 0 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = 0 ) ) & ( for b
2, b
3 being
Real holds
( b
2 < 0 & b
3 < 0 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = - 1 ) ) implies for b
2, b
3 being
Element of
REAL holds
max (sgn b2),
(sgn b3) is_result_of [b2,b3],b
1 )
:: deftheorem Def9 defines Result FSM_2:def 9 :
theorem Th27: :: FSM_2:27
theorem Th28: :: FSM_2:28
for b
1 being non
empty calculating_type halting Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } holds
( the
carrier of b
1 = REAL \/ {REAL } & the
FinalS of b
1 = REAL & the
InitS of b
1 = REAL & the
OFun of b
1 = id the
carrier of b
1 & ( for b
2, b
3 being
Real holds
( b
2 >= b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
2 ) ) & ( for b
2, b
3 being
Real holds
( b
2 < b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
3 ) ) implies for b
2, b
3 being
Element of
REAL holds
Result [b2,b3],b
1 = max b
2,b
3 )
theorem Th29: :: FSM_2:29
for b
1 being non
empty calculating_type halting Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } holds
( the
carrier of b
1 = REAL \/ {REAL } & the
FinalS of b
1 = REAL & the
InitS of b
1 = REAL & the
OFun of b
1 = id the
carrier of b
1 & ( for b
2, b
3 being
Real holds
( b
2 < b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
2 ) ) & ( for b
2, b
3 being
Real holds
( b
2 >= b
3 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = b
3 ) ) implies for b
2, b
3 being
Element of
REAL holds
Result [b2,b3],b
1 = min b
2,b
3 )
theorem Th30: :: FSM_2:30
theorem Th31: :: FSM_2:31
for b
1 being non
empty calculating_type halting Moore-SM_Final of
[:REAL ,REAL :],
REAL \/ {REAL } holds
( the
carrier of b
1 = REAL \/ {REAL } & the
FinalS of b
1 = REAL & the
InitS of b
1 = REAL & the
OFun of b
1 = id the
carrier of b
1 & ( for b
2, b
3 being
Real holds
( not ( not b
2 > 0 & not b
3 > 0 ) implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = 1 ) ) & ( for b
2, b
3 being
Real holds
( ( b
2 = 0 or b
3 = 0 ) & b
2 <= 0 & b
3 <= 0 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = 0 ) ) & ( for b
2, b
3 being
Real holds
( b
2 < 0 & b
3 < 0 implies the
Tran of b
1 . [the InitS of b1,[b2,b3]] = - 1 ) ) implies for b
2, b
3 being
Element of
REAL holds
Result [b2,b3],b
1 = max (sgn b2),
(sgn b3) )