theorem
for
x,
y,
z being
object for
S being non
empty non
void ManySortedSign for
o being
OperSymbol of
S for
s1,
s2,
s3,
r being
SortSymbol of
S for
T being
MSAlgebra over
S st
o is_of_type <*s1,s2,s3*>,
r &
x in the
Sorts of
T . s1 &
y in the
Sorts of
T . s2 &
z in the
Sorts of
T . s3 holds
<*x,y,z*> in Args (
o,
T)
definition
let n be
Nat;
let L be
PCLangSignature ;
attr L is
n PC-correct means :
Def4:
(
len the
connectives of
L >= n + 5 & the
connectives of
L | {n,(n + 1),(n + 2),(n + 3),(n + 4),(n + 5)} is
one-to-one & the
connectives of
L . n is_of_type <* the formula-sort of L*>, the
formula-sort of
L & the
connectives of
L . (n + 5) is_of_type {} , the
formula-sort of
L & the
connectives of
L . (n + 1) is_of_type <* the formula-sort of L, the formula-sort of L*>, the
formula-sort of
L & ... & the
connectives of
L . (n + 4) is_of_type <* the formula-sort of L, the formula-sort of L*>, the
formula-sort of
L );
end;
::
deftheorem Def4 defines
PC-correct AOFA_L00:def 4 :
for n being Nat
for L being PCLangSignature holds
( L is n PC-correct iff ( len the connectives of L >= n + 5 & the connectives of L | {n,(n + 1),(n + 2),(n + 3),(n + 4),(n + 5)} is one-to-one & the connectives of L . n is_of_type <* the formula-sort of L*>, the formula-sort of L & the connectives of L . (n + 5) is_of_type {} , the formula-sort of L & the connectives of L . (n + 1) is_of_type <* the formula-sort of L, the formula-sort of L*>, the formula-sort of L & ... & the connectives of L . (n + 4) is_of_type <* the formula-sort of L, the formula-sort of L*>, the formula-sort of L ) );
theorem Th11:
for
n being
natural non
empty number for
X being non
empty set for
J being
Signature ex
S being non
empty non
void strict AlgLangSignature over
X st
(
S is
n PC-correct &
S is
QC-correct &
S is
n AL-correct &
S is
J -extension & ( for
i being
natural number st not not
i = 0 & ... & not
i = 8 holds
the
connectives of
S . (n + i) = (sup the carrier' of J) +^ i ) & ( for
x being
Element of
X holds
( the
quantifiers of
S . (1,
x)
= [ the carrier' of J,1,x] & the
quantifiers of
S . (2,
x)
= [ the carrier' of J,2,x] ) ) & the
formula-sort of
S = sup the
carrier of
J & the
program-sort of
S = (sup the carrier of J) +^ 1 & the
carrier of
S = the
carrier of
J \/ { the formula-sort of S, the program-sort of S} & ( for
w being
Ordinal st
w = sup the
carrier' of
J holds
the
carrier' of
S = ( the carrier' of J \/ {(w +^ 0),(w +^ 1),(w +^ 2),(w +^ 3),(w +^ 4),(w +^ 5),(w +^ 6),(w +^ 7),(w +^ 8)}) \/ [:{ the carrier' of J},{1,2},X:] ) )
definition
let J be non
empty non
void Signature;
let X be
V3()
ManySortedSet of the
carrier of
J;
let Q be
non-empty SubstMSAlgebra over
J,
X;
let o be
OperSymbol of
J;
let p be
Element of
Args (
o,
Q);
let x be
Element of
Union X;
let y be
Element of
Union the
Sorts of
Q;
existence
ex b1 being Element of Args (o,Q) st
for i being Nat st i in dom (the_arity_of o) holds
ex j being SortSymbol of J st
( j = (the_arity_of o) . i & ex A being Element of Q,j st
( A = p . i & b1 . i = A / (x,y) ) )
uniqueness
for b1, b2 being Element of Args (o,Q) st ( for i being Nat st i in dom (the_arity_of o) holds
ex j being SortSymbol of J st
( j = (the_arity_of o) . i & ex A being Element of Q,j st
( A = p . i & b1 . i = A / (x,y) ) ) ) & ( for i being Nat st i in dom (the_arity_of o) holds
ex j being SortSymbol of J st
( j = (the_arity_of o) . i & ex A being Element of Q,j st
( A = p . i & b2 . i = A / (x,y) ) ) ) holds
b1 = b2
end;
definition
let J be non
empty non
void Signature;
let X be
V3()
ManySortedSet of the
carrier of
J;
let Q be
non-empty SubstMSAlgebra over
J,
X;
attr Q is
subst-correct means
for
x being
Element of
Union X for
a being
SortSymbol of
J st
x in X . a holds
( ( for
j being
SortSymbol of
J for
A being
Element of
Q,
j holds
A / (
x,
x)
= A ) & ( for
y being
Element of
Union the
Sorts of
Q st
y in the
Sorts of
Q . a holds
for
o being
OperSymbol of
J for
p being
Element of
Args (
o,
Q)
for
A being
Element of
Q,
(the_result_sort_of o) st
A = (Den (o,Q)) . p & ( for
S being
QCLangSignature over
Union X holds
( not
J = S or for
z being
Element of
Union X for
q being
Element of
{1,2} holds not
o = the
quantifiers of
S . (
q,
z) ) ) holds
A / (
x,
y)
= (Den (o,Q)) . (p / (x,y)) ) );
end;
::
deftheorem defines
subst-correct AOFA_L00:def 16 :
for J being non empty non void Signature
for X being V3() ManySortedSet of the carrier of J
for Q being non-empty SubstMSAlgebra over J,X holds
( Q is subst-correct iff for x being Element of Union X
for a being SortSymbol of J st x in X . a holds
( ( for j being SortSymbol of J
for A being Element of Q,j holds A / (x,x) = A ) & ( for y being Element of Union the Sorts of Q st y in the Sorts of Q . a holds
for o being OperSymbol of J
for p being Element of Args (o,Q)
for A being Element of Q,(the_result_sort_of o) st A = (Den (o,Q)) . p & ( for S being QCLangSignature over Union X holds
( not J = S or for z being Element of Union X
for q being Element of {1,2} holds not o = the quantifiers of S . (q,z) ) ) holds
A / (x,y) = (Den (o,Q)) . (p / (x,y)) ) ) );
theorem Th20:
for
S1,
S2,
E1,
E2 being
Signature st
ManySortedSign(# the
carrier of
S1, the
carrier' of
S1, the
Arity of
S1, the
ResultSort of
S1 #)
= ManySortedSign(# the
carrier of
S2, the
carrier' of
S2, the
Arity of
S2, the
ResultSort of
S2 #) &
ManySortedSign(# the
carrier of
E1, the
carrier' of
E1, the
Arity of
E1, the
ResultSort of
E1 #)
= ManySortedSign(# the
carrier of
E2, the
carrier' of
E2, the
Arity of
E2, the
ResultSort of
E2 #) &
E1 is
Extension of
S1 holds
E2 is
Extension of
S2
definition
let J be non
empty non
void Signature;
let T be
non-empty MSAlgebra over
J;
let X be
V3()
GeneratorSet of
T;
let S be non
empty non
void J -extension QCLangSignature over
Union X;
let Y be
X -tolerating ManySortedSet of the
carrier of
S;
attr c6 is
strict ;
struct LanguageStr over
T,
Y,
S -> VarMSAlgebra over
S,
SubstMSAlgebra over
S,
Y;
aggr LanguageStr(#
Sorts,
Charact,
free-vars,
subst-op,
equality #)
-> LanguageStr over
T,
Y,
S;
sel equality c6 -> Function of
(Union [| the Sorts of T, the Sorts of T|]),
( the Sorts of c6 . the formula-sort of S);
end;
definition
let n be
natural non
empty number ;
let S be non
empty non
void n PC-correct PCLangSignature ;
let L be
language MSAlgebra over
S;
set f = the
formula-sort of
S;
A1:
the
Sorts of
L . the
formula-sort of
S <> {}
by Def18;
A2:
the
connectives of
S . n is_of_type <* the formula-sort of S*>, the
formula-sort of
S
by Def4;
A3:
the
connectives of
S . (n + 5) is_of_type {} , the
formula-sort of
S
by Def4;
A4:
len the
connectives of
S >= n + 5
by Def4;
n + 1
<= n + 5 & ... &
n + 5
<= n + 5
by XREAL_1:6;
then
( 1
<= n + 1 &
n + 1
<= len the
connectives of
S ) & ... & ( 1
<= n + 5 &
n + 5
<= len the
connectives of
S )
by A4, NAT_1:12, XXREAL_0:2;
then A5:
n + 1
in dom the
connectives of
S & ... &
n + 5
in dom the
connectives of
S
by FINSEQ_3:25;
A6:
the
connectives of
S . (n + 1) is_of_type <* the formula-sort of S, the formula-sort of S*>, the
formula-sort of
S & ... & the
connectives of
S . (n + 4) is_of_type <* the formula-sort of S, the formula-sort of S*>, the
formula-sort of
S
by Def4;
A7:
( the
connectives of
S . (n + 5) in rng the
connectives of
S &
rng the
connectives of
S c= the
carrier' of
S )
by A5, FUNCT_1:def 3;
coherence
(Den ((In (( the connectives of S . (n + 5)), the carrier' of S)),L)) . {} is Formula of L
by A1, A3, A7, AOFA_A00:31;
let A be
Formula of
L;
coherence
(Den ((In (( the connectives of S . n), the carrier' of S)),L)) . <*A*> is Formula of L
by A1, A2, AOFA_A00:32;
let B be
Formula of
L;
coherence
(Den ((In (( the connectives of S . (n + 1)), the carrier' of S)),L)) . <*A,B*> is Formula of L
by A1, A6, AOFA_A00:33;
coherence
(Den ((In (( the connectives of S . (n + 2)), the carrier' of S)),L)) . <*A,B*> is Formula of L
by A1, A6, AOFA_A00:33;
coherence
(Den ((In (( the connectives of S . (n + 3)), the carrier' of S)),L)) . <*A,B*> is Formula of L
by A1, A6, AOFA_A00:33;
coherence
(Den ((In (( the connectives of S . (n + 4)), the carrier' of S)),L)) . <*A,B*> is Formula of L
by A1, A6, AOFA_A00:33;
end;
definition
let n be
natural non
empty number ;
let J be non
empty non
void Signature;
let T be
non-empty MSAlgebra over
J;
let X be
V3()
GeneratorSet of
T;
let S be non
empty non
void J -extension n PC-correct QC-correct QCLangSignature over
Union X;
let Y be
V3()
X -tolerating ManySortedSet of the
carrier of
S;
let L be
Language of
Y,
S;
let A be
Formula of
L;
let x be
Element of
Union X;
set f = the
formula-sort of
S;
A1:
the
quant-sort of
S = {1,2}
by Def5;
reconsider j = 1 as
Element of the
quant-sort of
S by A1, TARSKI:def 2;
[j,x] in [: the quant-sort of S,(Union X):]
by A1, ZFMISC_1:87;
then A2:
( the
quantifiers of
S . (1,
x)
= In (
( the quantifiers of S . (1,x)), the
carrier' of
S) & the
quantifiers of
S . (1,
x)
is_of_type <* the formula-sort of S*>, the
formula-sort of
S )
by A1, Def5, SUBSET_1:def 8, FUNCT_2:5;
coherence
(Den ((In (( the quantifiers of S . (1,x)), the carrier' of S)),L)) . <*A*> is Formula of L
by A2, AOFA_A00:32;
A3:
the
quant-sort of
S = {1,2}
by Def5;
reconsider j = 2 as
Element of the
quant-sort of
S by A3, TARSKI:def 2;
[j,x] in [: the quant-sort of S,(Union X):]
by A3, ZFMISC_1:87;
then A4:
( the
quantifiers of
S . (2,
x)
= In (
( the quantifiers of S . (2,x)), the
carrier' of
S) & the
quantifiers of
S . (2,
x)
is_of_type <* the formula-sort of S*>, the
formula-sort of
S )
by A3, Def5, SUBSET_1:def 8, FUNCT_2:5;
coherence
(Den ((In (( the quantifiers of S . (2,x)), the carrier' of S)),L)) . <*A*> is Formula of L
by A4, AOFA_A00:32;
end;
definition
let n be
natural non
empty number ;
let J be non
empty non
void Signature;
let T be
non-empty MSAlgebra over
J;
let X be
V3()
GeneratorSet of
T;
let S be non
empty non
void J -extension n PC-correct QC-correct QCLangSignature over
Union X;
let Y be
V3()
X -tolerating ManySortedSet of the
carrier of
S;
let L be
non-empty Language of
Y,
S;
attr L is
subst-forex means
for
A being
Formula of
L for
x being
Element of
Union X for
s,
s1 being
SortSymbol of
S for
t being
Element of
L,
s st
x in X . s1 holds
for
y being
Element of
Union Y st
y in Y . s holds
( (
x = y implies (
(\for (x,A)) / (
y,
t)
= \for (
x,
A) &
(\ex (x,A)) / (
y,
t)
= \ex (
x,
A) ) ) & (
x <> y &
x in (vf t) . s1 implies ex
z being
Element of
Union X ex
x0,
z0 being
Element of
Union Y st
(
x = x0 &
z0 = z &
z = the
Element of
((X . s1) \ ((vf t) . s1)) \ ((vf A) . s1) &
(\for (x,A)) / (
y,
t)
= \for (
z,
((A / (x0,z0)) / (y,t))) &
(\ex (x,A)) / (
y,
t)
= \ex (
z,
((A / (x0,z0)) / (y,t))) ) ) & (
x <> y &
x nin (vf t) . s implies (
(\for (x,A)) / (
y,
t)
= \for (
x,
(A / (y,t))) &
(\ex (x,A)) / (
y,
t)
= \ex (
x,
(A / (y,t))) ) ) );
end;
::
deftheorem defines
subst-forex AOFA_L00:def 37 :
for n being natural non empty number
for J being non empty non void Signature
for T being non-empty MSAlgebra over J
for X being V3() GeneratorSet of T
for S being non empty non void b2 -extension b1 PC-correct QC-correct QCLangSignature over Union X
for Y being V3() b4 -tolerating ManySortedSet of the carrier of S
for L being non-empty Language of Y,S holds
( L is subst-forex iff for A being Formula of L
for x being Element of Union X
for s, s1 being SortSymbol of S
for t being Element of L,s st x in X . s1 holds
for y being Element of Union Y st y in Y . s holds
( ( x = y implies ( (\for (x,A)) / (y,t) = \for (x,A) & (\ex (x,A)) / (y,t) = \ex (x,A) ) ) & ( x <> y & x in (vf t) . s1 implies ex z being Element of Union X ex x0, z0 being Element of Union Y st
( x = x0 & z0 = z & z = the Element of ((X . s1) \ ((vf t) . s1)) \ ((vf A) . s1) & (\for (x,A)) / (y,t) = \for (z,((A / (x0,z0)) / (y,t))) & (\ex (x,A)) / (y,t) = \ex (z,((A / (x0,z0)) / (y,t))) ) ) & ( x <> y & x nin (vf t) . s implies ( (\for (x,A)) / (y,t) = \for (x,(A / (y,t))) & (\ex (x,A)) / (y,t) = \ex (x,(A / (y,t))) ) ) ) );
theorem Th25:
for
n being
natural non
empty number for
X being non
empty set for
S being non
empty non
void b1 PC-correct QC-correct QCLangSignature over
X for
Q being
language MSAlgebra over
S holds
(
{} in Args (
(In (( the connectives of S . (n + 5)), the carrier' of S)),
Q) & ( for
A being
Formula of
Q holds
(
<*A*> in Args (
(In (( the connectives of S . n), the carrier' of S)),
Q) & ( for
B being
Formula of
Q holds
(
<*A,B*> in Args (
(In (( the connectives of S . (n + 1)), the carrier' of S)),
Q) & ... &
<*A,B*> in Args (
(In (( the connectives of S . (n + 4)), the carrier' of S)),
Q) & ( for
x being
Element of
X holds
(
<*A*> in Args (
(In (( the quantifiers of S . (1,x)), the carrier' of S)),
Q) &
<*A*> in Args (
(In (( the quantifiers of S . (2,x)), the carrier' of S)),
Q) ) ) ) ) ) ) )
theorem Th26:
for
n being
natural non
empty number for
J being non
empty non
void Signature for
T being
non-empty MSAlgebra over
J for
X being
V3()
GeneratorSet of
T for
S being non
empty non
void b2 -extension b1 PC-correct QC-correct QCLangSignature over
Union X for
Y being
V3()
b4 -tolerating ManySortedSet of the
carrier of
S for
L being
non-empty Language of
Y,
S for
x being
Element of
Union Y for
t being
Element of
Union the
Sorts of
L for
s being
SortSymbol of
S st
x in Y . s &
t in the
Sorts of
L . s holds
( ( for
a being
Element of
Args (
(In (( the connectives of S . (n + 5)), the carrier' of S)),
L) st
a = {} holds
a / (
x,
t)
= {} ) & ( for
A being
Formula of
L holds
( ( for
a being
Element of
Args (
(In (( the connectives of S . n), the carrier' of S)),
L) st
<*A*> = a holds
a / (
x,
t)
= <*(A / (x,t))*> ) & ( for
B being
Formula of
L holds
( ( for
a being
Element of
Args (
(In (( the connectives of S . (n + 1)), the carrier' of S)),
L) st
<*A,B*> = a holds
a / (
x,
t)
= <*(A / (x,t)),(B / (x,t))*> ) & ... & ( for
a being
Element of
Args (
(In (( the connectives of S . (n + 4)), the carrier' of S)),
L) st
<*A,B*> = a holds
a / (
x,
t)
= <*(A / (x,t)),(B / (x,t))*> ) & ( for
z being
Element of
Union X holds
( ( for
a being
Element of
Args (
(In (( the quantifiers of S . (1,z)), the carrier' of S)),
L) st
<*A*> = a holds
a / (
x,
t)
= <*(A / (x,t))*> ) & ( for
a being
Element of
Args (
(In (( the quantifiers of S . (2,z)), the carrier' of S)),
L) st
<*A*> = a holds
a / (
x,
t)
= <*(A / (x,t))*> ) ) ) ) ) ) ) )
theorem Th27:
for
n being
natural non
empty number for
J being non
empty non
void Signature for
T being
non-empty MSAlgebra over
J for
X being
V3()
GeneratorSet of
T for
S being non
empty non
void b2 -extension b1 PC-correct QC-correct QCLangSignature over
Union X for
Y being
V3()
b4 -tolerating ManySortedSet of the
carrier of
S for
L being
non-empty Language of
Y,
S st
L is
subst-correct &
Y is
ManySortedSubset of the
Sorts of
L holds
for
x,
y being
Element of
Union Y for
a being
SortSymbol of
S st
x in Y . a &
y in Y . a holds
for
A being
Formula of
L holds
(
(\not A) / (
x,
y)
= \not (A / (x,y)) & ( for
B being
Formula of
L holds
(
(A \and B) / (
x,
y)
= (A / (x,y)) \and (B / (x,y)) &
(A \or B) / (
x,
y)
= (A / (x,y)) \or (B / (x,y)) &
(A \imp B) / (
x,
y)
= (A / (x,y)) \imp (B / (x,y)) &
(A \iff B) / (
x,
y)
= (A / (x,y)) \iff (B / (x,y)) &
(\true_ L) / (
x,
y)
= \true_ L ) ) )
definition
let J be non
empty non
void Signature;
let T be
non-empty MSAlgebra over
J;
let X be
V3()
GeneratorSet of
T;
let S be non
empty non
void J -extension QCLangSignature over
Union X;
let Y be
X -tolerating ManySortedSet of the
carrier of
S;
attr c6 is
strict ;
struct BialgebraStr over
S,
Y -> LanguageStr over
T,
Y,
S,
ProgramAlgStr over
J,
T,
X;
aggr BialgebraStr(#
Sorts,
Charact,
free-vars,
subst-op,
equality,
carrier,
charact,
assignments #)
-> BialgebraStr over
S,
Y;
end;
theorem
for
U1,
U2 being
preIfWhileAlgebra st
UAStr(# the
carrier of
U1, the
charact of
U1 #)
= UAStr(# the
carrier of
U2, the
charact of
U2 #) holds
(
EmptyIns U1 = EmptyIns U2 & ( for
I1,
J1 being
Element of
U1 for
I2,
J2 being
Element of
U2 st
I1 = I2 &
J1 = J2 holds
(
I1 \; J1 = I2 \; J2 &
while (
I1,
J1)
= while (
I2,
J2) & ( for
C1 being
Element of
U1 for
C2 being
Element of
U2 st
C1 = C2 holds
if-then-else (
C1,
I1,
J1)
= if-then-else (
C2,
I2,
J2) ) ) ) ) ;
definition
let n be non
empty Nat;
let J be non
empty non
void Signature;
let T be
non-empty MSAlgebra over
J;
let X be
V3()
GeneratorSet of
T;
let S be non
empty non
void J -extension n PC-correct QC-correct n AL-correct essential AlgLangSignature over
Union X;
let L be
IfWhileAlgebra of
X,
S;
set f = the
formula-sort of
S;
set p = the
program-sort of
S;
A1:
the
connectives of
S . (n + 6) is_of_type <* the program-sort of S, the formula-sort of S*>, the
formula-sort of
S & ... & the
connectives of
S . (n + 8) is_of_type <* the program-sort of S, the formula-sort of S*>, the
formula-sort of
S
by Def6;
A2:
the
Sorts of
L . the
program-sort of
S = the
carrier of
L
by Def34;
let K be
Formula of
L;
let P be
Algorithm of
L;
coherence
(Den ((In (( the connectives of S . (n + 6)), the carrier' of S)),L)) . <*P,K*> is Formula of L
by A1, A2, AOFA_A00:33;
coherence
(Den ((In (( the connectives of S . (n + 7)), the carrier' of S)),L)) . <*P,K*> is Formula of L
by A1, A2, AOFA_A00:33;
coherence
(Den ((In (( the connectives of S . (n + 8)), the carrier' of S)),L)) . <*P,K*> is Formula of L
by A1, A2, AOFA_A00:33;
end;
definition
let n be non
empty Nat;
let J be non
empty non
void Signature;
let T be
non-empty MSAlgebra over
J;
let X be
V3()
GeneratorSet of
T;
let S be non
empty non
void J -extension n PC-correct QC-correct QCLangSignature over
Union X;
let L be
non-empty Language of
X extended_by (
{}, the
carrier of
S),
S;
let F be
Subset of
( the Sorts of L . the formula-sort of S);
attr F is
QC-closed means :
Def39:
for
A,
B being
Element of the
Sorts of
L . the
formula-sort of
S for
x being
Element of
Union X holds
( ( for
a being
SortSymbol of
J holds
( ( for
t being
Element of
Union the
Sorts of
L st
x in (X extended_by ({}, the carrier of S)) . a &
t in the
Sorts of
L . a holds
for
y being
Element of
Union (X extended_by ({}, the carrier of S)) st
x = y holds
(\for (x,A)) \imp (A / (y,t)) in F ) & (
x in X . a &
x nin (vf A) . a implies
(\for (x,(A \imp B))) \imp (A \imp (\for (x,B))) in F ) ) ) &
(\not (\ex (x,A))) \iff (\for (x,(\not A))) in F &
(\ex (x,(\not A))) \iff (\not (\for (x,A))) in F & (
A in F implies
\for (
x,
A)
in F ) );
end;
::
deftheorem Def39 defines
QC-closed AOFA_L00:def 43 :
for n being non empty Nat
for J being non empty non void Signature
for T being non-empty MSAlgebra over J
for X being V3() GeneratorSet of T
for S being non empty non void b2 -extension b1 PC-correct QC-correct QCLangSignature over Union X
for L being non-empty Language of X extended_by ({}, the carrier of S),S
for F being Subset of ( the Sorts of L . the formula-sort of S) holds
( F is QC-closed iff for A, B being Element of the Sorts of L . the formula-sort of S
for x being Element of Union X holds
( ( for a being SortSymbol of J holds
( ( for t being Element of Union the Sorts of L st x in (X extended_by ({}, the carrier of S)) . a & t in the Sorts of L . a holds
for y being Element of Union (X extended_by ({}, the carrier of S)) st x = y holds
(\for (x,A)) \imp (A / (y,t)) in F ) & ( x in X . a & x nin (vf A) . a implies (\for (x,(A \imp B))) \imp (A \imp (\for (x,B))) in F ) ) ) & (\not (\ex (x,A))) \iff (\for (x,(\not A))) in F & (\ex (x,(\not A))) \iff (\not (\for (x,A))) in F & ( A in F implies \for (x,A) in F ) ) );
definition
let n be non
empty Nat;
let J be non
empty non
void Signature;
let T be
non-empty MSAlgebra over
J;
let X be
V3()
GeneratorSet of
T;
let S be non
empty non
void J -extension n PC-correct QC-correct QCLangSignature over
Union X;
let L be
non-empty Language of
X extended_by (
{}, the
carrier of
S),
S;
attr L is
subst-eq-correct means
for
x0 being
Element of
Union (X extended_by ({}, the carrier of S)) for
s,
s1 being
SortSymbol of
S st
x0 in X . s holds
for
t being
Element of
L,
s for
t1,
t2 being
Element of
L,
s1 holds
(t1 '=' (t2,L)) / (
x0,
t)
= (t1 / (x0,t)) '=' (
(t2 / (x0,t)),
L);
let F be
Subset of
( the Sorts of L . the formula-sort of S);
attr F is
with_equality means :
Def42:
( ( for
t being
Element of
T holds
t '=' (
t,
L)
in F ) & ( for
b being
SortSymbol of
S for
t1,
t2 being
Element of
L,
b for
x being
Element of
Union (X extended_by ({}, the carrier of S)) st
x in X . b holds
( ( for
c being
SortSymbol of
S st
c in the
carrier of
J holds
for
t being
Element of
L,
c holds
(t1 '=' (t2,L)) \imp ((t / (x,t1)) '=' ((t / (x,t2)),L)) in F ) & ( for
A being
Formula of
L holds
(t1 '=' (t2,L)) \imp ((A / (x,t1)) \imp (A / (x,t2))) in F ) ) ) );
end;
::
deftheorem defines
subst-eq-correct AOFA_L00:def 44 :
for n being non empty Nat
for J being non empty non void Signature
for T being non-empty MSAlgebra over J
for X being V3() GeneratorSet of T
for S being non empty non void b2 -extension b1 PC-correct QC-correct QCLangSignature over Union X
for L being non-empty Language of X extended_by ({}, the carrier of S),S holds
( L is subst-eq-correct iff for x0 being Element of Union (X extended_by ({}, the carrier of S))
for s, s1 being SortSymbol of S st x0 in X . s holds
for t being Element of L,s
for t1, t2 being Element of L,s1 holds (t1 '=' (t2,L)) / (x0,t) = (t1 / (x0,t)) '=' ((t2 / (x0,t)),L) );
::
deftheorem Def42 defines
with_equality AOFA_L00:def 46 :
for n being non empty Nat
for J being non empty non void Signature
for T being non-empty MSAlgebra over J
for X being V3() GeneratorSet of T
for S being non empty non void b2 -extension b1 PC-correct QC-correct QCLangSignature over Union X
for L being non-empty Language of X extended_by ({}, the carrier of S),S
for F being Subset of ( the Sorts of L . the formula-sort of S) holds
( F is with_equality iff ( ( for t being Element of T holds t '=' (t,L) in F ) & ( for b being SortSymbol of S
for t1, t2 being Element of L,b
for x being Element of Union (X extended_by ({}, the carrier of S)) st x in X . b holds
( ( for c being SortSymbol of S st c in the carrier of J holds
for t being Element of L,c holds (t1 '=' (t2,L)) \imp ((t / (x,t1)) '=' ((t / (x,t2)),L)) in F ) & ( for A being Formula of L holds (t1 '=' (t2,L)) \imp ((A / (x,t1)) \imp (A / (x,t2))) in F ) ) ) ) );
definition
let n be
natural non
empty number ;
let J be non
empty non
void Signature;
let T be
non-empty VarMSAlgebra over
J;
let X be
V2()
GeneratorSet of
T;
let S be non
empty non
void J -extension n PC-correct QC-correct n AL-correct essential AlgLangSignature over
Union X;
let L be
IfWhileAlgebra of
X,
S;
let V be
Formula of
L;
let F be
Subset of
( the Sorts of L . the formula-sort of S);
attr F is
V AL-closed means :
Def43:
for
A,
B being
Formula of
L holds
( ( for
M being
Algorithm of
L holds
(
(M * (A \and B)) \iff ((M * A) \and (M * B)) in F &
(M * (A \or B)) \iff ((M * A) \or (M * B)) in F &
(\Cup (M,A)) \iff (A \or (\Cup (M,(M * A)))) in F &
(\Cap (M,A)) \iff (A \and (\Cap (M,(M * A)))) in F & (
A \imp B in F implies (
(\Cup (M,A)) \imp (\Cup (M,B)) in F &
(\Cap (M,A)) \imp (\Cap (M,B)) in F ) ) ) ) & ( for
a being
SortSymbol of
J for
x being
Element of
X . a for
x0 being
Element of
Union (X extended_by ({}, the carrier of S)) st
x = x0 holds
for
t being
Element of the
Sorts of
T . a for
t1 being
Element of
Union the
Sorts of
L st
t1 = t holds
(
((x := (t,L)) * A) \iff (A / (x0,t1)) in F & ( for
y being
Element of
X . a st
y nin (vf t) . a holds
for
y0 being
Element of
Union (X extended_by ({}, the carrier of S)) st
y = y0 holds
((x := (t,L)) * (\ex (x,A))) \iff (\ex (y,((x := (t,L)) * ((y := ((@ x),L)) * (A / (x0,y0)))))) in F ) &
((x := (t,L)) * A) \imp (\ex (x,A)) in F ) ) & ( for
M,
M1,
M2 being
Algorithm of
L holds
(
((M \; M1) * A) \iff (M * (M1 * A)) in F &
((if-then-else (M,M1,M2)) * A) \iff (((M * V) \and (M * (M1 * A))) \or ((M * (\not V)) \and (M * (M2 * A)))) in F &
((while (M,M1)) * A) \iff (((M * (\not V)) \and A) \or ((M * V) \and (M * (M1 * ((while (M,M1)) * A))))) in F ) ) );
end;
::
deftheorem Def43 defines
AL-closed AOFA_L00:def 47 :
for n being natural non empty number
for J being non empty non void Signature
for T being non-empty VarMSAlgebra over J
for X being V2() GeneratorSet of T
for S being non empty non void b2 -extension b1 PC-correct QC-correct b1 AL-correct essential AlgLangSignature over Union X
for L being IfWhileAlgebra of X,S
for V being Formula of L
for F being Subset of ( the Sorts of L . the formula-sort of S) holds
( F is V AL-closed iff for A, B being Formula of L holds
( ( for M being Algorithm of L holds
( (M * (A \and B)) \iff ((M * A) \and (M * B)) in F & (M * (A \or B)) \iff ((M * A) \or (M * B)) in F & (\Cup (M,A)) \iff (A \or (\Cup (M,(M * A)))) in F & (\Cap (M,A)) \iff (A \and (\Cap (M,(M * A)))) in F & ( A \imp B in F implies ( (\Cup (M,A)) \imp (\Cup (M,B)) in F & (\Cap (M,A)) \imp (\Cap (M,B)) in F ) ) ) ) & ( for a being SortSymbol of J
for x being Element of X . a
for x0 being Element of Union (X extended_by ({}, the carrier of S)) st x = x0 holds
for t being Element of the Sorts of T . a
for t1 being Element of Union the Sorts of L st t1 = t holds
( ((x := (t,L)) * A) \iff (A / (x0,t1)) in F & ( for y being Element of X . a st y nin (vf t) . a holds
for y0 being Element of Union (X extended_by ({}, the carrier of S)) st y = y0 holds
((x := (t,L)) * (\ex (x,A))) \iff (\ex (y,((x := (t,L)) * ((y := ((@ x),L)) * (A / (x0,y0)))))) in F ) & ((x := (t,L)) * A) \imp (\ex (x,A)) in F ) ) & ( for M, M1, M2 being Algorithm of L holds
( ((M \; M1) * A) \iff (M * (M1 * A)) in F & ((if-then-else (M,M1,M2)) * A) \iff (((M * V) \and (M * (M1 * A))) \or ((M * (\not V)) \and (M * (M2 * A)))) in F & ((while (M,M1)) * A) \iff (((M * (\not V)) \and A) \or ((M * V) \and (M * (M1 * ((while (M,M1)) * A))))) in F ) ) ) );
theorem
for
n being non
empty Nat for
J being non
empty non
void Signature for
T being
non-empty MSAlgebra over
J for
X being
V3()
GeneratorSet of
T for
S1 being non
empty non
void b2 -extension b1 PC-correct QC-correct QCLangSignature over
Union X for
x0 being
Element of
Union (X extended_by ({}, the carrier of S1)) for
L being
non-empty Language of
X extended_by (
{}, the
carrier of
S1),
S1 for
G1 being
QC-theory_with_equality of
L for
s,
s1 being
SortSymbol of
S1 for
t being
Element of
L,
s for
t1,
t2 being
Element of
L,
s1 st
L is
subst-eq-correct &
x0 in X . s &
t1 '=' (
t2,
L)
in G1 holds
(t1 / (x0,t)) '=' (
(t2 / (x0,t)),
L)
in G1