:: QC_LANG2 semantic presentation

theorem Th1: :: QC_LANG2:1
for b1, b2 being Element of QC-WFF st 'not' b1 = 'not' b2 holds
b1 = b2 by FINSEQ_1:46;

theorem Th2: :: QC_LANG2:2
for b1 being Element of QC-WFF holds the_argument_of ('not' b1) = b1
proof end;

theorem Th3: :: QC_LANG2:3
for b1, b2, b3, b4 being Element of QC-WFF st b1 '&' b2 = b3 '&' b4 holds
( b1 = b3 & b2 = b4 )
proof end;

theorem Th4: :: QC_LANG2:4
for b1 being Element of QC-WFF st b1 is conjunctive holds
b1 = (the_left_argument_of b1) '&' (the_right_argument_of b1)
proof end;

theorem Th5: :: QC_LANG2:5
for b1, b2 being Element of QC-WFF holds
( the_left_argument_of (b1 '&' b2) = b1 & the_right_argument_of (b1 '&' b2) = b2 )
proof end;

theorem Th6: :: QC_LANG2:6
for b1, b2 being bound_QC-variable
for b3, b4 being Element of QC-WFF st All b1,b3 = All b2,b4 holds
( b1 = b2 & b3 = b4 )
proof end;

theorem Th7: :: QC_LANG2:7
for b1 being Element of QC-WFF st b1 is universal holds
b1 = All (bound_in b1),(the_scope_of b1)
proof end;

theorem Th8: :: QC_LANG2:8
for b1 being bound_QC-variable
for b2 being Element of QC-WFF holds
( bound_in (All b1,b2) = b1 & the_scope_of (All b1,b2) = b2 )
proof end;

definition
func FALSUM -> QC-formula equals :: QC_LANG2:def 1
'not' VERUM ;
correctness
coherence
'not' VERUM is QC-formula
;
;
let c1, c2 be Element of QC-WFF ;
func c1 => c2 -> QC-formula equals :: QC_LANG2:def 2
'not' (a1 '&' ('not' a2));
correctness
coherence
'not' (c1 '&' ('not' c2)) is QC-formula
;
;
func c1 'or' c2 -> QC-formula equals :: QC_LANG2:def 3
'not' (('not' a1) '&' ('not' a2));
correctness
coherence
'not' (('not' c1) '&' ('not' c2)) is QC-formula
;
;
end;

:: deftheorem Def1 defines FALSUM QC_LANG2:def 1 :
FALSUM = 'not' VERUM ;

:: deftheorem Def2 defines => QC_LANG2:def 2 :
for b1, b2 being Element of QC-WFF holds b1 => b2 = 'not' (b1 '&' ('not' b2));

:: deftheorem Def3 defines 'or' QC_LANG2:def 3 :
for b1, b2 being Element of QC-WFF holds b1 'or' b2 = 'not' (('not' b1) '&' ('not' b2));

definition
let c1, c2 be Element of QC-WFF ;
func c1 <=> c2 -> QC-formula equals :: QC_LANG2:def 4
(a1 => a2) '&' (a2 => a1);
correctness
coherence
(c1 => c2) '&' (c2 => c1) is QC-formula
;
;
end;

:: deftheorem Def4 defines <=> QC_LANG2:def 4 :
for b1, b2 being Element of QC-WFF holds b1 <=> b2 = (b1 => b2) '&' (b2 => b1);

definition
let c1 be bound_QC-variable;
let c2 be Element of QC-WFF ;
func Ex c1,c2 -> QC-formula equals :: QC_LANG2:def 5
'not' (All a1,('not' a2));
correctness
coherence
'not' (All c1,('not' c2)) is QC-formula
;
;
end;

:: deftheorem Def5 defines Ex QC_LANG2:def 5 :
for b1 being bound_QC-variable
for b2 being Element of QC-WFF holds Ex b1,b2 = 'not' (All b1,('not' b2));

theorem Th9: :: QC_LANG2:9
canceled;

theorem Th10: :: QC_LANG2:10
canceled;

theorem Th11: :: QC_LANG2:11
canceled;

theorem Th12: :: QC_LANG2:12
canceled;

theorem Th13: :: QC_LANG2:13
( FALSUM is negative & the_argument_of FALSUM = VERUM ) by Th2, QC_LANG1:def 18;

theorem Th14: :: QC_LANG2:14
for b1, b2 being Element of QC-WFF holds b1 'or' b2 = ('not' b1) => b2 ;

theorem Th15: :: QC_LANG2:15
canceled;

theorem Th16: :: QC_LANG2:16
for b1, b2, b3, b4 being Element of QC-WFF st b1 'or' b2 = b3 'or' b4 holds
( b1 = b3 & b2 = b4 )
proof end;

