:: SUBSTUT1 semantic presentation
:: deftheorem Def1 defines vSUB SUBSTUT1:def 1 :
:: deftheorem Def2 defines @ SUBSTUT1:def 2 :
theorem Th1: :: SUBSTUT1:1
:: deftheorem Def3 defines CQC_Subst SUBSTUT1:def 3 :
:: deftheorem Def4 defines @ SUBSTUT1:def 4 :
:: deftheorem Def5 defines CQC_Subst SUBSTUT1:def 5 :
:: deftheorem Def6 defines RestrictSub SUBSTUT1:def 6 :
:: deftheorem Def7 defines Bound_Vars SUBSTUT1:def 7 :
:: deftheorem Def8 defines Bound_Vars SUBSTUT1:def 8 :
Lemma4:
for b1 being QC-formula holds
( Bound_Vars VERUM = {} bound_QC-variables & ( b1 is atomic implies Bound_Vars b1 = Bound_Vars (the_arguments_of b1) ) & ( b1 is negative implies Bound_Vars b1 = Bound_Vars (the_argument_of b1) ) & ( b1 is conjunctive implies Bound_Vars b1 = (Bound_Vars (the_left_argument_of b1)) \/ (Bound_Vars (the_right_argument_of b1)) ) & ( b1 is universal implies Bound_Vars b1 = (Bound_Vars (the_scope_of b1)) \/ {(bound_in b1)} ) )
theorem Th2: :: SUBSTUT1:2
theorem Th3: :: SUBSTUT1:3
theorem Th4: :: SUBSTUT1:4
theorem Th5: :: SUBSTUT1:5
theorem Th6: :: SUBSTUT1:6
:: deftheorem Def9 defines Dom_Bound_Vars SUBSTUT1:def 9 :
:: deftheorem Def10 defines Sub_Var SUBSTUT1:def 10 :
:: deftheorem Def11 defines NSub SUBSTUT1:def 11 :
:: deftheorem Def12 defines upVar SUBSTUT1:def 12 :
definition
let c
1 be
bound_QC-variable;
let c
2 be
QC-formula;
let c
3 be
finite CQC_Substitution;
assume E5:
ex b
1 being
CQC_Substitution st c
3 = RestrictSub c
1,
(All c1,c2),b
1
;
func ExpandSub c
1,c
2,c
3 -> CQC_Substitution equals :: SUBSTUT1:def 13
a
3 \/ {[a1,(x. (upVar a3,a2))]} if a
1 in rng a
3 otherwise a
3 \/ {[a1,a1]};
coherence
( ( c1 in rng c3 implies c3 \/ {[c1,(x. (upVar c3,c2))]} is CQC_Substitution ) & ( not c1 in rng c3 implies c3 \/ {[c1,c1]} is CQC_Substitution ) )
consistency
for b1 being CQC_Substitution holds
verum
;
end;
:: deftheorem Def13 defines ExpandSub SUBSTUT1:def 13 :
for b
1 being
bound_QC-variablefor b
2 being
QC-formulafor b
3 being
finite CQC_Substitution holds
( ex b
4 being
CQC_Substitution st b
3 = RestrictSub b
1,
(All b1,b2),b
4 implies ( ( b
1 in rng b
3 implies
ExpandSub b
1,b
2,b
3 = b
3 \/ {[b1,(x. (upVar b3,b2))]} ) & ( not b
1 in rng b
3 implies
ExpandSub b
1,b
2,b
3 = b
3 \/ {[b1,b1]} ) ) );
:: deftheorem Def14 defines PQSub SUBSTUT1:def 14 :
definition
func QSub -> Function means :: SUBSTUT1:def 15
for b
1 being
set holds
( b
1 in a
1 iff ex b
2 being
QC-formulaex b
3 being
CQC_Substitutionex b
4 being
set st
( b
1 = [[b2,b3],b4] & b
2,b
3 PQSub b
4 ) );
existence
ex b1 being Function st
for b2 being set holds
( b2 in b1 iff ex b3 being QC-formulaex b4 being CQC_Substitutionex b5 being set st
( b2 = [[b3,b4],b5] & b3,b4 PQSub b5 ) )
uniqueness
for b1, b2 being Function holds
( ( for b3 being set holds
( b3 in b1 iff ex b4 being QC-formulaex b5 being CQC_Substitutionex b6 being set st
( b3 = [[b4,b5],b6] & b4,b5 PQSub b6 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being QC-formulaex b5 being CQC_Substitutionex b6 being set st
( b3 = [[b4,b5],b6] & b4,b5 PQSub b6 ) ) ) implies b1 = b2 )
end;
:: deftheorem Def15 defines QSub SUBSTUT1:def 15 :
theorem Th7: :: SUBSTUT1:7
(
[:QC-WFF ,vSUB :] is
Subset of
[:([:NAT ,NAT :] * ),vSUB :] & ( for b
1 being
Natfor b
2 being
QC-pred_symbol of b
1for b
3 being
QC-variable_list of b
1for b
4 being
Element of
vSUB holds
[(<*b2*> ^ b3),b4] in [:QC-WFF ,vSUB :] ) & ( for b
1 being
Element of
vSUB holds
[<*[0,0]*>,b1] in [:QC-WFF ,vSUB :] ) & ( for b
1 being
FinSequence of
[:NAT ,NAT :]for b
2 being
Element of
vSUB holds
(
[b1,b2] in [:QC-WFF ,vSUB :] implies
[(<*[1,0]*> ^ b1),b2] in [:QC-WFF ,vSUB :] ) ) & ( for b
1, b
2 being
FinSequence of
[:NAT ,NAT :]for b
3 being
Element of
vSUB holds
(
[b1,b3] in [:QC-WFF ,vSUB :] &
[b2,b3] in [:QC-WFF ,vSUB :] implies
[((<*[2,0]*> ^ b1) ^ b2),b3] in [:QC-WFF ,vSUB :] ) ) & ( for b
1 being
bound_QC-variablefor b
2 being
FinSequence of
[:NAT ,NAT :]for b
3 being
Element of
vSUB holds
(
[b2,(QSub . [((<*[3,0]*> ^ <*b1*>) ^ b2),b3])] in [:QC-WFF ,vSUB :] implies
[((<*[3,0]*> ^ <*b1*>) ^ b2),b3] in [:QC-WFF ,vSUB :] ) ) )
definition
let c
1 be
set ;
attr a
1 is
QC-Sub-closed means :
Def16:
:: SUBSTUT1:def 16
( a
1 is
Subset of
[:([:NAT ,NAT :] * ),vSUB :] & ( for b
1 being
Natfor b
2 being
QC-pred_symbol of b
1for b
3 being
QC-variable_list of b
1for b
4 being
Element of
vSUB holds
[(<*b2*> ^ b3),b4] in a
1 ) & ( for b
1 being
Element of
vSUB holds
[<*[0,0]*>,b1] in a
1 ) & ( for b
1 being
FinSequence of
[:NAT ,NAT :]for b
2 being
Element of
vSUB holds
(
[b1,b2] in a
1 implies
[(<*[1,0]*> ^ b1),b2] in a
1 ) ) & ( for b
1, b
2 being
FinSequence of
[:NAT ,NAT :]for b
3 being
Element of
vSUB holds
(
[b1,b3] in a
1 &
[b2,b3] in a
1 implies
[((<*[2,0]*> ^ b1) ^ b2),b3] in a
1 ) ) & ( for b
1 being
bound_QC-variablefor b
2 being
FinSequence of
[:NAT ,NAT :]for b
3 being
Element of
vSUB holds
(
[b2,(QSub . [((<*[3,0]*> ^ <*b1*>) ^ b2),b3])] in a
1 implies
[((<*[3,0]*> ^ <*b1*>) ^ b2),b3] in a
1 ) ) );
end;
:: deftheorem Def16 defines QC-Sub-closed SUBSTUT1:def 16 :
for b
1 being
set holds
( b
1 is
QC-Sub-closed iff ( b
1 is
Subset of
[:([:NAT ,NAT :] * ),vSUB :] & ( for b
2 being
Natfor b
3 being
QC-pred_symbol of b
2for b
4 being
QC-variable_list of b
2for b
5 being
Element of
vSUB holds
[(<*b3*> ^ b4),b5] in b
1 ) & ( for b
2 being
Element of
vSUB holds
[<*[0,0]*>,b2] in b
1 ) & ( for b
2 being
FinSequence of
[:NAT ,NAT :]for b
3 being
Element of
vSUB holds
(
[b2,b3] in b
1 implies
[(<*[1,0]*> ^ b2),b3] in b
1 ) ) & ( for b
2, b
3 being
FinSequence of
[:NAT ,NAT :]for b
4 being
Element of
vSUB holds
(
[b2,b4] in b
1 &
[b3,b4] in b
1 implies
[((<*[2,0]*> ^ b2) ^ b3),b4] in b
1 ) ) & ( for b
2 being
bound_QC-variablefor b
3 being
FinSequence of
[:NAT ,NAT :]for b
4 being
Element of
vSUB holds
(
[b3,(QSub . [((<*[3,0]*> ^ <*b2*>) ^ b3),b4])] in b
1 implies
[((<*[3,0]*> ^ <*b2*>) ^ b3),b4] in b
1 ) ) ) );
Lemma8:
for b1 being bound_QC-variable
for b2 being FinSequence of [:NAT ,NAT :] holds
(<*[3,0]*> ^ <*b1*>) ^ b2 is FinSequence of [:NAT ,NAT :]
Lemma9:
for b1, b2 being Nat
for b3 being Element of vSUB holds [<*[b1,b2]*>,b3] in [:([:NAT ,NAT :] * ),vSUB :]
Lemma10:
for b1 being Nat
for b2 being QC-pred_symbol of b1
for b3 being QC-variable_list of b1
for b4 being Element of vSUB holds [(<*b2*> ^ b3),b4] in [:([:NAT ,NAT :] * ),vSUB :]
:: deftheorem Def17 defines QC-Sub-WFF SUBSTUT1:def 17 :
theorem Th8: :: SUBSTUT1:8
:: deftheorem Def18 defines Sub_P SUBSTUT1:def 18 :
theorem Th9: :: SUBSTUT1:9
:: deftheorem Def19 defines Sub_VERUM SUBSTUT1:def 19 :
theorem Th10: :: SUBSTUT1:10
:: deftheorem Def20 defines Sub_not SUBSTUT1:def 20 :
:: deftheorem Def21 defines Sub_& SUBSTUT1:def 21 :
:: deftheorem Def22 defines quantifiable SUBSTUT1:def 22 :
:: deftheorem Def23 defines second_Q_comp SUBSTUT1:def 23 :
:: deftheorem Def24 defines Sub_All SUBSTUT1:def 24 :
:: deftheorem Def25 defines Sub_atomic SUBSTUT1:def 25 :
theorem Th11: :: SUBSTUT1:11
:: deftheorem Def26 defines Sub_negative SUBSTUT1:def 26 :
:: deftheorem Def27 defines Sub_conjunctive SUBSTUT1:def 27 :
:: deftheorem Def28 defines Sub_universal SUBSTUT1:def 28 :
theorem Th12: :: SUBSTUT1:12
:: deftheorem Def29 defines Sub_the_arguments_of SUBSTUT1:def 29 :
:: deftheorem Def30 defines Sub_the_argument_of SUBSTUT1:def 30 :
:: deftheorem Def31 defines Sub_the_left_argument_of SUBSTUT1:def 31 :
:: deftheorem Def32 defines Sub_the_right_argument_of SUBSTUT1:def 32 :
:: deftheorem Def33 defines Sub_the_bound_of SUBSTUT1:def 33 :
:: deftheorem Def34 defines Sub_the_scope_of SUBSTUT1:def 34 :
theorem Th13: :: SUBSTUT1:13
theorem Th14: :: SUBSTUT1:14
theorem Th15: :: SUBSTUT1:15
theorem Th16: :: SUBSTUT1:16
theorem Th17: :: SUBSTUT1:17
theorem Th18: :: SUBSTUT1:18
theorem Th19: :: SUBSTUT1:19
theorem Th20: :: SUBSTUT1:20
theorem Th21: :: SUBSTUT1:21
theorem Th22: :: SUBSTUT1:22
theorem Th23: :: SUBSTUT1:23
theorem Th24: :: SUBSTUT1:24
theorem Th25: :: SUBSTUT1:25
theorem Th26: :: SUBSTUT1:26
theorem Th27: :: SUBSTUT1:27
scheme :: SUBSTUT1:sch 4
s4{ F
1()
-> non
empty set , F
2()
-> Function of
QC-Sub-WFF ,F
1(), F
3()
-> Function of
QC-Sub-WFF ,F
1(), F
4()
-> Element of F
1(), F
5(
set )
-> Element of F
1(), F
6(
set )
-> Element of F
1(), F
7(
set ,
set )
-> Element of F
1(), F
8(
set ,
set )
-> Element of F
1() } :
provided
:: deftheorem Def35 defines @ SUBSTUT1:def 35 :
definition
let c
1 be
Element of
[:QC-WFF ,vSUB :];
func S_Bound c
1 -> bound_QC-variable equals :: SUBSTUT1:def 36
x. (upVar (RestrictSub (bound_in (a1 `1 )),(a1 `1 ),(a1 `2 )),(the_scope_of (a1 `1 ))) if bound_in (a1 `1 ) in rng (RestrictSub (bound_in (a1 `1 )),(a1 `1 ),(a1 `2 )) otherwise bound_in (a1 `1 );
coherence
( ( bound_in (c1 `1 ) in rng (RestrictSub (bound_in (c1 `1 )),(c1 `1 ),(c1 `2 )) implies x. (upVar (RestrictSub (bound_in (c1 `1 )),(c1 `1 ),(c1 `2 )),(the_scope_of (c1 `1 ))) is bound_QC-variable ) & ( not bound_in (c1 `1 ) in rng (RestrictSub (bound_in (c1 `1 )),(c1 `1 ),(c1 `2 )) implies bound_in (c1 `1 ) is bound_QC-variable ) )
;
consistency
for b1 being bound_QC-variable holds
verum
;
end;
:: deftheorem Def36 defines S_Bound SUBSTUT1:def 36 :
:: deftheorem Def37 defines Quant SUBSTUT1:def 37 :
Lemma45:
for b1, b2 being Function of QC-Sub-WFF , QC-WFF holds
( ( for b3 being Element of QC-Sub-WFF holds
( ( b3 is Sub_VERUM implies b1 . b3 = VERUM ) & ( b3 is Sub_atomic implies b1 . b3 = (the_pred_symbol_of (b3 `1 )) ! (CQC_Subst (Sub_the_arguments_of b3),(b3 `2 )) ) & ( b3 is Sub_negative implies b1 . b3 = 'not' (b1 . (Sub_the_argument_of b3)) ) & ( b3 is Sub_conjunctive implies b1 . b3 = (b1 . (Sub_the_left_argument_of b3)) '&' (b1 . (Sub_the_right_argument_of b3)) ) & ( b3 is Sub_universal implies b1 . b3 = Quant b3,(b1 . (Sub_the_scope_of b3)) ) ) ) & ( for b3 being Element of QC-Sub-WFF holds
( ( b3 is Sub_VERUM implies b2 . b3 = VERUM ) & ( b3 is Sub_atomic implies b2 . b3 = (the_pred_symbol_of (b3 `1 )) ! (CQC_Subst (Sub_the_arguments_of b3),(b3 `2 )) ) & ( b3 is Sub_negative implies b2 . b3 = 'not' (b2 . (Sub_the_argument_of b3)) ) & ( b3 is Sub_conjunctive implies b2 . b3 = (b2 . (Sub_the_left_argument_of b3)) '&' (b2 . (Sub_the_right_argument_of b3)) ) & ( b3 is Sub_universal implies b2 . b3 = Quant b3,(b2 . (Sub_the_scope_of b3)) ) ) ) implies b1 = b2 )
definition
let c
1 be
Element of
QC-Sub-WFF ;
func CQC_Sub c
1 -> Element of
QC-WFF means :
Def38:
:: SUBSTUT1:def 38
ex b
1 being
Function of
QC-Sub-WFF ,
QC-WFF st
( a
2 = b
1 . a
1 & ( for b
2 being
Element of
QC-Sub-WFF holds
( ( b
2 is
Sub_VERUM implies b
1 . b
2 = VERUM ) & ( b
2 is
Sub_atomic implies b
1 . b
2 = (the_pred_symbol_of (b2 `1 )) ! (CQC_Subst (Sub_the_arguments_of b2),(b2 `2 )) ) & ( b
2 is
Sub_negative implies b
1 . b
2 = 'not' (b1 . (Sub_the_argument_of b2)) ) & ( b
2 is
Sub_conjunctive implies b
1 . b
2 = (b1 . (Sub_the_left_argument_of b2)) '&' (b1 . (Sub_the_right_argument_of b2)) ) & ( b
2 is
Sub_universal implies b
1 . b
2 = Quant b
2,
(b1 . (Sub_the_scope_of b2)) ) ) ) );
existence
ex b1 being Element of QC-WFF ex b2 being Function of QC-Sub-WFF , QC-WFF st
( b1 = b2 . c1 & ( for b3 being Element of QC-Sub-WFF holds
( ( b3 is Sub_VERUM implies b2 . b3 = VERUM ) & ( b3 is Sub_atomic implies b2 . b3 = (the_pred_symbol_of (b3 `1 )) ! (CQC_Subst (Sub_the_arguments_of b3),(b3 `2 )) ) & ( b3 is Sub_negative implies b2 . b3 = 'not' (b2 . (Sub_the_argument_of b3)) ) & ( b3 is Sub_conjunctive implies b2 . b3 = (b2 . (Sub_the_left_argument_of b3)) '&' (b2 . (Sub_the_right_argument_of b3)) ) & ( b3 is Sub_universal implies b2 . b3 = Quant b3,(b2 . (Sub_the_scope_of b3)) ) ) ) )
uniqueness
for b1, b2 being Element of QC-WFF holds
( ex b3 being Function of QC-Sub-WFF , QC-WFF st
( b1 = b3 . c1 & ( for b4 being Element of QC-Sub-WFF holds
( ( b4 is Sub_VERUM implies b3 . b4 = VERUM ) & ( b4 is Sub_atomic implies b3 . b4 = (the_pred_symbol_of (b4 `1 )) ! (CQC_Subst (Sub_the_arguments_of b4),(b4 `2 )) ) & ( b4 is Sub_negative implies b3 . b4 = 'not' (b3 . (Sub_the_argument_of b4)) ) & ( b4 is Sub_conjunctive implies b3 . b4 = (b3 . (Sub_the_left_argument_of b4)) '&' (b3 . (Sub_the_right_argument_of b4)) ) & ( b4 is Sub_universal implies b3 . b4 = Quant b4,(b3 . (Sub_the_scope_of b4)) ) ) ) ) & ex b3 being Function of QC-Sub-WFF , QC-WFF st
( b2 = b3 . c1 & ( for b4 being Element of QC-Sub-WFF holds
( ( b4 is Sub_VERUM implies b3 . b4 = VERUM ) & ( b4 is Sub_atomic implies b3 . b4 = (the_pred_symbol_of (b4 `1 )) ! (CQC_Subst (Sub_the_arguments_of b4),(b4 `2 )) ) & ( b4 is Sub_negative implies b3 . b4 = 'not' (b3 . (Sub_the_argument_of b4)) ) & ( b4 is Sub_conjunctive implies b3 . b4 = (b3 . (Sub_the_left_argument_of b4)) '&' (b3 . (Sub_the_right_argument_of b4)) ) & ( b4 is Sub_universal implies b3 . b4 = Quant b4,(b3 . (Sub_the_scope_of b4)) ) ) ) ) implies b1 = b2 )
by Lemma45;
end;
:: deftheorem Def38 defines CQC_Sub SUBSTUT1:def 38 :
theorem Th28: :: SUBSTUT1:28
theorem Th29: :: SUBSTUT1:29
theorem Th30: :: SUBSTUT1:30
theorem Th31: :: SUBSTUT1:31
theorem Th32: :: SUBSTUT1:32
:: deftheorem Def39 defines CQC-Sub-WFF SUBSTUT1:def 39 :
theorem Th33: :: SUBSTUT1:33
Lemma53:
for b1 being Nat
for b2 being QC-pred_symbol of b1
for b3 being CQC-variable_list of b1 holds the_pred_symbol_of (b2 ! b3) = b2
theorem Th34: :: SUBSTUT1:34
theorem Th35: :: SUBSTUT1:35
theorem Th36: :: SUBSTUT1:36
theorem Th37: :: SUBSTUT1:37
theorem Th38: :: SUBSTUT1:38