theorem
for
I being non
empty set for
s1,
s2,
s3 being
Element of
I for
S being non
empty FSM over
I for
q being
State of
S holds
GEN (
<*s1,s2,s3*>,
q)
= <*q,( the Tran of S . [q,s1]),( the Tran of S . [( the Tran of S . [q,s1]),s2]),( the Tran of S . [( the Tran of S . [( the Tran of S . [q,s1]),s2]),s3])*>
Lm1:
now for I being non empty set
for S being non empty FSM over I
for w being FinSequence of I
for q being State of S holds GEN ((<*> I),q), GEN (w,q) are_c=-comparable
let I be non
empty set ;
for S being non empty FSM over I
for w being FinSequence of I
for q being State of S holds GEN ((<*> I),q), GEN (w,q) are_c=-comparable let S be non
empty FSM over
I;
for w being FinSequence of I
for q being State of S holds GEN ((<*> I),q), GEN (w,q) are_c=-comparable let w be
FinSequence of
I;
for q being State of S holds GEN ((<*> I),q), GEN (w,q) are_c=-comparable let q be
State of
S;
GEN ((<*> I),q), GEN (w,q) are_c=-comparable A1:
dom (GEN (w,q)) =
Seg (len (GEN (w,q)))
by FINSEQ_1:def 3
.=
Seg ((len w) + 1)
by FSM_1:def 2
;
1
<= (len w) + 1
by NAT_1:11;
then A2:
1
in dom (GEN (w,q))
by A1, FINSEQ_1:1;
(GEN (w,q)) . 1
= q
by FSM_1:def 2;
then
[1,q] in GEN (
w,
q)
by A2, FUNCT_1:def 2;
then
{[1,q]} c= GEN (
w,
q)
by ZFMISC_1:31;
then
<*q*> c= GEN (
w,
q)
by FINSEQ_1:def 5;
then
GEN (
(<*> I),
q)
c= GEN (
w,
q)
by FSM_1:1;
hence
GEN (
(<*> I),
q),
GEN (
w,
q)
are_c=-comparable
;
verum
end;
Lm2:
now for p, q being FinSequence st p <> {} & q <> {} & p . (len p) = q . 1 holds
(Del (p,(len p))) ^ q = p ^ (Del (q,1))
let p,
q be
FinSequence;
( p <> {} & q <> {} & p . (len p) = q . 1 implies (Del (p,(len p))) ^ q = p ^ (Del (q,1)) )assume that A1:
p <> {}
and A2:
q <> {}
and A3:
p . (len p) = q . 1
;
(Del (p,(len p))) ^ q = p ^ (Del (q,1))consider p1 being
FinSequence,
x being
object such that A4:
p = p1 ^ <*x*>
by A1, FINSEQ_1:46;
consider y being
object ,
q1 being
FinSequence such that A5:
q = <*y*> ^ q1
and
len q = (len q1) + 1
by A2, REWRITE1:5;
A6:
len p =
(len p1) + (len <*x*>)
by A4, FINSEQ_1:22
.=
(len p1) + 1
by FINSEQ_1:39
;
then A7:
p . (len p) = x
by A4, FINSEQ_1:42;
A8:
q . 1
= y
by A5, FINSEQ_1:41;
(Del (p,(len p))) ^ q =
p1 ^ (<*y*> ^ q1)
by A4, A5, A6, WSIERP_1:40
.=
p ^ q1
by A3, A4, A7, A8, FINSEQ_1:32
;
hence
(Del (p,(len p))) ^ q = p ^ (Del (q,1))
by A5, WSIERP_1:40;
verum
end;
definition
let I,
O be non
empty set ;
let i,
f be
set ;
let o be
Function of
{i,f},
O;
uniqueness
for b1, b2 being non empty strict Moore-SM_Final over I,O st the carrier of b1 = {i,f} & the Tran of b1 = [:{i,f},I:] --> f & the OFun of b1 = o & the InitS of b1 = i & the FinalS of b1 = {f} & the carrier of b2 = {i,f} & the Tran of b2 = [:{i,f},I:] --> f & the OFun of b2 = o & the InitS of b2 = i & the FinalS of b2 = {f} holds
b1 = b2
;
existence
ex b1 being non empty strict Moore-SM_Final over I,O st
( the carrier of b1 = {i,f} & the Tran of b1 = [:{i,f},I:] --> f & the OFun of b1 = o & the InitS of b1 = i & the FinalS of b1 = {f} )
end;
::
deftheorem Def7 defines
-TwoStatesMooreSM FSM_2:def 7 :
for I, O being non empty set
for i, f being set
for o being Function of {i,f},O
for b6 being non empty strict Moore-SM_Final over I,O holds
( b6 = I -TwoStatesMooreSM (i,f,o) iff ( the carrier of b6 = {i,f} & the Tran of b6 = [:{i,f},I:] --> f & the OFun of b6 = o & the InitS of b6 = i & the FinalS of b6 = {f} ) );
theorem Th22:
for
X being non
empty set for
f being
BinOp of
X for
M being non
empty Moore-SM_Final over
[:X,X:],
succ X st
M is
calculating_type & the
carrier of
M = succ X & the
FinalS of
M = X & the
InitS of
M = X & the
OFun of
M = id the
carrier of
M & ( for
x,
y being
Element of
X holds the
Tran of
M . [ the InitS of M,[x,y]] = f . (
x,
y) ) holds
(
M is
halting & ( for
x,
y being
Element of
X holds
f . (
x,
y)
is_result_of [x,y],
M ) )
theorem Th23:
for
M being non
empty Moore-SM_Final over
[:REAL,REAL:],
succ REAL st
M is
calculating_type & the
carrier of
M = succ REAL & the
FinalS of
M = REAL & the
InitS of
M = REAL & the
OFun of
M = id the
carrier of
M & ( for
x,
y being
Real st
x >= y holds
the
Tran of
M . [ the InitS of M,[x,y]] = x ) & ( for
x,
y being
Real st
x < y holds
the
Tran of
M . [ the InitS of M,[x,y]] = y ) holds
for
x,
y being
Element of
REAL holds
max (
x,
y)
is_result_of [x,y],
M
theorem Th24:
for
M being non
empty Moore-SM_Final over
[:REAL,REAL:],
succ REAL st
M is
calculating_type & the
carrier of
M = succ REAL & the
FinalS of
M = REAL & the
InitS of
M = REAL & the
OFun of
M = id the
carrier of
M & ( for
x,
y being
Real st
x < y holds
the
Tran of
M . [ the InitS of M,[x,y]] = x ) & ( for
x,
y being
Real st
x >= y holds
the
Tran of
M . [ the InitS of M,[x,y]] = y ) holds
for
x,
y being
Element of
REAL holds
min (
x,
y)
is_result_of [x,y],
M
theorem Th26:
for
M being non
empty Moore-SM_Final over
[:REAL,REAL:],
succ REAL st
M is
calculating_type & the
carrier of
M = succ REAL & the
FinalS of
M = REAL & the
InitS of
M = REAL & the
OFun of
M = id the
carrier of
M & ( for
x,
y being
Real st (
x > 0 or
y > 0 ) holds
the
Tran of
M . [ the InitS of M,[x,y]] = 1 ) & ( for
x,
y being
Real st (
x = 0 or
y = 0 ) &
x <= 0 &
y <= 0 holds
the
Tran of
M . [ the InitS of M,[x,y]] = 0 ) & ( for
x,
y being
Real st
x < 0 &
y < 0 holds
the
Tran of
M . [ the InitS of M,[x,y]] = - 1 ) holds
for
x,
y being
Element of
REAL holds
max (
(sgn x),
(sgn y))
is_result_of [x,y],
M
theorem
for
M being non
empty calculating_type halting Moore-SM_Final over
[:REAL,REAL:],
succ REAL st the
carrier of
M = succ REAL & the
FinalS of
M = REAL & the
InitS of
M = REAL & the
OFun of
M = id the
carrier of
M & ( for
x,
y being
Real st
x >= y holds
the
Tran of
M . [ the InitS of M,[x,y]] = x ) & ( for
x,
y being
Real st
x < y holds
the
Tran of
M . [ the InitS of M,[x,y]] = y ) holds
for
x,
y being
Element of
REAL holds
Result (
[x,y],
M)
= max (
x,
y)
theorem
for
M being non
empty calculating_type halting Moore-SM_Final over
[:REAL,REAL:],
succ REAL st the
carrier of
M = succ REAL & the
FinalS of
M = REAL & the
InitS of
M = REAL & the
OFun of
M = id the
carrier of
M & ( for
x,
y being
Real st
x < y holds
the
Tran of
M . [ the InitS of M,[x,y]] = x ) & ( for
x,
y being
Real st
x >= y holds
the
Tran of
M . [ the InitS of M,[x,y]] = y ) holds
for
x,
y being
Element of
REAL holds
Result (
[x,y],
M)
= min (
x,
y)
theorem
for
M being non
empty calculating_type halting Moore-SM_Final over
[:REAL,REAL:],
succ REAL st the
carrier of
M = succ REAL & the
FinalS of
M = REAL & the
InitS of
M = REAL & the
OFun of
M = id the
carrier of
M & ( for
x,
y being
Real st (
x > 0 or
y > 0 ) holds
the
Tran of
M . [ the InitS of M,[x,y]] = 1 ) & ( for
x,
y being
Real st (
x = 0 or
y = 0 ) &
x <= 0 &
y <= 0 holds
the
Tran of
M . [ the InitS of M,[x,y]] = 0 ) & ( for
x,
y being
Real st
x < 0 &
y < 0 holds
the
Tran of
M . [ the InitS of M,[x,y]] = - 1 ) holds
for
x,
y being
Element of
REAL holds
Result (
[x,y],
M)
= max (
(sgn x),
(sgn y))