theorem Th17: :: QC_LANG2:17
for b1, b2, b3, b4 being Element of QC-WFF st b1 => b2 = b3 => b4 holds
( b1 = b3 & b2 = b4 )
proof end;

theorem Th18: :: QC_LANG2:18
for b1, b2, b3, b4 being Element of QC-WFF st b1 <=> b2 = b3 <=> b4 holds
( b1 = b3 & b2 = b4 )
proof end;

theorem Th19: :: QC_LANG2:19
for b1, b2 being bound_QC-variable
for b3, b4 being Element of QC-WFF st Ex b1,b3 = Ex b2,b4 holds
( b1 = b2 & b3 = b4 )
proof end;

definition
let c1, c2 be bound_QC-variable;
let c3 be Element of QC-WFF ;
func All c1,c2,c3 -> QC-formula equals :: QC_LANG2:def 6
All a1,(All a2,a3);
correctness
coherence
All c1,(All c2,c3) is QC-formula
;
;
func Ex c1,c2,c3 -> QC-formula equals :: QC_LANG2:def 7
Ex a1,(Ex a2,a3);
correctness
coherence
Ex c1,(Ex c2,c3) is QC-formula
;
;
end;

:: deftheorem Def6 defines All QC_LANG2:def 6 :
for b1, b2 being bound_QC-variable
for b3 being Element of QC-WFF holds All b1,b2,b3 = All b1,(All b2,b3);

:: deftheorem Def7 defines Ex QC_LANG2:def 7 :
for b1, b2 being bound_QC-variable
for b3 being Element of QC-WFF holds Ex b1,b2,b3 = Ex b1,(Ex b2,b3);

theorem Th20: :: QC_LANG2:20
for b1, b2 being bound_QC-variable
for b3 being Element of QC-WFF holds
( All b1,b2,b3 = All b1,(All b2,b3) & Ex b1,b2,b3 = Ex b1,(Ex b2,b3) ) ;

theorem Th21: :: QC_LANG2:21
for b1, b2 being Element of QC-WFF
for b3, b4, b5, b6 being bound_QC-variable st All b3,b5,b1 = All b4,b6,b2 holds
( b3 = b4 & b5 = b6 & b1 = b2 )
proof end;

theorem Th22: :: QC_LANG2:22
for b1, b2, b3 being bound_QC-variable
for b4, b5 being Element of QC-WFF st All b1,b2,b4 = All b3,b5 holds
( b1 = b3 & All b2,b4 = b5 ) by Th6;

theorem Th23: :: QC_LANG2:23
for b1, b2 being Element of QC-WFF
for b3, b4, b5, b6 being bound_QC-variable st Ex b3,b5,b1 = Ex b4,b6,b2 holds
( b3 = b4 & b5 = b6 & b1 = b2 )
proof end;

theorem Th24: :: QC_LANG2:24
for b1, b2, b3 being bound_QC-variable
for b4, b5 being Element of QC-WFF st Ex b1,b2,b4 = Ex b3,b5 holds
( b1 = b3 & Ex b2,b4 = b5 ) by Th19;

theorem Th25: :: QC_LANG2:25
for b1, b2 being bound_QC-variable
for b3 being Element of QC-WFF holds
( All b1,b2,b3 is universal & bound_in (All b1,b2,b3) = b1 & the_scope_of (All b1,b2,b3) = All b2,b3 ) by Th8, QC_LANG1:def 20;

definition
let c1, c2, c3 be bound_QC-variable;
let c4 be Element of QC-WFF ;
func All c1,c2,c3,c4 -> QC-formula equals :: QC_LANG2:def 8
All a1,(All a2,a3,a4);
correctness
coherence
All c1,(All c2,c3,c4) is QC-formula
;
;
func Ex c1,c2,c3,c4 -> QC-formula equals :: QC_LANG2:def 9
Ex a1,(Ex a2,a3,a4);
correctness
coherence
Ex c1,(Ex c2,c3,c4) is QC-formula
;
;
end;

:: deftheorem Def8 defines All QC_LANG2:def 8 :
for b1, b2, b3 being bound_QC-variable
for b4 being Element of QC-WFF holds All b1,b2,b3,b4 = All b1,(All b2,b3,b4);

:: deftheorem Def9 defines Ex QC_LANG2:def 9 :
for b1, b2, b3 being bound_QC-variable
for b4 being Element of QC-WFF holds Ex b1,b2,b3,b4 = Ex b1,(Ex b2,b3,b4);

theorem Th26: :: QC_LANG2:26
for b1, b2, b3 being bound_QC-variable
for b4 being Element of QC-WFF holds
( All b1,b2,b3,b4 = All b1,(All b2,b3,b4) & Ex b1,b2,b3,b4 = Ex b1,(Ex b2,b3,b4) ) ;

