begin
theorem
theorem Th2:
:: deftheorem defines QC-variables QC_LANG1:def 1 :
QC-variables = [:{4,5,6},NAT:];
theorem
canceled;
theorem Th4:
definition
mode QC-variable is Element of
QC-variables ;
func bound_QC-variables -> Subset of
QC-variables equals
[:{4},NAT:];
coherence
[:{4},NAT:] is Subset of QC-variables
func fixed_QC-variables -> Subset of
QC-variables equals
[:{5},NAT:];
coherence
[:{5},NAT:] is Subset of QC-variables
func free_QC-variables -> Subset of
QC-variables equals
[:{6},NAT:];
coherence
[:{6},NAT:] is Subset of QC-variables
func QC-pred_symbols -> set equals
{ [k,l] where k, l is Element of NAT : 7 <= k } ;
coherence
{ [k,l] where k, l is Element of NAT : 7 <= k } is set
;
end;
:: deftheorem defines bound_QC-variables QC_LANG1:def 2 :
bound_QC-variables = [:{4},NAT:];
:: deftheorem defines fixed_QC-variables QC_LANG1:def 3 :
fixed_QC-variables = [:{5},NAT:];
:: deftheorem defines free_QC-variables QC_LANG1:def 4 :
free_QC-variables = [:{6},NAT:];
:: deftheorem defines QC-pred_symbols QC_LANG1:def 5 :
QC-pred_symbols = { [k,l] where k, l is Element of NAT : 7 <= k } ;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem Th10:
:: deftheorem Def6 defines the_arity_of QC_LANG1:def 6 :
for P being Element of QC-pred_symbols
for b2 being Element of NAT holds
( b2 = the_arity_of P iff P `1 = 7 + b2 );
:: deftheorem defines -ary_QC-pred_symbols QC_LANG1:def 7 :
for k being Element of NAT holds k -ary_QC-pred_symbols = { P where P is QC-pred_symbol : the_arity_of P = k } ;
:: deftheorem QC_LANG1:def 8 :
canceled;
:: deftheorem Def9 defines QC-closed QC_LANG1:def 9 :
for D being set holds
( D is QC-closed iff ( D is Subset of ([:NAT,NAT:] *) & ( for k being Element of NAT
for p being QC-pred_symbol of k
for ll being QC-variable_list of k holds <*p*> ^ ll in D ) & <*[0,0]*> in D & ( for p being FinSequence of [:NAT,NAT:] st p in D holds
<*[1,0]*> ^ p in D ) & ( for p, q being FinSequence of [:NAT,NAT:] st p in D & q in D holds
(<*[2,0]*> ^ p) ^ q in D ) & ( for x being bound_QC-variable
for p being FinSequence of [:NAT,NAT:] st p in D holds
(<*[3,0]*> ^ <*x*>) ^ p in D ) ) );
Lm1:
for k, l being Element of NAT holds <*[k,l]*> is FinSequence of [:NAT,NAT:]
Lm2:
for k being Element of NAT
for p being QC-pred_symbol of k
for ll being QC-variable_list of k holds <*p*> ^ ll is FinSequence of [:NAT,NAT:]
Lm3:
for x being bound_QC-variable
for p being FinSequence of [:NAT,NAT:] holds (<*[3,0]*> ^ <*x*>) ^ p is FinSequence of [:NAT,NAT:]
:: deftheorem Def10 defines QC-WFF QC_LANG1:def 10 :
for b1 being non empty set holds
( b1 = QC-WFF iff ( b1 is QC-closed & ( for D being non empty set st D is QC-closed holds
b1 c= D ) ) );
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem Th21:
:: deftheorem Def11 defines ! QC_LANG1:def 11 :
for P being QC-pred_symbol
for l being FinSequence of QC-variables st the_arity_of P = len l holds
P ! l = <*P*> ^ l;
theorem
canceled;
theorem Th23:
:: deftheorem defines @ QC_LANG1:def 12 :
for p being Element of QC-WFF holds @ p = p;
:: deftheorem defines VERUM QC_LANG1:def 13 :
VERUM = <*[0,0]*>;
:: deftheorem defines 'not' QC_LANG1:def 14 :
for p being Element of QC-WFF holds 'not' p = <*[1,0]*> ^ (@ p);
:: deftheorem defines '&' QC_LANG1:def 15 :
for p, q being Element of QC-WFF holds p '&' q = (<*[2,0]*> ^ (@ p)) ^ (@ q);
:: deftheorem defines All QC_LANG1:def 16 :
for x being bound_QC-variable
for p being Element of QC-WFF holds All (x,p) = (<*[3,0]*> ^ <*x*>) ^ (@ p);
:: deftheorem Def17 defines atomic QC_LANG1:def 17 :
for F being Element of QC-WFF holds
( F is atomic iff ex k being Element of NAT ex p being QC-pred_symbol of k ex ll being QC-variable_list of k st F = p ! ll );
:: deftheorem Def18 defines negative QC_LANG1:def 18 :
for F being Element of QC-WFF holds
( F is negative iff ex p being Element of QC-WFF st F = 'not' p );
:: deftheorem Def19 defines conjunctive QC_LANG1:def 19 :
for F being Element of QC-WFF holds
( F is conjunctive iff ex p, q being Element of QC-WFF st F = p '&' q );
:: deftheorem Def20 defines universal QC_LANG1:def 20 :
for F being Element of QC-WFF holds
( F is universal iff ex x being bound_QC-variable ex p being Element of QC-WFF st F = All (x,p) );
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem Th33:
theorem Th34:
theorem Th35:
theorem Th36:
theorem Th37:
:: deftheorem Def21 defines the_pred_symbol_of QC_LANG1:def 21 :
for F being Element of QC-WFF st F is atomic holds
for b2 being QC-pred_symbol holds
( b2 = the_pred_symbol_of F iff ex k being Element of NAT ex ll being QC-variable_list of k ex P being QC-pred_symbol of k st
( b2 = P & F = P ! ll ) );
:: deftheorem Def22 defines the_arguments_of QC_LANG1:def 22 :
for F being Element of QC-WFF st F is atomic holds
for b2 being FinSequence of QC-variables holds
( b2 = the_arguments_of F iff ex k being Element of NAT ex P being QC-pred_symbol of k ex ll being QC-variable_list of k st
( b2 = ll & F = P ! ll ) );
:: deftheorem Def23 defines the_argument_of QC_LANG1:def 23 :
for F being Element of QC-WFF st F is negative holds
for b2 being QC-formula holds
( b2 = the_argument_of F iff F = 'not' b2 );
:: deftheorem Def24 defines the_left_argument_of QC_LANG1:def 24 :
for F being Element of QC-WFF st F is conjunctive holds
for b2 being QC-formula holds
( b2 = the_left_argument_of F iff ex q being Element of QC-WFF st F = b2 '&' q );
:: deftheorem Def25 defines the_right_argument_of QC_LANG1:def 25 :
for F being Element of QC-WFF st F is conjunctive holds
for b2 being QC-formula holds
( b2 = the_right_argument_of F iff ex p being Element of QC-WFF st F = p '&' b2 );
definition
let F be
Element of
QC-WFF ;
assume A1:
F is
universal
;
func bound_in F -> bound_QC-variable means :
Def26:
ex
p being
Element of
QC-WFF st
F = All (
it,
p);
existence
ex b1 being bound_QC-variable ex p being Element of QC-WFF st F = All (b1,p)
by A1, Def20;
uniqueness
for b1, b2 being bound_QC-variable st ex p being Element of QC-WFF st F = All (b1,p) & ex p being Element of QC-WFF st F = All (b2,p) holds
b1 = b2
func the_scope_of F -> QC-formula means :
Def27:
ex
x being
bound_QC-variable st
F = All (
x,
it);
existence
ex b1 being QC-formula ex x being bound_QC-variable st F = All (x,b1)
uniqueness
for b1, b2 being QC-formula st ex x being bound_QC-variable st F = All (x,b1) & ex x being bound_QC-variable st F = All (x,b2) holds
b1 = b2
end;
:: deftheorem Def26 defines bound_in QC_LANG1:def 26 :
for F being Element of QC-WFF st F is universal holds
for b2 being bound_QC-variable holds
( b2 = bound_in F iff ex p being Element of QC-WFF st F = All (b2,p) );
:: deftheorem Def27 defines the_scope_of QC_LANG1:def 27 :
for F being Element of QC-WFF st F is universal holds
for b2 being QC-formula holds
( b2 = the_scope_of F iff ex x being bound_QC-variable st F = All (x,b2) );
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem Th45:
theorem Th46:
theorem Th47:
theorem Th48:
theorem Th49:
theorem Th50:
theorem Th51:
:: deftheorem defines still_not-bound_in QC_LANG1:def 28 :
for ll being FinSequence of QC-variables holds still_not-bound_in ll = { (ll . k) where k is Element of NAT : ( 1 <= k & k <= len ll & ll . k in bound_QC-variables ) } ;
:: deftheorem defines still_not-bound_in QC_LANG1:def 29 :
for p being QC-formula
for b2 being Subset of bound_QC-variables holds
( b2 = still_not-bound_in p iff ex F being Function of QC-WFF,(bool bound_QC-variables) st
( b2 = F . p & ( for p being Element of QC-WFF holds
( F . VERUM = {} & ( p is atomic implies F . p = { ((the_arguments_of p) . k) where k is Element of NAT : ( 1 <= k & k <= len (the_arguments_of p) & (the_arguments_of p) . k in bound_QC-variables ) } ) & ( p is negative implies F . p = F . (the_argument_of p) ) & ( p is conjunctive implies F . p = (F . (the_left_argument_of p)) \/ (F . (the_right_argument_of p)) ) & ( p is universal implies F . p = (F . (the_scope_of p)) \ {(bound_in p)} ) ) ) ) );
:: deftheorem defines closed QC_LANG1:def 30 :
for p being QC-formula holds
( p is closed iff still_not-bound_in p = {} );