:: ZF_FUND2 semantic presentation

definition
let c1 be ZF-formula;
let c2 be non empty set ;
let c3 be Function of VAR ,c2;
func Section c1,c3 -> Subset of a2 equals :Def1: :: ZF_FUND2:def 1
{ b1 where B is Element of a2 : a2,a3 / (x. 0),b1 |= a1 } if x. 0 in Free a1
otherwise {} ;
coherence
( ( x. 0 in Free c1 implies { b1 where B is Element of c2 : c2,c3 / (x. 0),b1 |= c1 } is Subset of c2 ) & ( not x. 0 in Free c1 implies {} is Subset of c2 ) )
proof end;
consistency
for b1 being Subset of c2 holds
verum
;
end;

:: deftheorem Def1 defines Section ZF_FUND2:def 1 :
for b1 being ZF-formula
for b2 being non empty set
for b3 being Function of VAR ,b2 holds
( ( x. 0 in Free b1 implies Section b1,b3 = { b4 where B is Element of b2 : b2,b3 / (x. 0),b4 |= b1 } ) & ( not x. 0 in Free b1 implies Section b1,b3 = {} ) );

definition
let c1 be non empty set ;
attr a1 is predicatively_closed means :Def2: :: ZF_FUND2:def 2
for b1 being ZF-formula
for b2 being non empty set
for b3 being Function of VAR ,b2 holds
( b2 in a1 implies Section b1,b3 in a1 );
end;

:: deftheorem Def2 defines predicatively_closed ZF_FUND2:def 2 :
for b1 being non empty set holds
( b1 is predicatively_closed iff for b2 being ZF-formula
for b3 being non empty set
for b4 being Function of VAR ,b3 holds
( b3 in b1 implies Section b2,b4 in b1 ) );

theorem Th1: :: ZF_FUND2:1
for b1 being non empty set
for b2 being Element of b1
for b3 being Function of VAR ,b1 holds
( b1 is epsilon-transitive implies Section (All (x. 2),(((x. 2) 'in' (x. 0)) => ((x. 2) 'in' (x. 1)))),(b3 / (x. 1),b2) = b1 /\ (bool b2) )
proof end;

Lemma4: for b1 being Function
for b2 being set holds
not ( b2 in Union b1 & ( for b3 being set holds
not ( b3 in dom b1 & b2 in b1 . b3 ) ) )
proof end;

theorem Th2: :: ZF_FUND2:2
for b1 being Universe
for b2 being DOMAIN-Sequence of b1 holds
( ( for b3, b4 being Ordinal of b1 holds
( b3 in b4 implies b2 . b3 c= b2 . b4 ) ) & ( for b3 being Ordinal of b1 holds
( b2 . b3 in Union b2 & b2 . b3 is epsilon-transitive ) ) & Union b2 is predicatively_closed implies Union b2 |= the_axiom_of_power_sets )
proof end;

Lemma6: for b1 being ZF-formula
for b2 being non empty set
for b3 being Function of VAR ,b2
for b4 being Variable holds
( not b4 in variables_in b1 & {(x. 0),(x. 1),(x. 2)} misses Free b1 & b2,b3 |= All (x. 3),(Ex (x. 0),(All (x. 4),(b1 <=> ((x. 4) '=' (x. 0))))) implies ( {(x. 0),(x. 1),(x. 2)} misses Free (b1 / (x. 0),b4) & b2,b3 |= All (x. 3),(Ex (x. 0),(All (x. 4),((b1 / (x. 0),b4) <=> ((x. 4) '=' (x. 0))))) & def_func' b1,b3 = def_func' (b1 / (x. 0),b4),b3 ) )
proof end;

Lemma7: for b1, b2 being non empty set
for b3 being Element of b2
for b4 being Element of b1
for b5 being Function of VAR ,b1
for b6 being Function of VAR ,b2
for b7 being Variable holds
( b5 = b6 & b4 = b3 implies b5 / b7,b4 = b6 / b7,b3 )
proof end;

Lemma8: for b1 being ZF-formula
for b2 being non empty set
for b3 being Function of VAR ,b2 holds
( b2,b3 |= All (x. 3),(Ex (x. 0),(All (x. 4),(b1 <=> ((x. 4) '=' (x. 0))))) & not x. 4 in Free b1 implies for b4 being Element of b2 holds (def_func' b1,b3) .: b4 = {} )
proof end;

Lemma9: for b1 being ZF-formula
for b2, b3 being Variable holds
( not b2 in variables_in b1 & not b3 in variables_in b1 & b2 <> x. 0 & b3 <> x. 0 & b3 <> x. 4 implies ( x. 4 in Free b1 iff x. 0 in Free (Ex (x. 3),(((x. 3) 'in' b2) '&' ((b1 / (x. 0),b3) / (x. 4),(x. 0)))) ) )
proof end;

theorem Th3: :: ZF_FUND2:3
for b1 being Universe
for b2 being DOMAIN-Sequence of b1 holds
( omega in b1 & ( for b3, b4 being Ordinal of b1 holds
( b3 in b4 implies b2 . b3 c= b2 . b4 ) ) & ( for b3 being Ordinal of b1 holds
( b3 <> {} & b3 is_limit_ordinal implies b2 . b3 = Union (b2 | b3) ) ) & ( for b3 being Ordinal of b1 holds
( b2 . b3 in Union b2 & b2 . b3 is epsilon-transitive ) ) & Union b2 is predicatively_closed implies for b3 being ZF-formula holds
( {(x. 0),(x. 1),(x. 2)} misses Free b3 implies Union b2 |= the_axiom_of_substitution_for b3 ) )
proof end;

Lemma11: for b1 being ZF-formula
for b2 being non empty set
for b3 being Element of b2
for b4 being Function of VAR ,b2
for b5 being Nat holds
( x. b5 in Free b1 implies {[b5,b3]} \/ ((b4 * decode ) | ((code (Free b1)) \ {b5})) = ((b4 / (x. b5),b3) * decode ) | (code (Free b1)) )
proof end;

theorem Th4: :: ZF_FUND2:4
for b1 being ZF-formula
for b2 being non empty set
for b3 being Function of VAR ,b2 holds Section b1,b3 = { b4 where B is Element of b2 : {[{} ,b4]} \/ ((b3 * decode ) | ((code (Free b1)) \ {{} })) in Diagram b1,b2 }
proof end;

theorem Th5: :: ZF_FUND2:5
for b1 being Universe
for b2 being Subclass of b1 holds
( b2 is closed_wrt_A1-A7 & b2 is epsilon-transitive implies b2 is predicatively_closed )
proof end;

theorem Th6: :: ZF_FUND2:6
for b1 being Universe
for b2 being DOMAIN-Sequence of b1 holds
( omega in b1 & ( for b3, b4 being Ordinal of b1 holds
( b3 in b4 implies b2 . b3 c= b2 . b4 ) ) & ( for b3 being Ordinal of b1 holds
( b3 <> {} & b3 is_limit_ordinal implies b2 . b3 = Union (b2 | b3) ) ) & ( for b3 being Ordinal of b1 holds
( b2 . b3 in Union b2 & b2 . b3 is epsilon-transitive ) ) & Union b2 is closed_wrt_A1-A7 implies Union b2 is_a_model_of_ZF )
proof end;