theorem Th27: :: QC_LANG2:27
for b1, b2 being Element of QC-WFF
for b3, b4, b5, b6, b7, b8 being bound_QC-variable st All b3,b5,b7,b1 = All b4,b6,b8,b2 holds
( b3 = b4 & b5 = b6 & b7 = b8 & b1 = b2 )
proof end;

theorem Th28: :: QC_LANG2:28
for b1, b2, b3 being bound_QC-variable
for b4, b5 being Element of QC-WFF
for b6 being bound_QC-variable st All b1,b2,b3,b4 = All b6,b5 holds
( b1 = b6 & All b2,b3,b4 = b5 ) by Th6;

theorem Th29: :: QC_LANG2:29
for b1, b2, b3 being bound_QC-variable
for b4, b5 being Element of QC-WFF
for b6, b7 being bound_QC-variable st All b1,b2,b3,b4 = All b6,b7,b5 holds
( b1 = b6 & b2 = b7 & All b3,b4 = b5 )
proof end;

theorem Th30: :: QC_LANG2:30
for b1, b2 being Element of QC-WFF
for b3, b4, b5, b6, b7, b8 being bound_QC-variable st Ex b3,b5,b7,b1 = Ex b4,b6,b8,b2 holds
( b3 = b4 & b5 = b6 & b7 = b8 & b1 = b2 )
proof end;

theorem Th31: :: QC_LANG2:31
for b1, b2, b3 being bound_QC-variable
for b4, b5 being Element of QC-WFF
for b6 being bound_QC-variable st Ex b1,b2,b3,b4 = Ex b6,b5 holds
( b1 = b6 & Ex b2,b3,b4 = b5 ) by Th19;

theorem Th32: :: QC_LANG2:32
for b1, b2, b3 being bound_QC-variable
for b4, b5 being Element of QC-WFF
for b6, b7 being bound_QC-variable st Ex b1,b2,b3,b4 = Ex b6,b7,b5 holds
( b1 = b6 & b2 = b7 & Ex b3,b4 = b5 )
proof end;

theorem Th33: :: QC_LANG2:33
for b1, b2, b3 being bound_QC-variable
for b4 being Element of QC-WFF holds
( All b1,b2,b3,b4 is universal & bound_in (All b1,b2,b3,b4) = b1 & the_scope_of (All b1,b2,b3,b4) = All b2,b3,b4 ) by Th8, QC_LANG1:def 20;

definition
let c1 be Element of QC-WFF ;
attr a1 is disjunctive means :: QC_LANG2:def 10
ex b1, b2 being Element of QC-WFF st a1 = b1 'or' b2;
attr a1 is conditional means :Def11: :: QC_LANG2:def 11
ex b1, b2 being Element of QC-WFF st a1 = b1 => b2;
attr a1 is biconditional means :: QC_LANG2:def 12
ex b1, b2 being Element of QC-WFF st a1 = b1 <=> b2;
attr a1 is existential means :Def13: :: QC_LANG2:def 13
ex b1 being bound_QC-variableex b2 being Element of QC-WFF st a1 = Ex b1,b2;
end;

:: deftheorem Def10 defines disjunctive QC_LANG2:def 10 :
for b1 being Element of QC-WFF holds
( b1 is disjunctive iff ex b2, b3 being Element of QC-WFF st b1 = b2 'or' b3 );

:: deftheorem Def11 defines conditional QC_LANG2:def 11 :
for b1 being Element of QC-WFF holds
( b1 is conditional iff ex b2, b3 being Element of QC-WFF st b1 = b2 => b3 );

:: deftheorem Def12 defines biconditional QC_LANG2:def 12 :
for b1 being Element of QC-WFF holds
( b1 is biconditional iff ex b2, b3 being Element of QC-WFF st b1 = b2 <=> b3 );

:: deftheorem Def13 defines existential QC_LANG2:def 13 :
for b1 being Element of QC-WFF holds
( b1 is existential iff ex b2 being bound_QC-variableex b3 being Element of QC-WFF st b1 = Ex b2,b3 );

theorem Th34: :: QC_LANG2:34
canceled;

theorem Th35: :: QC_LANG2:35
canceled;

theorem Th36: :: QC_LANG2:36
canceled;

theorem Th37: :: QC_LANG2:37
canceled;

theorem Th38: :: QC_LANG2:38
for b1, b2, b3 being bound_QC-variable
for b4 being Element of QC-WFF holds
( Ex b1,b2,b4 is existential & Ex b1,b2,b3,b4 is existential ) by Def13;

