begin
Lm1:
for A being QC-alphabet
for p being QC-formula of A holds
( Bound_Vars (VERUM A) = {} (bound_QC-variables A) & ( p is atomic implies Bound_Vars p = Bound_Vars (the_arguments_of p) ) & ( p is negative implies Bound_Vars p = Bound_Vars (the_argument_of p) ) & ( p is conjunctive implies Bound_Vars p = (Bound_Vars (the_left_argument_of p)) \/ (Bound_Vars (the_right_argument_of p)) ) & ( p is universal implies Bound_Vars p = (Bound_Vars (the_scope_of p)) \/ {(bound_in p)} ) )
Lm2:
for X, Y being set st card X in card Y holds
Y \ X <> {}
::
deftheorem defines
ExpandSub SUBSTUT1:def 13 :
for A being QC-alphabet
for x being bound_QC-variable of A
for p being QC-formula of A
for finSub being finite CQC_Substitution of A st ex Sub being CQC_Substitution of A st finSub = RestrictSub (x,(All (x,p)),Sub) holds
( ( x in rng finSub implies ExpandSub (x,p,finSub) = finSub \/ {[x,(x. (upVar (finSub,p)))]} ) & ( not x in rng finSub implies ExpandSub (x,p,finSub) = finSub \/ {[x,x]} ) );
definition
let A be
QC-alphabet ;
existence
ex b1 being Function st
for a being set holds
( a in b1 iff ex p being QC-formula of A ex Sub being CQC_Substitution of A ex b being set st
( a = [[p,Sub],b] & p,Sub PQSub b ) )
uniqueness
for b1, b2 being Function st ( for a being set holds
( a in b1 iff ex p being QC-formula of A ex Sub being CQC_Substitution of A ex b being set st
( a = [[p,Sub],b] & p,Sub PQSub b ) ) ) & ( for a being set holds
( a in b2 iff ex p being QC-formula of A ex Sub being CQC_Substitution of A ex b being set st
( a = [[p,Sub],b] & p,Sub PQSub b ) ) ) holds
b1 = b2
end;
begin
theorem Th7:
for
A being
QC-alphabet holds
(
[:(QC-WFF A),(vSUB A):] is
Subset of
[:([:NAT,(QC-symbols A):] *),(vSUB A):] & ( for
k being
Element of
NAT for
p being
QC-pred_symbol of
k,
A for
ll being
QC-variable_list of
k,
A for
e being
Element of
vSUB A holds
[(<*p*> ^ ll),e] in [:(QC-WFF A),(vSUB A):] ) & ( for
e being
Element of
vSUB A holds
[<*[0,0]*>,e] in [:(QC-WFF A),(vSUB A):] ) & ( for
p being
FinSequence of
[:NAT,(QC-symbols A):] for
e being
Element of
vSUB A st
[p,e] in [:(QC-WFF A),(vSUB A):] holds
[(<*[1,0]*> ^ p),e] in [:(QC-WFF A),(vSUB A):] ) & ( for
p,
q being
FinSequence of
[:NAT,(QC-symbols A):] for
e being
Element of
vSUB A st
[p,e] in [:(QC-WFF A),(vSUB A):] &
[q,e] in [:(QC-WFF A),(vSUB A):] holds
[((<*[2,0]*> ^ p) ^ q),e] in [:(QC-WFF A),(vSUB A):] ) & ( for
x being
bound_QC-variable of
A for
p being
FinSequence of
[:NAT,(QC-symbols A):] for
e being
Element of
vSUB A st
[p,((QSub A) . [((<*[3,0]*> ^ <*x*>) ^ p),e])] in [:(QC-WFF A),(vSUB A):] holds
[((<*[3,0]*> ^ <*x*>) ^ p),e] in [:(QC-WFF A),(vSUB A):] ) )
definition
let A be
QC-alphabet ;
let IT be
set ;
attr IT is
A -Sub-closed means :
Def16:
(
IT is
Subset of
[:([:NAT,(QC-symbols A):] *),(vSUB A):] & ( for
k being
Element of
NAT for
p being
QC-pred_symbol of
k,
A for
ll being
QC-variable_list of
k,
A for
e being
Element of
vSUB A holds
[(<*p*> ^ ll),e] in IT ) & ( for
e being
Element of
vSUB A holds
[<*[0,0]*>,e] in IT ) & ( for
p being
FinSequence of
[:NAT,(QC-symbols A):] for
e being
Element of
vSUB A st
[p,e] in IT holds
[(<*[1,0]*> ^ p),e] in IT ) & ( for
p,
q being
FinSequence of
[:NAT,(QC-symbols A):] for
e being
Element of
vSUB A st
[p,e] in IT &
[q,e] in IT holds
[((<*[2,0]*> ^ p) ^ q),e] in IT ) & ( for
x being
bound_QC-variable of
A for
p being
FinSequence of
[:NAT,(QC-symbols A):] for
e being
Element of
vSUB A st
[p,((QSub A) . [((<*[3,0]*> ^ <*x*>) ^ p),e])] in IT holds
[((<*[3,0]*> ^ <*x*>) ^ p),e] in IT ) );
end;
::
deftheorem Def16 defines
-Sub-closed SUBSTUT1:def 16 :
for A being QC-alphabet
for IT being set holds
( IT is A -Sub-closed iff ( IT is Subset of [:([:NAT,(QC-symbols A):] *),(vSUB A):] & ( for k being Element of NAT
for p being QC-pred_symbol of k,A
for ll being QC-variable_list of k,A
for e being Element of vSUB A holds [(<*p*> ^ ll),e] in IT ) & ( for e being Element of vSUB A holds [<*[0,0]*>,e] in IT ) & ( for p being FinSequence of [:NAT,(QC-symbols A):]
for e being Element of vSUB A st [p,e] in IT holds
[(<*[1,0]*> ^ p),e] in IT ) & ( for p, q being FinSequence of [:NAT,(QC-symbols A):]
for e being Element of vSUB A st [p,e] in IT & [q,e] in IT holds
[((<*[2,0]*> ^ p) ^ q),e] in IT ) & ( for x being bound_QC-variable of A
for p being FinSequence of [:NAT,(QC-symbols A):]
for e being Element of vSUB A st [p,((QSub A) . [((<*[3,0]*> ^ <*x*>) ^ p),e])] in IT holds
[((<*[3,0]*> ^ <*x*>) ^ p),e] in IT ) ) );
Lm3:
for A being QC-alphabet
for x being bound_QC-variable of A
for p being FinSequence of [:NAT,(QC-symbols A):] holds (<*[3,0]*> ^ <*x*>) ^ p is FinSequence of [:NAT,(QC-symbols A):]
Lm4:
for A being QC-alphabet
for k being Element of NAT
for l being QC-symbol of A
for e being Element of vSUB A holds [<*[k,l]*>,e] in [:([:NAT,(QC-symbols A):] *),(vSUB A):]
Lm5:
for A being QC-alphabet
for k being Element of NAT
for p being QC-pred_symbol of k,A
for ll being QC-variable_list of k,A
for e being Element of vSUB A holds [(<*p*> ^ ll),e] in [:([:NAT,(QC-symbols A):] *),(vSUB A):]
scheme
SubQCInd{
F1()
-> QC-alphabet ,
P1[
Element of
QC-Sub-WFF F1()] } :
provided
A1:
for
k being
Element of
NAT for
P being
QC-pred_symbol of
k,
F1()
for
ll being
QC-variable_list of
k,
F1()
for
e being
Element of
vSUB F1() holds
P1[
Sub_P (
P,
ll,
e)]
and A2:
for
S being
Element of
QC-Sub-WFF F1() st
S is
F1()
-Sub_VERUM holds
P1[
S]
and A3:
for
S being
Element of
QC-Sub-WFF F1() st
P1[
S] holds
P1[
Sub_not S]
and A4:
for
S,
S9 being
Element of
QC-Sub-WFF F1() st
S `2 = S9 `2 &
P1[
S] &
P1[
S9] holds
P1[
Sub_& (
S,
S9)]
and A5:
for
x being
bound_QC-variable of
F1()
for
S being
Element of
QC-Sub-WFF F1()
for
SQ being
second_Q_comp of
[S,x] st
[S,x] is
quantifiable &
P1[
S] holds
P1[
Sub_All (
[S,x],
SQ)]
definition
let A be
QC-alphabet ;
let S be
Element of
QC-Sub-WFF A;
assume B1:
S is
Sub_atomic
;
existence
ex b1 being FinSequence of QC-variables A ex k being Element of NAT ex P being QC-pred_symbol of k,A ex ll being QC-variable_list of k,A ex e being Element of vSUB A st
( b1 = ll & S = Sub_P (P,ll,e) )
uniqueness
for b1, b2 being FinSequence of QC-variables A st ex k being Element of NAT ex P being QC-pred_symbol of k,A ex ll being QC-variable_list of k,A ex e being Element of vSUB A st
( b1 = ll & S = Sub_P (P,ll,e) ) & ex k being Element of NAT ex P being QC-pred_symbol of k,A ex ll being QC-variable_list of k,A ex e being Element of vSUB A st
( b2 = ll & S = Sub_P (P,ll,e) ) holds
b1 = b2
end;
scheme
SubQCFuncUniq{
F1()
-> QC-alphabet ,
F2()
-> non
empty set ,
F3()
-> Function of
(QC-Sub-WFF F1()),
F2(),
F4()
-> Function of
(QC-Sub-WFF F1()),
F2(),
F5()
-> Element of
F2(),
F6(
set )
-> Element of
F2(),
F7(
set )
-> Element of
F2(),
F8(
set ,
set )
-> Element of
F2(),
F9(
set ,
set ,
set )
-> Element of
F2() } :
provided
Lm6:
for A being QC-alphabet
for F1, F2 being Function of (QC-Sub-WFF A),(QC-WFF A) st ( for S being Element of QC-Sub-WFF A holds
( ( S is A -Sub_VERUM implies F1 . S = VERUM A ) & ( S is Sub_atomic implies F1 . S = (the_pred_symbol_of (S `1)) ! (CQC_Subst ((Sub_the_arguments_of S),(S `2))) ) & ( S is Sub_negative implies F1 . S = 'not' (F1 . (Sub_the_argument_of S)) ) & ( S is Sub_conjunctive implies F1 . S = (F1 . (Sub_the_left_argument_of S)) '&' (F1 . (Sub_the_right_argument_of S)) ) & ( S is Sub_universal implies F1 . S = Quant (S,(F1 . (Sub_the_scope_of S))) ) ) ) & ( for S being Element of QC-Sub-WFF A holds
( ( S is A -Sub_VERUM implies F2 . S = VERUM A ) & ( S is Sub_atomic implies F2 . S = (the_pred_symbol_of (S `1)) ! (CQC_Subst ((Sub_the_arguments_of S),(S `2))) ) & ( S is Sub_negative implies F2 . S = 'not' (F2 . (Sub_the_argument_of S)) ) & ( S is Sub_conjunctive implies F2 . S = (F2 . (Sub_the_left_argument_of S)) '&' (F2 . (Sub_the_right_argument_of S)) ) & ( S is Sub_universal implies F2 . S = Quant (S,(F2 . (Sub_the_scope_of S))) ) ) ) holds
F1 = F2
begin
definition
let A be
QC-alphabet ;
let S be
Element of
QC-Sub-WFF A;
existence
ex b1 being Element of QC-WFF A ex F being Function of (QC-Sub-WFF A),(QC-WFF A) st
( b1 = F . S & ( for S9 being Element of QC-Sub-WFF A holds
( ( S9 is A -Sub_VERUM implies F . S9 = VERUM A ) & ( S9 is Sub_atomic implies F . S9 = (the_pred_symbol_of (S9 `1)) ! (CQC_Subst ((Sub_the_arguments_of S9),(S9 `2))) ) & ( S9 is Sub_negative implies F . S9 = 'not' (F . (Sub_the_argument_of S9)) ) & ( S9 is Sub_conjunctive implies F . S9 = (F . (Sub_the_left_argument_of S9)) '&' (F . (Sub_the_right_argument_of S9)) ) & ( S9 is Sub_universal implies F . S9 = Quant (S9,(F . (Sub_the_scope_of S9))) ) ) ) )
uniqueness
for b1, b2 being Element of QC-WFF A st ex F being Function of (QC-Sub-WFF A),(QC-WFF A) st
( b1 = F . S & ( for S9 being Element of QC-Sub-WFF A holds
( ( S9 is A -Sub_VERUM implies F . S9 = VERUM A ) & ( S9 is Sub_atomic implies F . S9 = (the_pred_symbol_of (S9 `1)) ! (CQC_Subst ((Sub_the_arguments_of S9),(S9 `2))) ) & ( S9 is Sub_negative implies F . S9 = 'not' (F . (Sub_the_argument_of S9)) ) & ( S9 is Sub_conjunctive implies F . S9 = (F . (Sub_the_left_argument_of S9)) '&' (F . (Sub_the_right_argument_of S9)) ) & ( S9 is Sub_universal implies F . S9 = Quant (S9,(F . (Sub_the_scope_of S9))) ) ) ) ) & ex F being Function of (QC-Sub-WFF A),(QC-WFF A) st
( b2 = F . S & ( for S9 being Element of QC-Sub-WFF A holds
( ( S9 is A -Sub_VERUM implies F . S9 = VERUM A ) & ( S9 is Sub_atomic implies F . S9 = (the_pred_symbol_of (S9 `1)) ! (CQC_Subst ((Sub_the_arguments_of S9),(S9 `2))) ) & ( S9 is Sub_negative implies F . S9 = 'not' (F . (Sub_the_argument_of S9)) ) & ( S9 is Sub_conjunctive implies F . S9 = (F . (Sub_the_left_argument_of S9)) '&' (F . (Sub_the_right_argument_of S9)) ) & ( S9 is Sub_universal implies F . S9 = Quant (S9,(F . (Sub_the_scope_of S9))) ) ) ) ) holds
b1 = b2
by Lm6;
end;
Lm7:
for A being QC-alphabet
for k being Element of NAT
for P being QC-pred_symbol of k,A
for ll being CQC-variable_list of k,A holds the_pred_symbol_of (P ! ll) = P
scheme
SubCQCInd{
F1()
-> QC-alphabet ,
P1[
set ] } :
provided
A1:
for
S,
S9 being
Element of
CQC-Sub-WFF F1()
for
x being
bound_QC-variable of
F1()
for
SQ being
second_Q_comp of
[S,x] for
k being
Element of
NAT for
ll being
CQC-variable_list of
k,
F1()
for
P being
QC-pred_symbol of
k,
F1()
for
e being
Element of
vSUB F1() holds
(
P1[
Sub_P (
P,
ll,
e)] & (
S is
F1()
-Sub_VERUM implies
P1[
S] ) & (
P1[
S] implies
P1[
Sub_not S] ) & (
S `2 = S9 `2 &
P1[
S] &
P1[
S9] implies
P1[
Sub_& (
S,
S9)] ) & (
[S,x] is
quantifiable &
P1[
S] implies
P1[
Sub_All (
[S,x],
SQ)] ) )