:: QC_LANG3 semantic presentation

scheme :: QC_LANG3:sch 1
s1{ F1() -> non empty set , F2() -> Function of QC-WFF ,F1(), F3() -> Function of QC-WFF ,F1(), F4() -> Element of F1(), F5( set ) -> Element of F1(), F6( set ) -> Element of F1(), F7( set , set ) -> Element of F1(), F8( set , set ) -> Element of F1() } :
F2() = F3()
provided
E1: for b1 being Element of QC-WFF
for b2, b3 being Element of F1() holds
( ( b1 = VERUM implies F2() . b1 = F4() ) & ( b1 is atomic implies F2() . b1 = F5(b1) ) & ( b1 is negative & b2 = F2() . (the_argument_of b1) implies F2() . b1 = F6(b2) ) & ( b1 is conjunctive & b2 = F2() . (the_left_argument_of b1) & b3 = F2() . (the_right_argument_of b1) implies F2() . b1 = F7(b2,b3) ) & ( b1 is universal & b2 = F2() . (the_scope_of b1) implies F2() . b1 = F8(b1,b2) ) ) and
E2: for b1 being Element of QC-WFF
for b2, b3 being Element of F1() holds
( ( b1 = VERUM implies F3() . b1 = F4() ) & ( b1 is atomic implies F3() . b1 = F5(b1) ) & ( b1 is negative & b2 = F3() . (the_argument_of b1) implies F3() . b1 = F6(b2) ) & ( b1 is conjunctive & b2 = F3() . (the_left_argument_of b1) & b3 = F3() . (the_right_argument_of b1) implies F3() . b1 = F7(b2,b3) ) & ( b1 is universal & b2 = F3() . (the_scope_of b1) implies F3() . b1 = F8(b1,b2) ) )
proof end;