definition
let c1 be Element of QC-WFF ;
func the_left_disjunct_of c1 -> QC-formula equals :: QC_LANG2:def 14
the_argument_of (the_left_argument_of (the_argument_of a1));
correctness
coherence
the_argument_of (the_left_argument_of (the_argument_of c1)) is QC-formula
;
;
func the_right_disjunct_of c1 -> QC-formula equals :: QC_LANG2:def 15
the_argument_of (the_right_argument_of (the_argument_of a1));
correctness
coherence
the_argument_of (the_right_argument_of (the_argument_of c1)) is QC-formula
;
;
func the_antecedent_of c1 -> QC-formula equals :: QC_LANG2:def 16
the_left_argument_of (the_argument_of a1);
correctness
coherence
the_left_argument_of (the_argument_of c1) is QC-formula
;
;
end;

:: deftheorem Def14 defines the_left_disjunct_of QC_LANG2:def 14 :
for b1 being Element of QC-WFF holds the_left_disjunct_of b1 = the_argument_of (the_left_argument_of (the_argument_of b1));

:: deftheorem Def15 defines the_right_disjunct_of QC_LANG2:def 15 :
for b1 being Element of QC-WFF holds the_right_disjunct_of b1 = the_argument_of (the_right_argument_of (the_argument_of b1));

:: deftheorem Def16 defines the_antecedent_of QC_LANG2:def 16 :
for b1 being Element of QC-WFF holds the_antecedent_of b1 = the_left_argument_of (the_argument_of b1);

notation
let c1 be Element of QC-WFF ;
synonym the_consequent_of c1 for the_right_disjunct_of c1;
end;

definition
let c1 be Element of QC-WFF ;
canceled;
func the_left_side_of c1 -> QC-formula equals :: QC_LANG2:def 18
the_antecedent_of (the_left_argument_of a1);
correctness
coherence
the_antecedent_of (the_left_argument_of c1) is QC-formula
;
;
func the_right_side_of c1 -> QC-formula equals :: QC_LANG2:def 19
the_consequent_of (the_left_argument_of a1);
correctness
coherence
the_consequent_of (the_left_argument_of c1) is QC-formula
;
;
end;

:: deftheorem Def17 QC_LANG2:def 17 :
canceled;

:: deftheorem Def18 defines the_left_side_of QC_LANG2:def 18 :
for b1 being Element of QC-WFF holds the_left_side_of b1 = the_antecedent_of (the_left_argument_of b1);

:: deftheorem Def19 defines the_right_side_of QC_LANG2:def 19 :
for b1 being Element of QC-WFF holds the_right_side_of b1 = the_consequent_of (the_left_argument_of b1);

theorem Th39: :: QC_LANG2:39
canceled;

theorem Th40: :: QC_LANG2:40
canceled;

theorem Th41: :: QC_LANG2:41
canceled;

theorem Th42: :: QC_LANG2:42
canceled;

theorem Th43: :: QC_LANG2:43
canceled;

theorem Th44: :: QC_LANG2:44
canceled;

theorem Th45: :: QC_LANG2:45
for b1, b2 being Element of QC-WFF holds
( the_left_disjunct_of (b1 'or' b2) = b1 & the_right_disjunct_of (b1 'or' b2) = b2 & the_argument_of (b1 'or' b2) = ('not' b1) '&' ('not' b2) )
proof end;

theorem Th46: :: QC_LANG2:46
for b1, b2 being Element of QC-WFF holds
( the_antecedent_of (b1 => b2) = b1 & the_consequent_of (b1 => b2) = b2 & the_argument_of (b1 => b2) = b1 '&' ('not' b2) )
proof end;

theorem Th47: :: QC_LANG2:47
for b1, b2 being Element of QC-WFF holds
( the_left_side_of (b1 <=> b2) = b1 & the_right_side_of (b1 <=> b2) = b2 & the_left_argument_of (b1 <=> b2) = b1 => b2 & the_right_argument_of (b1 <=> b2) = b2 => b1 )
proof end;

theorem Th48: :: QC_LANG2:48
for b1 being bound_QC-variable
for b2 being Element of QC-WFF holds the_argument_of (Ex b1,b2) = All b1,('not' b2) by Th2;

theorem Th49: :: QC_LANG2:49
for b1 being Element of QC-WFF st b1 is disjunctive holds
( b1 is conditional & b1 is negative & the_argument_of b1 is conjunctive & the_left_argument_of (the_argument_of b1) is negative & the_right_argument_of (the_argument_of b1) is negative )
proof end;

theorem Th50: :: QC_LANG2:50
for b1 being Element of QC-WFF st b1 is conditional holds
( b1 is negative & the_argument_of b1 is conjunctive & the_right_argument_of (the_argument_of b1) is negative )
proof end;

theorem Th51: :: QC_LANG2:51
for b1 being Element of QC-WFF st b1 is biconditional holds
( b1 is conjunctive & the_left_argument_of b1 is conditional & the_right_argument_of b1 is conditional )
proof end;

