:: SCM_COMP semantic presentation
theorem Th1: :: SCM_COMP:1
for b
1, b
2 being
FinSequence of the
Instructions of
SCM for b
3 being
FinSequence of
INT for b
4, b
5, b
6 being
Natfor b
7 being
State-consisting of b
4,b
5,b
6,b
1 ^ b
2,b
3 holds
( b
7 is
State-consisting of b
4,b
5,b
6,b
1,b
3 & b
7 is
State-consisting of b
4,b
5 + (len b1),b
6,b
2,b
3 )
theorem Th2: :: SCM_COMP:2
for b
1, b
2 being
FinSequence of the
Instructions of
SCM for b
3, b
4, b
5, b
6, b
7 being
Natfor b
8 being
State-consisting of b
3,b
4,b
5,b
1 ^ b
2,
<*> INT for b
9 being
State of
SCM holds
( b
9 = (Computation b8) . b
6 &
il. b
7 = IC b
9 implies b
9 is
State-consisting of b
7,b
4 + (len b1),b
5,b
2,
<*> INT )
Lemma3:
1 = { b1 where B is Nat : b1 < 1 }
by AXIOMS:30;
Lemma4:
5 = { b1 where B is Nat : b1 < 5 }
by AXIOMS:30;
definition
func SCM-AE -> non
empty strict with_terminals with_nonterminals with_useful_nonterminals binary DTConstrStr means :
Def1:
:: SCM_COMP:def 1
(
Terminals a
1 = SCM-Data-Loc &
NonTerminals a
1 = [:1,5:] & ( for b
1, b
2, b
3 being
Symbol of a
1 holds
( b
1 ==> <*b2,b3*> iff b
1 in [:1,5:] ) ) );
existence
ex b1 being non empty strict with_terminals with_nonterminals with_useful_nonterminals binary DTConstrStr st
( Terminals b1 = SCM-Data-Loc & NonTerminals b1 = [:1,5:] & ( for b2, b3, b4 being Symbol of b1 holds
( b2 ==> <*b3,b4*> iff b2 in [:1,5:] ) ) )
uniqueness
for b1, b2 being non empty strict with_terminals with_nonterminals with_useful_nonterminals binary DTConstrStr holds
( Terminals b1 = SCM-Data-Loc & NonTerminals b1 = [:1,5:] & ( for b3, b4, b5 being Symbol of b1 holds
( b3 ==> <*b4,b5*> iff b3 in [:1,5:] ) ) & Terminals b2 = SCM-Data-Loc & NonTerminals b2 = [:1,5:] & ( for b3, b4, b5 being Symbol of b2 holds
( b3 ==> <*b4,b5*> iff b3 in [:1,5:] ) ) implies b1 = b2 )
end;
:: deftheorem Def1 defines SCM-AE SCM_COMP:def 1 :
Lemma6:
NonTerminals SCM-AE = [:1,5:]
by Def1;
:: deftheorem Def2 defines @ SCM_COMP:def 2 :
theorem Th3: :: SCM_COMP:3
theorem Th4: :: SCM_COMP:4
then reconsider c1 = [0,0], c2 = [0,1], c3 = [0,2], c4 = [0,3], c5 = [0,4] as NonTerminal of SCM-AE ;
definition
let c
6, c
7 be
bin-term;
func c
1 + c
2 -> bin-term equals :: SCM_COMP:def 3
[0,0] -tree a
1,a
2;
coherence
[0,0] -tree c6,c7 is bin-term
func c
1 - c
2 -> bin-term equals :: SCM_COMP:def 4
[0,1] -tree a
1,a
2;
coherence
[0,1] -tree c6,c7 is bin-term
func c
1 * c
2 -> bin-term equals :: SCM_COMP:def 5
[0,2] -tree a
1,a
2;
coherence
[0,2] -tree c6,c7 is bin-term
func c
1 div c
2 -> bin-term equals :: SCM_COMP:def 6
[0,3] -tree a
1,a
2;
coherence
[0,3] -tree c6,c7 is bin-term
func c
1 mod c
2 -> bin-term equals :: SCM_COMP:def 7
[0,4] -tree a
1,a
2;
coherence
[0,4] -tree c6,c7 is bin-term
end;
:: deftheorem Def3 defines + SCM_COMP:def 3 :
:: deftheorem Def4 defines - SCM_COMP:def 4 :
:: deftheorem Def5 defines * SCM_COMP:def 5 :
:: deftheorem Def6 defines div SCM_COMP:def 6 :
:: deftheorem Def7 defines mod SCM_COMP:def 7 :
theorem Th5: :: SCM_COMP:5
definition
let c
6 be
NonTerminal of
SCM-AE ;
let c
7, c
8 be
Integer;
func c
1 -Meaning_on c
2,c
3 -> Integer equals :
Def8:
:: SCM_COMP:def 8
a
2 + a
3 if a
1 = [0,0]a
2 - a
3 if a
1 = [0,1]a
2 * a
3 if a
1 = [0,2]a
2 div a
3 if a
1 = [0,3]a
2 mod a
3 if a
1 = [0,4];
coherence
( ( c6 = [0,0] implies c7 + c8 is Integer ) & ( c6 = [0,1] implies c7 - c8 is Integer ) & ( c6 = [0,2] implies c7 * c8 is Integer ) & ( c6 = [0,3] implies c7 div c8 is Integer ) & ( c6 = [0,4] implies c7 mod c8 is Integer ) )
;
consistency
for b1 being Integer holds
( ( c6 = [0,0] & c6 = [0,1] implies ( b1 = c7 + c8 iff b1 = c7 - c8 ) ) & ( c6 = [0,0] & c6 = [0,2] implies ( b1 = c7 + c8 iff b1 = c7 * c8 ) ) & ( c6 = [0,0] & c6 = [0,3] implies ( b1 = c7 + c8 iff b1 = c7 div c8 ) ) & ( c6 = [0,0] & c6 = [0,4] implies ( b1 = c7 + c8 iff b1 = c7 mod c8 ) ) & ( c6 = [0,1] & c6 = [0,2] implies ( b1 = c7 - c8 iff b1 = c7 * c8 ) ) & ( c6 = [0,1] & c6 = [0,3] implies ( b1 = c7 - c8 iff b1 = c7 div c8 ) ) & ( c6 = [0,1] & c6 = [0,4] implies ( b1 = c7 - c8 iff b1 = c7 mod c8 ) ) & ( c6 = [0,2] & c6 = [0,3] implies ( b1 = c7 * c8 iff b1 = c7 div c8 ) ) & ( c6 = [0,2] & c6 = [0,4] implies ( b1 = c7 * c8 iff b1 = c7 mod c8 ) ) & ( c6 = [0,3] & c6 = [0,4] implies ( b1 = c7 div c8 iff b1 = c7 mod c8 ) ) )
end;
:: deftheorem Def8 defines -Meaning_on SCM_COMP:def 8 :
for b
1 being
NonTerminal of
SCM-AE for b
2, b
3 being
Integer holds
( ( b
1 = [0,0] implies b
1 -Meaning_on b
2,b
3 = b
2 + b
3 ) & ( b
1 = [0,1] implies b
1 -Meaning_on b
2,b
3 = b
2 - b
3 ) & ( b
1 = [0,2] implies b
1 -Meaning_on b
2,b
3 = b
2 * b
3 ) & ( b
1 = [0,3] implies b
1 -Meaning_on b
2,b
3 = b
2 div b
3 ) & ( b
1 = [0,4] implies b
1 -Meaning_on b
2,b
3 = b
2 mod b
3 ) );
set c6 = id INT ;
definition
let c
7 be
State of
SCM ;
let c
8 be
bin-term;
deffunc H
1(
NonTerminal of
SCM-AE ,
set ,
set ,
Integer,
Integer)
-> Element of
INT =
(id INT ) . (a1 -Meaning_on a4,a5);
deffunc H
2(
Terminal of
SCM-AE )
-> Element of
INT =
(id INT ) . (c7 . a1);
func c
2 @ c
1 -> Integer means :
Def9:
:: SCM_COMP:def 9
ex b
1 being
Function of
TS SCM-AE ,
INT st
( a
3 = b
1 . a
2 & ( for b
2 being
Terminal of
SCM-AE holds b
1 . (root-tree b2) = a
1 . b
2 ) & ( for b
2 being
NonTerminal of
SCM-AE for b
3, b
4 being
bin-termfor b
5, b
6 being
Symbol of
SCM-AE holds
( b
5 = root-label b
3 & b
6 = root-label b
4 & b
2 ==> <*b5,b6*> implies for b
7, b
8 being
Element of
INT holds
( b
7 = b
1 . b
3 & b
8 = b
1 . b
4 implies b
1 . (b2 -tree b3,b4) = b
2 -Meaning_on b
7,b
8 ) ) ) );
existence
ex b1 being Integerex b2 being Function of TS SCM-AE , INT st
( b1 = b2 . c8 & ( for b3 being Terminal of SCM-AE holds b2 . (root-tree b3) = c7 . b3 ) & ( for b3 being NonTerminal of SCM-AE
for b4, b5 being bin-term
for b6, b7 being Symbol of SCM-AE holds
( b6 = root-label b4 & b7 = root-label b5 & b3 ==> <*b6,b7*> implies for b8, b9 being Element of INT holds
( b8 = b2 . b4 & b9 = b2 . b5 implies b2 . (b3 -tree b4,b5) = b3 -Meaning_on b8,b9 ) ) ) )
uniqueness
for b1, b2 being Integer holds
( ex b3 being Function of TS SCM-AE , INT st
( b1 = b3 . c8 & ( for b4 being Terminal of SCM-AE holds b3 . (root-tree b4) = c7 . b4 ) & ( for b4 being NonTerminal of SCM-AE
for b5, b6 being bin-term
for b7, b8 being Symbol of SCM-AE holds
( b7 = root-label b5 & b8 = root-label b6 & b4 ==> <*b7,b8*> implies for b9, b10 being Element of INT holds
( b9 = b3 . b5 & b10 = b3 . b6 implies b3 . (b4 -tree b5,b6) = b4 -Meaning_on b9,b10 ) ) ) ) & ex b3 being Function of TS SCM-AE , INT st
( b2 = b3 . c8 & ( for b4 being Terminal of SCM-AE holds b3 . (root-tree b4) = c7 . b4 ) & ( for b4 being NonTerminal of SCM-AE
for b5, b6 being bin-term
for b7, b8 being Symbol of SCM-AE holds
( b7 = root-label b5 & b8 = root-label b6 & b4 ==> <*b7,b8*> implies for b9, b10 being Element of INT holds
( b9 = b3 . b5 & b10 = b3 . b6 implies b3 . (b4 -tree b5,b6) = b4 -Meaning_on b9,b10 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def9 defines @ SCM_COMP:def 9 :
theorem Th6: :: SCM_COMP:6
theorem Th7: :: SCM_COMP:7
theorem Th8: :: SCM_COMP:8
for b
1 being
State of
SCM for b
2, b
3 being
bin-term holds
(
(b2 + b3) @ b
1 = (b2 @ b1) + (b3 @ b1) &
(b2 - b3) @ b
1 = (b2 @ b1) - (b3 @ b1) &
(b2 * b3) @ b
1 = (b2 @ b1) * (b3 @ b1) &
(b2 div b3) @ b
1 = (b2 @ b1) div (b3 @ b1) &
(b2 mod b3) @ b
1 = (b2 @ b1) mod (b3 @ b1) )
definition
let c
7 be
NonTerminal of
SCM-AE ;
let c
8 be
Nat;
func Selfwork c
1,c
2 -> Element of the
Instructions of
SCM * equals :
Def10:
:: SCM_COMP:def 10
<*(AddTo (dl. a2),(dl. (a2 + 1)))*> if a
1 = [0,0]<*(SubFrom (dl. a2),(dl. (a2 + 1)))*> if a
1 = [0,1]<*(MultBy (dl. a2),(dl. (a2 + 1)))*> if a
1 = [0,2]<*(Divide (dl. a2),(dl. (a2 + 1)))*> if a
1 = [0,3]<*(Divide (dl. a2),(dl. (a2 + 1))),((dl. a2) := (dl. (a2 + 1)))*> if a
1 = [0,4];
coherence
( ( c7 = [0,0] implies <*(AddTo (dl. c8),(dl. (c8 + 1)))*> is Element of the Instructions of SCM * ) & ( c7 = [0,1] implies <*(SubFrom (dl. c8),(dl. (c8 + 1)))*> is Element of the Instructions of SCM * ) & ( c7 = [0,2] implies <*(MultBy (dl. c8),(dl. (c8 + 1)))*> is Element of the Instructions of SCM * ) & ( c7 = [0,3] implies <*(Divide (dl. c8),(dl. (c8 + 1)))*> is Element of the Instructions of SCM * ) & ( c7 = [0,4] implies <*(Divide (dl. c8),(dl. (c8 + 1))),((dl. c8) := (dl. (c8 + 1)))*> is Element of the Instructions of SCM * ) )
;
consistency
for b1 being Element of the Instructions of SCM * holds
( ( c7 = [0,0] & c7 = [0,1] implies ( b1 = <*(AddTo (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(SubFrom (dl. c8),(dl. (c8 + 1)))*> ) ) & ( c7 = [0,0] & c7 = [0,2] implies ( b1 = <*(AddTo (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(MultBy (dl. c8),(dl. (c8 + 1)))*> ) ) & ( c7 = [0,0] & c7 = [0,3] implies ( b1 = <*(AddTo (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(Divide (dl. c8),(dl. (c8 + 1)))*> ) ) & ( c7 = [0,0] & c7 = [0,4] implies ( b1 = <*(AddTo (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(Divide (dl. c8),(dl. (c8 + 1))),((dl. c8) := (dl. (c8 + 1)))*> ) ) & ( c7 = [0,1] & c7 = [0,2] implies ( b1 = <*(SubFrom (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(MultBy (dl. c8),(dl. (c8 + 1)))*> ) ) & ( c7 = [0,1] & c7 = [0,3] implies ( b1 = <*(SubFrom (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(Divide (dl. c8),(dl. (c8 + 1)))*> ) ) & ( c7 = [0,1] & c7 = [0,4] implies ( b1 = <*(SubFrom (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(Divide (dl. c8),(dl. (c8 + 1))),((dl. c8) := (dl. (c8 + 1)))*> ) ) & ( c7 = [0,2] & c7 = [0,3] implies ( b1 = <*(MultBy (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(Divide (dl. c8),(dl. (c8 + 1)))*> ) ) & ( c7 = [0,2] & c7 = [0,4] implies ( b1 = <*(MultBy (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(Divide (dl. c8),(dl. (c8 + 1))),((dl. c8) := (dl. (c8 + 1)))*> ) ) & ( c7 = [0,3] & c7 = [0,4] implies ( b1 = <*(Divide (dl. c8),(dl. (c8 + 1)))*> iff b1 = <*(Divide (dl. c8),(dl. (c8 + 1))),((dl. c8) := (dl. (c8 + 1)))*> ) ) )
end;
:: deftheorem Def10 defines Selfwork SCM_COMP:def 10 :
for b
1 being
NonTerminal of
SCM-AE for b
2 being
Nat holds
( ( b
1 = [0,0] implies
Selfwork b
1,b
2 = <*(AddTo (dl. b2),(dl. (b2 + 1)))*> ) & ( b
1 = [0,1] implies
Selfwork b
1,b
2 = <*(SubFrom (dl. b2),(dl. (b2 + 1)))*> ) & ( b
1 = [0,2] implies
Selfwork b
1,b
2 = <*(MultBy (dl. b2),(dl. (b2 + 1)))*> ) & ( b
1 = [0,3] implies
Selfwork b
1,b
2 = <*(Divide (dl. b2),(dl. (b2 + 1)))*> ) & ( b
1 = [0,4] implies
Selfwork b
1,b
2 = <*(Divide (dl. b2),(dl. (b2 + 1))),((dl. b2) := (dl. (b2 + 1)))*> ) );
definition
let c
7 be
bin-term;
let c
8 be
Nat;
deffunc H
1(
Terminal of
SCM-AE ,
Nat)
-> Element of the
Instructions of
SCM * =
<*((dl. a2) := (@ a1))*>;
deffunc H
2(
NonTerminal of
SCM-AE ,
Function of
NAT ,the
Instructions of
SCM * ,
Function of
NAT ,the
Instructions of
SCM * ,
Nat)
-> Element of the
Instructions of
SCM * =
((a2 . a4) ^ (a3 . (a4 + 1))) ^ (Selfwork a1,a4);
func SCM-Compile c
1,c
2 -> FinSequence of the
Instructions of
SCM means :
Def11:
:: SCM_COMP:def 11
ex b
1 being
Function of
TS SCM-AE ,
Funcs NAT ,
(the Instructions of SCM * ) st
( a
3 = (b1 . a1) . a
2 & ( for b
2 being
Terminal of
SCM-AE holds
ex b
3 being
Function of
NAT ,the
Instructions of
SCM * st
( b
3 = b
1 . (root-tree b2) & ( for b
4 being
Nat holds b
3 . b
4 = <*((dl. b4) := (@ b2))*> ) ) ) & ( for b
2 being
NonTerminal of
SCM-AE for b
3, b
4 being
bin-termfor b
5, b
6 being
Symbol of
SCM-AE holds
not ( b
5 = root-label b
3 & b
6 = root-label b
4 & b
2 ==> <*b5,b6*> & ( for b
7, b
8, b
9 being
Function of
NAT ,the
Instructions of
SCM * holds
not ( b
7 = b
1 . (b2 -tree b3,b4) & b
8 = b
1 . b
3 & b
9 = b
1 . b
4 & ( for b
10 being
Nat holds b
7 . b
10 = ((b8 . b10) ^ (b9 . (b10 + 1))) ^ (Selfwork b2,b10) ) ) ) ) ) );
existence
ex b1 being FinSequence of the Instructions of SCM ex b2 being Function of TS SCM-AE , Funcs NAT ,(the Instructions of SCM * ) st
( b1 = (b2 . c7) . c8 & ( for b3 being Terminal of SCM-AE holds
ex b4 being Function of NAT ,the Instructions of SCM * st
( b4 = b2 . (root-tree b3) & ( for b5 being Nat holds b4 . b5 = <*((dl. b5) := (@ b3))*> ) ) ) & ( for b3 being NonTerminal of SCM-AE
for b4, b5 being bin-term
for b6, b7 being Symbol of SCM-AE holds
not ( b6 = root-label b4 & b7 = root-label b5 & b3 ==> <*b6,b7*> & ( for b8, b9, b10 being Function of NAT ,the Instructions of SCM * holds
not ( b8 = b2 . (b3 -tree b4,b5) & b9 = b2 . b4 & b10 = b2 . b5 & ( for b11 being Nat holds b8 . b11 = ((b9 . b11) ^ (b10 . (b11 + 1))) ^ (Selfwork b3,b11) ) ) ) ) ) )
uniqueness
for b1, b2 being FinSequence of the Instructions of SCM holds
( ex b3 being Function of TS SCM-AE , Funcs NAT ,(the Instructions of SCM * ) st
( b1 = (b3 . c7) . c8 & ( for b4 being Terminal of SCM-AE holds
ex b5 being Function of NAT ,the Instructions of SCM * st
( b5 = b3 . (root-tree b4) & ( for b6 being Nat holds b5 . b6 = <*((dl. b6) := (@ b4))*> ) ) ) & ( for b4 being NonTerminal of SCM-AE
for b5, b6 being bin-term
for b7, b8 being Symbol of SCM-AE holds
not ( b7 = root-label b5 & b8 = root-label b6 & b4 ==> <*b7,b8*> & ( for b9, b10, b11 being Function of NAT ,the Instructions of SCM * holds
not ( b9 = b3 . (b4 -tree b5,b6) & b10 = b3 . b5 & b11 = b3 . b6 & ( for b12 being Nat holds b9 . b12 = ((b10 . b12) ^ (b11 . (b12 + 1))) ^ (Selfwork b4,b12) ) ) ) ) ) ) & ex b3 being Function of TS SCM-AE , Funcs NAT ,(the Instructions of SCM * ) st
( b2 = (b3 . c7) . c8 & ( for b4 being Terminal of SCM-AE holds
ex b5 being Function of NAT ,the Instructions of SCM * st
( b5 = b3 . (root-tree b4) & ( for b6 being Nat holds b5 . b6 = <*((dl. b6) := (@ b4))*> ) ) ) & ( for b4 being NonTerminal of SCM-AE
for b5, b6 being bin-term
for b7, b8 being Symbol of SCM-AE holds
not ( b7 = root-label b5 & b8 = root-label b6 & b4 ==> <*b7,b8*> & ( for b9, b10, b11 being Function of NAT ,the Instructions of SCM * holds
not ( b9 = b3 . (b4 -tree b5,b6) & b10 = b3 . b5 & b11 = b3 . b6 & ( for b12 being Nat holds b9 . b12 = ((b10 . b12) ^ (b11 . (b12 + 1))) ^ (Selfwork b4,b12) ) ) ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def11 defines SCM-Compile SCM_COMP:def 11 :
for b
1 being
bin-termfor b
2 being
Natfor b
3 being
FinSequence of the
Instructions of
SCM holds
( b
3 = SCM-Compile b
1,b
2 iff ex b
4 being
Function of
TS SCM-AE ,
Funcs NAT ,
(the Instructions of SCM * ) st
( b
3 = (b4 . b1) . b
2 & ( for b
5 being
Terminal of
SCM-AE holds
ex b
6 being
Function of
NAT ,the
Instructions of
SCM * st
( b
6 = b
4 . (root-tree b5) & ( for b
7 being
Nat holds b
6 . b
7 = <*((dl. b7) := (@ b5))*> ) ) ) & ( for b
5 being
NonTerminal of
SCM-AE for b
6, b
7 being
bin-termfor b
8, b
9 being
Symbol of
SCM-AE holds
not ( b
8 = root-label b
6 & b
9 = root-label b
7 & b
5 ==> <*b8,b9*> & ( for b
10, b
11, b
12 being
Function of
NAT ,the
Instructions of
SCM * holds
not ( b
10 = b
4 . (b5 -tree b6,b7) & b
11 = b
4 . b
6 & b
12 = b
4 . b
7 & ( for b
13 being
Nat holds b
10 . b
13 = ((b11 . b13) ^ (b12 . (b13 + 1))) ^ (Selfwork b5,b13) ) ) ) ) ) ) );
consider c7 being bin-term, c8 being Nat;
consider c9 being Function of TS SCM-AE , Funcs NAT ,(the Instructions of SCM * ) such that
SCM-Compile c7,c8 = (c9 . c7) . c8
and
Lemma14:
( ( for b1 being Terminal of SCM-AE holds
ex b2 being Function of NAT ,the Instructions of SCM * st
( b2 = c9 . (root-tree b1) & ( for b3 being Nat holds b2 . b3 = <*((dl. b3) := (@ b1))*> ) ) ) & ( for b1 being NonTerminal of SCM-AE
for b2, b3 being bin-term
for b4, b5 being Symbol of SCM-AE holds
not ( b4 = root-label b2 & b5 = root-label b3 & b1 ==> <*b4,b5*> & ( for b6, b7, b8 being Function of NAT ,the Instructions of SCM * holds
not ( b6 = c9 . (b1 -tree b2,b3) & b7 = c9 . b2 & b8 = c9 . b3 & ( for b9 being Nat holds b6 . b9 = ((b7 . b9) ^ (b8 . (b9 + 1))) ^ (Selfwork b1,b9) ) ) ) ) ) )
by Def11;
theorem Th9: :: SCM_COMP:9
theorem Th10: :: SCM_COMP:10
:: deftheorem Def12 defines d". SCM_COMP:def 12 :
definition
let c
10 be
bin-term;
deffunc H
1(
NonTerminal of
SCM-AE ,
set ,
set ,
Nat,
Nat)
-> Element of
NAT =
max a
4,a
5;
deffunc H
2(
Terminal of
SCM-AE )
-> Nat =
d". a
1;
func max_Data-Loc_in c
1 -> Nat means :
Def13:
:: SCM_COMP:def 13
ex b
1 being
Function of
TS SCM-AE ,
NAT st
( a
2 = b
1 . a
1 & ( for b
2 being
Terminal of
SCM-AE holds b
1 . (root-tree b2) = d". b
2 ) & ( for b
2 being
NonTerminal of
SCM-AE for b
3, b
4 being
bin-termfor b
5, b
6 being
Symbol of
SCM-AE holds
( b
5 = root-label b
3 & b
6 = root-label b
4 & b
2 ==> <*b5,b6*> implies for b
7, b
8 being
Nat holds
( b
7 = b
1 . b
3 & b
8 = b
1 . b
4 implies b
1 . (b2 -tree b3,b4) = max b
7,b
8 ) ) ) );
existence
ex b1 being Natex b2 being Function of TS SCM-AE , NAT st
( b1 = b2 . c10 & ( for b3 being Terminal of SCM-AE holds b2 . (root-tree b3) = d". b3 ) & ( for b3 being NonTerminal of SCM-AE
for b4, b5 being bin-term
for b6, b7 being Symbol of SCM-AE holds
( b6 = root-label b4 & b7 = root-label b5 & b3 ==> <*b6,b7*> implies for b8, b9 being Nat holds
( b8 = b2 . b4 & b9 = b2 . b5 implies b2 . (b3 -tree b4,b5) = max b8,b9 ) ) ) )
uniqueness
for b1, b2 being Nat holds
( ex b3 being Function of TS SCM-AE , NAT st
( b1 = b3 . c10 & ( for b4 being Terminal of SCM-AE holds b3 . (root-tree b4) = d". b4 ) & ( for b4 being NonTerminal of SCM-AE
for b5, b6 being bin-term
for b7, b8 being Symbol of SCM-AE holds
( b7 = root-label b5 & b8 = root-label b6 & b4 ==> <*b7,b8*> implies for b9, b10 being Nat holds
( b9 = b3 . b5 & b10 = b3 . b6 implies b3 . (b4 -tree b5,b6) = max b9,b10 ) ) ) ) & ex b3 being Function of TS SCM-AE , NAT st
( b2 = b3 . c10 & ( for b4 being Terminal of SCM-AE holds b3 . (root-tree b4) = d". b4 ) & ( for b4 being NonTerminal of SCM-AE
for b5, b6 being bin-term
for b7, b8 being Symbol of SCM-AE holds
( b7 = root-label b5 & b8 = root-label b6 & b4 ==> <*b7,b8*> implies for b9, b10 being Nat holds
( b9 = b3 . b5 & b10 = b3 . b6 implies b3 . (b4 -tree b5,b6) = max b9,b10 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def13 defines max_Data-Loc_in SCM_COMP:def 13 :
consider c10 being bin-term;
consider c11 being Function of TS SCM-AE , NAT such that
max_Data-Loc_in c10 = c11 . c10
and
Lemma19:
( ( for b1 being Terminal of SCM-AE holds c11 . (root-tree b1) = d". b1 ) & ( for b1 being NonTerminal of SCM-AE
for b2, b3 being bin-term
for b4, b5 being Symbol of SCM-AE holds
( b4 = root-label b2 & b5 = root-label b3 & b1 ==> <*b4,b5*> implies for b6, b7 being Nat holds
( b6 = c11 . b2 & b7 = c11 . b3 implies c11 . (b1 -tree b2,b3) = max b6,b7 ) ) ) )
by Def13;
theorem Th11: :: SCM_COMP:11
Lemma21:
NonTerminals SCM-AE = [:1,5:]
by Def1;
theorem Th12: :: SCM_COMP:12
defpred S1[ bin-term] means for b1, b2 being State of SCM holds
( ( for b3 being Nat holds
( b3 <= max_Data-Loc_in a1 implies b1 . (dl. b3) = b2 . (dl. b3) ) ) implies a1 @ b1 = a1 @ b2 );
theorem Th13: :: SCM_COMP:13
set c12 = <*> INT ;
defpred S2[ bin-term] means for b1, b2, b3 being Nat
for b4 being State-consisting of b2,b2,b3, SCM-Compile a1,b1, <*> INT holds
not ( b1 > max_Data-Loc_in a1 & ( for b5 being Nat
for b6 being State of SCM holds
not ( b6 = (Computation b4) . (b5 + 1) & b5 + 1 = len (SCM-Compile a1,b1) & IC ((Computation b4) . b5) = il. (b2 + b5) & IC b6 = il. (b2 + (b5 + 1)) & b6 . (dl. b1) = a1 @ b4 & ( for b7 being Nat holds
( b7 < b1 implies b4 . (dl. b7) = b6 . (dl. b7) ) ) ) ) );
theorem Th14: :: SCM_COMP:14
theorem Th15: :: SCM_COMP:15