scheme :: QC_LANG3:sch 2
s2{ F1() -> non empty set , F2() -> Element of F1(), F3() -> Element of QC-WFF , F4( Element of QC-WFF ) -> Element of F1(), F5( Element of F1()) -> Element of F1(), F6( Element of F1(), Element of F1()) -> Element of F1(), F7( Element of QC-WFF , Element of F1()) -> Element of F1() } :
( ex b1 being Element of F1()ex b2 being Function of QC-WFF ,F1() st
( b1 = b2 . F3() & ( for b3 being Element of QC-WFF
for b4, b5 being Element of F1() holds
( ( b3 = VERUM implies b2 . b3 = F2() ) & ( b3 is atomic implies b2 . b3 = F4(b3) ) & ( b3 is negative & b4 = b2 . (the_argument_of b3) implies b2 . b3 = F5(b4) ) & ( b3 is conjunctive & b4 = b2 . (the_left_argument_of b3) & b5 = b2 . (the_right_argument_of b3) implies b2 . b3 = F6(b4,b5) ) & ( b3 is universal & b4 = b2 . (the_scope_of b3) implies b2 . b3 = F7(b3,b4) ) ) ) ) & ( for b1, b2 being Element of F1() st ex b3 being Function of QC-WFF ,F1() st
( b1 = b3 . F3() & ( for b4 being Element of QC-WFF
for b5, b6 being Element of F1() holds
( ( b4 = VERUM implies b3 . b4 = F2() ) & ( b4 is atomic implies b3 . b4 = F4(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = F5(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = F6(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = F7(b4,b5) ) ) ) ) & ex b3 being Function of QC-WFF ,F1() st
( b2 = b3 . F3() & ( for b4 being Element of QC-WFF
for b5, b6 being Element of F1() holds
( ( b4 = VERUM implies b3 . b4 = F2() ) & ( b4 is atomic implies b3 . b4 = F4(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = F5(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = F6(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = F7(b4,b5) ) ) ) ) holds
b1 = b2 ) )
proof end;

scheme :: QC_LANG3:sch 3
s3{ F1() -> non empty set , F2( Element of QC-WFF ) -> Element of F1(), F3() -> Element of F1(), F4( Element of QC-WFF ) -> Element of F1(), F5( Element of F1()) -> Element of F1(), F6( Element of F1(), Element of F1()) -> Element of F1(), F7( Element of QC-WFF , Element of F1()) -> Element of F1() } :
F2(VERUM ) = F3()
provided
E1: for b1 being QC-formula
for b2 being Element of F1() holds
( b2 = F2(b1) iff ex b3 being Function of QC-WFF ,F1() st
( b2 = b3 . b1 & ( for b4 being Element of QC-WFF
for b5, b6 being Element of F1() holds
( ( b4 = VERUM implies b3 . b4 = F3() ) & ( b4 is atomic implies b3 . b4 = F4(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = F5(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = F6(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = F7(b4,b5) ) ) ) ) )
proof end;

scheme :: QC_LANG3:sch 4
s4{ F1() -> non empty set , F2() -> Element of F1(), F3( Element of QC-WFF ) -> Element of F1(), F4() -> QC-formula, F5( Element of QC-WFF ) -> Element of F1(), F6( Element of F1()) -> Element of F1(), F7( Element of F1(), Element of F1()) -> Element of F1(), F8( Element of QC-WFF , Element of F1()) -> Element of F1() } :
F3(F4()) = F5(F4())
provided
E1: for b1 being QC-formula
for b2 being Element of F1() holds
( b2 = F3(b1) iff ex b3 being Function of QC-WFF ,F1() st
( b2 = b3 . b1 & ( for b4 being Element of QC-WFF
for b5, b6 being Element of F1() holds
( ( b4 = VERUM implies b3 . b4 = F2() ) & ( b4 is atomic implies b3 . b4 = F5(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = F6(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = F7(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = F8(b4,b5) ) ) ) ) ) and
E2: F4() is atomic
proof end;

scheme :: QC_LANG3:sch 5
s5{ F1() -> non empty set , F2() -> Element of F1(), F3() -> QC-formula, F4( Element of QC-WFF ) -> Element of F1(), F5( Element of F1()) -> Element of F1(), F6( Element of F1(), Element of F1()) -> Element of F1(), F7( Element of QC-WFF , Element of F1()) -> Element of F1(), F8( Element of QC-WFF ) -> Element of F1() } :
F8(F3()) = F5(F8((the_argument_of F3())))
provided
E1: for b1 being QC-formula
for b2 being Element of F1() holds
( b2 = F8(b1) iff ex b3 being Function of QC-WFF ,F1() st
( b2 = b3 . b1 & ( for b4 being Element of QC-WFF
for b5, b6 being Element of F1() holds
( ( b4 = VERUM implies b3 . b4 = F2() ) & ( b4 is atomic implies b3 . b4 = F4(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = F5(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = F6(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = F7(b4,b5) ) ) ) ) ) and
E2: F3() is negative
proof end;

scheme :: QC_LANG3:sch 6
s6{ F1() -> non empty set , F2() -> Element of F1(), F3( Element of QC-WFF ) -> Element of F1(), F4( Element of F1()) -> Element of F1(), F5( Element of F1(), Element of F1()) -> Element of F1(), F6( Element of QC-WFF , Element of F1()) -> Element of F1(), F7( Element of QC-WFF ) -> Element of F1(), F8() -> QC-formula } :
for b1, b2 being Element of F1() st b1 = F7((the_left_argument_of F8())) & b2 = F7((the_right_argument_of F8())) holds
F7(F8()) = F5(b1,b2)
provided
E1: for b1 being QC-formula
for b2 being Element of F1() holds
( b2 = F7(b1) iff ex b3 being Function of QC-WFF ,F1() st
( b2 = b3 . b1 & ( for b4 being Element of QC-WFF
for b5, b6 being Element of F1() holds
( ( b4 = VERUM implies b3 . b4 = F2() ) & ( b4 is atomic implies b3 . b4 = F3(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = F4(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = F5(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = F6(b4,b5) ) ) ) ) ) and
E2: F8() is conjunctive
proof end;

scheme :: QC_LANG3:sch 7
s7{ F1() -> non empty set , F2() -> Element of F1(), F3() -> QC-formula, F4( Element of QC-WFF ) -> Element of F1(), F5( Element of F1()) -> Element of F1(), F6( Element of F1(), Element of F1()) -> Element of F1(), F7( Element of QC-WFF , Element of F1()) -> Element of F1(), F8( Element of QC-WFF ) -> Element of F1() } :
F8(F3()) = F7(F3(),F8((the_scope_of F3())))
provided
E1: for b1 being QC-formula
for b2 being Element of F1() holds
( b2 = F8(b1) iff ex b3 being Function of QC-WFF ,F1() st
( b2 = b3 . b1 & ( for b4 being Element of QC-WFF
for b5, b6 being Element of F1() holds
( ( b4 = VERUM implies b3 . b4 = F2() ) & ( b4 is atomic implies b3 . b4 = F4(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = F5(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = F6(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = F7(b4,b5) ) ) ) ) ) and
E2: F3() is universal
proof end;

theorem Th1: :: QC_LANG3:1
canceled;

theorem Th2: :: QC_LANG3:2
canceled;

theorem Th3: :: QC_LANG3:3
for b1 being QC-pred_symbol holds b1 is QC-pred_symbol of (the_arity_of b1)
proof end;

definition
let c1 be FinSequence of QC-variables ;
let c2 be non empty Subset of QC-variables ;
canceled;
func variables_in c1,c2 -> Subset of a2 equals :: QC_LANG3:def 2
{ (a1 . b1) where B is Nat : ( 1 <= b1 & b1 <= len a1 & a1 . b1 in a2 ) } ;
coherence
{ (c1 . b1) where B is Nat : ( 1 <= b1 & b1 <= len c1 & c1 . b1 in c2 ) } is Subset of c2
proof end;
end;

:: deftheorem Def1 QC_LANG3:def 1 :
canceled;

:: deftheorem Def2 defines variables_in QC_LANG3:def 2 :
for b1 being FinSequence of QC-variables
for b2 being non empty Subset of QC-variables holds variables_in b1,b2 = { (b1 . b3) where B is Nat : ( 1 <= b3 & b3 <= len b1 & b1 . b3 in b2 ) } ;

theorem Th4: :: QC_LANG3:4
canceled;

theorem Th5: :: QC_LANG3:5
canceled;

theorem Th6: :: QC_LANG3:6
for b1 being FinSequence of QC-variables holds still_not-bound_in b1 = variables_in b1,bound_QC-variables ;

deffunc H1( Element of QC-WFF ) -> Element of bool bound_QC-variables = still_not-bound_in a1;

deffunc H2( Element of QC-WFF ) -> Element of bool bound_QC-variables = still_not-bound_in (the_arguments_of a1);

deffunc H3( Subset of bound_QC-variables ) -> Subset of bound_QC-variables = a1;

deffunc H4( Subset of bound_QC-variables , Subset of bound_QC-variables ) -> Element of bool bound_QC-variables = a1 \/ a2;

deffunc H5( Element of QC-WFF , Subset of bound_QC-variables ) -> Element of bool bound_QC-variables = a2 \ {(bound_in a1)};

Lemma1: for b1 being QC-formula
for b2 being Subset of bound_QC-variables holds
( b2 = H1(b1) iff ex b3 being Function of QC-WFF , bool bound_QC-variables st
( b2 = b3 . b1 & ( for b4 being Element of QC-WFF
for b5, b6 being Subset of bound_QC-variables holds
( ( b4 = VERUM implies b3 . b4 = {} bound_QC-variables ) & ( b4 is atomic implies b3 . b4 = H2(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = H3(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = H4(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = H5(b4,b5) ) ) ) ) )
proof end;

theorem Th7: :: QC_LANG3:7
still_not-bound_in VERUM = {}
proof end;

theorem Th8: :: QC_LANG3:8
for b1 being QC-formula st b1 is atomic holds
still_not-bound_in b1 = still_not-bound_in (the_arguments_of b1)
proof end;

theorem Th9: :: QC_LANG3:9
for b1 being Nat
for b2 being QC-pred_symbol of b1
for b3 being QC-variable_list of b1 holds still_not-bound_in (b2 ! b3) = still_not-bound_in b3
proof end;

theorem Th10: :: QC_LANG3:10
for b1 being QC-formula st b1 is negative holds
still_not-bound_in b1 = still_not-bound_in (the_argument_of b1)
proof end;

theorem Th11: :: QC_LANG3:11
for b1 being QC-formula holds still_not-bound_in ('not' b1) = still_not-bound_in b1
proof end;

theorem Th12: :: QC_LANG3:12
still_not-bound_in FALSUM = {} by Th7, Th11, QC_LANG2:def 1;

theorem Th13: :: QC_LANG3:13
for b1 being QC-formula st b1 is conjunctive holds
still_not-bound_in b1 = (still_not-bound_in (the_left_argument_of b1)) \/ (still_not-bound_in (the_right_argument_of b1))
proof end;

theorem Th14: :: QC_LANG3:14
for b1, b2 being QC-formula holds still_not-bound_in (b1 '&' b2) = (still_not-bound_in b1) \/ (still_not-bound_in b2)
proof end;

theorem Th15: :: QC_LANG3:15
for b1 being QC-formula st b1 is universal holds
still_not-bound_in b1 = (still_not-bound_in (the_scope_of b1)) \ {(bound_in b1)}
proof end;

theorem Th16: :: QC_LANG3:16
for b1 being bound_QC-variable
for b2 being QC-formula holds still_not-bound_in (All b1,b2) = (still_not-bound_in b2) \ {b1}
proof end;

theorem Th17: :: QC_LANG3:17
for b1 being QC-formula st b1 is disjunctive holds
still_not-bound_in b1 = (still_not-bound_in (the_left_disjunct_of b1)) \/ (still_not-bound_in (the_right_disjunct_of b1))
proof end;

theorem Th18: :: QC_LANG3:18
for b1, b2 being QC-formula holds still_not-bound_in (b1 'or' b2) = (still_not-bound_in b1) \/ (still_not-bound_in b2)
proof end;

theorem Th19: :: QC_LANG3:19
for b1 being QC-formula st b1 is conditional holds
still_not-bound_in b1 = (still_not-bound_in (the_antecedent_of b1)) \/ (still_not-bound_in (the_consequent_of b1))
proof end;

theorem Th20: :: QC_LANG3:20
for b1, b2 being QC-formula holds still_not-bound_in (b1 => b2) = (still_not-bound_in b1) \/ (still_not-bound_in b2)
proof end;

theorem Th21: :: QC_LANG3:21
for b1 being QC-formula st b1 is biconditional holds
still_not-bound_in b1 = (still_not-bound_in (the_left_side_of b1)) \/ (still_not-bound_in (the_right_side_of b1))
proof end;

theorem Th22: :: QC_LANG3:22
for b1, b2 being QC-formula holds still_not-bound_in (b1 <=> b2) = (still_not-bound_in b1) \/ (still_not-bound_in b2)
proof end;

theorem Th23: :: QC_LANG3:23
for b1 being bound_QC-variable
for b2 being QC-formula holds still_not-bound_in (Ex b1,b2) = (still_not-bound_in b2) \ {b1}
proof end;

theorem Th24: :: QC_LANG3:24
( VERUM is closed & FALSUM is closed ) by Th7, Th12, QC_LANG1:def 30;

theorem Th25: :: QC_LANG3:25
for b1 being QC-formula holds
( b1 is closed iff 'not' b1 is closed )
proof end;

theorem Th26: :: QC_LANG3:26
for b1, b2 being QC-formula holds
( ( b1 is closed & b2 is closed ) iff b1 '&' b2 is closed )
proof end;

theorem Th27: :: QC_LANG3:27
for b1 being bound_QC-variable
for b2 being QC-formula holds
( All b1,b2 is closed iff still_not-bound_in b2 c= {b1} )
proof end;

theorem Th28: :: QC_LANG3:28
for b1 being bound_QC-variable
for b2 being QC-formula st b2 is closed holds
All b1,b2 is closed
proof end;

theorem Th29: :: QC_LANG3:29
for b1, b2 being QC-formula holds
( ( b1 is closed & b2 is closed ) iff b1 'or' b2 is closed )
proof end;

theorem Th30: :: QC_LANG3:30
for b1, b2 being QC-formula holds
( ( b1 is closed & b2 is closed ) iff b1 => b2 is closed )
proof end;

theorem Th31: :: QC_LANG3:31
for b1, b2 being QC-formula holds
( ( b1 is closed & b2 is closed ) iff b1 <=> b2 is closed )
proof end;

theorem Th32: :: QC_LANG3:32
for b1 being bound_QC-variable
for b2 being QC-formula holds
( Ex b1,b2 is closed iff still_not-bound_in b2 c= {b1} )
proof end;

theorem Th33: :: QC_LANG3:33
for b1 being bound_QC-variable
for b2 being QC-formula st b2 is closed holds
Ex b1,b2 is closed
proof end;

definition
let c1 be Nat;
func x. c1 -> bound_QC-variable equals :: QC_LANG3:def 3
[4,a1];
coherence
[4,c1] is bound_QC-variable
proof end;
end;

:: deftheorem Def3 defines x. QC_LANG3:def 3 :
for b1 being Nat holds x. b1 = [4,b1];

theorem Th34: :: QC_LANG3:34
canceled;

theorem Th35: :: QC_LANG3:35
for b1, b2 being Nat st x. b1 = x. b2 holds
b1 = b2 by ZFMISC_1:33;

theorem Th36: :: QC_LANG3:36
for b1 being bound_QC-variable ex b2 being Nat st x. b2 = b1
proof end;

definition
let c1 be Nat;
func a. c1 -> free_QC-variable equals :: QC_LANG3:def 4
[6,a1];
coherence
[6,c1] is free_QC-variable
proof end;
end;

:: deftheorem Def4 defines a. QC_LANG3:def 4 :
for b1 being Nat holds a. b1 = [6,b1];

theorem Th37: :: QC_LANG3:37
canceled;

theorem Th38: :: QC_LANG3:38
for b1, b2 being Nat st a. b1 = a. b2 holds
b1 = b2 by ZFMISC_1:33;

theorem Th39: :: QC_LANG3:39
for b1 being free_QC-variable ex b2 being Nat st a. b2 = b1
proof end;

theorem Th40: :: QC_LANG3:40
for b1 being Element of fixed_QC-variables
for b2 being Element of free_QC-variables holds b1 <> b2
proof end;

theorem Th41: :: QC_LANG3:41
for b1 being Element of fixed_QC-variables
for b2 being Element of bound_QC-variables holds b1 <> b2
proof end;

theorem Th42: :: QC_LANG3:42
for b1 being Element of free_QC-variables
for b2 being Element of bound_QC-variables holds b1 <> b2
proof end;

definition
let c1 be non empty Subset of QC-variables ;
let c2 be Element of QC-WFF ;
func Vars c2,c1 -> Subset of a1 means :Def5: :: QC_LANG3:def 5
ex b1 being Function of QC-WFF , bool a1 st
( a3 = b1 . a2 & ( for b2 being Element of QC-WFF
for b3, b4 being Subset of a1 holds
( ( b2 = VERUM implies b1 . b2 = {} a1 ) & ( b2 is atomic implies b1 . b2 = variables_in (the_arguments_of b2),a1 ) & ( b2 is negative & b3 = b1 . (the_argument_of b2) implies b1 . b2 = b3 ) & ( b2 is conjunctive & b3 = b1 . (the_left_argument_of b2) & b4 = b1 . (the_right_argument_of b2) implies b1 . b2 = b3 \/ b4 ) & ( b2 is universal & b3 = b1 . (the_scope_of b2) implies b1 . b2 = b3 ) ) ) );
correctness
existence
ex b1 being Subset of c1ex b2 being Function of QC-WFF , bool c1 st
( b1 = b2 . c2 & ( for b3 being Element of QC-WFF
for b4, b5 being Subset of c1 holds
( ( b3 = VERUM implies b2 . b3 = {} c1 ) & ( b3 is atomic implies b2 . b3 = variables_in (the_arguments_of b3),c1 ) & ( b3 is negative & b4 = b2 . (the_argument_of b3) implies b2 . b3 = b4 ) & ( b3 is conjunctive & b4 = b2 . (the_left_argument_of b3) & b5 = b2 . (the_right_argument_of b3) implies b2 . b3 = b4 \/ b5 ) & ( b3 is universal & b4 = b2 . (the_scope_of b3) implies b2 . b3 = b4 ) ) ) )
;
uniqueness
for b1, b2 being Subset of c1 st ex b3 being Function of QC-WFF , bool c1 st
( b1 = b3 . c2 & ( for b4 being Element of QC-WFF
for b5, b6 being Subset of c1 holds
( ( b4 = VERUM implies b3 . b4 = {} c1 ) & ( b4 is atomic implies b3 . b4 = variables_in (the_arguments_of b4),c1 ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = b5 ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = b5 \/ b6 ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = b5 ) ) ) ) & ex b3 being Function of QC-WFF , bool c1 st
( b2 = b3 . c2 & ( for b4 being Element of QC-WFF
for b5, b6 being Subset of c1 holds
( ( b4 = VERUM implies b3 . b4 = {} c1 ) & ( b4 is atomic implies b3 . b4 = variables_in (the_arguments_of b4),c1 ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = b5 ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = b5 \/ b6 ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = b5 ) ) ) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def5 defines Vars QC_LANG3:def 5 :
for b1 being non empty Subset of QC-variables
for b2 being Element of QC-WFF
for b3 being Subset of b1 holds
( b3 = Vars b2,b1 iff ex b4 being Function of QC-WFF , bool b1 st
( b3 = b4 . b2 & ( for b5 being Element of QC-WFF
for b6, b7 being Subset of b1 holds
( ( b5 = VERUM implies b4 . b5 = {} b1 ) & ( b5 is atomic implies b4 . b5 = variables_in (the_arguments_of b5),b1 ) & ( b5 is negative & b6 = b4 . (the_argument_of b5) implies b4 . b5 = b6 ) & ( b5 is conjunctive & b6 = b4 . (the_left_argument_of b5) & b7 = b4 . (the_right_argument_of b5) implies b4 . b5 = b6 \/ b7 ) & ( b5 is universal & b6 = b4 . (the_scope_of b5) implies b4 . b5 = b6 ) ) ) ) );

E22: now
let c1 be non empty Subset of QC-variables ;
deffunc H6( Element of QC-WFF ) -> Subset of c1 = Vars a1,c1;
deffunc H7( Element of QC-WFF ) -> Subset of c1 = variables_in (the_arguments_of a1),c1;
deffunc H8( Subset of c1) -> Subset of c1 = a1;
deffunc H9( Subset of c1, Subset of c1) -> Element of bool c1 = a1 \/ a2;
deffunc H10( Element of QC-WFF , Subset of c1) -> Subset of c1 = a2;
E23: for b1 being Element of QC-WFF
for b2 being Subset of c1 holds
( b2 = H6(b1) iff ex b3 being Function of QC-WFF , bool c1 st
( b2 = b3 . b1 & ( for b4 being Element of QC-WFF
for b5, b6 being Subset of c1 holds
( ( b4 = VERUM implies b3 . b4 = {} c1 ) & ( b4 is atomic implies b3 . b4 = H7(b4) ) & ( b4 is negative & b5 = b3 . (the_argument_of b4) implies b3 . b4 = H8(b5) ) & ( b4 is conjunctive & b5 = b3 . (the_left_argument_of b4) & b6 = b3 . (the_right_argument_of b4) implies b3 . b4 = H9(b5,b6) ) & ( b4 is universal & b5 = b3 . (the_scope_of b4) implies b3 . b4 = H10(b4,b5) ) ) ) ) ) by Def5;
thus H6( VERUM ) = {} c1 from QC_LANG3:sch 3(E23)
.= {} ;
thus for b1 being Element of QC-WFF st b1 is atomic holds
Vars b1,c1 = variables_in (the_arguments_of b1),c1
proof
let c2 be Element of QC-WFF ;
assume E24: c2 is atomic ;
thus H6(c2) = H7(c2) from QC_LANG3:sch 4(E23, E24);
end;
thus for b1 being Element of QC-WFF st b1 is negative holds
Vars b1,c1 = Vars (the_argument_of b1),c1
proof
let c2 be Element of QC-WFF ;
assume E24: c2 is negative ;
thus H6(c2) = H8(H6( the_argument_of c2)) from QC_LANG3:sch 5(E23, E24);
end;
thus for b1 being Element of QC-WFF st b1 is conjunctive holds
Vars b1,c1 = (Vars (the_left_argument_of b1),c1) \/ (Vars (the_right_argument_of b1),c1)
proof
let c2 be Element of QC-WFF ;
assume E24: c2 is conjunctive ;
for b1, b2 being Subset of c1 st b1 = H6( the_left_argument_of c2) & b2 = H6( the_right_argument_of c2) holds
H6(c2) = H9(b1,b2) from QC_LANG3:sch 6(E23, E24);
hence Vars c2,c1 = (Vars (the_left_argument_of c2),c1) \/ (Vars (the_right_argument_of c2),c1) ;
end;
thus for b1 being Element of QC-WFF st b1 is universal holds
Vars b1,c1 = Vars (the_scope_of b1),c1
proof
let c2 be Element of QC-WFF ;
assume E24: c2 is universal ;
thus H6(c2) = H10(c2,H6( the_scope_of c2)) from QC_LANG3:sch 7(E23, E24);
end;
end;

theorem Th43: :: QC_LANG3:43
canceled;

theorem Th44: :: QC_LANG3:44
canceled;

theorem Th45: :: QC_LANG3:45
canceled;

theorem Th46: :: QC_LANG3:46
for b1 being non empty Subset of QC-variables holds Vars VERUM ,b1 = {} by Lemma22;

theorem Th47: :: QC_LANG3:47
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is atomic holds
( Vars b1,b2 = variables_in (the_arguments_of b1),b2 & Vars b1,b2 = { ((the_arguments_of b1) . b3) where B is Nat : ( 1 <= b3 & b3 <= len (the_arguments_of b1) & (the_arguments_of b1) . b3 in b2 ) } )
proof end;

theorem Th48: :: QC_LANG3:48
for b1 being Nat
for b2 being non empty Subset of QC-variables
for b3 being QC-pred_symbol of b1
for b4 being QC-variable_list of b1 holds
( Vars (b3 ! b4),b2 = variables_in b4,b2 & Vars (b3 ! b4),b2 = { (b4 . b5) where B is Nat : ( 1 <= b5 & b5 <= len b4 & b4 . b5 in b2 ) } )
proof end;

theorem Th49: :: QC_LANG3:49
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is negative holds
Vars b1,b2 = Vars (the_argument_of b1),b2 by Lemma22;

theorem Th50: :: QC_LANG3:50
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables holds Vars ('not' b1),b2 = Vars b1,b2
proof end;

theorem Th51: :: QC_LANG3:51
for b1 being non empty Subset of QC-variables holds Vars FALSUM ,b1 = {}
proof end;

theorem Th52: :: QC_LANG3:52
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is conjunctive holds
Vars b1,b2 = (Vars (the_left_argument_of b1),b2) \/ (Vars (the_right_argument_of b1),b2) by Lemma22;

theorem Th53: :: QC_LANG3:53
for b1, b2 being Element of QC-WFF
for b3 being non empty Subset of QC-variables holds Vars (b1 '&' b2),b3 = (Vars b1,b3) \/ (Vars b2,b3)
proof end;

theorem Th54: :: QC_LANG3:54
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is universal holds
Vars b1,b2 = Vars (the_scope_of b1),b2 by Lemma22;

theorem Th55: :: QC_LANG3:55
for b1 being bound_QC-variable
for b2 being Element of QC-WFF
for b3 being non empty Subset of QC-variables holds Vars (All b1,b2),b3 = Vars b2,b3
proof end;

theorem Th56: :: QC_LANG3:56
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is disjunctive holds
Vars b1,b2 = (Vars (the_left_disjunct_of b1),b2) \/ (Vars (the_right_disjunct_of b1),b2)
proof end;

theorem Th57: :: QC_LANG3:57
for b1, b2 being Element of QC-WFF
for b3 being non empty Subset of QC-variables holds Vars (b1 'or' b2),b3 = (Vars b1,b3) \/ (Vars b2,b3)
proof end;

theorem Th58: :: QC_LANG3:58
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is conditional holds
Vars b1,b2 = (Vars (the_antecedent_of b1),b2) \/ (Vars (the_consequent_of b1),b2)
proof end;

theorem Th59: :: QC_LANG3:59
for b1, b2 being Element of QC-WFF
for b3 being non empty Subset of QC-variables holds Vars (b1 => b2),b3 = (Vars b1,b3) \/ (Vars b2,b3)
proof end;

theorem Th60: :: QC_LANG3:60
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is biconditional holds
Vars b1,b2 = (Vars (the_left_side_of b1),b2) \/ (Vars (the_right_side_of b1),b2)
proof end;

theorem Th61: :: QC_LANG3:61
for b1, b2 being Element of QC-WFF
for b3 being non empty Subset of QC-variables holds Vars (b1 <=> b2),b3 = (Vars b1,b3) \/ (Vars b2,b3)
proof end;

theorem Th62: :: QC_LANG3:62
for b1 being Element of QC-WFF
for b2 being non empty Subset of QC-variables st b1 is existential holds
Vars b1,b2 = Vars (the_argument_of (the_scope_of (the_argument_of b1))),b2
proof end;

theorem Th63: :: QC_LANG3:63
for b1 being bound_QC-variable
for b2 being Element of QC-WFF
for b3 being non empty Subset of QC-variables holds Vars (Ex b1,b2),b3 = Vars b2,b3
proof end;

definition
let c1 be Element of QC-WFF ;
func Free c1 -> Subset of free_QC-variables equals :: QC_LANG3:def 6
Vars a1,free_QC-variables ;
correctness
coherence
Vars c1,free_QC-variables is Subset of free_QC-variables
;
;
end;

:: deftheorem Def6 defines Free QC_LANG3:def 6 :
for b1 being Element of QC-WFF holds Free b1 = Vars b1,free_QC-variables ;

theorem Th64: :: QC_LANG3:64
canceled;

theorem Th65: :: QC_LANG3:65
Free VERUM = {} by Lemma22;

theorem Th66: :: QC_LANG3:66
for b1 being Nat
for b2 being QC-pred_symbol of b1
for b3 being QC-variable_list of b1 holds Free (b2 ! b3) = { (b3 . b4) where B is Nat : ( 1 <= b4 & b4 <= len b3 & b3 . b4 in free_QC-variables ) } by Th48;

theorem Th67: :: QC_LANG3:67
for b1 being Element of QC-WFF holds Free ('not' b1) = Free b1 by Th50;

theorem Th68: :: QC_LANG3:68
Free FALSUM = {} by Th51;

theorem Th69: :: QC_LANG3:69
for b1, b2 being Element of QC-WFF holds Free (b1 '&' b2) = (Free b1) \/ (Free b2) by Th53;

theorem Th70: :: QC_LANG3:70
for b1 being bound_QC-variable
for b2 being Element of QC-WFF holds Free (All b1,b2) = Free b2 by Th55;

theorem Th71: :: QC_LANG3:71
for b1, b2 being Element of QC-WFF holds Free (b1 'or' b2) = (Free b1) \/ (Free b2)
proof end;

theorem Th72: :: QC_LANG3:72
for b1, b2 being Element of QC-WFF holds Free (b1 => b2) = (Free b1) \/ (Free b2)
proof end;

theorem Th73: :: QC_LANG3:73
for b1, b2 being Element of QC-WFF holds Free (b1 <=> b2) = (Free b1) \/ (Free b2)
proof end;

theorem Th74: :: QC_LANG3:74
for b1 being bound_QC-variable
for b2 being Element of QC-WFF holds Free (Ex b1,b2) = Free b2
proof end;

definition
let c1 be Element of QC-WFF ;
func Fixed c1 -> Subset of fixed_QC-variables equals :: QC_LANG3:def 7
Vars a1,fixed_QC-variables ;
correctness
coherence
Vars c1,fixed_QC-variables is Subset of fixed_QC-variables
;
;
end;

:: deftheorem Def7 defines Fixed QC_LANG3:def 7 :
for b1 being Element of QC-WFF holds Fixed b1 = Vars b1,fixed_QC-variables ;

theorem Th75: :: QC_LANG3:75
canceled;

theorem Th76: :: QC_LANG3:76
Fixed VERUM = {} by Lemma22;

theorem Th77: :: QC_LANG3:77
for b1 being Nat
for b2 being QC-pred_symbol of b1
for b3 being QC-variable_list of b1 holds Fixed (b2 ! b3) = { (b3 . b4) where B is Nat : ( 1 <= b4 & b4 <= len b3 & b3 . b4 in fixed_QC-variables ) } by Th48;

theorem Th78: :: QC_LANG3:78
for b1 being Element of QC-WFF holds Fixed ('not' b1) = Fixed b1 by Th50;

theorem Th79: :: QC_LANG3:79
Fixed FALSUM = {} by Th76, Th78, QC_LANG2:def 1;

theorem Th80: :: QC_LANG3:80
for b1, b2 being Element of QC-WFF holds Fixed (b1 '&' b2) = (Fixed b1) \/ (Fixed b2) by Th53;

theorem Th81: :: QC_LANG3:81
for b1 being bound_QC-variable
for b2 being Element of QC-WFF holds Fixed (All b1,b2) = Fixed b2 by Th55;

theorem Th82: :: QC_LANG3:82
for b1, b2 being Element of QC-WFF holds Fixed (b1 'or' b2) = (Fixed b1) \/ (Fixed b2)
proof end;

theorem Th83: :: QC_LANG3:83
for b1, b2 being Element of QC-WFF holds Fixed (b1 => b2) = (Fixed b1) \/ (Fixed b2)
proof end;

theorem Th84: :: QC_LANG3:84
for b1, b2 being Element of QC-WFF holds Fixed (b1 <=> b2) = (Fixed b1) \/ (Fixed b2)
proof end;

theorem Th85: :: QC_LANG3:85
for b1 being bound_QC-variable
for b2 being Element of QC-WFF holds Fixed (Ex b1,b2) = Fixed b2
proof end;