theorem Th52: :: QC_LANG2:52
for b1 being Element of QC-WFF st b1 is existential holds
( b1 is negative & the_argument_of b1 is universal & the_scope_of (the_argument_of b1) is negative )
proof end;

theorem Th53: :: QC_LANG2:53
for b1 being Element of QC-WFF st b1 is disjunctive holds
b1 = (the_left_disjunct_of b1) 'or' (the_right_disjunct_of b1)
proof end;

theorem Th54: :: QC_LANG2:54
for b1 being Element of QC-WFF st b1 is conditional holds
b1 = (the_antecedent_of b1) => (the_consequent_of b1)
proof end;

theorem Th55: :: QC_LANG2:55
for b1 being Element of QC-WFF st b1 is biconditional holds
b1 = (the_left_side_of b1) <=> (the_right_side_of b1)
proof end;

theorem Th56: :: QC_LANG2:56
for b1 being Element of QC-WFF st b1 is existential holds
b1 = Ex (bound_in (the_argument_of b1)),(the_argument_of (the_scope_of (the_argument_of b1)))
proof end;

definition
let c1, c2 be Element of QC-WFF ;
pred c1 is_immediate_constituent_of c2 means :Def20: :: QC_LANG2:def 20
( a2 = 'not' a1 or ex b1 being Element of QC-WFF st
( a2 = a1 '&' b1 or a2 = b1 '&' a1 ) or ex b1 being bound_QC-variable st a2 = All b1,a1 );
end;

:: deftheorem Def20 defines is_immediate_constituent_of QC_LANG2:def 20 :
for b1, b2 being Element of QC-WFF holds
( b1 is_immediate_constituent_of b2 iff ( b2 = 'not' b1 or ex b3 being Element of QC-WFF st
( b2 = b1 '&' b3 or b2 = b3 '&' b1 ) or ex b3 being bound_QC-variable st b2 = All b3,b1 ) );

theorem Th57: :: QC_LANG2:57
canceled;

theorem Th58: :: QC_LANG2:58
for b1 being Element of QC-WFF holds not b1 is_immediate_constituent_of VERUM
proof end;

theorem Th59: :: QC_LANG2:59
for b1 being Element of QC-WFF
for b2 being Nat
for b3 being QC-pred_symbol of b2
for b4 being QC-variable_list of b2 holds not b1 is_immediate_constituent_of b3 ! b4
proof end;

theorem Th60: :: QC_LANG2:60
for b1, b2 being Element of QC-WFF holds
( b1 is_immediate_constituent_of 'not' b2 iff b1 = b2 )
proof end;

theorem Th61: :: QC_LANG2:61
for b1 being Element of QC-WFF holds
( b1 is_immediate_constituent_of FALSUM iff b1 = VERUM ) by Th60;

theorem Th62: :: QC_LANG2:62
for b1, b2, b3 being Element of QC-WFF holds
( b1 is_immediate_constituent_of b2 '&' b3 iff ( b1 = b2 or b1 = b3 ) )
proof end;

theorem Th63: :: QC_LANG2:63
for b1, b2 being Element of QC-WFF
for b3 being bound_QC-variable holds
( b1 is_immediate_constituent_of All b3,b2 iff b1 = b2 )
proof end;

theorem Th64: :: QC_LANG2:64
for b1, b2 being Element of QC-WFF st b1 is atomic holds
not b2 is_immediate_constituent_of b1
proof end;

theorem Th65: :: QC_LANG2:65
for b1, b2 being Element of QC-WFF st b1 is negative holds
( b2 is_immediate_constituent_of b1 iff b2 = the_argument_of b1 )
proof end;

theorem Th66: :: QC_LANG2:66
for b1, b2 being Element of QC-WFF st b1 is conjunctive holds
( b2 is_immediate_constituent_of b1 iff ( b2 = the_left_argument_of b1 or b2 = the_right_argument_of b1 ) )
proof end;

theorem Th67: :: QC_LANG2:67
for b1, b2 being Element of QC-WFF st b1 is universal holds
( b2 is_immediate_constituent_of b1 iff b2 = the_scope_of b1 )
proof end;

definition
let c1, c2 be Element of QC-WFF ;
pred c1 is_subformula_of c2 means :Def21: :: QC_LANG2:def 21
ex b1 being Natex b2 being FinSequence st
( 1 <= b1 & len b2 = b1 & b2 . 1 = a1 & b2 . b1 = a2 & ( for b3 being Nat st 1 <= b3 & b3 < b1 holds
ex b4, b5 being Element of QC-WFF st
( b2 . b3 = b4 & b2 . (b3 + 1) = b5 & b4 is_immediate_constituent_of b5 ) ) );
reflexivity
for b1 being Element of QC-WFF ex b2 being Natex b3 being FinSequence st
( 1 <= b2 & len b3 = b2 & b3 . 1 = b1 & b3 . b2 = b1 & ( for b4 being Nat st 1 <= b4 & b4 < b2 holds
ex b5, b6 being Element of QC-WFF st
( b3 . b4 = b5 & b3 . (b4 + 1) = b6 & b5 is_immediate_constituent_of b6 ) ) )
proof end;
end;

:: deftheorem Def21 defines is_subformula_of QC_LANG2:def 21 :
for b1, b2 being Element of QC-WFF holds
( b1 is_subformula_of b2 iff ex b3 being Natex b4 being FinSequence st
( 1 <= b3 & len b4 = b3 & b4 . 1 = b1 & b4 . b3 = b2 & ( for b5 being Nat st 1 <= b5 & b5 < b3 holds
ex b6, b7 being Element of QC-WFF st
( b4 . b5 = b6 & b4 . (b5 + 1) = b7 & b6 is_immediate_constituent_of b7 ) ) ) );

definition
let c1, c2 be Element of QC-WFF ;
pred c1 is_proper_subformula_of c2 means :Def22: :: QC_LANG2:def 22
( a1 is_subformula_of a2 & a1 <> a2 );
irreflexivity
for b1 being Element of QC-WFF holds
( not b1 is_subformula_of b1 or not b1 <> b1 )
;
end;

:: deftheorem Def22 defines is_proper_subformula_of QC_LANG2:def 22 :
for b1, b2 being Element of QC-WFF holds
( b1 is_proper_subformula_of b2 iff ( b1 is_subformula_of b2 & b1 <> b2 ) );

theorem Th68: :: QC_LANG2:68
canceled;

theorem Th69: :: QC_LANG2:69
canceled;

theorem Th70: :: QC_LANG2:70
canceled;

theorem Th71: :: QC_LANG2:71
for b1, b2 being Element of QC-WFF st b1 is_immediate_constituent_of b2 holds
len (@ b1) < len (@ b2)
proof end;

theorem Th72: :: QC_LANG2:72
for b1, b2 being Element of QC-WFF st b1 is_immediate_constituent_of b2 holds
b1 is_subformula_of b2
proof end;

theorem Th73: :: QC_LANG2:73
for b1, b2 being Element of QC-WFF st b1 is_immediate_constituent_of b2 holds
b1 is_proper_subformula_of b2
proof end;

theorem Th74: :: QC_LANG2:74
for b1, b2 being Element of QC-WFF st b1 is_proper_subformula_of b2 holds
len (@ b1) < len (@ b2)
proof end;

theorem Th75: :: QC_LANG2:75
for b1, b2 being Element of QC-WFF st b1 is_proper_subformula_of b2 holds
ex b3 being Element of QC-WFF st b3 is_immediate_constituent_of b2
proof end;

theorem Th76: :: QC_LANG2:76
for b1, b2, b3 being Element of QC-WFF st b1 is_proper_subformula_of b2 & b2 is_proper_subformula_of b3 holds
b1 is_proper_subformula_of b3
proof end;

theorem Th77: :: QC_LANG2:77
for b1, b2, b3 being Element of QC-WFF st b1 is_subformula_of b2 & b2 is_subformula_of b3 holds
b1 is_subformula_of b3
proof end;

theorem Th78: :: QC_LANG2:78
for b1, b2 being Element of QC-WFF st b1 is_subformula_of b2 & b2 is_subformula_of b1 holds
b1 = b2
proof end;

theorem Th79: :: QC_LANG2:79
for b1, b2 being Element of QC-WFF holds
( not b1 is_proper_subformula_of b2 or not b2 is_subformula_of b1 )
proof end;

theorem Th80: :: QC_LANG2:80
for b1, b2 being Element of QC-WFF holds
( not b1 is_proper_subformula_of b2 or not b2 is_proper_subformula_of b1 )
proof end;

theorem Th81: :: QC_LANG2:81
for b1, b2 being Element of QC-WFF holds
( not b1 is_subformula_of b2 or not b2 is_immediate_constituent_of b1 )
proof end;

theorem Th82: :: QC_LANG2:82
for b1, b2 being Element of QC-WFF holds
( not b1 is_proper_subformula_of b2 or not b2 is_immediate_constituent_of b1 )
proof end;

theorem Th83: :: QC_LANG2:83
for b1, b2, b3 being Element of QC-WFF st ( ( b1 is_proper_subformula_of b2 & b2 is_subformula_of b3 ) or ( b1 is_subformula_of b2 & b2 is_proper_subformula_of b3 ) or ( b1 is_subformula_of b2 & b2 is_immediate_constituent_of b3 ) or ( b1 is_immediate_constituent_of b2 & b2 is_subformula_of b3 ) or ( b1 is_proper_subformula_of b2 & b2 is_immediate_constituent_of b3 ) or ( b1 is_immediate_constituent_of b2 & b2 is_proper_subformula_of b3 ) ) holds
b1 is_proper_subformula_of b3
proof end;

theorem Th84: :: QC_LANG2:84
for b1 being Element of QC-WFF holds not b1 is_proper_subformula_of VERUM by Th58, Th75;

theorem Th85: :: QC_LANG2:85
for b1 being Element of QC-WFF
for b2 being Nat
for b3 being QC-pred_symbol of b2
for b4 being QC-variable_list of b2 holds not b1 is_proper_subformula_of b3 ! b4
proof end;

theorem Th86: :: QC_LANG2:86
for b1, b2 being Element of QC-WFF holds
( b1 is_subformula_of b2 iff b1 is_proper_subformula_of 'not' b2 )
proof end;

theorem Th87: :: QC_LANG2:87
for b1, b2 being Element of QC-WFF st 'not' b1 is_subformula_of b2 holds
b1 is_proper_subformula_of b2
proof end;

theorem Th88: :: QC_LANG2:88
for b1 being Element of QC-WFF holds
( b1 is_proper_subformula_of FALSUM iff b1 is_subformula_of VERUM ) by Th86;

theorem Th89: :: QC_LANG2:89
for b1, b2, b3 being Element of QC-WFF holds
( ( b1 is_subformula_of b2 or b1 is_subformula_of b3 ) iff b1 is_proper_subformula_of b2 '&' b3 )
proof end;

theorem Th90: :: QC_LANG2:90
for b1, b2, b3 being Element of QC-WFF st b1 '&' b2 is_subformula_of b3 holds
( b1 is_proper_subformula_of b3 & b2 is_proper_subformula_of b3 )
proof end;

theorem Th91: :: QC_LANG2:91
for b1, b2 being Element of QC-WFF
for b3 being bound_QC-variable holds
( b1 is_subformula_of b2 iff b1 is_proper_subformula_of All b3,b2 )
proof end;

theorem Th92: :: QC_LANG2:92
for b1, b2 being Element of QC-WFF
for b3 being bound_QC-variable st All b3,b1 is_subformula_of b2 holds
b1 is_proper_subformula_of b2
proof end;

theorem Th93: :: QC_LANG2:93
for b1, b2 being Element of QC-WFF holds
( b1 '&' ('not' b2) is_proper_subformula_of b1 => b2 & b1 is_proper_subformula_of b1 => b2 & 'not' b2 is_proper_subformula_of b1 => b2 & b2 is_proper_subformula_of b1 => b2 )
proof end;

theorem Th94: :: QC_LANG2:94
for b1, b2 being Element of QC-WFF holds
( ('not' b1) '&' ('not' b2) is_proper_subformula_of b1 'or' b2 & 'not' b1 is_proper_subformula_of b1 'or' b2 & 'not' b2 is_proper_subformula_of b1 'or' b2 & b1 is_proper_subformula_of b1 'or' b2 & b2 is_proper_subformula_of b1 'or' b2 )
proof end;

theorem Th95: :: QC_LANG2:95
for b1, b2 being Element of QC-WFF st b1 is atomic holds
not b2 is_proper_subformula_of b1
proof end;

theorem Th96: :: QC_LANG2:96
for b1 being Element of QC-WFF st b1 is negative holds
the_argument_of b1 is_proper_subformula_of b1
proof end;

theorem Th97: :: QC_LANG2:97
for b1 being Element of QC-WFF st b1 is conjunctive holds
( the_left_argument_of b1 is_proper_subformula_of b1 & the_right_argument_of b1 is_proper_subformula_of b1 )
proof end;

theorem Th98: :: QC_LANG2:98
for b1 being Element of QC-WFF st b1 is universal holds
the_scope_of b1 is_proper_subformula_of b1
proof end;

theorem Th99: :: QC_LANG2:99
for b1 being Element of QC-WFF holds
( b1 is_subformula_of VERUM iff b1 = VERUM )
proof end;

theorem Th100: :: QC_LANG2:100
for b1 being Element of QC-WFF
for b2 being Nat
for b3 being QC-pred_symbol of b2
for b4 being QC-variable_list of b2 holds
( b1 is_subformula_of b3 ! b4 iff b1 = b3 ! b4 )
proof end;

theorem Th101: :: QC_LANG2:101
for b1 being Element of QC-WFF holds
( b1 is_subformula_of FALSUM iff ( b1 = FALSUM or b1 = VERUM ) )
proof end;

definition
let c1 be Element of QC-WFF ;
func Subformulae c1 -> set means :Def23: :: QC_LANG2:def 23
for b1 being set holds
( b1 in a2 iff ex b2 being Element of QC-WFF st
( b2 = b1 & b2 is_subformula_of a1 ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being Element of QC-WFF st
( b3 = b2 & b3 is_subformula_of c1 ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being Element of QC-WFF st
( b4 = b3 & b4 is_subformula_of c1 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being Element of QC-WFF st
( b4 = b3 & b4 is_subformula_of c1 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def23 defines Subformulae QC_LANG2:def 23 :
for b1 being Element of QC-WFF
for b2 being set holds
( b2 = Subformulae b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being Element of QC-WFF st
( b4 = b3 & b4 is_subformula_of b1 ) ) );

theorem Th102: :: QC_LANG2:102
canceled;

theorem Th103: :: QC_LANG2:103
for b1, b2 being Element of QC-WFF st b1 in Subformulae b2 holds
b1 is_subformula_of b2
proof end;

theorem Th104: :: QC_LANG2:104
for b1, b2 being Element of QC-WFF st b1 is_subformula_of b2 holds
Subformulae b1 c= Subformulae b2
proof end;

theorem Th105: :: QC_LANG2:105
for b1, b2 being Element of QC-WFF st b1 in Subformulae b2 holds
Subformulae b1 c= Subformulae b2
proof end;

theorem Th106: :: QC_LANG2:106
canceled;

theorem Th107: :: QC_LANG2:107
Subformulae VERUM = {VERUM }
proof end;

theorem Th108: :: QC_LANG2:108
for b1 being Nat
for b2 being QC-pred_symbol of b1
for b3 being QC-variable_list of b1 holds Subformulae (b2 ! b3) = {(b2 ! b3)}
proof end;

theorem Th109: :: QC_LANG2:109
Subformulae FALSUM = {VERUM ,FALSUM }
proof end;

theorem Th110: :: QC_LANG2:110
for b1 being Element of QC-WFF holds Subformulae ('not' b1) = (Subformulae b1) \/ {('not' b1)}
proof end;

theorem Th111: :: QC_LANG2:111
for b1, b2 being Element of QC-WFF holds Subformulae (b1 '&' b2) = ((Subformulae b1) \/ (Subformulae b2)) \/ {(b1 '&' b2)}
proof end;

theorem Th112: :: QC_LANG2:112
for b1 being Element of QC-WFF
for b2 being bound_QC-variable holds Subformulae (All b2,b1) = (Subformulae b1) \/ {(All b2,b1)}
proof end;

theorem Th113: :: QC_LANG2:113
for b1, b2 being Element of QC-WFF holds Subformulae (b1 => b2) = ((Subformulae b1) \/ (Subformulae b2)) \/ {('not' b2),(b1 '&' ('not' b2)),(b1 => b2)}
proof end;

theorem Th114: :: QC_LANG2:114
for b1, b2 being Element of QC-WFF holds Subformulae (b1 'or' b2) = ((Subformulae b1) \/ (Subformulae b2)) \/ {('not' b2),('not' b1),(('not' b1) '&' ('not' b2)),(b1 'or' b2)}
proof end;

theorem Th115: :: QC_LANG2:115
for b1, b2 being Element of QC-WFF holds Subformulae (b1 <=> b2) = ((Subformulae b1) \/ (Subformulae b2)) \/ {('not' b2),(b1 '&' ('not' b2)),(b1 => b2),('not' b1),(b2 '&' ('not' b1)),(b2 => b1),(b1 <=> b2)}
proof end;

theorem Th116: :: QC_LANG2:116
for b1 being Element of QC-WFF holds
( ( b1 = VERUM or b1 is atomic ) iff Subformulae b1 = {b1} )
proof end;

theorem Th117: :: QC_LANG2:117
for b1 being Element of QC-WFF st b1 is negative holds
Subformulae b1 = (Subformulae (the_argument_of b1)) \/ {b1}
proof end;

theorem Th118: :: QC_LANG2:118
for b1 being Element of QC-WFF st b1 is conjunctive holds
Subformulae b1 = ((Subformulae (the_left_argument_of b1)) \/ (Subformulae (the_right_argument_of b1))) \/ {b1}
proof end;

theorem Th119: :: QC_LANG2:119
for b1 being Element of QC-WFF st b1 is universal holds
Subformulae b1 = (Subformulae (the_scope_of b1)) \/ {b1}
proof end;

theorem Th120: :: QC_LANG2:120
for b1, b2, b3 being Element of QC-WFF st ( b1 is_immediate_constituent_of b2 or b1 is_proper_subformula_of b2 or b1 is_subformula_of b2 ) & b2 in Subformulae b3 holds
b1 in Subformulae b3
proof end;