begin
definition
mode set;
end;
definition let x,y be set;
pred x = y;
reflexivity;
symmetry;
end;
notation let x,y be set;
antonym x <> y for x = y;
end;
definition let x,X be set;
pred x in X;
asymmetry;
end;
begin
reserve x,y,z,u,N,M,X,Y,Z for set;
theorem
(for x holds x in X iff x in Y) implies X = Y;
definition let y; func { y } -> set means
x in it iff x = y;
correctness;
let z; func { y, z } -> set means
x in it iff x = y or x = z;
correctness;
commutativity;
end;
definition let X,Y;
pred X c= Y means
x in X implies x in Y;
reflexivity;
end;
definition let X;
func union X -> set means
x in it iff ex Y st x in Y & Y in X;
correctness;
end;
theorem
x in X implies ex Y st Y in X & not ex x st x in X & x in Y;
scheme Fraenkel { A()-> set, P[set, set] }:
ex X st for x holds x in X iff ex y st y in A() & P[y,x]
provided for x,y,z st P[x,y] & P[x,z] holds y = z
proof
thus thesis;
end;
definition let x,y;
func [x,y] equals
{ { x,y }, { x } };
correctness;
end;
definition let X,Y;
pred X,Y are_equipotent means
ex Z st
(for x st x in X ex y st y in Y & [x,y] in Z) &
(for y st y in Y ex x st x in X & [x,y] in Z) &
for x,y,z,u st [x,y] in Z & [z,u] in Z holds x = z iff y = u;
end;
theorem
ex M st N in M &
(for X,Y holds X in M & Y c= X implies Y in M) &
(for X st X in M ex Z st Z in M & for Y st Y c= X holds Y in Z) &
(for X holds X c= M implies X,M are_equipotent or X in M);
begin
reserve X, Y, Z, x, y, z for set;
scheme
Separation { A()-> set, P[set] } :
ex X being set st for x being set holds x in X iff x in A() & P[x]
proof
defpred Q[set,set] means $1 = $2 & P[$2];
A1: for x,y,z st Q[x,y] & Q[x,z] holds y = z;
consider X such that
A2: for x holds x in X iff ex y st y in A() & Q[y,x] from TARSKI:sch 1(A1);
take X;
let x;
x in X iff ex y st y in A() & y = x & P[x] by A2;
hence thesis;
end;
definition
let X be set;
attr X is empty means
:Def1:
not ex x being set st x in X;
end;
registration
cluster empty for set;
existence
proof
defpred P[set] means contradiction;
consider Y such that
A1: x in Y iff x in the set & P[x] from Separation;
take Y;
thus not ex x being set st x in Y by A1;
end;
end;
definition
func {} -> set equals
the empty set;
coherence;
let X,Y be set;
func X \/ Y -> set means
:Def3:
x in it iff x in X or x in Y;
existence
proof
take union {X,Y};
let x;
thus x in union {X,Y} implies x in X or x in Y
proof
assume x in union {X,Y};
then ex Z being set st x in Z & Z in {X,Y} by TARSKI:def 4;
hence thesis by TARSKI:def 2;
end;
X in {X,Y} & Y in {X,Y} by TARSKI:def 2;
hence thesis by TARSKI:def 4;
end;
uniqueness
proof
let A1, A2 be set such that
A3: x in A1 iff x in X or x in Y and
A4: x in A2 iff x in X or x in Y;
now
let x;
x in A1 iff x in X or x in Y by A3;
hence x in A1 iff x in A2 by A4;
end;
hence thesis by TARSKI:1;
end;
commutativity;
idempotence;
func X /\ Y -> set means
:Def4:
x in it iff x in X & x in Y;
existence
proof
defpred P[set] means $1 in Y;
thus ex Z being set st for x holds x in Z iff x in X & P[x] from
Separation;
end;
uniqueness
proof
let A1, A2 be set such that
A5: x in A1 iff x in X & x in Y and
A6: x in A2 iff x in X & x in Y;
now
let x;
x in A1 iff x in X & x in Y by A5;
hence x in A1 iff x in A2 by A6;
end;
hence thesis by TARSKI:1;
end;
commutativity;
idempotence;
func X \ Y -> set means
:Def5:
x in it iff x in X & not x in Y;
existence
proof
defpred P[set] means not $1 in Y;
thus ex Z being set st for x holds x in Z iff x in X & P[x] from
Separation;
end;
uniqueness
proof
let A1, A2 be set such that
A7: x in A1 iff x in X & not x in Y and
A8: x in A2 iff x in X & not x in Y;
now
let x;
x in A1 iff x in X & not x in Y by A7;
hence x in A1 iff x in A2 by A8;
end;
hence thesis by TARSKI:1;
end;
end;
definition
let X, Y be set;
func X \+\ Y -> set equals
(X \ Y) \/ (Y \ X);
correctness;
commutativity;
pred X misses Y means
:Def7:
X /\ Y = {};
symmetry;
pred X c< Y means
:Def8:
X c= Y & X <> Y;
irreflexivity;
asymmetry
proof
let X,Y;
assume
A1: X c= Y;
assume X <> Y;
assume Y c= X;
then for x holds x in X iff x in Y by A1,TARSKI:def 3;
hence thesis by TARSKI:1;
end;
pred X,Y are_c=-comparable means
X c= Y or Y c= X;
reflexivity;
symmetry;
redefine pred X = Y means
X c= Y & Y c= X;
compatibility
proof
thus X = Y implies X c= Y & Y c= X;
assume X c= Y & Y c= X;
then for x holds x in X iff x in Y by TARSKI:def 3;
hence thesis by TARSKI:1;
end;
end;
notation
let X, Y be set;
antonym X meets Y for X misses Y;
end;
theorem
x in X \+\ Y iff not (x in X iff x in Y)
proof
x in X \+\ Y iff x in X \ Y or x in Y \ X by Def3;
hence thesis by Def5;
end;
theorem
(for x holds not x in X iff (x in Y iff x in Z)) implies X = Y \+\ Z
proof
assume
A1: not x in X iff (x in Y iff x in Z);
now
let x;
x in X iff x in Y & not x in Z or x in Z & not x in Y by A1;
then x in X iff x in Y \ Z or x in Z \ Y by Def5;
hence x in X iff x in Y \+\ Z by Def3;
end;
hence thesis by TARSKI:1;
end;
registration
cluster {} -> empty;
coherence;
end;
registration
let x1 be set;
cluster { x1 } -> non empty;
coherence
proof
x1 in {x1} by TARSKI:def 1;
hence ex x being set st x in {x1};
end;
let x2 be set;
cluster { x1, x2 } -> non empty;
coherence
proof
x1 in {x1,x2} by TARSKI:def 2;
hence ex x being set st x in {x1,x2};
end;
end;
registration
cluster non empty for set;
existence
proof
take { the set };
thus thesis;
end;
end;
registration
let D be non empty set, X be set;
cluster D \/ X -> non empty;
coherence
proof
consider x being set such that
A1: x in D by Def1;
x in D \/ X by A1,Def3;
hence ex x being set st x in D \/ X;
end;
cluster X \/ D -> non empty;
coherence;
end;
Lm1: X is empty implies X = {}
proof
assume not ex x st x in X;
then x in {} iff x in X by Def1;
hence thesis by TARSKI:1;
end;
theorem Th3:
X meets Y iff ex x st x in X & x in Y
proof
hereby
assume X meets Y;
then X /\ Y <> {} by Def7;
then X /\ Y is not empty by Lm1;
then consider x such that
A1: x in X /\ Y by Def1;
take x;
thus x in X & x in Y by A1,Def4;
end;
given x such that
A2: x in X & x in Y;
x in X /\ Y by A2,Def4;
then X /\ Y <> {} by Def1;
hence thesis by Def7;
end;
theorem
X meets Y iff ex x st x in X /\ Y
proof
hereby
assume X meets Y;
then X /\ Y <> {} by Def7;
then X /\ Y is not empty by Lm1;
then consider x such that
A1: x in X /\ Y by Def1;
take x;
thus x in X /\ Y by A1;
end;
assume ex x st x in X /\ Y;
then X /\ Y <> {} by Def1;
hence thesis by Def7;
end;
theorem
X misses Y & x in X \/ Y implies x in X & not x in Y or x in Y & not x in X
by Def3,Th3;
scheme
Extensionality { X,Y() -> set, P[set] } : X() = Y()
provided
A1: for x holds x in X() iff P[x] and
A2: for x holds x in Y() iff P[x]
proof
A3: x in Y() implies x in X()
proof
assume x in Y();
then P[x] by A2;
hence thesis by A1;
end;
x in X() implies x in Y()
proof
assume x in X();
then P[x] by A1;
hence thesis by A2;
end;
hence thesis by A3,TARSKI:1;
end;
scheme
SetEq { P[set] } :
for X1,X2 being set st
(for x being set holds x in X1 iff P[x]) &
(for x being set holds x in X2 iff P[x]) holds X1 = X2
proof
let X1,X2 be set such that
A1: for x being set holds x in X1 iff P[x] and
A2: for x being set holds x in X2 iff P[x];
thus thesis from Extensionality(A1,A2);
end;
begin
theorem
X c< Y implies ex x st x in Y & not x in X
proof
assume X c< Y;
then (not for x holds x in X iff x in Y) & X c= Y by Def8,TARSKI:1;
hence thesis by TARSKI:def 3;
end;
theorem
X <> {} implies ex x st x in X
proof
assume
A1: X <> {};
assume not ex x st x in X;
then X is empty by Def1;
hence thesis by A1,Lm1;
end;
begin
theorem
for X being set holds X \/ {} = X
proof
let X be set;
thus X \/ {} c= X
proof
let x be set;
assume x in X \/ {};
then x in X or x in {} by XBOOLE_0:def 3;
hence thesis by XBOOLE_0:def 1;
end;
let x be set;
assume x in X;
hence thesis by XBOOLE_0:def 3;
end;
theorem
for X being set holds X /\ {} = {}
proof
let X be set;
thus X /\ {} c= {}
proof
let x be set;
assume x in X /\ {};
hence thesis by XBOOLE_0:def 4;
end;
let x be set;
assume x in {};
hence thesis by XBOOLE_0:def 1;
end;
theorem
for X being set holds X \ {} = X
proof
let X be set;
thus X \ {} c= X
proof
let x be set;
assume x in X \ {};
hence thesis by XBOOLE_0:def 5;
end;
let x be set;
A1: not x in {} by XBOOLE_0:def 1;
assume x in X;
hence thesis by A1,XBOOLE_0:def 5;
end;
theorem
for X being set holds {} \ X = {}
proof
let X be set;
thus {} \ X c= {}
proof
let x be set;
assume x in {} \ X;
hence thesis by XBOOLE_0:def 5;
end;
let x be set;
assume x in {};
hence thesis by XBOOLE_0:def 1;
end;
theorem
for X being set holds X \+\ {} = X
proof
let X be set;
thus X \+\ {} c= X
proof
let x be set;
assume x in X \+\ {};
then
A1: x in X \ {} or x in {} \ X by XBOOLE_0:def 3;
per cases by A1,XBOOLE_0:def 5;
suppose
x in X & not x in {};
hence thesis;
end;
suppose
x in {} & not x in X;
hence thesis by XBOOLE_0:def 1;
end;
end;
let x be set;
A2: not x in {} by XBOOLE_0:def 1;
assume x in X;
then x in X \ {} by A2,XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
reserve x,X for set;
Lm1: X is empty implies X = {}
proof
assume not ex x st x in X;
then x in {} iff x in X by XBOOLE_0:def 1;
hence thesis by TARSKI:1;
end;
theorem
for X being set st X is empty holds X = {} by Lm1;
theorem
for x, X being set st x in X holds X is non empty by XBOOLE_0:def 1;
theorem
for X, Y being set st X is empty & X <> Y holds Y is non empty
proof
let X, Y be set;
assume that
A1: X is empty and
A2: X <> Y;
X = {} by A1,Lm1;
hence thesis by A2,Lm1;
end;
begin
reserve x,A,B,X,X9,Y,Y9,Z,V for set;
theorem Th1:
X c= Y & Y c= Z implies X c= Z
proof
assume that
A1: X c= Y and
A2: Y c= Z;
let x;
assume x in X;
then x in Y by A1,TARSKI:def 3;
hence thesis by A2,TARSKI:def 3;
end;
theorem Th2:
{} c= X
proof
let x;
thus thesis;
end;
theorem Th3:
X c= {} implies X = {}
proof
assume X c= {};
hence X c= {} & {} c= X by Th2;
end;
theorem Th4:
(X \/ Y) \/ Z = X \/ (Y \/ Z)
proof
thus (X \/ Y) \/ Z c= X \/ (Y \/ Z)
proof
let x;
assume x in (X \/ Y) \/ Z;
then x in X \/ Y or x in Z by XBOOLE_0:def 3;
then x in X or x in Y or x in Z by XBOOLE_0:def 3;
then x in X or x in Y \/ Z by XBOOLE_0:def 3;
hence thesis by XBOOLE_0:def 3;
end;
let x;
assume x in X \/ (Y \/ Z);
then x in X or x in Y \/ Z by XBOOLE_0:def 3;
then x in X or x in Y or x in Z by XBOOLE_0:def 3;
then x in X \/ Y or x in Z by XBOOLE_0:def 3;
hence thesis by XBOOLE_0:def 3;
end;
theorem
(X \/ Y) \/ Z = (X \/ Z) \/ (Y \/ Z)
proof
(X \/ Y) \/ Z = X \/ ((Z \/ Z) \/ Y) by Th4
.= X \/ (Z \/ (Z \/ Y)) by Th4
.= (X \/ Z) \/ (Y \/ Z) by Th4;
hence thesis;
end;
theorem
X \/ (X \/ Y) = X \/ Y
proof
X \/ (X \/ Y) = (X \/ X) \/ Y by Th4
.= X \/ Y;
hence thesis;
end;
theorem Th7:
X c= X \/ Y
proof
let x;
thus thesis by XBOOLE_0:def 3;
end;
theorem Th8:
X c= Z & Y c= Z implies X \/ Y c= Z
proof
assume
A1: X c= Z & Y c= Z;
let x;
assume x in X \/ Y;
then x in X or x in Y by XBOOLE_0:def 3;
hence thesis by A1,TARSKI:def 3;
end;
theorem
X c= Y implies X \/ Z c= Y \/ Z
proof
assume
A1: X c= Y;
let x;
assume x in X \/ Z;
then x in X or x in Z by XBOOLE_0:def 3;
then x in Y or x in Z by A1,TARSKI:def 3;
hence thesis by XBOOLE_0:def 3;
end;
theorem
X c= Y implies X c= Z \/ Y
proof
Y c= Z \/ Y by Th7;
hence thesis by Th1;
end;
theorem
X \/ Y c= Z implies X c= Z
proof
X c= X \/ Y by Th7;
hence thesis by Th1;
end;
theorem Th12:
X c= Y implies X \/ Y = Y
proof
assume
A1: X c= Y;
thus X \/ Y c= Y
proof
let x;
assume x in X \/ Y;
then x in X or x in Y by XBOOLE_0:def 3;
hence thesis by A1,TARSKI:def 3;
end;
let x;
thus thesis by XBOOLE_0:def 3;
end;
theorem
X c= Y & Z c= V implies X \/ Z c= Y \/ V
proof
assume
A1: X c= Y;
assume
A2: Z c= V;
let x;
assume x in X \/ Z;
then x in X or x in Z by XBOOLE_0:def 3;
then x in Y or x in V by A1,A2,TARSKI:def 3;
hence thesis by XBOOLE_0:def 3;
end;
theorem
(Y c= X & Z c= X & for V st Y c= V & Z c= V holds X c= V) implies X = Y \/ Z
proof
assume that
A1: Y c= X & Z c= X and
A2: Y c= V & Z c= V implies X c= V;
Y c= Y \/ Z & Z c= Y \/ Z by Th7;
hence X c= Y \/ Z by A2;
thus thesis by A1,Th8;
end;
theorem
X \/ Y = {} implies X = {};
theorem Th16:
(X /\ Y) /\ Z = X /\ (Y /\ Z)
proof
thus (X /\ Y) /\ Z c= X /\ (Y /\ Z)
proof
let x;
assume
A1: x in (X /\ Y) /\ Z;
then
A2: x in Z by XBOOLE_0:def 4;
A3: x in X /\ Y by A1,XBOOLE_0:def 4;
then
A4: x in X by XBOOLE_0:def 4;
x in Y by A3,XBOOLE_0:def 4;
then x in Y /\ Z by A2,XBOOLE_0:def 4;
hence thesis by A4,XBOOLE_0:def 4;
end;
let x;
assume
A5: x in X /\ (Y /\ Z);
then
A6: x in Y /\ Z by XBOOLE_0:def 4;
then
A7: x in Y by XBOOLE_0:def 4;
A8: x in Z by A6,XBOOLE_0:def 4;
x in X by A5,XBOOLE_0:def 4;
then x in X /\ Y by A7,XBOOLE_0:def 4;
hence thesis by A8,XBOOLE_0:def 4;
end;
theorem Th17:
X /\ Y c= X
proof
let x;
thus thesis by XBOOLE_0:def 4;
end;
theorem
X c= Y /\ Z implies X c= Y
proof
Y /\ Z c= Y by Th17;
hence thesis by Th1;
end;
theorem Th19:
Z c= X & Z c= Y implies Z c= X /\ Y
proof
assume
A1: Z c= X & Z c= Y;
let x;
assume x in Z;
then x in X & x in Y by A1,TARSKI:def 3;
hence thesis by XBOOLE_0:def 4;
end;
theorem
(X c= Y & X c= Z & for V st V c= Y & V c= Z holds V c= X) implies X = Y /\ Z
proof
assume that
A1: X c= Y & X c= Z and
A2: V c= Y & V c= Z implies V c= X;
thus X c= Y /\ Z by A1,Th19;
Y /\ Z c= Y & Y /\ Z c= Z implies Y /\ Z c= X by A2;
hence thesis by Th17;
end;
theorem
X /\ (X \/ Y) = X
proof
thus X /\ (X \/ Y) c= X
proof
let x;
thus thesis by XBOOLE_0:def 4;
end;
let x;
assume
A1: x in X;
then x in X \/ Y by XBOOLE_0:def 3;
hence thesis by A1,XBOOLE_0:def 4;
end;
theorem Th22:
X \/ (X /\ Y) = X
proof
thus X \/ (X /\ Y) c= X
proof
let x;
assume x in X \/ (X /\ Y);
then x in X or x in X /\ Y by XBOOLE_0:def 3;
hence thesis by XBOOLE_0:def 4;
end;
let x;
thus thesis by XBOOLE_0:def 3;
end;
theorem Th23:
X /\ (Y \/ Z) = X /\ Y \/ X /\ Z
proof
thus X /\ (Y \/ Z) c= X /\ Y \/ X /\ Z
proof
let x;
assume
A1: x in X /\ (Y \/ Z);
then x in Y \/ Z by XBOOLE_0:def 4;
then
A2: x in Y or x in Z by XBOOLE_0:def 3;
x in X by A1,XBOOLE_0:def 4;
then x in X /\ Y or x in X /\ Z by A2,XBOOLE_0:def 4;
hence thesis by XBOOLE_0:def 3;
end;
let x;
assume x in X /\ Y \/ X /\ Z;
then x in X /\ Y or x in X /\ Z by XBOOLE_0:def 3;
then
A3: x in X & x in Y or x in X & x in Z by XBOOLE_0:def 4;
then x in Y \/ Z by XBOOLE_0:def 3;
hence thesis by A3,XBOOLE_0:def 4;
end;
theorem Th24:
X \/ Y /\ Z = (X \/ Y) /\ (X \/ Z)
proof
thus X \/ Y /\ Z c= (X \/ Y) /\ (X \/ Z)
proof
let x;
assume x in X \/ Y /\ Z;
then x in X or x in Y /\ Z by XBOOLE_0:def 3;
then x in X or x in Y & x in Z by XBOOLE_0:def 4;
then x in X \/ Y & x in X \/ Z by XBOOLE_0:def 3;
hence thesis by XBOOLE_0:def 4;
end;
let x;
assume
A1: x in (X \/ Y) /\ (X \/ Z);
then x in X \/ Z by XBOOLE_0:def 4;
then
A2: x in X or x in Z by XBOOLE_0:def 3;
x in X \/ Y by A1,XBOOLE_0:def 4;
then x in X or x in Y by XBOOLE_0:def 3;
then x in X or x in Y /\ Z by A2,XBOOLE_0:def 4;
hence thesis by XBOOLE_0:def 3;
end;
theorem
(X /\ Y) \/ (Y /\ Z) \/ (Z /\ X) = (X \/ Y) /\ (Y \/ Z) /\ (Z \/ X)
proof
thus X /\ Y \/ Y /\ Z \/ Z /\ X = (X /\ Y \/ Y /\ Z \/ Z) /\ (X /\ Y \/ Y /\
Z \/ X) by Th24
.= (X /\ Y \/ (Y /\ Z \/ Z)) /\ (X /\ Y \/ Y /\ Z \/ X) by Th4
.= (X /\ Y \/ Z) /\ (X /\ Y \/ Y /\ Z \/ X) by Th22
.= (X /\ Y \/ Z) /\ (X /\ Y \/ X \/ Y /\ Z) by Th4
.= (X /\ Y \/ Z) /\ (X \/ Y /\ Z) by Th22
.= (X \/ Z) /\ (Y \/ Z) /\ (X \/ Y /\ Z) by Th24
.= (X \/ Z) /\ (Y \/ Z) /\ ((X \/ Y) /\ (X \/ Z)) by Th24
.= (X \/ Y) /\ ((Y \/ Z) /\ (X \/ Z) /\ (X \/ Z)) by Th16
.= (X \/ Y) /\ ((Y \/ Z) /\ ((X \/ Z) /\ (X \/ Z))) by Th16
.= (X \/ Y) /\ (Y \/ Z) /\ (Z \/ X) by Th16;
end;
theorem Th26:
X c= Y implies X /\ Z c= Y /\ Z
proof
assume
A1: X c= Y;
let x;
assume
A2: x in X /\ Z;
then x in X by XBOOLE_0:def 4;
then
A3: x in Y by A1,TARSKI:def 3;
x in Z by A2,XBOOLE_0:def 4;
hence thesis by A3,XBOOLE_0:def 4;
end;
theorem
X c= Y & Z c= V implies X /\ Z c= Y /\ V
proof
assume that
A1: X c= Y and
A2: Z c= V;
let x;
assume
A3: x in X /\ Z;
then x in Z by XBOOLE_0:def 4;
then
A4: x in V by A2,TARSKI:def 3;
x in X by A3,XBOOLE_0:def 4;
then x in Y by A1,TARSKI:def 3;
hence thesis by A4,XBOOLE_0:def 4;
end;
theorem Th28:
X c= Y implies X /\ Y = X
proof
assume
A1: X c= Y;
thus X /\ Y c= X by Th17;
let x;
assume
A2: x in X;
then x in Y by A1,TARSKI:def 3;
hence thesis by A2,XBOOLE_0:def 4;
end;
theorem
X /\ Y c= X \/ Z
proof
X /\ Y c= X & X c= X \/ Z by Th7,Th17;
hence thesis by Th1;
end;
theorem
X c= Z implies X \/ Y /\ Z = (X \/ Y) /\ Z
proof
assume
A1: X c= Z;
thus X \/ Y /\ Z c= (X \/ Y) /\ Z
proof
let x;
assume x in X \/ Y /\ Z;
then
A2: x in X or x in Y /\ Z by XBOOLE_0:def 3;
then x in X or x in Y & x in Z by XBOOLE_0:def 4;
then
A3: x in (X \/ Y) by XBOOLE_0:def 3;
x in Z by A1,A2,TARSKI:def 3,XBOOLE_0:def 4;
hence thesis by A3,XBOOLE_0:def 4;
end;
let x;
assume
A4: x in (X \/ Y) /\ Z;
then x in X \/ Y by XBOOLE_0:def 4;
then
A5: x in X or x in Y by XBOOLE_0:def 3;
x in Z by A4,XBOOLE_0:def 4;
then x in X & x in Z or x in Y /\ Z by A5,XBOOLE_0:def 4;
hence thesis by XBOOLE_0:def 3;
end;
theorem
(X /\ Y) \/ (X /\ Z) c= Y \/ Z
proof
now
let x;
assume x in (X /\ Y) \/ (X /\ Z);
then x in (X /\ Y) or x in (X /\ Z) by XBOOLE_0:def 3;
then x in X & x in Y or x in X & x in Z by XBOOLE_0:def 4;
hence x in Y \/ Z by XBOOLE_0:def 3;
end;
hence thesis by TARSKI:def 3;
end;
Lm1: X \ Y = {} iff X c= Y
proof
thus X \ Y = {} implies X c= Y
proof
assume
A1: X \ Y = {};
let x;
assume x in X & not x in Y;
hence contradiction by A1,XBOOLE_0:def 5;
end;
assume
A2: X c= Y;
now
let x;
x in X & not x in Y iff contradiction by A2,TARSKI:def 3;
hence x in X \ Y iff x in {} by XBOOLE_0:def 5;
end;
hence thesis by TARSKI:1;
end;
theorem
X \ Y = Y \ X implies X = Y
proof
assume
A1: X \ Y = Y \ X;
now
let x;
x in X & not x in Y iff x in Y \ X by A1,XBOOLE_0:def 5;
hence x in X iff x in Y by XBOOLE_0:def 5;
end;
hence thesis by TARSKI:1;
end;
theorem Th33:
X c= Y implies X \ Z c= Y \ Z
proof
assume
A1: X c= Y;
let x;
assume
A2: x in X \ Z;
then x in X by XBOOLE_0:def 5;
then
A3: x in Y by A1,TARSKI:def 3;
not x in Z by A2,XBOOLE_0:def 5;
hence thesis by A3,XBOOLE_0:def 5;
end;
theorem Th34:
X c= Y implies Z \ Y c= Z \ X
proof
assume
A1: X c= Y;
let x;
assume
A2: x in Z \ Y;
then not x in Y by XBOOLE_0:def 5;
then
A3: not x in X by A1,TARSKI:def 3;
x in Z by A2,XBOOLE_0:def 5;
hence thesis by A3,XBOOLE_0:def 5;
end;
Lm2: X \ (Y /\ Z) = (X \ Y) \/ (X \ Z)
proof
thus X \ (Y /\ Z) c= (X \ Y) \/ (X \ Z)
proof
let x;
assume
A1: x in X \ (Y /\ Z);
then not x in (Y /\ Z) by XBOOLE_0:def 5;
then
A2: not x in Y or not x in Z by XBOOLE_0:def 4;
x in X by A1,XBOOLE_0:def 5;
then x in (X \ Y) or x in (X \ Z) by A2,XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
(X \ Y) c= X \ (Y /\ Z) & X \ Z c= X \ (Y /\ Z) by Th17,Th34;
hence thesis by Th8;
end;
theorem
X c= Y & Z c= V implies X \ V c= Y \ Z
proof
assume X c= Y & Z c= V;
then X \ V c= Y \ V & Y \ V c= Y \ Z by Th33,Th34;
hence thesis by Th1;
end;
theorem Th36:
X \ Y c= X
proof
let x;
thus thesis by XBOOLE_0:def 5;
end;
theorem
X \ Y = {} iff X c= Y by Lm1;
theorem
X c= Y \ X implies X = {}
proof
assume
A1: X c= Y \ X;
thus X c= {}
proof
let x;
assume
A2: x in X;
then x in Y \ X by A1,TARSKI:def 3;
hence thesis by A2,XBOOLE_0:def 5;
end;
thus thesis by Th2;
end;
theorem Th39:
X \/ (Y \ X) = X \/ Y
proof
thus X \/ (Y \ X) c= X \/ Y
proof
let x;
assume x in X \/ (Y \ X);
then x in X or x in Y \ X by XBOOLE_0:def 3;
then x in X or x in Y by XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
let x;
assume x in X \/ Y;
then x in X or x in Y & not x in X by XBOOLE_0:def 3;
then x in X or x in Y \ X by XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
theorem
(X \/ Y) \ Y = X \ Y
proof
thus x in (X \/ Y) \ Y implies x in X \ Y
proof
assume
A1: x in (X \/ Y) \ Y;
then x in (X \/ Y) by XBOOLE_0:def 5;
then
A2: x in X or x in Y by XBOOLE_0:def 3;
not x in Y by A1,XBOOLE_0:def 5;
hence thesis by A2,XBOOLE_0:def 5;
end;
thus x in X \ Y implies x in (X \/ Y) \ Y
proof
assume
A3: x in X \ Y;
then x in X or x in Y by XBOOLE_0:def 5;
then
A4: x in (X \/ Y) by XBOOLE_0:def 3;
not x in Y by A3,XBOOLE_0:def 5;
hence thesis by A4,XBOOLE_0:def 5;
end;
end;
theorem Th41:
(X \ Y) \ Z = X \ (Y \/ Z)
proof
thus x in (X \ Y) \ Z implies x in X \ (Y \/ Z)
proof
assume
A1: x in (X \ Y) \ Z;
then
A2: not x in Z by XBOOLE_0:def 5;
A3: x in (X \ Y) by A1,XBOOLE_0:def 5;
then
A4: x in X by XBOOLE_0:def 5;
not x in Y by A3,XBOOLE_0:def 5;
then not x in (Y \/ Z) by A2,XBOOLE_0:def 3;
hence thesis by A4,XBOOLE_0:def 5;
end;
thus x in X \ (Y \/ Z) implies x in (X \ Y) \ Z
proof
assume
A5: x in X \ (Y \/ Z);
then
A6: not x in (Y \/ Z) by XBOOLE_0:def 5;
then
A7: not x in Y by XBOOLE_0:def 3;
A8: not x in Z by A6,XBOOLE_0:def 3;
x in X by A5,XBOOLE_0:def 5;
then x in (X \ Y) by A7,XBOOLE_0:def 5;
hence thesis by A8,XBOOLE_0:def 5;
end;
end;
theorem Th42:
(X \/ Y) \ Z = (X \ Z) \/ (Y \ Z)
proof
thus (X \/ Y) \ Z c= (X \ Z) \/ (Y \ Z)
proof
let x;
assume
A1: x in (X \/ Y) \ Z;
then x in (X \/ Y) by XBOOLE_0:def 5;
then x in X & not x in Z or x in Y & not x in Z by A1,XBOOLE_0:def 3,def 5;
then x in (X \ Z) or x in (Y \ Z) by XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
let x;
assume x in (( X \ Z) \/ (Y \ Z));
then x in (X \ Z) or x in (Y \ Z) by XBOOLE_0:def 3;
then
A2: x in X & not x in Z or x in Y & not x in Z by XBOOLE_0:def 5;
then x in (X \/ Y) by XBOOLE_0:def 3;
hence thesis by A2,XBOOLE_0:def 5;
end;
theorem
X c= Y \/ Z implies X \ Y c= Z
proof
assume
A1: X c= Y \/ Z;
let x;
assume
A2: x in X \ Y;
then x in X by XBOOLE_0:def 5;
then
A3: x in Y \/ Z by A1,TARSKI:def 3;
not x in Y by A2,XBOOLE_0:def 5;
hence thesis by A3,XBOOLE_0:def 3;
end;
theorem
X \ Y c= Z implies X c= Y \/ Z
proof
assume
A1: x in X \ Y implies x in Z;
let x;
assume x in X;
then x in X \ Y or x in Y by XBOOLE_0:def 5;
then x in Z or x in Y by A1;
hence thesis by XBOOLE_0:def 3;
end;
theorem
X c= Y implies Y = X \/ (Y \ X)
proof
assume
A1: X c= Y;
now
let x;
x in Y iff x in X or x in (Y \ X) by A1,TARSKI:def 3,XBOOLE_0:def 5;
hence x in Y iff x in X \/ (Y \ X) by XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem
X \ (X \/ Y) = {}
proof
X c= X \/ Y by Th7;
hence thesis by Lm1;
end;
theorem Th47:
X \ X /\ Y = X \ Y
proof
now
let x;
x in X & not x in X /\ Y iff x in X & not x in Y by XBOOLE_0:def 4;
hence x in X \ X /\ Y iff x in X \ Y by XBOOLE_0:def 5;
end;
hence thesis by TARSKI:1;
end;
theorem
X \ (X \ Y) = X /\ Y
proof
thus x in X \ (X \ Y) implies x in X /\ Y
proof
assume
A1: x in X \ (X \ Y);
then not x in (X \ Y) by XBOOLE_0:def 5;
then
A2: not x in X or x in Y by XBOOLE_0:def 5;
x in X by A1,XBOOLE_0:def 5;
hence thesis by A2,XBOOLE_0:def 4;
end;
thus x in X /\ Y implies x in X \ (X \ Y)
proof
assume
A3: x in X /\ Y;
then not x in X or x in Y by XBOOLE_0:def 4;
then
A4: not x in (X \ Y) by XBOOLE_0:def 5;
x in X by A3,XBOOLE_0:def 4;
hence thesis by A4,XBOOLE_0:def 5;
end;
end;
theorem Th49:
X /\ (Y \ Z) = (X /\ Y) \ Z
proof
now
let x;
x in X & x in Y & not x in Z iff x in X & x in Y & not x in Z;
then x in X & x in (Y \ Z) iff x in (X /\ Y) & not x in Z by XBOOLE_0:def 4
,def 5;
hence x in X /\ (Y \ Z) iff x in (X /\ Y) \ Z by XBOOLE_0:def 4,def 5;
end;
hence thesis by TARSKI:1;
end;
theorem Th50:
X /\ (Y \ Z) = X /\ Y \ X /\ Z
proof
A1: X /\ Y c= X by Th17;
X /\ Y \ X /\ Z = ((X /\ Y) \ X) \/ ((X /\ Y) \ Z) by Lm2
.= {} \/ ((X /\ Y) \ Z) by A1,Lm1
.= (X /\ Y) \ Z;
hence thesis by Th49;
end;
theorem Th51:
X /\ Y \/ (X \ Y) = X
proof
thus X /\ Y \/ (X \ Y) c= X
proof
let x;
assume x in X /\ Y \/ (X \ Y);
then x in X /\ Y or x in (X \ Y) by XBOOLE_0:def 3;
hence thesis by XBOOLE_0:def 4,def 5;
end;
let x;
assume x in X;
then x in X & x in Y or x in (X\Y) by XBOOLE_0:def 5;
then x in X /\ Y or x in (X \ Y) by XBOOLE_0:def 4;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th52:
X \ (Y \ Z) = (X \ Y) \/ X /\ Z
proof
thus x in X \ (Y \ Z) implies x in (X \ Y) \/ X /\ Z
proof
assume
A1: x in X \ (Y \ Z);
then not x in (Y \ Z) by XBOOLE_0:def 5;
then x in X & not x in Y or x in X & x in Z by A1,XBOOLE_0:def 5;
then x in (X \ Y) or x in X /\ Z by XBOOLE_0:def 4,def 5;
hence thesis by XBOOLE_0:def 3;
end;
thus x in (X \ Y) \/ X /\ Z implies x in X \ (Y \ Z)
proof
assume x in (X \ Y) \/ X /\ Z;
then x in (X \ Y) or x in X /\ Z by XBOOLE_0:def 3;
then
A2: x in X & not x in Y or x in X & x in Z by XBOOLE_0:def 4,def 5;
then not x in (Y \ Z) by XBOOLE_0:def 5;
hence thesis by A2,XBOOLE_0:def 5;
end;
end;
theorem
X \ (Y \/ Z) = (X \ Y) /\ (X \ Z)
proof
X \(Y \/ Z) c= X \ Y & X \ (Y \/ Z) c= X \ Z by Th7,Th34;
hence X \ (Y \/ Z) c= (X \ Y) /\ (X \ Z) by Th19;
let x;
assume
A1: x in (X \ Y) /\ (X \ Z);
then
A2: x in (X \ Y) by XBOOLE_0:def 4;
then
A3: x in X by XBOOLE_0:def 5;
x in (X \ Z) by A1,XBOOLE_0:def 4;
then
A4: not x in Z by XBOOLE_0:def 5;
not x in Y by A2,XBOOLE_0:def 5;
then not x in (Y \/ Z) by A4,XBOOLE_0:def 3;
hence thesis by A3,XBOOLE_0:def 5;
end;
theorem
X \ (Y /\ Z) = (X \ Y) \/ (X \ Z) by Lm2;
theorem Th55:
(X \/ Y) \ (X /\ Y) = (X \ Y) \/ (Y \ X)
proof
x in (X \/ Y) \ (X /\ Y) iff x in (X \ Y) \/ (Y \ X)
proof
thus x in (X \/ Y) \ (X /\ Y) implies x in (X \ Y) \/ (Y \ X)
proof
assume
A1: x in (X \/ Y) \ (X /\ Y);
then not x in (X /\ Y) by XBOOLE_0:def 5;
then
A2: not x in X or not x in Y by XBOOLE_0:def 4;
x in (X \/ Y) by A1,XBOOLE_0:def 5;
then x in X or x in Y by XBOOLE_0:def 3;
then x in (X \ Y) or x in( Y \ X) by A2,XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
assume x in (X \ Y) \/ (Y \ X);
then x in (X \ Y) or x in (Y \ X) by XBOOLE_0:def 3;
then x in X & not x in Y or x in Y & not x in X by XBOOLE_0:def 5;
then ( not x in (X /\ Y))& x in (X \/ Y) by XBOOLE_0:def 3,def 4;
hence thesis by XBOOLE_0:def 5;
end;
hence thesis by TARSKI:1;
end;
Lm3: X c= Y & Y c< Z implies X c< Z
proof
assume that
A1: X c= Y and
A2: Y c< Z;
Y c= Z by A2,XBOOLE_0:def 8;
hence X c= Z & X <> Z by A1,A2,Th1,XBOOLE_0:def 10;
end;
theorem
X c< Y & Y c< Z implies X c< Z
proof
assume that
A1: X c< Y and
A2: Y c< Z;
X c= Y by A1,XBOOLE_0:def 8;
hence thesis by A2,Lm3;
end;
theorem
not (X c< Y & Y c< X);
theorem
X c< Y & Y c= Z implies X c< Z
proof
assume that
A1: X c< Y and
A2: Y c= Z;
X c= Y by A1,XBOOLE_0:def 8;
hence X c= Z & X <> Z by A1,A2,Th1,XBOOLE_0:def 10;
end;
theorem
X c= Y & Y c< Z implies X c< Z by Lm3;
theorem Th60:
X c= Y implies not Y c< X
proof
assume X c= Y & Y c= X & X <> Y;
hence contradiction by XBOOLE_0:def 10;
end;
theorem
X <> {} implies {} c< X
proof
assume
A1: X <> {};
thus {} c= X by Th2;
thus thesis by A1;
end;
theorem
not X c< {}
proof
assume
A1: X c< {};
then X c= {} by XBOOLE_0:def 8;
hence contradiction by A1,Th3;
end;
theorem Th63:
X c= Y & Y misses Z implies X misses Z
proof
assume X c= Y & Y /\ Z = {};
then X /\ Z = {} by Th3,Th26;
hence thesis by XBOOLE_0:def 7;
end;
theorem
A c= X & B c= Y & X misses Y implies A misses B
proof
assume that
A1: A c= X and
A2: B c= Y and
A3: X misses Y;
A misses Y by A1,A3,Th63;
hence thesis by A2,Th63;
end;
theorem
X misses {}
proof
assume X meets {};
then ex x st x in X & x in {} by XBOOLE_0:3;
hence contradiction;
end;
theorem
X meets X iff X <> {}
proof
hereby
assume X meets X;
then ex x st x in X & x in X by XBOOLE_0:3;
hence X <> {};
end;
assume X <> {};
then X /\ X <> {};
hence thesis by XBOOLE_0:def 7;
end;
theorem
X c= Y & X c= Z & Y misses Z implies X = {}
proof
assume X c= Y & X c= Z & Y /\ Z = {};
hence thesis by Th3,Th19;
end;
theorem Th68:
for A being non empty set st A c= Y & A c= Z holds Y meets Z
proof
let A be non empty set;
consider x being set such that
A1: x in A by XBOOLE_0:def 1;
assume A c= Y & A c= Z;
then x in Y & x in Z by A1,TARSKI:def 3;
hence thesis by XBOOLE_0:3;
end;
theorem
for A being non empty set st A c= Y holds A meets Y by Th68;
theorem Th70:
X meets Y \/ Z iff X meets Y or X meets Z
proof
thus X meets Y \/ Z implies X meets Y or X meets Z
proof
assume X meets Y \/ Z;
then consider x such that
A1: x in X & x in Y \/ Z by XBOOLE_0:3;
x in X & x in Y or x in X & x in Z by A1,XBOOLE_0:def 3;
hence thesis by XBOOLE_0:3;
end;
A2: X meets Z implies X meets Y \/ Z
proof
assume X meets Z;
then consider x such that
A3: x in X and
A4: x in Z by XBOOLE_0:3;
x in Y \/ Z by A4,XBOOLE_0:def 3;
hence thesis by A3,XBOOLE_0:3;
end;
X meets Y implies X meets Y \/ Z
proof
assume X meets Y;
then consider x such that
A5: x in X and
A6: x in Y by XBOOLE_0:3;
x in Y \/ Z by A6,XBOOLE_0:def 3;
hence thesis by A5,XBOOLE_0:3;
end;
hence thesis by A2;
end;
theorem
X \/ Y = Z \/ Y & X misses Y & Z misses Y implies X = Z
proof
assume that
A1: X \/ Y = Z \/ Y and
A2: X /\ Y = {} and
A3: Z /\ Y = {};
thus X c= Z
proof
let x be set such that
A4: x in X;
X c= Z \/ Y by A1,Th7;
then
A5: x in Z \/ Y by A4,TARSKI:def 3;
not x in Y by A2,A4,XBOOLE_0:def 4;
hence thesis by A5,XBOOLE_0:def 3;
end;
let x be set such that
A6: x in Z;
Z c= X \/ Y by A1,Th7;
then
A7: x in X \/ Y by A6,TARSKI:def 3;
not x in Y by A3,A6,XBOOLE_0:def 4;
hence thesis by A7,XBOOLE_0:def 3;
end;
theorem
X9 \/ Y9 = X \/ Y & X misses X9 & Y misses Y9 implies X = Y9
proof
assume
A1: X9 \/ Y9 = X \/ Y;
assume X misses X9 & Y misses Y9;
then
A2: X /\ X9 = {} & Y /\ Y9 = {} by XBOOLE_0:def 7;
thus X = X /\ (X9 \/ Y9) by A1,Th7,Th28
.= X /\ X9 \/ X /\ Y9 by Th23
.= (X \/ Y) /\ Y9 by A2,Th23
.= Y9 by A1,Th7,Th28;
end;
theorem
X c= Y \/ Z & X misses Z implies X c= Y
proof
assume that
A1: X c= Y \/ Z and
A2: X /\ Z = {};
X /\ (Y \/ Z)= X by A1,Th28;
then Y /\ X \/ {} = X by A2,Th23;
hence thesis by Th17;
end;
theorem Th74:
X meets Y /\ Z implies X meets Y
proof
assume X meets Y /\ Z;
then consider x such that
A1: x in X and
A2: x in Y /\ Z by XBOOLE_0:3;
x in Y by A2,XBOOLE_0:def 4;
hence thesis by A1,XBOOLE_0:3;
end;
theorem
X meets Y implies X /\ Y meets Y
proof
assume X meets Y;
then consider x being set such that
A1: x in X and
A2: x in Y by XBOOLE_0:3;
x in X /\ Y by A1,A2,XBOOLE_0:def 4;
hence thesis by A2,XBOOLE_0:3;
end;
theorem
Y misses Z implies X /\ Y misses X /\ Z
proof
assume Y misses Z;
then (X /\ Z) misses Y by Th74;
hence thesis by Th74;
end;
theorem
X meets Y & X c= Z implies X meets Y /\ Z
proof
assume that
A1: X meets Y and
A2: X c= Z;
now
assume
A3: X /\ (Y /\ Z) = {};
X /\ Y = (X /\ Z) /\ Y by A2,Th28
.= {} by A3,Th16;
hence contradiction by A1,XBOOLE_0:def 7;
end;
hence thesis by XBOOLE_0:def 7;
end;
theorem
X misses Y implies X /\ (Y \/ Z) = X /\ Z
proof
assume X misses Y;
then X /\ Y = {} by XBOOLE_0:def 7;
hence X /\ (Y \/ Z) = {} \/ X /\ Z by Th23
.= X /\ Z;
end;
theorem Th79:
X \ Y misses Y
proof
not ex x st x in (X \ Y) /\ Y
proof
given x such that
A1: x in (X \ Y) /\ Y;
x in X \ Y & x in Y by A1,XBOOLE_0:def 4;
hence contradiction by XBOOLE_0:def 5;
end;
hence (X \ Y) /\ Y = {} by XBOOLE_0:def 1;
end;
theorem
X misses Y implies X misses Y \ Z
proof
assume
A1: X misses Y;
assume X meets Y \ Z;
then consider x such that
A2: x in X and
A3: x in Y \ Z by XBOOLE_0:3;
x in Y by A3,XBOOLE_0:def 5;
hence thesis by A1,A2,XBOOLE_0:3;
end;
theorem
X misses Y \ Z implies Y misses X \ Z
proof
A1: X misses Y \ Z iff X /\ (Y \ Z) = {} by XBOOLE_0:def 7;
X /\ (Y \ Z) = Y /\ X \ Z by Th49
.= Y /\ (X \ Z) by Th49;
hence thesis by A1,XBOOLE_0:def 7;
end;
theorem
X \ Y misses Y \ X
proof
assume X \ Y meets Y \ X;
then consider x such that
A1: x in X \ Y and
A2: x in Y \ X by XBOOLE_0:3;
x in X by A1,XBOOLE_0:def 5;
hence thesis by A2,XBOOLE_0:def 5;
end;
theorem Th83:
X misses Y iff X \ Y = X
proof
thus X misses Y implies X \ Y = X
proof
assume
A1: X /\ Y = {};
thus for x holds x in X \ Y implies x in X by XBOOLE_0:def 5;
let x;
not x in X /\ Y implies not x in X or not x in Y by XBOOLE_0:def 4;
hence thesis by A1,XBOOLE_0:def 5;
end;
assume
A2: X \ Y = X;
not ex x st x in X /\ Y
proof
given x such that
A3: x in X /\ Y;
x in X & x in Y by A3,XBOOLE_0:def 4;
hence contradiction by A2,XBOOLE_0:def 5;
end;
hence thesis by XBOOLE_0:4;
end;
theorem
X meets Y & X misses Z implies X meets Y \ Z
proof
assume that
A1: X meets Y and
A2: X misses Z;
X /\ (Y \ Z) = X /\ Y \ X /\ Z by Th50
.= X /\ Y \ {} by A2,XBOOLE_0:def 7;
hence X /\ (Y \ Z) <> {} by A1,XBOOLE_0:def 7;
end;
theorem
X c= Y implies X misses Z \ Y
proof
assume
A1: X c= Y;
thus X /\ (Z \ Y) = Z /\ X \ Y by Th49
.= Z /\ (X \ Y) by Th49
.= Z /\ {} by A1,Lm1
.= {};
end;
theorem Th86:
X c= Y & X misses Z implies X c= Y \ Z
proof
assume
A1: X c= Y & X /\ Z = {};
let x;
assume x in X;
then x in Y & not x in Z by A1,TARSKI:def 3,XBOOLE_0:def 4;
hence thesis by XBOOLE_0:def 5;
end;
theorem
Y misses Z implies (X \ Y) \/ Z = (X \/ Z) \ Y
proof
assume
A1: Y misses Z;
thus (X \/ Z) \ Y = (X \ Y) \/ (Z \ Y) by Th42
.= (X \ Y) \/ Z by A1,Th83;
end;
theorem Th88:
X misses Y implies (X \/ Y) \ Y = X
proof
assume
A1: X misses Y;
thus (X \/ Y) \ Y = (X \ Y) \/ (Y \ Y) by Th42
.= (X \ Y) \/ {} by Lm1
.= X by A1,Th83;
end;
theorem Th89:
X /\ Y misses X \ Y
proof
now
let x;
not (x in X & x in Y & not x in Y);
hence not (x in X /\ Y & x in X \ Y) by XBOOLE_0:def 4,def 5;
end;
hence thesis by XBOOLE_0:3;
end;
theorem
X \ (X /\ Y) misses Y
proof
X \ (X /\ Y) = X \ Y by Th47;
hence thesis by Th79;
end;
theorem
(X \+\ Y) \+\ Z = X \+\ (Y \+\ Z)
proof
set S1 = X \ (Y \/ Z), S2 = Y \ (X \/ Z), S3 = Z \ (X \/ Y), S4 = X /\ Y /\
Z;
thus (X \+\ Y) \+\ Z = (((X \ Y) \ Z) \/ ((Y \ X) \ Z)) \/ (Z \ ((X \ Y) \/
(Y \ X))) by Th42
.= (S1 \/ ((Y \ X) \ Z)) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th41
.= (S1 \/ S2) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th41
.= (S1 \/ S2) \/ (Z \ ((X \/ Y) \ (X /\ Y))) by Th55
.= (S1 \/ S2) \/ (S4 \/ S3) by Th52
.= (S1 \/ S2 \/ S4) \/ S3 by Th4
.= (S1 \/ S4 \/ S2) \/ S3 by Th4
.= (S1 \/ S4) \/ (S2 \/ S3) by Th4
.= (S1 \/ X /\ (Y /\ Z)) \/ (S2 \/ S3) by Th16
.= X \ ((Y \/ Z) \ (Y /\ Z)) \/ (S2 \/ S3) by Th52
.= X \ ((Y \ Z) \/ (Z \ Y)) \/ (S2 \/ (Z \ (Y \/ X))) by Th55
.= X \ ((Y \ Z) \/ (Z \ Y)) \/ ((Y \ (Z \/ X)) \/ (Z \ Y \ X)) by Th41
.= X \ ((Y \ Z) \/ (Z \ Y)) \/ ((Y \ Z \ X) \/ (Z \ Y \ X)) by Th41
.= X \+\ (Y \+\ Z) by Th42;
end;
theorem
X \+\ X = {} by Lm1;
theorem Th93:
X \/ Y = (X \+\ Y) \/ X /\ Y
proof
thus X \/ Y = ((X \ Y) \/ X /\ Y) \/ Y by Th51
.= (X \ Y) \/ (X /\ Y \/ Y) by Th4
.= (X \ Y) \/ Y by Th22
.= (X \ Y) \/ ((Y \ X) \/ (Y /\ X)) by Th51
.= (X \+\ Y) \/ X /\ Y by Th4;
end;
Lm4: X /\ Y misses X \+\ Y
proof
X /\ Y misses X \ Y & X /\ Y misses Y \ X by Th89;
hence thesis by Th70;
end;
Lm5: X \+\ Y = (X \/ Y) \ X /\ Y
proof
thus X \+\ Y = (X \ X /\ Y) \/ (Y \ X) by Th47
.= (X \ X /\ Y) \/ (Y \ X /\ Y) by Th47
.= (X \/ Y) \ X /\ Y by Th42;
end;
theorem
X \/ Y = X \+\ Y \+\ X /\ Y
proof
X /\ Y misses X \+\ Y by Lm4;
then (X \+\ Y) \ X /\ Y = X \+\ Y & X /\ Y \ (X \+\ Y) = X /\ Y by Th83;
hence thesis by Th93;
end;
theorem
X /\ Y = X \+\ Y \+\ (X \/ Y)
proof
X \+\ Y = (X \/ Y) \ X /\ Y by Lm5;
then X \+\ Y c= X \/ Y by Th36;
then
A1: (X \+\ Y) \ (X \/ Y) = {} by Lm1;
X \/ Y = (X \+\ Y) \/ X /\ Y by Th93;
hence thesis by A1,Lm4,Th88;
end;
theorem
X \ Y c= X \+\ Y by Th7;
theorem
X \ Y c= Z & Y \ X c= Z implies X \+\ Y c= Z by Th8;
theorem
X \/ Y = X \+\ (Y \ X)
proof
A1: Y \ X \ X = Y \ (X \/ X) by Th41
.= Y \ X;
X \ (Y \ X) = (X \ Y) \/ X /\ X by Th52
.= X by Th12,Th36;
hence thesis by A1,Th39;
end;
theorem
(X \+\ Y) \ Z = (X \ (Y \/ Z)) \/ (Y \ (X \/ Z))
proof
thus (X \+\ Y) \ Z = (X \ Y \ Z) \/ (Y \ X \ Z) by Th42
.= (X \ (Y \/ Z)) \/ (Y \ X \ Z) by Th41
.= (X \ (Y \/ Z)) \/ (Y \ (X \/ Z)) by Th41;
end;
theorem
X \ Y = X \+\ (X /\ Y)
proof
X /\ Y c= X by Th17;
then X /\ Y \ X = {} by Lm1;
hence thesis by Th47;
end;
theorem
X \+\ Y = (X \/ Y) \ X /\ Y by Lm5;
theorem
X \ (Y \+\ Z) = X \ (Y \/ Z) \/ X /\ Y /\ Z
proof
thus X \ (Y \+\ Z) = X \ ((Y \/ Z) \ Y /\ Z) by Lm5
.= X \ (Y \/ Z) \/ X /\ (Y /\ Z) by Th52
.= X \ (Y \/ Z) \/ X /\ Y /\ Z by Th16;
end;
theorem
X /\ Y misses X \+\ Y by Lm4;
theorem
X c< Y or X = Y or Y c< X iff X,Y are_c=-comparable
proof
thus X c< Y or X = Y or Y c< X implies X,Y are_c=-comparable
proof
assume X c< Y or X = Y or Y c< X;
hence X c= Y or Y c= X by XBOOLE_0:def 8;
end;
assume X c= Y or Y c= X;
hence thesis by XBOOLE_0:def 8;
end;
begin
theorem
for X, Y being set st X c< Y holds Y \ X <> {}
proof
let X, Y be set;
assume
A1: X c< Y;
assume Y \ X = {};
then Y c= X by Lm1;
hence thesis by A1,Th60;
end;
theorem Th106:
X c= A \ B implies X c= A & X misses B
proof
assume
A1: X c= A \ B;
A \ B c= A by Th36;
hence X c= A by A1,Th1;
now
let x;
assume x in X;
then x in A \ B by A1,TARSKI:def 3;
hence not x in B by XBOOLE_0:def 5;
end;
hence thesis by XBOOLE_0:3;
end;
theorem
X c= A \+\ B iff X c= A \/ B & X misses A /\ B
proof
A \+\ B = (A \/ B) \ A /\ B by Lm5;
hence thesis by Th86,Th106;
end;
theorem
X c= A implies X /\ Y c= A
proof
X /\ Y c= X by Th17;
hence thesis by Th1;
end;
theorem Th109:
X c= A implies X \ Y c= A
proof
X \ Y c= X by Th36;
hence thesis by Th1;
end;
theorem
X c= A & Y c= A implies X \+\ Y c= A
proof
assume X c= A & Y c= A;
then X \ Y c= A & Y \ X c= A by Th109;
hence thesis by Th8;
end;
theorem Th111:
(X /\ Z) \ (Y /\ Z) = (X \ Y) /\ Z
proof
thus (X /\ Z) \ (Y /\ Z) = ((X /\ Z) \ Y) \/ ((X /\ Z) \ Z) by Lm2
.= ((X /\ Z) \ Y) \/ (X /\ (Z \ Z)) by Th49
.= ((X /\ Z) \ Y) \/ (X /\ {}) by Lm1
.= (X \ Y) /\ Z by Th49;
end;
theorem
(X /\ Z) \+\ (Y /\ Z) = (X \+\ Y) /\ Z
proof
thus (X /\ Z) \+\ (Y /\ Z) = ((X \ Y) /\ Z) \/ ((Y /\ Z) \ (X /\ Z)) by Th111
.= ((X \ Y) /\ Z) \/ ((Y \ X) /\ Z) by Th111
.= (X \+\ Y) /\ Z by Th23;
end;
theorem
X \/ Y \/ Z \/ V = X \/ (Y \/ Z \/ V)
proof
X \/ Y \/ Z \/ V = X \/ Y \/ (Z \/ V) by Th4
.= X \/ (Y \/ (Z \/ V)) by Th4
.= X \/ (Y \/ Z \/ V) by Th4;
hence thesis;
end;
theorem
for A,B,C,D being set st A misses D & B misses D & C misses D holds A
\/ B \/ C misses D
proof
let A,B,C,D be set;
assume A misses D & B misses D;
then
A1: A \/ B misses D by Th70;
assume C misses D;
hence thesis by A1,Th70;
end;
theorem
not A c< {}
proof
assume
A1: A c< {};
then A c= {} by XBOOLE_0:def 8;
hence contradiction by A1,Th3;
end;
theorem
X /\ (Y /\ Z) = (X /\ Y) /\ (X /\ Z)
proof
thus X /\ (Y /\ Z) = X /\ X /\ Y /\ Z by Th16
.= X /\ (X /\ Y) /\ Z by Th16
.= (X /\ Y) /\ (X /\ Z) by Th16;
end;
theorem
for P,G,C being set st C c= G holds P \ C = (P \ G) \/ (P /\ (G \ C))
proof
let P,G,C be set;
assume C c= G;
then
A1: P \ G c= P \ C by Th34;
thus P \ C c= (P \ G) \/ (P /\ (G \ C))
proof
let x be set;
assume x in P \ C;
then x in P & not x in G or x in P & x in G & not x in C by XBOOLE_0:def 5;
then x in P \ G or x in P & x in G \ C by XBOOLE_0:def 5;
then x in P \ G or x in P /\ (G \ C) by XBOOLE_0:def 4;
hence thesis by XBOOLE_0:def 3;
end;
P /\ (G \ C) = (P /\ G) \ C & (P /\ G) \ C c= P \ C by Th17,Th33,Th49;
hence thesis by A1,Th8;
end;
begin
reserve x,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,y,X,Z for set;
Lm1: x in union({X,{y}}) iff x in X or x=y
proof
A1: x in union({X,{y}}) implies x in X or x in {y}
proof
assume x in union({X,{y}});
then ex Z st x in Z & Z in {X,{y}} by TARSKI:def 4;
hence thesis by TARSKI:def 2;
end;
A2: x in {y} iff x=y by TARSKI:def 1;
X in {X,{y}} & {y} in {X,{y}} by TARSKI:def 2;
hence thesis by A1,A2,TARSKI:def 4;
end;
definition
let x1,x2,x3;
func { x1,x2,x3 } -> set means
:Def1:
x in it iff x=x1 or x=x2 or x=x3;
existence
proof
take union({{x1,x2},{x3}});
let x;
x in { x1,x2 } iff x = x1 or x = x2 by TARSKI:def 2;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3;
for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for
x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3;
hence thesis;
end;
end;
definition
let x1,x2,x3,x4;
func { x1,x2,x3,x4 } -> set means
:Def2:
x in it iff x=x1 or x=x2 or x=x3 or x=x4;
existence
proof
take union({{x1,x2,x3},{x4}});
let x;
x in { x1,x2,x3 } iff x = x1 or x = x2 or x = x3 by Def1;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4;
for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for
x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3;
hence thesis;
end;
end;
definition
let x1,x2,x3,x4,x5;
func { x1,x2,x3,x4,x5 } -> set means
:Def3:
x in it iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5;
existence
proof
take union({{x1,x2,x3,x4},{x5}});
let x;
x in { x1,x2,x3,x4 } iff x = x1 or x = x2 or x = x3 or x = x4 by Def2;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5;
for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for
x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3;
hence thesis;
end;
end;
definition
let x1,x2,x3,x4,x5,x6;
func { x1,x2,x3,x4,x5,x6 } -> set means
:Def4:
x in it iff x=x1 or x=x2 or x =x3 or x=x4 or x=x5 or x=x6;
existence
proof
take union({{x1,x2,x3,x4,x5},{x6}});
let x;
x in {x1,x2,x3,x4,x5} iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 by Def3;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6;
for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for
x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3;
hence thesis;
end;
end;
definition
let x1,x2,x3,x4,x5,x6,x7;
func { x1,x2,x3,x4,x5,x6,x7 } -> set means
:Def5:
x in it iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7;
existence
proof
take union({{x1,x2,x3,x4,x5,x6},{x7}});
let x;
x in { x1,x2,x3,x4,x5,x6 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or
x=x6 by Def4;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or
$1=x7;
for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for
x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3;
hence thesis;
end;
end;
definition
let x1,x2,x3,x4,x5,x6,x7,x8;
func { x1,x2,x3,x4,x5,x6,x7,x8 } -> set means
:Def6:
x in it iff x=x1 or x= x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8;
existence
proof
take union({{x1,x2,x3,x4,x5,x6,x7},{x8}});
let x;
x in { x1,x2,x3,x4,x5,x6,x7 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5
or x = x6 or x=x7 by Def5;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or
$1=x7 or $1=x8;
for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for
x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3;
hence thesis;
end;
end;
definition
let x1,x2,x3,x4,x5,x6,x7,x8,x9;
func { x1,x2,x3,x4,x5,x6,x7,x8,x9 } -> set means
:Def7:
x in it iff x=x1 or
x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8 or x=x9;
existence
proof
take union({{x1,x2,x3,x4,x5,x6,x7,x8},{x9}});
let x;
x in { x1,x2,x3,x4,x5,x6,x7,x8 } iff x=x1 or x=x2 or x=x3 or x=x4 or x
=x5 or x = x6 or x=x7 or x=x8 by Def6;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or
$1=x7 or $1=x8 or $1=x9;
thus for X, Y being set st (for x being set holds x in X iff P[x]) & (for
x being set holds x in Y iff P[x]) holds X = Y from XBOOLE_0:sch 3;
end;
end;
definition
let x1,x2,x3,x4,x5,x6,x7,x8,x9,x10;
func { x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 } -> set means
:Def8:
x in it iff x=x1
or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8 or x=x9 or x=x10;
existence
proof
take union({{x1,x2,x3,x4,x5,x6,x7,x8,x9},{x10}});
let x;
x in { x1,x2,x3,x4,x5,x6,x7,x8,x9 } iff x=x1 or x=x2 or x=x3 or x=x4
or x=x5 or x = x6 or x=x7 or x=x8 or x=x9 by Def7;
hence thesis by Lm1;
end;
uniqueness
proof
defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or
$1=x7 or $1=x8 or $1=x9 or $1=x10;
thus for X, Y being set st (for x being set holds x in X iff P[x]) & (for
x being set holds x in Y iff P[x]) holds X = Y from XBOOLE_0:sch 3;
end;
end;
theorem Th1:
{ x1,x2 } = { x1 } \/ { x2 }
proof
now
let x;
x in { x1,x2 } iff x=x1 or x=x2 by TARSKI:def 2;
then x in { x1,x2 } iff x in { x1 } or x in { x2 } by TARSKI:def 1;
hence x in { x1,x2 } iff x in { x1 } \/ { x2 } by XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem Th2:
{ x1,x2,x3 } = { x1 } \/ { x2,x3 }
proof
now
let x;
x in { x1,x2,x3 } iff x=x1 or x=x2 or x=x3 by Def1;
then x in { x1,x2,x3 } iff x in { x1 } or x in { x2,x3 } by TARSKI:def 1
,def 2;
hence x in { x1,x2,x3 } iff x in { x1 } \/ { x2,x3 } by XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem Th3:
{ x1,x2,x3 } = { x1,x2 } \/ { x3 }
proof
thus { x1,x2,x3 } = { x1 } \/ { x2,x3 } by Th2
.= { x1 } \/ ({ x2 } \/ { x3 }) by Th1
.= { x1 } \/ { x2 } \/ { x3 } by XBOOLE_1:4
.= { x1,x2 } \/ { x3 } by Th1;
end;
Lm2: { x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 }
proof
now
let x;
x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2;
then x in { x1,x2,x3,x4 } iff x in { x1,x2 } or x in { x3,x4 } by
TARSKI:def 2;
hence x in { x1,x2,x3,x4 } iff x in { x1,x2 } \/ { x3,x4 } by
XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem Th4:
{ x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 }
proof
thus { x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 } by Lm2
.= { x1 } \/ { x2 } \/ { x3,x4 } by Th1
.= { x1 } \/ ({ x2 } \/ { x3,x4 }) by XBOOLE_1:4
.= { x1 } \/ { x2,x3,x4 } by Th2;
end;
theorem
{ x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 } by Lm2;
theorem Th6:
{ x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 }
proof
thus { x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 } by Lm2
.= { x1,x2 } \/ ({ x3 } \/ { x4 }) by Th1
.= { x1,x2 } \/ { x3 } \/ { x4 } by XBOOLE_1:4
.= { x1,x2,x3 } \/ { x4 } by Th3;
end;
Lm3: { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 }
proof
now
let x;
x in { x1,x2,x3,x4,x5 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 by Def3;
then x in { x1,x2,x3,x4,x5 } iff x in { x1,x2,x3 } or x in { x4,x5 } by
Def1,TARSKI:def 2;
hence x in { x1,x2,x3,x4,x5 } iff x in { x1,x2,x3 } \/ { x4,x5 } by
XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem Th7:
{ x1,x2,x3,x4,x5 } = { x1 } \/ { x2,x3,x4,x5 }
proof
thus { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3
.= { x1 } \/ { x2,x3 } \/ { x4,x5 } by Th2
.= { x1 } \/ ({ x2,x3 } \/ { x4,x5 }) by XBOOLE_1:4
.= { x1 } \/ { x2,x3,x4,x5 } by Lm2;
end;
theorem Th8:
{ x1,x2,x3,x4,x5 } = { x1,x2 } \/ { x3,x4,x5 }
proof
thus { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3
.= { x1,x2 } \/ { x3 } \/ { x4,x5 } by Th3
.= { x1,x2 } \/ ({ x3 } \/ { x4,x5 }) by XBOOLE_1:4
.= { x1,x2 } \/ { x3,x4,x5 } by Th2;
end;
theorem
{ x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3;
theorem Th10:
{ x1,x2,x3,x4,x5 } = { x1,x2,x3,x4 } \/ { x5 }
proof
thus { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3
.= { x1,x2,x3 } \/ ({ x4 } \/ { x5 }) by Th1
.= { x1,x2,x3 } \/ { x4 } \/ { x5 } by XBOOLE_1:4
.= { x1,x2,x3,x4 } \/ { x5 } by Th6;
end;
Lm4: { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 }
proof
now
let x;
x in { x1,x2,x3,x4,x5,x6 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or
x=x6 by Def4;
then
x in { x1,x2,x3,x4,x5,x6 } iff x in { x1,x2,x3 } or x in { x4,x5,x6 }
by Def1;
hence x in { x1,x2,x3,x4,x5,x6 } iff x in { x1,x2,x3 } \/ { x4,x5,x6 } by
XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem Th11:
{ x1,x2,x3,x4,x5,x6 } = { x1 } \/ { x2,x3,x4,x5,x6 }
proof
thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4
.= { x1 } \/ { x2,x3 } \/ { x4,x5,x6 } by Th2
.= { x1 } \/ ({ x2,x3 } \/ { x4,x5,x6 }) by XBOOLE_1:4
.= { x1 } \/ { x2,x3,x4,x5,x6 } by Th8;
end;
theorem Th12:
{ x1,x2,x3,x4,x5,x6 } = { x1,x2 } \/ { x3,x4,x5,x6 }
proof
thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4
.= { x1,x2 } \/ { x3 } \/ { x4,x5,x6 } by Th3
.= { x1,x2 } \/ ({ x3 } \/ { x4,x5,x6 }) by XBOOLE_1:4
.= { x1,x2 } \/ { x3,x4,x5,x6 } by Th4;
end;
theorem
{ x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4;
theorem Th14:
{ x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4 } \/ { x5,x6 }
proof
thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4
.= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6 }) by Th2
.= { x1,x2,x3 } \/ { x4 } \/ { x5,x6 } by XBOOLE_1:4
.= { x1,x2,x3,x4 } \/ { x5,x6 } by Th6;
end;
theorem
{ x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4,x5 } \/ { x6 }
proof
thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4
.= { x1,x2,x3 } \/ ({ x4,x5 } \/ { x6 }) by Th3
.= { x1,x2,x3 } \/ { x4,x5 } \/ { x6 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5 } \/ { x6 } by Lm3;
end;
Lm5: { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 }
proof
now
let x;
A1: x in { x5,x6,x7 } iff x=x5 or x=x6 or x=x7 by Def1;
x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2;
hence x in { x1,x2,x3,x4,x5,x6,x7 } iff x in { x1,x2,x3,x4 } \/ { x5,x6,x7
} by A1,Def5,XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem Th16:
{ x1,x2,x3,x4,x5,x6,x7 } = { x1 } \/ { x2,x3,x4,x5,x6,x7 }
proof
thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5
.= { x1 } \/ { x2,x3,x4 } \/ { x5,x6,x7 } by Th4
.= { x1 } \/ ({ x2,x3,x4 } \/ { x5,x6,x7 }) by XBOOLE_1:4
.= { x1 } \/ { x2,x3,x4,x5,x6,x7 } by Lm4;
end;
theorem Th17:
{ x1,x2,x3,x4,x5,x6,x7 } = { x1,x2 } \/ { x3,x4,x5,x6,x7 }
proof
thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5
.= { x1,x2 } \/ { x3,x4 } \/ { x5,x6,x7 } by Lm2
.= { x1,x2 } \/ ({ x3,x4 } \/ { x5,x6,x7 }) by XBOOLE_1:4
.= { x1,x2 } \/ { x3,x4,x5,x6,x7 } by Th8;
end;
theorem Th18:
{ x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3 } \/ { x4,x5,x6,x7 }
proof
thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5
.= { x1,x2,x3 } \/ { x4 } \/ { x5,x6,x7 } by Th6
.= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6,x7 }) by XBOOLE_1:4
.= { x1,x2,x3 } \/ { x4,x5,x6,x7 } by Th4;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5;
theorem
{ x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4,x5 } \/ { x6,x7 }
proof
thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5
.= { x1,x2,x3,x4 } \/ ({ x5 } \/ { x6,x7 }) by Th2
.= { x1,x2,x3,x4 } \/ { x5 } \/ { x6,x7 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5 } \/ { x6,x7 } by Th10;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4,x5,x6 } \/ { x7 }
proof
thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5
.= { x1,x2,x3,x4 } \/ ({ x5,x6 } \/ { x7 }) by Th3
.= { x1,x2,x3,x4 } \/ { x5,x6 } \/ { x7 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5,x6 } \/ { x7 } by Th14;
end;
Lm6: { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 }
proof
now
let x;
A1: x in { x5,x6,x7,x8 } iff x=x5 or x=x6 or x=x7 or x=x8 by Def2;
x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2;
hence
x in { x1,x2,x3,x4,x5,x6,x7,x8 } iff x in { x1,x2,x3,x4 } \/ { x5,x6,
x7,x8 } by A1,Def6,XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8 } = { x1 } \/ { x2,x3,x4,x5,x6,x7,x8 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6
.= { x1 } \/ { x2,x3,x4 } \/ { x5,x6,x7,x8 } by Th4
.= { x1 } \/ ({ x2,x3,x4 } \/ { x5,x6,x7,x8 }) by XBOOLE_1:4
.= { x1 } \/ { x2,x3,x4,x5,x6,x7,x8 } by Th18;
end;
theorem Th23:
{ x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2 } \/ { x3,x4,x5,x6,x7,x8 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6
.= { x1,x2 } \/ { x3,x4 } \/ { x5,x6,x7,x8 } by Lm2
.= { x1,x2 } \/ ({ x3,x4 } \/ { x5,x6,x7,x8 }) by XBOOLE_1:4
.= { x1,x2 } \/ { x3,x4,x5,x6,x7,x8 } by Th12;
end;
theorem Th24:
{ x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3 } \/ { x4,x5,x6,x7,x8 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6
.= { x1,x2,x3 } \/ { x4 } \/ { x5,x6,x7,x8 } by Th6
.= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6,x7,x8 }) by XBOOLE_1:4
.= { x1,x2,x3 } \/ { x4,x5,x6,x7,x8 } by Th7;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4,x5 } \/ { x6,x7,x8 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6
.= { x1,x2,x3,x4 } \/ ({x5 } \/ { x6,x7,x8 }) by Th4
.= { x1,x2,x3,x4 } \/ {x5 } \/ { x6,x7,x8 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5 } \/ { x6,x7,x8 } by Th10;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4,x5,x6 } \/ { x7,x8 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6
.= { x1,x2,x3,x4 } \/ ({ x5,x6 } \/ { x7,x8 }) by Lm2
.= { x1,x2,x3,x4 } \/ { x5,x6 } \/ { x7,x8 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5,x6 } \/ { x7,x8 } by Th14;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4,x5,x6,x7 } \/ { x8 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6
.= { x1,x2,x3,x4 } \/ ({ x5,x6,x7 } \/ { x8 }) by Th6
.= { x1,x2,x3,x4 } \/ { x5,x6,x7 } \/ { x8 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5,x6,x7 } \/ { x8 } by Lm5;
end;
theorem Th29:
{ x1,x1 } = { x1 }
proof
now
let x;
x in { x1,x1 } iff x = x1 by TARSKI:def 2;
hence x in { x1,x1 } iff x in { x1 } by TARSKI:def 1;
end;
hence thesis by TARSKI:1;
end;
theorem Th30:
{ x1,x1,x2 } = { x1,x2 }
proof
thus { x1,x1,x2 } = { x1,x1 } \/ { x2 } by Th3
.= { x1 } \/ { x2 } by Th29
.= { x1,x2 } by Th1;
end;
theorem Th31:
{ x1,x1,x2,x3 } = { x1,x2,x3 }
proof
thus { x1,x1,x2,x3 } = { x1,x1 } \/ { x2,x3 } by Lm2
.= { x1 } \/ { x2,x3 } by Th29
.= { x1,x2,x3 } by Th2;
end;
theorem Th32:
{ x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 }
proof
thus { x1,x1,x2,x3,x4 } = { x1,x1 } \/ { x2,x3,x4 } by Th8
.= { x1 } \/ { x2,x3,x4 } by Th29
.= { x1,x2,x3,x4 } by Th4;
end;
theorem Th33:
{ x1,x1,x2,x3,x4,x5 } = { x1,x2,x3,x4,x5 }
proof
thus { x1,x1,x2,x3,x4,x5 } = { x1,x1 } \/ { x2,x3,x4,x5 } by Th12
.= { x1 } \/ { x2,x3,x4,x5 } by Th29
.= { x1,x2,x3,x4,x5 } by Th7;
end;
theorem Th34:
{ x1,x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4,x5,x6 }
proof
thus { x1,x1,x2,x3,x4,x5,x6 } = { x1,x1 } \/ { x2,x3,x4,x5,x6 } by Th17
.= { x1 } \/ { x2,x3,x4,x5,x6 } by Th29
.= { x1,x2,x3,x4,x5,x6 } by Th11;
end;
theorem Th35:
{ x1,x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4,x5,x6,x7 }
proof
thus { x1,x1,x2,x3,x4,x5,x6,x7 } = { x1,x1 } \/ { x2,x3,x4,x5,x6,x7 } by Th23
.= { x1 } \/ { x2,x3,x4,x5,x6,x7 } by Th29
.= { x1,x2,x3,x4,x5,x6,x7 } by Th16;
end;
theorem
{ x1,x1,x1 } = { x1 }
proof
thus { x1,x1,x1 } = { x1,x1 } by Th30
.= { x1 } by Th29;
end;
theorem Th37:
{ x1,x1,x1,x2 } = { x1,x2 }
proof
thus { x1,x1,x1,x2 } = { x1,x1,x2 } by Th31
.= { x1,x2 } by Th30;
end;
theorem Th38:
{ x1,x1,x1,x2,x3 } = { x1,x2,x3 }
proof
thus { x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th32
.= { x1,x2,x3 } by Th31;
end;
theorem Th39:
{ x1,x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 }
proof
thus { x1,x1,x1,x2,x3,x4 } = { x1,x1,x2,x3,x4 } by Th33
.= { x1,x2,x3,x4 } by Th32;
end;
theorem Th40:
{ x1,x1,x1,x2,x3,x4,x5 } = { x1,x2,x3,x4,x5 }
proof
thus { x1,x1,x1,x2,x3,x4,x5 } = { x1,x1,x2,x3,x4,x5 } by Th34
.= { x1,x2,x3,x4,x5 } by Th33;
end;
theorem Th41:
{ x1,x1,x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4,x5,x6 }
proof
thus { x1,x1,x1,x2,x3,x4,x5,x6 } = { x1,x1,x2,x3,x4,x5,x6 } by Th35
.= { x1,x2,x3,x4,x5,x6 } by Th34;
end;
theorem
{ x1,x1,x1,x1 } = { x1 }
proof
thus { x1,x1,x1,x1 } = { x1,x1 } by Th37
.= { x1 } by Th29;
end;
theorem Th43:
{ x1,x1,x1,x1,x2 } = { x1,x2 }
proof
thus { x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th38
.= { x1,x2 } by Th30;
end;
theorem Th44:
{ x1,x1,x1,x1,x2,x3 } = { x1,x2,x3 }
proof
thus { x1,x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th39
.= { x1,x2,x3 } by Th31;
end;
theorem Th45:
{ x1,x1,x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 }
proof
thus { x1,x1,x1,x1,x2,x3,x4 } = { x1,x1,x2,x3,x4 } by Th40
.= { x1,x2,x3,x4 } by Th32;
end;
theorem Th46:
{ x1,x1,x1,x1,x2,x3,x4,x5 } = { x1,x2,x3,x4,x5 }
proof
thus { x1,x1,x1,x1,x2,x3,x4,x5 } = { x1,x1,x2,x3,x4,x5 } by Th41
.= { x1,x2,x3,x4,x5 } by Th33;
end;
theorem
{ x1,x1,x1,x1,x1 } = { x1 }
proof
thus { x1,x1,x1,x1,x1 } = { x1,x1 } by Th43
.= { x1 } by Th29;
end;
theorem Th48:
{ x1,x1,x1,x1,x1,x2 } = { x1,x2 }
proof
thus { x1,x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th44
.= { x1,x2 } by Th30;
end;
theorem Th49:
{ x1,x1,x1,x1,x1,x2,x3 } = { x1,x2,x3 }
proof
thus { x1,x1,x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th45
.= { x1,x2,x3 } by Th31;
end;
theorem Th50:
{ x1,x1,x1,x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 }
proof
thus { x1,x1,x1,x1,x1,x2,x3,x4 } = { x1,x1,x2,x3,x4 } by Th46
.= { x1,x2,x3,x4 } by Th32;
end;
theorem
{ x1,x1,x1,x1,x1,x1 } = { x1 }
proof
thus { x1,x1,x1,x1,x1,x1 } = { x1,x1 } by Th48
.= { x1 } by Th29;
end;
theorem Th52:
{ x1,x1,x1,x1,x1,x1,x2 } = { x1,x2 }
proof
thus { x1,x1,x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th49
.= { x1,x2 } by Th30;
end;
theorem Th53:
{ x1,x1,x1,x1,x1,x1,x2,x3 } = { x1,x2,x3 }
proof
thus { x1,x1,x1,x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th50
.= { x1,x2,x3 } by Th31;
end;
theorem
{ x1,x1,x1,x1,x1,x1,x1 } = { x1 }
proof
thus { x1,x1,x1,x1,x1,x1,x1 } = { x1,x1 } by Th52
.= { x1 } by Th29;
end;
theorem Th55:
{ x1,x1,x1,x1,x1,x1,x1,x2 } = { x1,x2 }
proof
thus { x1,x1,x1,x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th53
.= { x1,x2 } by Th30;
end;
theorem
{ x1,x1,x1,x1,x1,x1,x1,x1 } = { x1 }
proof
thus { x1,x1,x1,x1,x1,x1,x1,x1 } = { x1,x1 } by Th55
.= { x1 } by Th29;
end;
theorem Th57:
{ x1,x2,x3 } = { x1,x3,x2 }
proof
thus { x1,x2,x3 } = { x1 } \/ { x2,x3 } by Th2
.= { x1,x3,x2 } by Th2;
end;
theorem Th58:
{ x1,x2,x3 } = { x2,x1,x3 }
proof
thus { x1,x2,x3 } = { x1,x2 } \/ { x3 } by Th3
.= { x2,x1,x3 } by Th3;
end;
theorem Th59:
{ x1,x2,x3 } = { x2,x3,x1 }
proof
thus { x1,x2,x3 } = { x2,x3 } \/ { x1 } by Th2
.= { x2,x3,x1 } by Th3;
end;
theorem Th60:
{ x1,x2,x3 } = { x3,x2,x1 }
proof
thus { x1,x2,x3 } = { x3,x1,x2 } by Th59
.= { x3,x2,x1 } by Th57;
end;
theorem Th61:
{ x1,x2,x3,x4 } = { x1,x2,x4,x3 }
proof
thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4
.= { x1 } \/ { x2,x4,x3 } by Th57
.= { x1,x2,x4,x3 } by Th4;
end;
theorem
{ x1,x2,x3,x4 } = { x1,x3,x2,x4 }
proof
thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4
.= { x1 } \/ { x3,x2,x4 } by Th58
.= { x1,x3,x2,x4 } by Th4;
end;
theorem Th63:
{ x1,x2,x3,x4 } = { x1,x3,x4,x2 }
proof
thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4
.= { x1 } \/ { x3,x4,x2 } by Th59
.= { x1,x3,x4,x2 } by Th4;
end;
theorem Th64:
{ x1,x2,x3,x4 } = { x1,x4,x3,x2 }
proof
thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4
.= { x1 } \/ { x4,x3,x2 } by Th60
.= { x1,x4,x3,x2 } by Th4;
end;
theorem Th65:
{ x1,x2,x3,x4 } = { x2,x1,x3,x4 }
proof
thus { x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 } by Th6
.= { x2,x1,x3 } \/ { x4 } by Th58
.= { x2,x1,x3,x4 } by Th6;
end;
Lm7: { x1,x2,x3,x4 } = { x2,x3,x1,x4 }
proof
thus { x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 } by Th6
.= { x2,x3,x1 } \/ { x4 } by Th59
.= { x2,x3,x1,x4 } by Th6;
end;
theorem
{ x1,x2,x3,x4 } = { x2,x1,x4,x3 }
proof
thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7
.= { x2,x1,x4,x3 } by Th63;
end;
theorem
{ x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7;
theorem
{ x1,x2,x3,x4 } = { x2,x3,x4,x1 }
proof
thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7
.= { x2,x3,x4,x1 } by Th61;
end;
theorem Th69:
{ x1,x2,x3,x4 } = { x2,x4,x1,x3 }
proof
thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7
.= { x2,x4,x1,x3 } by Th64;
end;
theorem
{ x1,x2,x3,x4 } = { x2,x4,x3,x1 }
proof
thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7
.= { x2,x4,x3,x1 } by Th63;
end;
Lm8: { x1,x2,x3,x4 } = { x3,x2,x1,x4 }
proof
thus { x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 } by Th6
.= { x3,x2,x1 } \/ { x4 } by Th60
.= { x3,x2,x1,x4 } by Th6;
end;
theorem
{ x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8;
theorem
{ x1,x2,x3,x4 } = { x3,x2,x4,x1 }
proof
thus { x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8
.= { x3,x2,x4,x1 } by Th61;
end;
theorem
{ x1,x2,x3,x4 } = { x3,x4,x1,x2 }
proof
thus { x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8
.= { x3,x4,x1,x2 } by Th64;
end;
theorem Th74:
{ x1,x2,x3,x4 } = { x3,x4,x2,x1 }
proof
thus { x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8
.= { x3,x4,x2,x1 } by Th63;
end;
theorem
{ x1,x2,x3,x4 } = { x4,x2,x3,x1 }
proof
thus { x1,x2,x3,x4 } = { x3,x4,x2,x1 } by Th74
.= { x4,x2,x3,x1 } by Lm7;
end;
theorem
{ x1,x2,x3,x4 } = { x4,x3,x2,x1 }
proof
thus { x1,x2,x3,x4 } = { x3,x4,x2,x1 } by Th74
.= { x4,x3,x2,x1 } by Th65;
end;
Lm9: { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
proof
now
let x;
A1: x in { x5,x6,x7,x8,x9 } iff x=x5 or x=x6 or x=x7 or x=x8 or x=x9 by Def3;
x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2;
hence
x in { x1,x2,x3,x4,x5,x6,x7,x8,x9 } iff x in { x1,x2,x3,x4 } \/ { x5,
x6,x7,x8,x9 } by A1,Def7,XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1 } \/ { x2,x3,x4,x5,x6,x7,x8,x9 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9
.= ({ x1 } \/ { x2,x3,x4 }) \/ { x5,x6,x7,x8,x9 } by Th4
.= { x1 } \/ ({ x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }) by XBOOLE_1:4
.= { x1 } \/ { x2,x3,x4,x5,x6,x7,x8,x9 } by Th24;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2 } \/ { x3,x4,x5,x6,x7,x8,x9 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9
.= { x1,x2 } \/ { x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm2
.= { x1,x2 } \/ ({ x3,x4 } \/ { x5,x6,x7,x8,x9 }) by XBOOLE_1:4
.= { x1,x2 } \/ { x3,x4,x5,x6,x7,x8,x9 } by Th17;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3 } \/ { x4,x5,x6,x7,x8,x9 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9
.= { x1,x2,x3 } \/ { x4 } \/ { x5,x6,x7,x8,x9 } by Th6
.= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6,x7,x8,x9 }) by XBOOLE_1:4
.= { x1,x2,x3 } \/ { x4,x5,x6,x7,x8,x9 } by Th11;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5 } \/ { x6,x7,x8,x9 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9
.= { x1,x2,x3,x4 } \/ ({x5 } \/ { x6,x7,x8,x9 }) by Th7
.= { x1,x2,x3,x4 } \/ {x5 } \/ { x6,x7,x8,x9 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5 } \/ { x6,x7,x8,x9 } by Th10;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5,x6 } \/ { x7,x8,x9 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9
.= { x1,x2,x3,x4 } \/ ({ x5,x6 } \/ { x7,x8,x9 }) by Th8
.= { x1,x2,x3,x4 } \/ { x5,x6 } \/ { x7,x8,x9 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5,x6 } \/ { x7,x8,x9 } by Th14;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5,x6,x7 } \/ { x8,x9 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9
.= { x1,x2,x3,x4 } \/ ({ x5,x6,x7 } \/ { x8,x9 }) by Lm3
.= { x1,x2,x3,x4 } \/ { x5,x6,x7 } \/ { x8,x9 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5,x6,x7 } \/ { x8,x9 } by Lm5;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5,x6,x7,x8 } \/ { x9 }
proof
thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }
by Lm9
.= { x1,x2,x3,x4 } \/ ({ x5,x6,x7,x8 } \/ { x9 }) by Th10
.= { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } \/ { x9 } by XBOOLE_1:4
.= { x1,x2,x3,x4,x5,x6,x7,x8 } \/ { x9 } by Lm6;
end;
theorem
{ x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 } = { x1,x2,x3,x4,x5,x6,x7,x8,x9 } \/
{ x10 }
proof
now
let x;
A1: x in {x10} iff x=x10 by TARSKI:def 1;
x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8 or x=x9
or x=x10 iff x in { x1,x2,x3,x4,x5,x6,x7,x8,x9 } or x = x10 by Def7;
hence
x in { x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 } iff x in { x1,x2,x3,x4,x5,x6,
x7,x8,x9 } \/ {x10} by A1,Def8,XBOOLE_0:def 3;
end;
hence thesis by TARSKI:1;
end;
begin
theorem
for x, y, z being set st x <> y & x <> z holds {x, y, z} \ {x} = {y, z }
proof
let x, y, z be set such that
A1: x <> y & x <> z;
hereby
let a be set;
assume
A2: a in {x, y, z} \ {x};
then a in {x, y, z} by XBOOLE_0:def 5;
then
A3: a = x or a = y or a = z by Def1;
not a in {x} by A2,XBOOLE_0:def 5;
hence a in {y, z} by A3,TARSKI:def 1,def 2;
end;
let a be set;
assume a in {y, z};
then
A4: a = y or a = z by TARSKI:def 2;
then
A5: not a in {x} by A1,TARSKI:def 1;
a in {x, y, z} by A4,Def1;
hence thesis by A5,XBOOLE_0:def 5;
end;
theorem
for x1,x2,x3 being set holds {x2,x1} \/ {x3,x1} = {x1,x2,x3}
proof
let x1,x2,x3 be set;
thus {x2,x1} \/ {x3,x1} = {x2,x1,x3,x1} by Lm2
.= {x1,x1,x2,x3} by Th69
.= {x1,x2,x3} by Th31;
end;
begin
reserve x,x1,x2,x3,x4,y,y1,y2,y3,y4,z,z1,z2,z2,z4 for set;
definition let x;
attr x is pair means
:Dfx: ex x1,x2 st x = [x1,x2];
end;
registration let x1,x2;
cluster [x1,x2] -> pair;
coherence by Dfx;
end;
reserve X,Y for set;
Lx4: {x} = {y1,y2} implies x = y1
proof
assume { x } = { y1,y2 };
then y1 in { x } by TARSKI:def 2;
hence thesis by TARSKI:def 1;
end;
Lx5: {x} = {y1,y2} implies y1 = y2
proof
assume
A1: { x } = { y1,y2 };
then x = y1 by Lx4;
hence thesis by A1,Lx4;
end;
Lx6: { x1,x2 } = { y1,y2 } implies x1 = y1 or x1 = y2
proof
x1 in { x1,x2 } by TARSKI:def 2;
hence thesis by TARSKI:def 2;
end;
theorem Th1:
[x1,x2] = [y1,y2] implies x1 = y1 & x2 = y2
proof
assume
A1: [x1,x2] = [y1,y2];
per cases;
suppose
A3: y1 <> y2;
then
A4: {x1} <> {y1,y2} by Lx5;
then {x1} = {y1} by A1,Lx6;
then x1 in {y1} by TARSKI:def 1;
hence
A5: x1 = y1 by TARSKI:def 1;
{y1,y2} = {x1,x2} by A1,A4,Lx6;
hence thesis by A3,A5,Lx6;
end;
suppose
A6: y1 = y2;
then {{x1,x2},{x1}} = {{y1},{y1}} by A1,ENUMSET1:29
.= {{y1}} by ENUMSET1:29;
then { y1 } = { x1,x2 } by Lx4;
hence thesis by A6,Lx4;
end;
end;
definition
let x;
assume x is pair;
then consider x1,x2 such that
A1: x = [x1,x2] by Dfx;
func x`1 means
:Def1: x = [y1,y2] implies it = y1;
existence
proof
take x1;
thus thesis by A1,Th1;
end;
uniqueness
proof
let z1,z2;
assume that
A2: x = [y1,y2] implies z1 = y1 and
A3: x = [y1,y2] implies z2 = y1;
thus z1 = x1 by A1,A2
.= z2 by A1,A3;
end;
func x`2 means
:Def2: x = [y1,y2] implies it = y2;
existence
proof
take x2;
thus thesis by A1,Th1;
end;
uniqueness
proof
let z1,z2;
assume that
A4: x = [y1,y2] implies z1 = y2 and
A5: x = [y1,y2] implies z2 = y2;
thus z1 = x2 by A1,A4
.= z2 by A1,A5;
end;
end;
registration let x1,x2;
reduce [x1,x2]`1 to x1;
reducibility by Def1;
reduce [x1,x2]`2 to x2;
reducibility by Def2;
end;
registration
cluster pair for set;
existence
proof
take [the set, the set], the set, the set;
thus thesis;
end;
end;
registration let x be pair set;
reduce [x`1,x`2] to x;
reducibility
proof
consider x1,x2 such that
W: x = [x1,x2] by Dfx;
thus [x`1,x`2] = [x1,x`2] by W,Def1
.= x by W,Def2;
end;
end;
theorem
for a,b being pair set st a`1 = b`1 & a`2 = b`2
holds a = b
proof let a,b be pair set such that
Z: a`1 = b`1 & a`2 = b`2;
a = [a`1,a`2] & b = [b`1,b`2];
hence a = b by Z;
end;
begin
definition
let x1,x2,x3;
func [x1,x2,x3] equals
[[x1,x2],x3];
coherence;
end;
definition let x;
attr x is triple means
:Dfy: ex x1,x2,x3 st x = [x1,x2,x3];
end;
registration let x1,x2,x3;
cluster [x1,x2,x3] -> triple;
coherence by Dfy;
end;
theorem Th3:
[x1,x2,x3] = [y1,y2,y3] implies x1 = y1 & x2 = y2 & x3 = y3
proof
assume
A1: [x1,x2,x3] = [y1,y2,y3];
then [x1,x2] = [y1,y2] by Th1;
hence thesis by A1,Th1;
end;
registration
cluster triple for set;
existence
proof
take [the set, the set, the set], the set, the set, the set;
thus thesis;
end;
cluster triple -> pair for set;
coherence
proof let x be set;
assume ex x1,x2,x3 st x = [x1,x2,x3];
hence thesis;
end;
end;
definition
let x be set;
func x`1_3 equals x`1`1;
coherence;
func x`2_3 equals x`1`2;
coherence;
end;
notation
let x be set;
synonym x`3_3 for x`2;
end;
registration let x1,x2,x3;
reduce [x1,x2,x3]`1_3 to x1;
reducibility
proof
thus [x1,x2,x3]`1_3 = [[x1,x2],x3]`1`1 .= x1;
end;
reduce [x1,x2,x3]`2_3 to x2;
reducibility
proof
thus [x1,x2,x3]`2_3 = [[x1,x2],x3]`1`2 .= x2;
end;
reduce [x1,x2,x3]`3_3 to x3;
reducibility
proof
thus [x1,x2,x3]`3_3 = [[x1,x2],x3]`2 .= x3;
end;
end;
registration let x be triple set;
reduce [x`1_3,x`2_3,x`3_3] to x;
reducibility
proof
consider x1,x2,x3 such that
W: x = [x1,x2,x3] by Dfy;
[x1,x2,x3]`1_3 = x1 & [x1,x2,x3]`2_3 = x2 & [x1,x2,x3]`3_3 = x3;
hence thesis by W;
end;
end;
theorem
for a,b being triple set st a`1_3 = b`1_3 & a`2_3 = b`2_3 & a`3_3 = b`3_3
holds a = b
proof let a,b be triple set such that
Z: a`1_3 = b`1_3 & a`2_3 = b`2_3 & a`3_3 = b`3_3;
a = [a`1_3,a`2_3,a`3_3] & b = [b`1_3,b`2_3,b`3_3];
hence a = b by Z;
end;
begin
definition
let x1,x2,x3,x4;
func [x1,x2,x3,x4] equals
[[x1,x2,x3],x4];
coherence;
end;
definition let x;
attr x is quadruple means
:Dfz: ex x1,x2,x3,x4 st x = [x1,x2,x3,x4];
end;
registration let x1,x2,x3,x4;
cluster [x1,x2,x3,x4] -> quadruple;
coherence by Dfz;
end;
theorem
[x1,x2,x3,x4] = [y1,y2,y3,y4]
implies x1 = y1 & x2 = y2 & x3 = y3 & x4 = y4
proof
assume
A1: [x1,x2,x3,x4] = [y1,y2,y3,y4];
then [x1,x2,x3] = [y1,y2,y3] by Th1;
hence thesis by A1,Th3,Th1;
end;
registration
cluster quadruple for set;
existence
proof
take [the set, the set, the set, the set],
the set, the set, the set, the set;
thus thesis;
end;
cluster quadruple -> triple for set;
coherence
proof let x;
given x1,x2,x3,x4 such that
G: x = [x1,x2,x3,x4];
x = [[x1,x2],x3,x4] by G;
hence thesis;
end;
end;
definition
let x be set;
func x`1_4 equals x`1`1`1;
coherence;
func x`2_4 equals x`1`1`2;
coherence;
end;
notation let x be set;
synonym x`3_4 for x`2_3;
synonym x`4_4 for x`2;
end;
registration let x1,x2,x3,x4;
reduce [x1,x2,x3,x4]`1_4 to x1;
reducibility
proof
thus [x1,x2,x3,x4]`1_4 = [[x1,x2,x3],x4]`1`1`1
.= [x1,x2,x3]`1_3
.= x1;
end;
reduce [x1,x2,x3,x4]`2_4 to x2;
reducibility
proof
thus [x1,x2,x3,x4]`2_4 = [[x1,x2,x3],x4]`1`1`2
.= [x1,x2,x3]`2_3
.= x2;
end;
reduce [x1,x2,x3,x4]`3_4 to x3;
reducibility
proof
thus [x1,x2,x3,x4]`3_4 = [[x1,x2,x3],x4]`1`2
.= x3;
end;
reduce [x1,x2,x3,x4]`4_4 to x4;
reducibility
proof
thus [x1,x2,x3,x4]`4_4 = [[x1,x2,x3],x4]`2
.= x4;
end;
end;
registration let x be quadruple set;
reduce [x`1_4,x`2_4,x`3_4,x`4_4] to x;
reducibility
proof
consider x1,x2,x3,x4 such that
W: x = [x1,x2,x3,x4] by Dfz;
[x1,x2,x3,x4]`1_4 = x1 & [x1,x2,x3,x4]`2_4 = x2 &
[x1,x2,x3,x4]`3_4 = x3 & [x1,x2,x3,x4]`4_4 = x4;
hence thesis by W;
end;
end;
reserve X,X1,X2,X3,X4,Y for set;
theorem Pre1:
[x,y] in X implies x in union union X
proof assume
A1: [x,y] in X;
{x} in [x,y] by TARSKI:def 2;
then
A2: {x} in union X by A1,TARSKI:def 4;
x in {x} by TARSKI:def 1;
hence x in union union X by A2,TARSKI:def 4;
end;
theorem Pre2:
[x,y] in X implies y in union union X
proof assume
A1: [x,y] in X;
{x,y} in [x,y] by TARSKI:def 2;
then
A2: {x,y} in union X by A1,TARSKI:def 4;
y in {x,y} by TARSKI:def 2;
hence y in union union X by A2,TARSKI:def 4;
end;
definition
let X be set;
func proj1 X -> set means
:Def4:
x in it iff ex y st [x,y] in X;
existence
proof
defpred Q[set] means ex y st [$1,y] in X;
consider Y such that
A0: for x holds x in Y iff x in union union X & Q[x] from XBOOLE_0:sch 1;
take Y;
let x;
thus x in Y implies ex y st [x,y] in X by A0;
given y such that
A1: [x,y] in X;
x in union union X by A1,Pre1;
hence thesis by A1,A0;
end;
uniqueness
proof
let X1,X2;
assume that
A2: for x holds x in X1 iff ex y st [x,y] in X and
A3: for x holds x in X2 iff ex y st [x,y] in X;
now
let x;
x in X1 iff ex y st [x,y] in X by A2;
hence x in X1 iff x in X2 by A3;
end;
hence thesis by TARSKI:1;
end;
func proj2 X -> set means
:Def5:
x in it iff ex y st [y,x] in X;
existence
proof
defpred Q[set] means ex y st [y,$1] in X;
consider Y such that
A0: for x holds x in Y iff x in union union X & Q[x] from XBOOLE_0:sch 1;
take Y;
let x;
thus x in Y implies ex y st [y,x] in X by A0;
given y such that
A1: [y,x] in X;
x in union union X by A1,Pre2;
hence thesis by A1,A0;
end;
uniqueness
proof
let X1,X2;
assume that
A2: for x holds x in X1 iff ex y st [y,x] in X and
A3: for x holds x in X2 iff ex y st [y,x] in X;
now
let x;
x in X1 iff ex y st [y,x] in X by A2;
hence x in X1 iff x in X2 by A3;
end;
hence thesis by TARSKI:1;
end;
end;
theorem Th10:
X c= Y implies proj1 X c= proj1 Y
proof assume
A1: X c= Y;
let x;
assume x in proj1 X;
then consider y such that
A2: [x,y] in X by Def4;
[x,y] in Y by A1,A2,TARSKI:def 3;
hence thesis by Def4;
end;
theorem Th11:
X c= Y implies proj2 X c= proj2 Y
proof assume
A1: X c= Y;
let x;
assume x in proj2 X;
then consider y such that
A2: [y,x] in X by Def5;
[y,x] in Y by A1,A2,TARSKI:def 3;
hence thesis by Def5;
end;
definition
let X be set;
func proj1_3 X -> set equals
proj1 proj1 X;
coherence;
func proj2_3 X -> set equals
proj2 proj1 X;
coherence;
end;
notation let X be set;
synonym proj3_3 X for proj2 X;
end;
theorem Th12:
X c= Y implies proj1_3 X c= proj1_3 Y
proof assume X c= Y;
then proj1 X c= proj1 Y by Th10;
hence thesis by Th10;
end;
theorem Th13:
X c= Y implies proj2_3 X c= proj2_3 Y
proof assume X c= Y;
then proj1 X c= proj1 Y by Th10;
hence thesis by Th11;
end;
theorem Th14:
x in proj1_3 X implies ex y,z st [x,y,z] in X
proof assume x in proj1_3 X;
then consider y such that
W1: [x,y] in proj1 X by Def4;
consider z such that
W2: [[x,y],z] in X by W1,Def4;
take y,z;
thus thesis by W2;
end;
theorem Th14a:
[x,y,z] in X implies x in proj1_3 X
proof
assume [x,y,z] in X;
then [x,y] in proj1 X by Def4;
hence thesis by Def4;
end;
theorem Th15:
x in proj2_3 X implies ex y,z st [y,x,z] in X
proof assume x in proj2_3 X;
then consider y such that
W1: [y,x] in proj1 X by Def5;
consider z such that
W2: [[y,x],z] in X by W1,Def4;
take y,z;
thus thesis by W2;
end;
theorem Th15a:
[x,y,z] in X implies y in proj2_3 X
proof
assume [x,y,z] in X;
then [x,y] in proj1 X by Def4;
hence thesis by Def5;
end;
definition
let X be set;
func proj1_4 X -> set equals
proj1 proj1_3 X;
coherence;
func proj2_4 X -> set equals
proj2 proj1_3 X;
coherence;
end;
notation let X be set;
synonym proj3_4 X for proj2_3 X;
synonym proj4_4 X for proj2 X;
end;
theorem Th17:
X c= Y implies proj1_4 X c= proj1_4 Y
proof assume X c= Y;
then proj1_3 X c= proj1_3 Y by Th12;
hence thesis by Th10;
end;
theorem Th18:
X c= Y implies proj2_4 X c= proj2_4 Y
proof assume X c= Y;
then proj1_3 X c= proj1_3 Y by Th12;
hence thesis by Th11;
end;
theorem Th19:
x in proj1_4 X implies ex x1,x2,x3 st [x,x1,x2,x3] in X
proof assume x in proj1_4 X;
then consider x1 such that
W1: [x,x1] in proj1_3 X by Def4;
consider x2 such that
W2: [[x,x1],x2] in proj1 X by W1,Def4;
consider x3 such that
W3: [[[x,x1],x2],x3] in X by W2,Def4;
take x1,x2,x3;
thus thesis by W3;
end;
theorem Th19a:
[x,x1,x2,x3] in X implies x in proj1_4 X
proof
assume [x,x1,x2,x3] in X;
then [[x,x1],x2,x3] in X;
then [x,x1] in proj1_3 X by Th14a;
hence thesis by Def4;
end;
theorem Th20:
x in proj2_4 X implies ex x1,x2,x3 st [x1,x,x2,x3] in X
proof assume x in proj2_4 X;
then consider x1 such that
W1: [x1,x] in proj1_3 X by Def5;
consider x2 such that
W2: [[x1,x],x2] in proj1 X by W1,Def4;
consider x3 such that
W3: [[[x1,x],x2],x3] in X by W2,Def4;
take x1,x2,x3;
thus thesis by W3;
end;
theorem Th20a:
[x1,x,x2,x3] in X implies x in proj2_4 X
proof
assume [x1,x,x2,x3] in X;
then [[x1,x],x2,x3] in X;
then [x1,x] in proj1_3 X by Th14a;
hence thesis by Def5;
end;
theorem
for a,b being quadruple set
st a`1_4 = b`1_4 & a`2_4 = b`2_4 & a`3_4 = b`3_4 & a`4_4 = b`4_4
holds a = b
proof let a,b be quadruple set such that
Z: a`1_4 = b`1_4 & a`2_4 = b`2_4 & a`3_4 = b`3_4 & a`4_4 = b`4_4;
a = [a`1_4,a`2_4,a`3_4,a`4_4] & b = [b`1_4,b`2_4,b`3_4,b`4_4];
hence a = b by Z;
end;
begin
registration let X be empty set;
cluster proj1 X -> empty;
coherence
proof
assume proj1 X is non empty;
then consider x such that
W: x in proj1 X by XBOOLE_0:def 1;
ex y st [x,y] in X by W,Def4;
hence contradiction;
end;
end;
registration let X be empty set;
cluster proj2 X -> empty;
coherence
proof
assume proj2 X is non empty;
then consider x such that
W: x in proj2 X by XBOOLE_0:def 1;
ex y st [y,x] in X by W,Def5;
hence contradiction;
end;
end;
registration let X be empty set;
cluster proj1_3 X -> empty;
coherence;
end;
registration let X be empty set;
cluster proj2_3 X -> empty;
coherence;
end;
registration let X be empty set;
cluster proj1_4 X -> empty;
coherence;
end;
registration let X be empty set;
cluster proj2_4 X -> empty;
coherence;
end;
theorem Th22:
proj1(X \/ Y) = proj1 X \/ proj1 Y
proof
thus proj1(X \/ Y) c= proj1 X \/ proj1 Y
proof
let x;
assume x in proj1(X \/ Y);
then consider y such that
A1: [x,y] in X \/ Y by Def4;
[x,y] in X or [x,y] in Y by A1,XBOOLE_0:def 3;
then x in proj1 X or x in proj1 Y by Def4;
hence thesis by XBOOLE_0:def 3;
end;
A3: proj1 Y c= proj1(X \/ Y) by Th10,XBOOLE_1:7;
proj1 X c= proj1(X \/ Y) by Th10,XBOOLE_1:7;
hence proj1 X \/ proj1 Y c= proj1 (X \/ Y) by A3,XBOOLE_1:8;
end;
theorem
proj1(X /\ Y) c= proj1 X /\ proj1 Y
proof
proj1(X /\ Y) c= proj1 X & proj1(X /\ Y) c= proj1 Y by Th10,XBOOLE_1:17;
hence thesis by XBOOLE_1:19;
end;
theorem Th24:
proj1 X \ proj1 Y c= proj1(X \ Y)
proof
let x;
assume
A1: x in proj1 X \ proj1 Y;
then x in proj1 X by XBOOLE_0:def 5;
then consider y such that
A2: [x,y] in X by Def4;
not x in proj1 Y by A1,XBOOLE_0:def 5;
then not [x,y] in Y by Def4;
then [x,y] in X \ Y by A2,XBOOLE_0:def 5;
hence thesis by Def4;
end;
theorem
proj1 X \+\ proj1 Y c= proj1(X \+\ Y)
proof
proj1 X \ proj1 Y c= proj1(X \ Y) & proj1 Y \ proj1 X c= proj1(Y \ X)
by Th24;
then proj1 X \+\ proj1 Y c= proj1(X\Y) \/ proj1(Y\X) by XBOOLE_1:13;
hence thesis by Th22;
end;
theorem Th26:
proj2(X \/ Y) = proj2 X \/ proj2 Y
proof
thus proj2(X \/ Y) c= proj2 X \/ proj2 Y
proof
let y;
assume y in proj2(X \/ Y);
then consider x such that
A1: [x,y] in X \/ Y by Def5;
[x,y] in X or [x,y] in Y by A1,XBOOLE_0:def 3;
then y in proj2 X or y in proj2 Y by Def5;
hence thesis by XBOOLE_0:def 3;
end;
A3: proj2 Y c= proj2(X \/ Y) by Th11,XBOOLE_1:7;
proj2 X c= proj2(X \/ Y) by Th11,XBOOLE_1:7;
hence proj2 X \/ proj2 Y c= proj2(X \/ Y) by A3,XBOOLE_1:8;
end;
theorem
proj2(X /\ Y) c= proj2 X /\ proj2 Y
proof
let y;
assume y in proj2(X /\ Y);
then consider x such that
A3: [x,y] in X /\ Y by Def5;
[x,y] in Y by A3,XBOOLE_0:def 4;
then
A4: y in proj2 Y by Def5;
[x,y] in X by A3,XBOOLE_0:def 4;
then y in proj2 X by Def5;
hence thesis by A4,XBOOLE_0:def 4;
end;
theorem Th28:
proj2 X \ proj2 Y c= proj2(X \ Y)
proof
let y;
assume
A3: y in proj2 X \ proj2 Y;
then y in proj2 X by XBOOLE_0:def 5;
then consider x such that
A4: [x,y] in X by Def5;
not y in proj2 Y by A3,XBOOLE_0:def 5;
then not [x,y] in Y by Def5;
then [x,y] in X \ Y by A4,XBOOLE_0:def 5;
hence thesis by Def5;
end;
theorem
proj2 X \+\ proj2 Y c= proj2(X \+\ Y)
proof
proj2 X \ proj2 Y c= proj2(X \ Y) & proj2 Y \ proj2 X c= proj2(Y \ X)
by Th28;
then proj2 X \+\ proj2 Y c= proj2(X\Y) \/ proj2(Y\X) by XBOOLE_1:13;
hence thesis by Th26;
end;
theorem Th30:
proj1_3(X \/ Y) = proj1_3 X \/ proj1_3 Y
proof
thus proj1_3(X \/ Y) = proj1(proj1 X \/ proj1 Y) by Th22
.= proj1_3 X \/ proj1_3 Y by Th22;
end;
theorem
proj1_3(X /\ Y) c= proj1_3 X /\ proj1_3 Y
proof
proj1_3(X /\ Y) c= proj1_3 X & proj1_3(X /\ Y) c= proj1_3 Y
by Th12,XBOOLE_1:17;
hence thesis by XBOOLE_1:19;
end;
theorem Th32:
proj1_3 X \ proj1_3 Y c= proj1_3(X \ Y)
proof
let x;
assume
A1: x in proj1_3 X \ proj1_3 Y;
then x in proj1_3 X by XBOOLE_0:def 5;
then consider y,z such that
A2: [x,y,z] in X by Th14;
not x in proj1_3 Y by A1,XBOOLE_0:def 5;
then not [x,y,z] in Y by Th14a;
then [x,y,z] in X \ Y by A2,XBOOLE_0:def 5;
hence thesis by Th14a;
end;
theorem
proj1_3 X \+\ proj1_3 Y c= proj1_3(X \+\ Y)
proof
proj1_3 X \ proj1_3 Y c= proj1_3(X \ Y) &
proj1_3 Y \ proj1_3 X c= proj1_3(Y \ X) by Th32;
then proj1_3 X \+\ proj1_3 Y c= proj1_3(X\Y) \/ proj1_3(Y\X) by XBOOLE_1:13;
hence thesis by Th30;
end;
theorem Th34:
proj2_3(X \/ Y) = proj2_3 X \/ proj2_3 Y
proof
thus proj2_3(X \/ Y) = proj2(proj1 X \/ proj1 Y) by Th22
.= proj2_3 X \/ proj2_3 Y by Th26;
end;
theorem
proj2_3(X /\ Y) c= proj2_3 X /\ proj2_3 Y
proof
proj2_3(X /\ Y) c= proj2_3 X & proj2_3(X /\ Y) c= proj2_3 Y
by Th13,XBOOLE_1:17;
hence thesis by XBOOLE_1:19;
end;
theorem Th36:
proj2_3 X \ proj2_3 Y c= proj2_3(X \ Y)
proof
let x;
assume
A1: x in proj2_3 X \ proj2_3 Y;
then x in proj2_3 X by XBOOLE_0:def 5;
then consider y,z such that
A2: [y,x,z] in X by Th15;
not x in proj2_3 Y by A1,XBOOLE_0:def 5;
then not [y,x,z] in Y by Th15a;
then [y,x,z] in X \ Y by A2,XBOOLE_0:def 5;
hence thesis by Th15a;
end;
theorem
proj2_3 X \+\ proj2_3 Y c= proj2_3(X \+\ Y)
proof
proj2_3 X \ proj2_3 Y c= proj2_3(X \ Y) &
proj2_3 Y \ proj2_3 X c= proj2_3(Y \ X) by Th36;
then proj2_3 X \+\ proj2_3 Y c= proj2_3(X\Y) \/ proj2_3(Y\X) by XBOOLE_1:13;
hence thesis by Th34;
end;
theorem Th38:
proj1_4(X \/ Y) = proj1_4 X \/ proj1_4 Y
proof
thus proj1_4(X \/ Y) = proj1(proj1_3 X \/ proj1_3 Y) by Th30
.= proj1_4 X \/ proj1_4 Y by Th22;
end;
theorem
proj1_4(X /\ Y) c= proj1_4 X /\ proj1_4 Y
proof
proj1_4(X /\ Y) c= proj1_4 X & proj1_4(X /\ Y) c= proj1_4 Y
by Th17,XBOOLE_1:17;
hence thesis by XBOOLE_1:19;
end;
theorem Th32:
proj1_4 X \ proj1_4 Y c= proj1_4(X \ Y)
proof
let x;
assume
A1: x in proj1_4 X \ proj1_4 Y;
then x in proj1_4 X by XBOOLE_0:def 5;
then consider x1,x2,x3 such that
A2: [x,x1,x2,x3] in X by Th19;
not x in proj1_4 Y by A1,XBOOLE_0:def 5;
then not [x,x1,x2,x3] in Y by Th19a;
then [x,x1,x2,x3] in X \ Y by A2,XBOOLE_0:def 5;
hence thesis by Th19a;
end;
theorem
proj1_4 X \+\ proj1_4 Y c= proj1_4(X \+\ Y)
proof
proj1_4 X \ proj1_4 Y c= proj1_4(X \ Y) &
proj1_4 Y \ proj1_4 X c= proj1_4(Y \ X) by Th32;
then proj1_4 X \+\ proj1_4 Y c= proj1_4(X\Y) \/ proj1_4(Y\X) by XBOOLE_1:13;
hence thesis by Th38;
end;
theorem Th34:
proj2_4(X \/ Y) = proj2_4 X \/ proj2_4 Y
proof
thus proj2_4(X \/ Y) = proj2(proj1_3 X \/ proj1_3 Y) by Th30
.= proj2_4 X \/ proj2_4 Y by Th26;
end;
theorem
proj2_4(X /\ Y) c= proj2_4 X /\ proj2_4 Y
proof
proj2_4(X /\ Y) c= proj2_4 X & proj2_4(X /\ Y) c= proj2_4 Y
by Th18,XBOOLE_1:17;
hence thesis by XBOOLE_1:19;
end;
theorem Th36:
proj2_4 X \ proj2_4 Y c= proj2_4(X \ Y)
proof
let x;
assume
A1: x in proj2_4 X \ proj2_4 Y;
then x in proj2_4 X by XBOOLE_0:def 5;
then consider x1,x2,x3 such that
A2: [x1,x,x2,x3] in X by Th20;
not x in proj2_4 Y by A1,XBOOLE_0:def 5;
then not [x1,x,x2,x3] in Y by Th20a;
then [x1,x,x2,x3] in X \ Y by A2,XBOOLE_0:def 5;
hence thesis by Th20a;
end;
theorem
proj2_4 X \+\ proj2_4 Y c= proj2_4(X \+\ Y)
proof
proj2_4 X \ proj2_4 Y c= proj2_4(X \ Y) &
proj2_4 Y \ proj2_4 X c= proj2_4(Y \ X) by Th36;
then proj2_4 X \+\ proj2_4 Y c= proj2_4(X\Y) \/ proj2_4(Y\X) by XBOOLE_1:13;
hence thesis by Th34;
end;
begin
reserve x,y,X1,X2,X3,X4,X5,X6,Y,Y1,Y2,Y3,Y4,Y5,Z,Z1,Z2,Z3,Z4,Z5 for set;
reserve X for non empty set;
theorem Th1:
ex Y st Y in X & Y misses X
proof
consider x such that
W: x in X by XBOOLE_0:def 1;
consider Y such that
A1: Y in X & not ex x st x in X & x in Y by TARSKI:2,W;
take Y;
thus thesis by A1,XBOOLE_0:3;
end;
theorem
ex Y st Y in X & for Y1 st Y1 in Y holds Y1 misses X
proof
defpred P[set] means $1 meets X;
consider Z such that
A1: for Y holds Y in Z iff Y in union X & P[Y] from XBOOLE_0:sch 1;
consider Y such that
A2: Y in X \/ Z and
A3: Y misses X \/ Z by Th1;
assume
A4: not thesis;
now
assume
A5: Y in X;
then consider Y1 such that
A6: Y1 in Y and
A7: not Y1 misses X by A4;
Y1 in union X by A5,A6,TARSKI:def 4;
then Y1 in Z by A1,A7;
then Y1 in X \/ Z by XBOOLE_0:def 3;
hence contradiction by A3,A6,XBOOLE_0:3;
end;
then Y in Z by A2,XBOOLE_0:def 3;
then Y meets X by A1;
hence contradiction by A3,XBOOLE_1:70;
end;
theorem
ex Y st Y in X & for Y1,Y2 st Y1 in Y2 & Y2 in Y holds Y1 misses X
proof
defpred P[set] means ex Y1 st Y1 in $1 & Y1 meets X;
consider Z1 such that
A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1;
defpred Q[set] means $1 meets X;
consider Z2 such that
A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch 1;
consider Y such that
A3: Y in X \/ Z1 \/ Z2 and
A4: Y misses X \/ Z1 \/ Z2 by Th1;
A5: now
assume
A6: Y in Z1;
then consider Y1 such that
A7: Y1 in Y and
A8: Y1 meets X by A1;
Y in union X by A1,A6;
then Y1 in union union X by A7,TARSKI:def 4;
then Y1 in Z2 by A2,A8;
then Y1 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
hence contradiction by A4,A7,XBOOLE_0:3;
end;
assume
A9: not thesis;
A10: now
assume
A11: Y in X;
then consider Y1,Y2 such that
A12: Y1 in Y2 and
A13: Y2 in Y and
A14: not Y1 misses X by A9;
Y2 in union X by A11,A13,TARSKI:def 4;
then Y2 in Z1 by A1,A12,A14;
then Y2 in X \/ Z1 by XBOOLE_0:def 3;
then Y2 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
hence contradiction by A4,A13,XBOOLE_0:3;
end;
Y in X \/ (Z1 \/ Z2) by A3,XBOOLE_1:4;
then Y in Z1 \/ Z2 by A10,XBOOLE_0:def 3;
then Y in Z2 by A5,XBOOLE_0:def 3;
then Y meets X by A2;
then Y meets X \/ Z1 by XBOOLE_1:70;
hence contradiction by A4,XBOOLE_1:70;
end;
theorem
ex Y st Y in X &
for Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in Y holds Y1 misses X
proof
defpred P[set] means ex Y1,Y2 st Y1 in Y2 & Y2 in $1 & Y1 meets X;
consider Z1 such that
A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1;
defpred R[set] means $1 meets X;
defpred Q[set] means ex Y1 st Y1 in $1 & Y1 meets X;
consider Z2 such that
A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch 1;
consider Z3 such that
A3: for Y holds Y in Z3 iff Y in union union union X & R[Y]
from XBOOLE_0:sch 1;
consider Y such that
A4: Y in X \/ Z1 \/ Z2 \/ Z3 and
A5: Y misses X \/ Z1 \/ Z2 \/ Z3 by Th1;
A6: now
assume
A7: Y in Z2;
then consider Y1 such that
A8: Y1 in Y and
A9: Y1 meets X by A2;
Y in union union X by A2,A7;
then Y1 in union union union X by A8,TARSKI:def 4;
then Y1 in Z3 by A3,A9;
then Y1 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3;
hence contradiction by A5,A8,XBOOLE_0:3;
end;
A10: now
assume
A11: Y in Z1;
then consider Y1,Y2 such that
A12: Y1 in Y2 and
A13: Y2 in Y and
A14: Y1 meets X by A1;
Y in union X by A1,A11;
then Y2 in union union X by A13,TARSKI:def 4;
then Y2 in Z2 by A2,A12,A14;
then Y2 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
then Y meets X \/ Z1 \/ Z2 by A13,XBOOLE_0:3;
hence contradiction by A5,XBOOLE_1:70;
end;
set V = X \/ Z1 \/ Z2 \/ Z3;
A15: V = X \/ (Z1 \/ Z2) \/ Z3 by XBOOLE_1:4
.= X \/ (Z1 \/ Z2 \/ Z3) by XBOOLE_1:4;
assume
A16: not thesis;
now
assume
A17: Y in X;
then consider Y1,Y2,Y3 such that
A18: Y1 in Y2 & Y2 in Y3 and
A19: Y3 in Y and
A20: not Y1 misses X by A16;
Y3 in union X by A17,A19,TARSKI:def 4;
then Y3 in Z1 by A1,A18,A20;
then Y3 in X \/ Z1 by XBOOLE_0:def 3;
then Y3 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
then Y3 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3;
hence contradiction by A5,A19,XBOOLE_0:3;
end;
then Y in Z1 \/ Z2 \/ Z3 by A15,A4,XBOOLE_0:def 3;
then Y in Z1 \/ (Z2 \/ Z3) by XBOOLE_1:4;
then Y in Z2 \/ Z3 by A10,XBOOLE_0:def 3;
then Y in Z3 by A6,XBOOLE_0:def 3;
then Y meets X by A3;
hence contradiction by A15,A5,XBOOLE_1:70;
end;
theorem
ex Y st Y in X &
for Y1,Y2,Y3,Y4 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y
holds Y1 misses X
proof
defpred P[set] means ex Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in $1 & Y1
meets X;
consider Z1 such that
A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1;
defpred S[set] means $1 meets X;
defpred R[set] means ex Y1 st Y1 in $1 & Y1 meets X;
defpred Q[set] means ex Y1,Y2 st Y1 in Y2 & Y2 in $1 & Y1 meets X;
consider Z2 such that
A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch 1;
consider Z4 such that
A3: for Y holds Y in Z4 iff Y in union union union union X & S[Y] from
XBOOLE_0:sch 1;
consider Z3 such that
A4: for Y holds Y in Z3 iff Y in union union union X & R[Y] from
XBOOLE_0:sch 1;
consider Y such that
A5: Y in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 and
A6: Y misses X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by Th1;
A7: now
assume
A8: Y in Z3;
then consider Y1 such that
A9: Y1 in Y and
A10: Y1 meets X by A4;
Y in union union union X by A4,A8;
then Y1 in union union union union X by A9,TARSKI:def 4;
then Y1 in Z4 by A3,A10;
then Y1 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3;
hence contradiction by A6,A9,XBOOLE_0:3;
end;
A11: now
assume
A12: Y in Z1;
then consider Y1,Y2,Y3 such that
A13: Y1 in Y2 & Y2 in Y3 and
A14: Y3 in Y and
A15: Y1 meets X by A1;
Y in union X by A1,A12;
then Y3 in union union X by A14,TARSKI:def 4;
then Y3 in Z2 by A2,A13,A15;
then Y3 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
then Y meets X \/ Z1 \/ Z2 by A14,XBOOLE_0:3;
then Y meets X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_1:70;
hence contradiction by A6,XBOOLE_1:70;
end;
A16: X \/ Z1 \/ Z2 \/ Z3 \/ Z4 = X \/ (Z1 \/ Z2) \/ Z3 \/ Z4 by XBOOLE_1:4
.= X \/ (Z1 \/ Z2 \/ Z3) \/ Z4 by XBOOLE_1:4
.= X \/ (Z1 \/ Z2 \/ Z3 \/ Z4) by XBOOLE_1:4;
A17: now
assume
A18: Y in Z2;
then consider Y1,Y2 such that
A19: Y1 in Y2 and
A20: Y2 in Y and
A21: Y1 meets X by A2;
Y in union union X by A2,A18;
then Y2 in union union union X by A20,TARSKI:def 4;
then Y2 in Z3 by A4,A19,A21;
then Y2 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3;
then Y meets X \/ Z1 \/ Z2 \/ Z3 by A20,XBOOLE_0:3;
hence contradiction by A6,XBOOLE_1:70;
end;
assume
A22: not thesis;
now
assume
A23: Y in X;
then consider Y1,Y2,Y3,Y4 such that
A24: Y1 in Y2 & Y2 in Y3 & Y3 in Y4 and
A25: Y4 in Y and
A26: not Y1 misses X by A22;
Y4 in union X by A23,A25,TARSKI:def 4;
then Y4 in Z1 by A1,A24,A26;
then Y4 in X \/ Z1 by XBOOLE_0:def 3;
then Y4 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
then Y4 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3;
then Y4 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3;
hence contradiction by A6,A25,XBOOLE_0:3;
end;
then Y in Z1 \/ Z2 \/ Z3 \/ Z4 by A16,A5,XBOOLE_0:def 3;
then Y in Z1 \/ (Z2 \/ Z3) \/ Z4 by XBOOLE_1:4;
then Y in Z1 \/ (Z2 \/ Z3 \/ Z4) by XBOOLE_1:4;
then Y in Z2 \/ Z3 \/ Z4 by A11,XBOOLE_0:def 3;
then Y in Z2 \/ (Z3 \/ Z4) by XBOOLE_1:4;
then Y in Z3 \/ Z4 by A17,XBOOLE_0:def 3;
then Y in Z4 by A7,XBOOLE_0:def 3;
then Y meets X by A3;
hence contradiction by A16,A6,XBOOLE_1:70;
end;
theorem
ex Y st Y in X &
for Y1,Y2,Y3,Y4,Y5 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y5 & Y5 in Y
holds Y1 misses X
proof
defpred P[set] means ex Y1,Y2,Y3,Y4 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4
in $1 & Y1 meets X;
consider Z1 such that
A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1;
defpred T[set] means $1 meets X;
defpred S[set] means ex Y1 st Y1 in $1 & Y1 meets X;
defpred R[set] means ex Y1,Y2 st Y1 in Y2 & Y2 in $1 & Y1 meets X;
defpred Q[set] means ex Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in $1 & Y1
meets X;
consider Z2 such that
A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch
1;
consider Z5 such that
A3: for Y holds Y in Z5 iff Y in union union union union union X & T[Y]
from XBOOLE_0:sch 1;
consider Z3 such that
A4: for Y holds Y in Z3 iff Y in union union union X & R[Y] from
XBOOLE_0:sch 1;
consider Z4 such that
A5: for Y holds Y in Z4 iff Y in union union union union X & S[Y] from
XBOOLE_0:sch 1;
set V = X \/ Z1 \/ Z2 \/ Z3 \/ Z4 \/ Z5;
consider Y such that
A6: Y in V and
A7: Y misses V by Th1;
A8: V = X \/ (Z1 \/ Z2) \/ Z3 \/ Z4 \/ Z5 by XBOOLE_1:4
.= X \/ (Z1 \/ Z2 \/ Z3) \/ Z4 \/ Z5 by XBOOLE_1:4
.= X \/ (Z1 \/ Z2 \/ Z3 \/ Z4) \/ Z5 by XBOOLE_1:4
.= X \/ (Z1 \/ Z2 \/ Z3 \/ Z4 \/ Z5) by XBOOLE_1:4;
A9: now
assume
A10: Y in Z1;
then consider Y1,Y2,Y3,Y4 such that
A11: Y1 in Y2 & Y2 in Y3 & Y3 in Y4 and
A12: Y4 in Y and
A13: Y1 meets X by A1;
Y in union X by A1,A10;
then Y4 in union union X by A12,TARSKI:def 4;
then Y4 in Z2 by A2,A11,A13;
then Y4 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
then Y meets X \/ Z1 \/ Z2 by A12,XBOOLE_0:3;
then Y meets X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_1:70;
then Y meets X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_1:70;
hence contradiction by A7,XBOOLE_1:70;
end;
A14: now
assume
A15: Y in Z2;
then consider Y1,Y2,Y3 such that
A16: Y1 in Y2 & Y2 in Y3 and
A17: Y3 in Y and
A18: Y1 meets X by A2;
Y in union union X by A2,A15;
then Y3 in union union union X by A17,TARSKI:def 4;
then Y3 in Z3 by A4,A16,A18;
then Y3 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3;
then Y3 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3;
then Y3 in V by XBOOLE_0:def 3;
hence contradiction by A7,A17,XBOOLE_0:3;
end;
A19: now
assume
A20: Y in Z3;
then consider Y1,Y2 such that
A21: Y1 in Y2 and
A22: Y2 in Y and
A23: Y1 meets X by A4;
Y in union union union X by A4,A20;
then Y2 in union union union union X by A22,TARSKI:def 4;
then Y2 in Z4 by A5,A21,A23;
then Y2 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3;
then Y2 in V by XBOOLE_0:def 3;
hence contradiction by A7,A22,XBOOLE_0:3;
end;
A24: now
assume
A25: Y in Z4;
then consider Y1 such that
A26: Y1 in Y and
A27: Y1 meets X by A5;
Y in union union union union X by A5,A25;
then Y1 in union union union union union X by A26,TARSKI:def 4;
then Y1 in Z5 by A3,A27;
then Y1 in V by XBOOLE_0:def 3;
hence contradiction by A7,A26,XBOOLE_0:3;
end;
assume
A28: not thesis;
now
assume
A29: Y in X;
then consider Y1,Y2,Y3,Y4,Y5 such that
A30: Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y5 and
A31: Y5 in Y and
A32: not Y1 misses X by A28;
Y5 in union X by A29,A31,TARSKI:def 4;
then Y5 in Z1 by A1,A30,A32;
then Y5 in X \/ Z1 by XBOOLE_0:def 3;
then Y5 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3;
then Y5 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3;
then Y meets X \/ Z1 \/ Z2 \/ Z3 by A31,XBOOLE_0:3;
then Y meets X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_1:70;
hence contradiction by A7,XBOOLE_1:70;
end;
then Y in Z1 \/ Z2 \/ Z3 \/ Z4 \/ Z5 by A8,A6,XBOOLE_0:def 3;
then Y in Z1 \/ (Z2 \/ Z3) \/ Z4 \/ Z5 by XBOOLE_1:4;
then Y in Z1 \/ (Z2 \/ Z3 \/ Z4) \/ Z5 by XBOOLE_1:4;
then Y in Z1 \/ (Z2 \/ Z3 \/ Z4 \/ Z5) by XBOOLE_1:4;
then Y in Z2 \/ Z3 \/ Z4 \/ Z5 by A9,XBOOLE_0:def 3;
then Y in Z2 \/ (Z3 \/ Z4) \/ Z5 by XBOOLE_1:4;
then Y in Z2 \/ (Z3 \/ Z4 \/ Z5) by XBOOLE_1:4;
then Y in Z3 \/ Z4 \/ Z5 by A14,XBOOLE_0:def 3;
then Y in Z3 \/ (Z4 \/ Z5) by XBOOLE_1:4;
then Y in Z4 \/ Z5 by A19,XBOOLE_0:def 3;
then Y in Z5 by A24,XBOOLE_0:def 3;
then Y meets X by A3;
hence contradiction by A8,A7,XBOOLE_1:70;
end;
theorem
not ( X1 in X2 & X2 in X3 & X3 in X1)
proof
A1: X2 in { X1,X2,X3 } & X3 in { X1,X2,X3 } by ENUMSET1:def 1;
A2: X1 in { X1,X2,X3 } by ENUMSET1:def 1;
then consider T being set such that
A3: T in { X1,X2,X3 } and
A4: { X1,X2,X3 } misses T by Th1;
T = X1 or T = X2 or T = X3 by A3,ENUMSET1:def 1;
hence thesis by A2,A1,A4,XBOOLE_0:3;
end;
theorem
not ( X1 in X2 & X2 in X3 & X3 in X4 & X4 in X1)
proof
A1: X2 in { X1,X2,X3,X4 } & X3 in { X1,X2,X3,X4 } by ENUMSET1:def 2;
A2: X4 in { X1,X2,X3,X4 } by ENUMSET1:def 2;
A3: X1 in { X1,X2,X3,X4 } by ENUMSET1:def 2;
then consider T being set such that
A4: T in { X1,X2,X3,X4 } and
A5: { X1,X2,X3,X4 } misses T by Th1;
T = X1 or T = X2 or T = X3 or T = X4 by A4,ENUMSET1:def 2;
hence thesis by A3,A1,A2,A5,XBOOLE_0:3;
end;
theorem
not ( X1 in X2 & X2 in X3 & X3 in X4 & X4 in X5 & X5 in X1)
proof
assume that
A1: X1 in X2 and
A2: X2 in X3 and
A3: X3 in X4 and
A4: X4 in X5 and
A5: X5 in X1;
set Z = { X1,X2,X3,X4,X5 };
A6: for Y st Y in Z holds Z meets Y
proof
let Y such that
A7: Y in Z;
now
per cases by A7,ENUMSET1:def 3;
suppose
A8: Y = X1;
take y = X5;
thus y in Z & y in Y by A5,A8,ENUMSET1:def 3;
end;
suppose
A9: Y = X2;
take y = X1;
thus y in Z & y in Y by A1,A9,ENUMSET1:def 3;
end;
suppose
A10: Y = X3;
take y = X2;
thus y in Z & y in Y by A2,A10,ENUMSET1:def 3;
end;
suppose
A11: Y = X4;
take y = X3;
thus y in Z & y in Y by A3,A11,ENUMSET1:def 3;
end;
suppose
A12: Y = X5;
take y = X4;
thus y in Z & y in Y by A4,A12,ENUMSET1:def 3;
end;
end;
hence thesis by XBOOLE_0:3;
end;
X1 in { X1,X2,X3,X4,X5 } by ENUMSET1:def 3;
hence contradiction by A6,Th1;
end;
theorem
not ( X1 in X2 & X2 in X3 & X3 in X4 & X4 in X5 & X5 in X6 & X6 in X1)
proof
assume that
A1: X1 in X2 and
A2: X2 in X3 and
A3: X3 in X4 and
A4: X4 in X5 and
A5: X5 in X6 and
A6: X6 in X1;
set Z = { X1,X2,X3,X4,X5,X6 };
A7: for Y st Y in Z holds Z meets Y
proof
let Y such that
A8: Y in Z;
now
per cases by A8,ENUMSET1:def 4;
suppose
A9: Y = X1;
take y = X6;
thus y in Z & y in Y by A6,A9,ENUMSET1:def 4;
end;
suppose
A10: Y = X2;
take y = X1;
thus y in Z & y in Y by A1,A10,ENUMSET1:def 4;
end;
suppose
A11: Y = X3;
take y = X2;
thus y in Z & y in Y by A2,A11,ENUMSET1:def 4;
end;
suppose
A12: Y = X4;
take y = X3;
thus y in Z & y in Y by A3,A12,ENUMSET1:def 4;
end;
suppose
A13: Y = X5;
take y = X4;
thus y in Z & y in Y by A4,A13,ENUMSET1:def 4;
end;
suppose
A14: Y = X6;
take y = X5;
thus y in Z & y in Y by A5,A14,ENUMSET1:def 4;
end;
end;
hence thesis by XBOOLE_0:3;
end;
X1 in { X1,X2,X3,X4,X5,X6 } by ENUMSET1:def 4;
hence contradiction by A7,Th1;
end;
begin
reserve v,x,x1,x2,y,y1,y2,z,A,B,X,X1,X2,X3,X4,Y,Y1,Y2,Z,N,M for set;
registration
let x, y be set;
cluster [x,y] -> non empty;
coherence;
end;
Lm1: {x} c= X iff x in X
proof
x in {x} by TARSKI:def 1;
hence {x} c= X implies x in X by TARSKI:def 3;
assume
A1: x in X;
let y;
thus thesis by A1,TARSKI:def 1;
end;
Lm2: Y c= X & not x in Y implies Y c= X \ { x }
proof
assume
A1: Y c= X & not x in Y;
let y;
assume y in Y;
then y in X & not y in { x } by A1,TARSKI:def 1,def 3;
hence thesis by XBOOLE_0:def 5;
end;
Lm3: Y c= { x } iff Y = {} or Y = { x }
proof
thus Y c= { x } implies Y = {} or Y = { x }
proof
assume
A1: Y c= { x };
x in Y or not x in Y;
then { x } c= Y or Y c= { x } \ { x } by A1,Lm1,Lm2;
then { x } = Y or Y c= {} by A1,XBOOLE_0:def 10,XBOOLE_1:37;
hence thesis by XBOOLE_1:3;
end;
thus thesis by XBOOLE_1:2;
end;
definition
let X;
defpred IT[set] means $1 c= X;
func bool X means
:Def1:
Z in it iff Z c= X;
existence
proof
consider M such that
A1: X in M & for X,Y holds X in M & Y c= X implies Y in M and
for X st X in M ex Z st Z in M & for Y st Y c= X holds Y in Z and
for X holds X c= M implies X,M are_equipotent or X in M by TARSKI:3;
consider IT being set such that
A2: Y in IT iff Y in M & IT[Y] from XBOOLE_0:sch 1;
take IT;
thus thesis by A2,A1;
end;
uniqueness
proof
thus for X1,X2 being set st (for x being set holds x in X1 iff IT[x]) & (
for x being set holds x in X2 iff IT[x]) holds X1 = X2 from XBOOLE_0:sch 3;
end;
end;
definition
let X1,X2;
defpred X[set] means ex x,y st x in X1 & y in X2 & $1 = [x,y];
func [: X1,X2 :] means
:Def2:
z in it iff ex x,y st x in X1 & y in X2 & z = [x,y];
existence
proof
A1: X1 c= X1 \/ X2 by XBOOLE_1:7;
consider X such that
A2: for z holds z in X iff z in bool(bool(X1 \/ X2)) & X[z] from
XBOOLE_0:sch 1;
take X;
let z;
thus z in X implies ex x,y st x in X1 & y in X2 & z = [x,y] by A2;
given x,y such that
A3: x in X1 and
A4: y in X2 and
A5: z = [x,y];
{x,y} c= X1 \/ X2
proof
let z;
assume z in {x,y};
then z = x or z = y by TARSKI:def 2;
hence thesis by A3,A4,XBOOLE_0:def 3;
end;
then
A6: {x,y} in bool(X1 \/ X2) by Def1;
{x} c= X1 by A3,Lm1;
then {x} c= X1 \/ X2 by A1,XBOOLE_1:1;
then
A7: {x} in bool(X1 \/ X2) by Def1;
{{x,y},{x}} c= bool(X1 \/ X2)
proof
let z;
assume z in {{x,y},{x}};
hence thesis by A7,A6,TARSKI:def 2;
end;
then {{x,y},{x}} in bool(bool(X1 \/ X2)) by Def1;
hence thesis by A2,A3,A4,A5;
end;
uniqueness
proof
thus for X1,X2 being set st (for x being set holds x in X1 iff X[x]) & (
for x being set holds x in X2 iff X[x]) holds X1 = X2 from XBOOLE_0:sch 3;
end;
end;
definition
let X1,X2,X3;
func [: X1,X2,X3 :] equals
[:[:X1,X2:],X3:];
coherence;
end;
definition
let X1,X2,X3,X4;
func [: X1,X2,X3,X4 :] equals
[:[:X1,X2,X3:],X4:];
coherence;
end;
begin
theorem
bool {} = { {} }
proof
now
let x be set;
x c= {} iff x = {} by XBOOLE_1:3;
hence x in bool {} iff x in { {} } by Def1,TARSKI:def 1;
end;
hence thesis by TARSKI:1;
end;
theorem
union {} = {}
proof
now
given x such that
A1: x in union {};
ex X being set st x in X & X in {} by A1,TARSKI:def 4;
hence contradiction;
end;
hence thesis by XBOOLE_0:7;
end;
theorem Th3:
{x} c= {y} implies x = y
proof
x in { x } by TARSKI:def 1;
then {x} = {y} implies x = y by TARSKI:def 1;
hence thesis by Lm3;
end;
theorem Th4:
{x} = {y1,y2} implies x = y1
proof
assume { x } = { y1,y2 };
then y1 in { x } by TARSKI:def 2;
hence thesis by TARSKI:def 1;
end;
theorem
{x} = {y1,y2} implies y1 = y2
proof
assume
A1: { x } = { y1,y2 };
then x = y1 by Th4;
hence thesis by A1,Th4;
end;
theorem Th6:
{ x1,x2 } = { y1,y2 } implies x1 = y1 or x1 = y2
proof
x1 in { x1,x2 } by TARSKI:def 2;
hence thesis by TARSKI:def 2;
end;
theorem Th7:
{x} c= {x,y}
proof
let z;
assume z in {x};
then z=x by TARSKI:def 1;
hence thesis by TARSKI:def 2;
end;
Lm4: {x} \/ X c= X implies x in X
proof
assume
A1: {x} \/ X c= X;
assume not x in X;
then not x in {x} \/ X by A1,TARSKI:def 3;
then not x in {x} by XBOOLE_0:def 3;
hence thesis by TARSKI:def 1;
end;
theorem
{x} \/ {y} = {x} implies x = y
proof
assume {x} \/ {y} = {x};
then y in {x} or x in {y} by Lm4;
hence thesis by TARSKI:def 1;
end;
theorem
{x} \/ {x,y} = {x,y}
proof
x in {x,y} by TARSKI:def 2;
hence thesis by XBOOLE_1:12,Lm1;
end;
Lm6: {x} misses X implies not x in X
proof
A1: x in {x} by TARSKI:def 1;
assume {x} /\ X = {} & x in X;
hence contradiction by A1,XBOOLE_0:def 4;
end;
theorem
{x} misses {y} implies x <> y
proof
assume {x} misses {y};
then not x in {y} by Lm6;
hence thesis by TARSKI:def 1;
end;
Lm7: not x in X implies {x} misses X
proof
assume
A1: not x in X;
thus {x} /\ X c= {}
proof
let y;
assume y in {x} /\ X;
then y in {x} & y in X by XBOOLE_0:def 4;
hence thesis by A1,TARSKI:def 1;
end;
thus thesis by XBOOLE_1:2;
end;
theorem Th11:
x <> y implies {x} misses {y}
proof
assume x <> y;
then not x in {y} by TARSKI:def 1;
hence thesis by Lm7;
end;
Lm8: X /\ {x} = {x} implies x in X
proof
assume X /\ {x} = {x};
then x in X /\ {x} by TARSKI:def 1;
hence thesis by XBOOLE_0:def 4;
end;
theorem
{x} /\ {y} = {x} implies x = y
proof
assume {x} /\ {y} = {x};
then x in {y} or y in {x} by Lm8;
hence thesis by TARSKI:def 1;
end;
Lm9: x in X implies X /\ {x} = {x} by XBOOLE_1:28,Lm1;
theorem
{x} /\ {x,y} = {x}
proof
x in {x,y} by TARSKI:def 2;
hence thesis by XBOOLE_1:28,Lm1;
end;
Lm10: {x} \ X = {x} iff not x in X by Lm6,Lm7,XBOOLE_1:83;
theorem
{x} \ {y} = {x} iff x <> y
proof
{x} \ {y} = {x} iff not x in {y} by Lm6,Lm7,XBOOLE_1:83;
hence thesis by TARSKI:def 1;
end;
Lm11: {x} \ X = {} iff x in X by Lm1,XBOOLE_1:37;
theorem
{x} \ {y} = {} implies x = y
proof
assume {x} \ {y} = {};
then x in {y} by Lm1,XBOOLE_1:37;
hence thesis by TARSKI:def 1;
end;
theorem
{x} \ {x,y} = {}
proof
x in {x,y} by TARSKI:def 2;
hence thesis by Lm1,XBOOLE_1:37;
end;
Lm12: {x,y} \ X = {x} iff not x in X & (y in X or x = y)
proof
thus {x,y} \ X = {x} implies not x in X & (y in X or x = y)
proof
assume
A1: {x,y} \ X = {x};
then x in {x,y} \ X by TARSKI:def 1;
hence not x in X by XBOOLE_0:def 5;
A2: y in {x,y} by TARSKI:def 2;
assume not y in X;
then y in {x} by A1,A2,XBOOLE_0:def 5;
hence thesis by TARSKI:def 1;
end;
assume
A3: ( not x in X)&( y in X or x=y);
z in {x,y} \ X iff z=x
proof
z in {x,y} \ X iff z in {x,y} & not z in X by XBOOLE_0:def 5;
hence thesis by A3,TARSKI:def 2;
end;
hence thesis by TARSKI:def 1;
end;
theorem
x <> y implies { x,y } \ { y } = { x }
proof
assume x <> y;
then
A1: not x in {y} by TARSKI:def 1;
y in {y} by TARSKI:def 1;
hence thesis by A1,Lm12;
end;
theorem
{x} c= {y} implies x = y by Th3;
theorem
{z} c= {x,y} implies z = x or z = y
proof
A1: z in {z} by TARSKI:def 1;
assume {z} c= {x,y};
then z in {x,y} by A1,TARSKI:def 3;
hence thesis by TARSKI:def 2;
end;
theorem Th20:
{x,y} c= {z} implies x = z
proof
A1: x in {x,y} by TARSKI:def 2;
assume {x,y} c= {z};
then x in {z} by A1,TARSKI:def 3;
hence thesis by TARSKI:def 1;
end;
theorem
{x,y} c= {z} implies {x,y} = {z}
proof
assume {x,y} c= {z};
then x=z & y=z by Th20;
hence thesis by ENUMSET1:29;
end;
Lm13: X <> {x} & X <> {} implies ex y st y in X & y <> x
proof
assume that
A1: X <> {x} and
A2: X <> {};
per cases;
suppose
A3: not x in X;
consider y being set such that
A4: y in X by A2,XBOOLE_0:7;
take y;
thus thesis by A3,A4;
end;
suppose
A5: x in X;
consider y such that
A6: y in X & not y in {x} or y in {x} & not y in X by A1,TARSKI:1;
take y;
thus thesis by A5,A6,TARSKI:def 1;
end;
end;
Lm14: Z c= {x1,x2} iff Z = {} or Z = {x1} or Z = {x2} or Z = {x1,x2}
proof
thus Z c= {x1,x2} implies Z={} or Z={x1} or Z={x2} or Z={x1,x2}
proof
assume that
A1: Z c= {x1,x2} and
A2: Z <> {} and
A3: Z <> {x1} and
A4: Z <> {x2};
now
let z;
thus z in Z implies z in {x1,x2} by A1,TARSKI:def 3;
A5: now
assume
A6: not x1 in Z;
consider y such that
A7: y in Z and
A8: y<>x2 by A2,A4,Lm13;
y in {x1,x2} by A1,A7,TARSKI:def 3;
hence contradiction by A6,A7,A8,TARSKI:def 2;
end;
A9: now
assume
A10: not x2 in Z;
consider y such that
A11: y in Z and
A12: y<>x1 by A2,A3,Lm13;
y in {x1,x2} by A1,A11,TARSKI:def 3;
hence contradiction by A10,A11,A12,TARSKI:def 2;
end;
assume z in {x1,x2};
hence z in Z by A5,A9,TARSKI:def 2;
end;
hence thesis by TARSKI:1;
end;
thus thesis by Th7,XBOOLE_1:2;
end;
theorem
{x1,x2} c= {y1,y2} implies x1 = y1 or x1 = y2
proof
assume {x1,x2} c= {y1,y2};
then {x1,x2}={} or {x1,x2}={y1} or {x1,x2}={y2} or {x1,x2}={y1,y2} by Lm14;
hence thesis by Th4,Th6;
end;
theorem
x <> y implies { x } \+\ { y } = { x,y }
proof
assume
A1: x <> y;
z in { x } \+\ { y } iff z=x or z=y
proof
A2: z in {y} iff z=y by TARSKI:def 1;
z in {x} iff z=x by TARSKI:def 1;
hence thesis by A1,A2,XBOOLE_0:1;
end;
hence thesis by TARSKI:def 2;
end;
theorem
bool { x } = { {} , { x }}
proof
now
let y;
y c= { x } iff y = {} or y = { x } by Lm3;
hence y in bool { x } iff y in { {}, { x }} by Def1,TARSKI:def 2;
end;
hence thesis by TARSKI:1;
end;
Lm15: X in A implies X c= union A
proof
assume
A1: X in A;
let x;
thus thesis by A1,TARSKI:def 4;
end;
theorem
union { x } = x
proof
A1: union { x } c= x
proof
let y;
assume y in union { x };
then ex Y being set st y in Y & Y in { x } by TARSKI:def 4;
hence thesis by TARSKI:def 1;
end;
x in { x } by TARSKI:def 1;
then x c= union { x } by Lm15;
hence thesis by A1,XBOOLE_0:def 10;
end;
Lm16: union { X,Y } = X \/ Y
proof
x in union {X,Y} iff x in X or x in Y
proof
thus x in union {X,Y} implies x in X or x in Y
proof
assume x in union {X,Y};
then ex Z st x in Z & Z in {X,Y} by TARSKI:def 4;
hence thesis by TARSKI:def 2;
end;
X in {X,Y} & Y in {X,Y} by TARSKI:def 2;
hence thesis by TARSKI:def 4;
end;
hence thesis by XBOOLE_0:def 3;
end;
theorem
union {{x},{y}} = {x,y}
proof
thus union {{x},{y}} = {x} \/ {y} by Lm16
.= {x,y} by ENUMSET1:1;
end;
Lm17: [x,y] in [:X,Y:] iff x in X & y in Y
proof
thus [x,y] in [:X,Y:] implies x in X & y in Y
proof
assume [x,y] in [:X,Y:];
then ex x1,y1 st x1 in X & y1 in Y & [x,y]=[x1,y1] by Def2;
hence thesis by XTUPLE_0:1;
end;
thus thesis by Def2;
end;
canceled;
theorem
[x,y] in [:{x1},{y1}:] iff x = x1 & y = y1
proof
x=x1 & y=y1 iff x in {x1} & y in {y1} by TARSKI:def 1;
hence thesis by Lm17;
end;
theorem
[:{x},{y}:] = {[x,y]}
proof
now
let z;
thus z in [:{x},{y}:] implies z in {[x,y]}
proof
assume z in [:{x},{y}:];
then consider x1,y1 such that
A1: x1 in {x} & y1 in {y} and
A2: z=[x1,y1] by Def2;
x1=x & y1=y by A1,TARSKI:def 1;
hence thesis by A2,TARSKI:def 1;
end;
assume z in {[x,y]};
then
A3: z=[x,y] by TARSKI:def 1;
x in {x} & y in {y} by TARSKI:def 1;
hence z in [:{x},{y}:] by A3,Lm17;
end;
hence thesis by TARSKI:1;
end;
theorem Th30:
[:{x},{y,z}:] = {[x,y],[x,z]} & [:{x,y},{z}:] = {[x,z],[y,z]}
proof
now
let v;
A1: z in{y,z} by TARSKI:def 2;
thus v in [:{x},{y,z}:] implies v in {[x,y],[x,z]}
proof
assume v in [:{x},{y,z}:];
then consider x1,y1 such that
A2: x1 in {x} and
A3: y1 in {y,z} and
A4: v=[x1,y1] by Def2;
A5: y1=y or y1=z by A3,TARSKI:def 2;
x1=x by A2,TARSKI:def 1;
hence thesis by A4,A5,TARSKI:def 2;
end;
assume v in {[x,y],[x,z]};
then
A6: v=[x,y] or v=[x,z] by TARSKI:def 2;
x in{x} & y in{y,z} by TARSKI:def 1,def 2;
hence v in [:{x},{y,z}:] by A6,A1,Lm17;
end;
hence [:{x},{y,z}:] = {[x,y],[x,z]} by TARSKI:1;
now
let v;
A7: z in{z} by TARSKI:def 1;
thus v in [:{x,y},{z}:] implies v in {[x,z],[y,z]}
proof
assume v in [:{x,y},{z}:];
then consider x1,y1 such that
A8: x1 in {x,y} and
A9: y1 in {z} and
A10: v=[x1,y1] by Def2;
A11: x1=x or x1=y by A8,TARSKI:def 2;
y1=z by A9,TARSKI:def 1;
hence thesis by A10,A11,TARSKI:def 2;
end;
assume v in {[x,z],[y,z]};
then
A12: v=[x,z] or v=[y,z] by TARSKI:def 2;
x in{x,y} & y in{x,y} by TARSKI:def 2;
hence v in [:{x,y},{z}:] by A12,A7,Lm17;
end;
hence thesis by TARSKI:1;
end;
theorem
{x} c= X iff x in X by Lm1;
theorem Th32:
{x1,x2} c= Z iff x1 in Z & x2 in Z
proof
x1 in {x1,x2} & x2 in {x1,x2} by TARSKI:def 2;
hence {x1,x2} c= Z implies x1 in Z & x2 in Z by TARSKI:def 3;
assume
A1: x1 in Z & x2 in Z;
let z;
assume z in {x1,x2};
hence thesis by A1,TARSKI:def 2;
end;
theorem
Y c= { x } iff Y = {} or Y = { x } by Lm3;
theorem
Y c= X & not x in Y implies Y c= X \ { x } by Lm2;
theorem
X <> {x} & X <> {} implies ex y st y in X & y <> x by Lm13;
theorem
Z c= {x1,x2} iff Z = {} or Z = {x1} or Z = {x2} or Z = {x1,x2} by Lm14;
theorem Th37:
{z} = X \/ Y implies X = {z} & Y = {z} or X = {} & Y = {z} or X
= {z} & Y = {}
proof
assume
A1: {z} = X \/ Y;
X <> {} or Y <> {} by A1;
hence thesis by A1,Lm3,XBOOLE_1:7;
end;
theorem
{z} = X \/ Y & X <> Y implies X = {} or Y = {}
proof
assume {z} = X \/ Y;
then X={z} & Y={z} or X={} & Y={z} or X={z} & Y={} by Th37;
hence thesis;
end;
theorem
{x} \/ X c= X implies x in X by Lm4;
theorem
x in X implies {x} \/ X = X by XBOOLE_1:12,Lm1;
theorem
{x,y} \/ Z c= Z implies x in Z
proof
assume
A1: {x,y} \/ Z c= Z;
assume not x in Z;
then not x in {x,y} \/ Z by A1,TARSKI:def 3;
then not x in {x,y} by XBOOLE_0:def 3;
hence thesis by TARSKI:def 2;
end;
theorem
x in Z & y in Z implies {x,y} \/ Z = Z by XBOOLE_1:12,Th32;
theorem
{x} \/ X <> {};
theorem
{x,y} \/ X <> {};
theorem
X /\ {x} = {x} implies x in X by Lm8;
theorem
x in X implies X /\ {x} = {x} by XBOOLE_1:28,Lm1;
theorem
x in Z & y in Z implies {x,y} /\ Z = {x,y} by XBOOLE_1:28,Th32;
theorem
{x} misses X implies not x in X by Lm6;
theorem Th49:
{x,y} misses Z implies not x in Z
proof
A1: x in {x,y} by TARSKI:def 2;
assume {x,y} /\ Z = {} & x in Z;
hence contradiction by A1,XBOOLE_0:def 4;
end;
theorem
not x in X implies {x} misses X by Lm7;
theorem Th51:
not x in Z & not y in Z implies {x,y} misses Z
proof
assume
A1: ( not x in Z)& not y in Z;
assume {x,y} meets Z;
then consider z such that
A2: z in {x,y} /\ Z by XBOOLE_0:4;
z in {x,y} & z in Z by A2,XBOOLE_0:def 4;
hence contradiction by A1,TARSKI:def 2;
end;
theorem
{x} misses X or {x} /\ X = {x} by Lm7,Lm9;
theorem
{x,y} /\ X = {x} implies not y in X or x = y
proof
A1: y in {x,y} by TARSKI:def 2;
assume {x,y} /\ X = {x} & y in X;
then y in {x} by A1,XBOOLE_0:def 4;
hence thesis by TARSKI:def 1;
end;
theorem
x in X & (not y in X or x = y) implies {x,y} /\ X = {x}
proof
assume
A1: x in X &( not y in X or x=y);
z in {x,y} /\ X iff z=x
proof
z in {x,y} /\ X iff z in {x,y} & z in X by XBOOLE_0:def 4;
hence thesis by A1,TARSKI:def 2;
end;
hence thesis by TARSKI:def 1;
end;
theorem
{x,y} /\ X = {x,y} implies x in X
proof
assume {x,y} /\ X = {x,y};
then x in {x,y} /\ X & y in {x,y} /\ X or x in X /\ {x,y} & y in X /\ {x,y}
by TARSKI:def 2;
hence thesis by XBOOLE_0:def 4;
end;
theorem Th56:
z in X \ {x} iff z in X & z <> x
proof
z in X \ {x} iff z in X & not z in {x} by XBOOLE_0:def 5;
hence thesis by TARSKI:def 1;
end;
theorem Th57:
X \ {x} = X iff not x in X
proof
X \ {x} = X iff X misses {x} by XBOOLE_1:83;
hence thesis by Lm6,Lm7;
end;
theorem
X \ {x} = {} implies X = {} or X = {x}
proof
assume X \ {x} = {};
then X c= {x} by XBOOLE_1:37;
hence thesis by Lm3;
end;
theorem
{x} \ X = {x} iff not x in X by Lm6,Lm7,XBOOLE_1:83;
theorem
{x} \ X = {} iff x in X by Lm1,XBOOLE_1:37;
theorem
{x} \ X = {} or {x} \ X = {x} by Lm10,Lm11;
theorem
{x,y} \ X = {x} iff not x in X & (y in X or x = y) by Lm12;
theorem
{x,y} \ X = {x,y} iff not x in X & not y in X by Th49,Th51,XBOOLE_1:83;
theorem Th64:
{x,y} \ X = {} iff x in X & y in X
proof
{x,y} \ X = {} iff {x,y} c= X by XBOOLE_1:37;
hence thesis by Th32;
end;
theorem
{x,y} \ X = {} or {x,y} \ X = {x} or {x,y} \ X = {y} or {x,y} \ X = {x ,y}
proof
assume that
A1: {x,y} \ X <> {} and
A2: {x,y} \ X <> {x} and
A3: {x,y} \ X <> {y};
A4: not x in X & x<>y or y in X by A3,Lm12;
x in X or not y in X & x<>y by A2,Lm12;
hence thesis by A1,A4,Th51,XBOOLE_1:83,Th64;
end;
theorem
X \ {x,y} = {} iff X = {} or X = {x} or X = {y} or X = {x,y}
proof
X \ {x,y} = {} iff X c= {x,y} by XBOOLE_1:37;
hence thesis by Lm14;
end;
theorem
A c= B implies bool A c= bool B
proof
assume
A1: A c= B;
let x;
assume x in bool A;
then x c= A by Def1;
then x c= B by A1,XBOOLE_1:1;
hence thesis by Def1;
end;
theorem
{ A } c= bool A
proof
A in bool A by Def1;
hence thesis by Lm1;
end;
theorem
bool A \/ bool B c= bool (A \/ B)
proof
let x;
assume x in bool A \/ bool B;
then x in bool A or x in bool B by XBOOLE_0:def 3;
then
A1: x c= A or x c= B by Def1;
A c= A \/ B & B c= A \/ B by XBOOLE_1:7;
then x c= A \/ B by A1,XBOOLE_1:1;
hence thesis by Def1;
end;
theorem
bool A \/ bool B = bool (A \/ B) implies A,B are_c=-comparable
proof
assume
A1: bool A \/ bool B = bool (A \/ B);
A \/ B in bool (A \/ B) by Def1;
then A \/ B in bool A or A \/ B in bool B by A1,XBOOLE_0:def 3;
then
A2: A \/ B c= A or A \/ B c= B by Def1;
A c= A \/ B & B c= A \/ B by XBOOLE_1:7;
hence A c= B or B c= A by A2,XBOOLE_0:def 10;
end;
theorem
bool (A /\ B) = bool A /\ bool B
proof
now
let x;
A /\ B c= A & A /\ B c= B by XBOOLE_1:17;
then x c= A & x c= B iff x c= A /\ B by XBOOLE_1:1,19;
then x in bool A & x in bool B iff x in bool (A /\ B) by Def1;
hence x in bool (A /\ B) iff x in bool A /\ bool B by XBOOLE_0:def 4;
end;
hence thesis by TARSKI:1;
end;
theorem
bool (A \ B) c= { {} } \/ (bool A \ bool B)
proof
let x;
assume x in bool (A \ B);
then
A1: x c= A \ B by Def1;
then x misses B by XBOOLE_1:63,79;
then A \ B c= A & x /\ B = {} by XBOOLE_0:def 7,XBOOLE_1:36;
then x = {} or x c= A & not x c= B by A1,XBOOLE_1:1,28;
then x in { {} } or x in bool A & not x in bool B by Def1,TARSKI:def 1;
then x in { {} } or x in bool A \ bool B by XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
theorem
bool (A \ B) \/ bool (B \ A) c= bool (A \+\ B)
proof
let x;
assume x in bool (A \ B) \/ bool (B \ A);
then x in bool (A \ B) or x in bool (B \ A) by XBOOLE_0:def 3;
then
A1: x c= A \ B or x c= B \ A by Def1;
x c= (A \ B) \/ (B \ A)
proof
let z;
assume z in x;
then z in A \ B or z in B \ A by A1,TARSKI:def 3;
hence thesis by XBOOLE_0:def 3;
end;
hence thesis by Def1;
end;
theorem
X in A implies X c= union A by Lm15;
theorem
union { X,Y } = X \/ Y by Lm16;
theorem
(for X st X in A holds X c= Z) implies union A c= Z
proof
assume
A1: for X st X in A holds X c= Z;
let y;
assume y in union A;
then consider Y such that
A2: y in Y and
A3: Y in A by TARSKI:def 4;
Y c= Z by A1,A3;
hence thesis by A2,TARSKI:def 3;
end;
theorem Th77:
A c= B implies union A c= union B
proof
assume
A1: A c= B;
let x;
assume x in union A;
then consider Y such that
A2: x in Y and
A3: Y in A by TARSKI:def 4;
Y in B by A1,A3,TARSKI:def 3;
hence thesis by A2,TARSKI:def 4;
end;
theorem
union (A \/ B) = union A \/ union B
proof
A1: union (A \/ B) c= union A \/ union B
proof
let x;
assume x in union (A \/ B);
then consider Y such that
A2: x in Y and
A3: Y in A \/ B by TARSKI:def 4;
Y in A or Y in B by A3,XBOOLE_0:def 3;
then x in union A or x in union B by A2,TARSKI:def 4;
hence thesis by XBOOLE_0:def 3;
end;
union A c= union (A \/ B) & union B c= union (A \/ B) by Th77,XBOOLE_1:7;
then union A \/ union B c= union (A \/ B) by XBOOLE_1:8;
hence thesis by A1,XBOOLE_0:def 10;
end;
theorem Th79:
union (A /\ B) c= union A /\ union B
proof
let x;
assume x in union (A /\ B);
then consider Y such that
A1: x in Y and
A2: Y in A /\ B by TARSKI:def 4;
Y in B by A2,XBOOLE_0:def 4;
then
A3: x in union B by A1,TARSKI:def 4;
Y in A by A2,XBOOLE_0:def 4;
then x in union A by A1,TARSKI:def 4;
hence thesis by A3,XBOOLE_0:def 4;
end;
theorem Th80:
(for X st X in A holds X misses B) implies union A misses B
proof
assume
A1: for X st X in A holds X misses B;
assume union(A) meets B;
then consider z being set such that
A2: z in union(A) /\ B by XBOOLE_0:4;
z in union(A) by A2,XBOOLE_0:def 4;
then consider X such that
A3: z in X and
A4: X in A by TARSKI:def 4;
z in B by A2,XBOOLE_0:def 4;
then z in X /\ B by A3,XBOOLE_0:def 4;
hence contradiction by A1,A4,XBOOLE_0:4;
end;
theorem
union bool A = A
proof
now
let x;
thus x in union bool A implies x in A
proof
assume x in union bool A;
then consider X such that
A1: x in X and
A2: X in bool A by TARSKI:def 4;
X c= A by A2,Def1;
hence thesis by A1,TARSKI:def 3;
end;
assume x in A;
then { x } c= A by Lm1;
then
A3: { x } in bool A by Def1;
x in { x } by TARSKI:def 1;
hence x in union bool A by A3,TARSKI:def 4;
end;
hence thesis by TARSKI:1;
end;
theorem
A c= bool union A
proof
let x;
assume x in A;
then x c= union A by Lm15;
hence thesis by Def1;
end;
theorem
(for X,Y st X<>Y & X in A \/ B & Y in A \/ B holds X misses Y) implies
union(A /\ B) = union A /\ union B
proof
assume
A1: for X,Y st X<>Y & X in A \/ B & Y in A \/ B holds X misses Y;
A2: union A /\ union B c= union (A /\ B)
proof
let x;
assume
A3: x in union A /\ union B;
then x in union A by XBOOLE_0:def 4;
then consider X such that
A4: x in X and
A5: X in A by TARSKI:def 4;
x in union B by A3,XBOOLE_0:def 4;
then consider Y such that
A6: x in Y and
A7: Y in B by TARSKI:def 4;
now
B8: x in X /\ Y by A4,A6,XBOOLE_0:def 4;
assume
A9: X<>Y;
X in A \/ B & Y in A \/ B by A5,A7,XBOOLE_0:def 3;
hence contradiction by A1,A9,B8,XBOOLE_0:4;
end;
then Y in A /\ B by A5,A7,XBOOLE_0:def 4;
hence thesis by A6,TARSKI:def 4;
end;
union (A /\ B) c= union A /\ union B by Th79;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem Th84:
A c= [:X,Y:] & z in A implies ex x,y st x in X & y in Y & z = [ x,y]
proof
assume A c= [:X,Y:] & z in A;
then z in [:X,Y:] by TARSKI:def 3;
hence thesis by Def2;
end;
theorem Th85:
z in [:X1, Y1:] /\ [:X2, Y2:] implies ex x,y st z = [x,y] & x
in X1 /\ X2 & y in Y1 /\ Y2
proof
assume
A1: z in [:X1, Y1:] /\ [:X2, Y2:];
then z in [:X1, Y1:] by XBOOLE_0:def 4;
then consider x1,y1 such that
A2: x1 in X1 and
A3: y1 in Y1 and
A4: z=[x1,y1] by Def2;
z in [:X2, Y2:] by A1,XBOOLE_0:def 4;
then consider x2,y2 such that
A5: x2 in X2 and
A6: y2 in Y2 and
A7: z=[x2,y2] by Def2;
y1=y2 by A4,A7,XTUPLE_0:1;
then
A8: y1 in Y1 /\ Y2 by A3,A6,XBOOLE_0:def 4;
x1=x2 by A4,A7,XTUPLE_0:1;
then x1 in X1 /\ X2 by A2,A5,XBOOLE_0:def 4;
hence thesis by A4,A8;
end;
theorem
[:X,Y:] c= bool bool (X \/ Y)
proof
let z;
assume z in [:X,Y:];
then consider x,y such that
A1: x in X and
A2: y in Y and
A3: z = [x,y] by Def2;
z c= bool (X \/ Y)
proof
let u be set;
assume u in z;
then
A4: u = {x,y} or u = {x} by A3,TARSKI:def 2;
X c= X \/ Y & {x} c= X by A1,Lm1,XBOOLE_1:7;
then
A5: {x} c= X \/ Y by XBOOLE_1:1;
x in X \/ Y & y in X \/ Y by A1,A2,XBOOLE_0:def 3;
then {x,y} c= X \/ Y by Th32;
hence thesis by A5,A4,Def1;
end;
hence thesis by Def1;
end;
theorem
[x,y] in [:X,Y:] iff x in X & y in Y by Lm17;
theorem Th88:
[x,y] in [:X,Y:] implies [y,x] in [:Y,X:]
proof
[x,y] in [:X,Y:] implies x in X & y in Y by Lm17;
hence thesis by Lm17;
end;
theorem
(for x,y holds [x,y] in [:X1,Y1:] iff [x,y] in [:X2,Y2:]) implies [:X1
,Y1:]=[:X2,Y2:]
proof
assume
A1: for x,y holds [x,y] in [:X1,Y1:] iff [x,y] in [:X2,Y2:];
now
let z;
thus z in [:X1,Y1:] implies z in [:X2,Y2:]
proof
assume
A2: z in [:X1,Y1:];
then ex x,y st x in X1 & y in Y1 & [x,y]=z by Def2;
hence thesis by A1,A2;
end;
assume
A3: z in [:X2,Y2:];
then ex x,y st x in X2 & y in Y2 & [x,y]=z by Def2;
hence z in [:X1,Y1:] by A1,A3;
end;
hence thesis by TARSKI:1;
end;
Lm18: A c= [:X1,Y1:] & B c= [:X2,Y2:] & (for x,y holds [x,y] in A iff [x,y] in
B) implies A = B
proof
assume that
A1: A c= [:X1,Y1:] and
A2: B c= [:X2,Y2:] and
A3: for x,y holds [x,y] in A iff [x,y] in B;
now
let z;
A4: z in B implies ex x,y st x in X2 & y in Y2 & z=[x,y] by A2,Th84;
z in A implies ex x,y st x in X1 & y in Y1 & z=[x,y] by A1,Th84;
hence z in A iff z in B by A3,A4;
end;
hence thesis by TARSKI:1;
end;
Lm19: ( for z st z in A ex x,y st z = [x,y]) & (for z st z in B ex x,y st z=[x
,y]) & (for x,y holds [x,y] in A iff [x,y] in B) implies A = B
proof
assume that
A1: for z st z in A ex x,y st z=[x,y] and
A2: for z st z in B ex x,y st z=[x,y] and
A3: for x,y holds [x,y] in A iff [x,y] in B;
now
let z;
A4: z in B implies ex x,y st z=[x, y ] by A2;
z in A implies ex x,y st z=[x,y] by A1;
hence z in A iff z in B by A3,A4;
end;
hence thesis by TARSKI:1;
end;
theorem Th90:
[:X,Y:] = {} iff X = {} or Y = {}
proof
thus [:X,Y:] = {} implies X={} or Y={}
proof
assume
A1: [:X,Y:] = {};
assume X<>{};
then consider x being set such that
A2: x in X by XBOOLE_0:7;
assume Y<>{};
then consider y being set such that
A3: y in Y by XBOOLE_0:7;
[x,y] in [:X,Y:] by A2,A3,Def2;
hence contradiction by A1;
end;
assume
A4: not thesis;
then consider z being set such that
A5: z in [:X,Y:] by XBOOLE_0:7;
A6: now
assume
A7: Y={};
ex x,y st x in X & y in Y & [x,y]=z by A5,Def2;
hence contradiction by A7;
end;
now
assume
A8: X={};
ex x,y st x in X & y in Y & [x,y]=z by A5,Def2;
hence contradiction by A8;
end;
hence contradiction by A4,A6;
end;
theorem
X <> {} & Y <> {} & [:X,Y:] = [:Y,X:] implies X = Y
proof
assume X<>{};
then consider x being set such that
A1: x in X by XBOOLE_0:7;
assume Y<>{};
then consider y being set such that
A2: y in Y by XBOOLE_0:7;
assume
A3: [:X,Y:]=[:Y,X:];
z in X iff z in Y
proof
thus z in X implies z in Y
proof
assume z in X;
then [z,y] in [:Y,X:] by A2,A3,Lm17;
hence thesis by Lm17;
end;
assume z in Y;
then [z,x] in [:X,Y:] by A1,A3,Lm17;
hence thesis by Lm17;
end;
hence thesis by TARSKI:1;
end;
theorem
[:X,X:] = [:Y,Y:] implies X = Y
proof
assume
A1: [:X,X:] = [:Y,Y:];
x in X iff x in Y
proof
x in X iff [x,x] in [:X,X:] by Lm17;
hence thesis by A1,Lm17;
end;
hence thesis by TARSKI:1;
end;
Lm20: z in [:X,Y:] implies ex x,y st [x,y] = z
proof
assume z in [:X,Y:];
then ex x,y st x in X & y in Y & [x,y]=z by Def2;
hence thesis;
end;
theorem
X c= [:X,X:] implies X = {}
proof
assume
A1: X c= [:X,X:];
assume X <> {};
then consider z being set such that
A2: z in X by XBOOLE_0:7;
consider Y such that
A3: Y in X \/ union X and
A4: X \/ union X misses Y by XREGULAR:1,A2;
now
assume
A5: Y in X;
then consider x,y such that
A6: Y=[x,y] by Lm20,A1,TARSKI:def 3;
A7: {x} in Y by A6,TARSKI:def 2;
Y c= union X by A5,Lm15;
then {x} in union X by A7,TARSKI:def 3;
then {x} in X \/ union X by XBOOLE_0:def 3;
hence contradiction by A4,A7,XBOOLE_0:3;
end;
then Y in union X by A3,XBOOLE_0:def 3;
then consider Z such that
A8: Y in Z and
A9: Z in X by TARSKI:def 4;
Z in [:X,X:] by A1,A9,TARSKI:def 3;
then consider x,y such that
A10: x in X and
y in X and
A11: Z=[x,y] by Def2;
Y={x} or Y={x,y} by A8,A11,TARSKI:def 2;
then
A12: x in Y by TARSKI:def 1,def 2;
x in X \/ union X by A10,XBOOLE_0:def 3;
hence contradiction by A4,A12,XBOOLE_0:3;
end;
theorem
Z <> {} & ([:X,Z:] c= [:Y,Z:] or [:Z,X:] c= [:Z,Y:]) implies X c= Y
proof
assume Z<>{};
then consider z being set such that
A1: z in Z by XBOOLE_0:7;
assume
A2: [:X,Z:] c= [:Y,Z:] or [:Z,X:] c= [:Z,Y:];
let x;
assume x in X;
then [x,z] in [:X,Z:] & [z,x] in [:Z,X:] by A1,Def2;
then [x,z] in [:Y,Z:] or [z,x] in [:Z,Y:] by A2,TARSKI:def 3;
hence thesis by Lm17;
end;
theorem Th95:
X c= Y implies [:X,Z:] c= [:Y,Z:] & [:Z,X:] c= [:Z,Y:]
proof
assume
A1: X c= Y;
thus [:X,Z:] c= [:Y,Z:]
proof
let z;
assume z in [:X,Z:];
then consider x,y such that
A2: x in X and
A3: y in Z & z=[x,y] by Def2;
x in Y by A1,A2,TARSKI:def 3;
hence thesis by A3,Def2;
end;
let z;
assume z in [:Z,X:];
then consider y,x such that
A4: y in Z and
A5: x in X and
A6: z=[y,x] by Def2;
x in Y by A1,A5,TARSKI:def 3;
hence thesis by A4,A6,Def2;
end;
theorem Th96:
X1 c= Y1 & X2 c= Y2 implies [:X1,X2:] c= [:Y1,Y2:]
proof
assume X1 c= Y1 & X2 c= Y2;
then [:X1,X2:] c= [:Y1,X2:] & [:Y1,X2:] c= [:Y1,Y2:] by Th95;
hence thesis by XBOOLE_1:1;
end;
theorem Th97:
[:X \/ Y, Z:] = [:X, Z:] \/ [:Y, Z:] & [:Z, X \/ Y:] = [:Z, X:] \/ [:Z, Y:]
proof
A1: for z st z in [:X \/ Y, Z:] ex x,y st z=[x,y] by Lm20;
A2: for x,y holds [x,y] in [:X \/ Y, Z:] iff [x,y] in [:X, Z:] \/ [:Y, Z:]
proof
let x,y;
thus [x,y] in [:X \/ Y, Z:] implies [x,y] in [:X, Z:] \/ [:Y, Z:]
proof
assume
A3: [x,y] in [:X \/ Y, Z:];
then x in X \/ Y by Lm17;
then
A4: x in X or x in Y by XBOOLE_0:def 3;
y in Z by A3,Lm17;
then [x,y] in [:X,Z:] or [x,y] in [:Y,Z:] by A4,Lm17;
hence thesis by XBOOLE_0:def 3;
end;
assume [x,y] in [:X, Z:] \/ [:Y, Z:];
then [x,y] in [:X, Z:] or [x,y] in [:Y, Z:] by XBOOLE_0:def 3;
then
A5: x in X & y in Z or x in Y & y in Z by Lm17;
then x in X \/ Y by XBOOLE_0:def 3;
hence thesis by A5,Lm17;
end;
A6: z in [:X1,X2:] \/ [:Y1,Y2:] implies ex x,y st z=[x,y]
proof
assume z in [:X1,X2:] \/ [:Y1,Y2:];
then z in [:X1,X2:] or z in [:Y1,Y2:] by XBOOLE_0:def 3;
hence thesis by Lm20;
end;
then for z st z in [:X,Z:] \/ [:Y,Z:] ex x,y st z=[x,y];
hence
A7: [:X \/ Y, Z:] = [:X, Z:] \/ [:Y, Z:] by A1,A2,Lm19;
A8: for y,x holds [y,x] in [:Z, X \/ Y:] iff [y,x] in [:Z, X:] \/ [:Z, Y:]
proof
let y,x;
A9: [x,y]in[:X, Z:] or [x,y]in[:Y,Z:] iff [y,x]in[:Z,X:] or [y,x]in[:Z,Y
:] by Th88;
[y,x] in [:Z, X \/ Y:] iff [x,y] in [:X \/ Y, Z:] by Th88;
hence thesis by A7,A9,XBOOLE_0:def 3;
end;
A10: for z st z in [:Z,X \/ Y:] ex x,y st z=[x,y] by Lm20;
for z st z in [:Z,X:] \/ [:Z,Y:] ex x,y st z=[x,y] by A6;
hence thesis by A10,A8,Lm19;
end;
theorem
[:X1 \/ X2, Y1 \/ Y2:] = [:X1,Y1:] \/ [:X1,Y2:] \/ [:X2,Y1:] \/ [:X2, Y2:]
proof
thus [:X1 \/ X2, Y1 \/ Y2:] = [:X1, Y1 \/ Y2:] \/ [:X2, Y1 \/ Y2:] by Th97
.= [:X1,Y1:] \/ [:X1,Y2:] \/ [:X2,Y1 \/ Y2:] by Th97
.= [:X1,Y1:] \/ [:X1,Y2:] \/ ([:X2,Y1:] \/ [:X2,Y2:]) by Th97
.= [:X1,Y1:] \/ [:X1,Y2:] \/ [:X2,Y1:] \/ [:X2,Y2:] by XBOOLE_1:4;
end;
theorem
[:X /\ Y, Z:] = [:X, Z:] /\ [:Y, Z:] & [:Z, X /\ Y:] = [:Z, X:] /\ [:Z , Y :]
proof
A1: for x,y holds [x,y] in [:X /\ Y, Z:] iff [x,y] in [:X, Z:] /\ [:Y, Z :]
proof
let x,y;
thus [x,y] in [:X /\ Y, Z:] implies [x,y] in [:X, Z:] /\ [:Y, Z:]
proof
assume
A2: [x,y] in [:X /\ Y, Z:];
then
A3: x in X /\ Y by Lm17;
A4: y in Z by A2,Lm17;
x in Y by A3,XBOOLE_0:def 4;
then
A5: [x,y] in [:Y,Z:] by A4,Lm17;
x in X by A3,XBOOLE_0:def 4;
then [x,y] in [:X,Z:] by A4,Lm17;
hence thesis by A5,XBOOLE_0:def 4;
end;
assume
A6: [x,y] in [:X, Z:] /\ [:Y, Z:];
then [x,y] in [:Y, Z:] by XBOOLE_0:def 4;
then
A7: x in Y by Lm17;
A8: [x,y] in [:X, Z:] by A6,XBOOLE_0:def 4;
then x in X by Lm17;
then
A9: x in X /\ Y by A7,XBOOLE_0:def 4;
y in Z by A8,Lm17;
hence thesis by A9,Lm17;
end;
[:X, Z:] /\ [:Y, Z:] c= [:X, Z:] by XBOOLE_1:17;
hence
A10: [:X /\ Y, Z:] = [:X, Z:] /\ [:Y, Z:] by A1,Lm18;
A11: for y,x holds [y,x] in [:Z, X /\ Y:] iff [y,x] in [:Z, X:] /\ [:Z, Y:]
proof
let y,x;
A12: [x,y]in[:X, Z:] & [x,y]in[:Y,Z:] iff [y,x]in[:Z,X:] & [y,x]in[:Z,Y:]
by Th88;
[y,x] in [:Z, X /\ Y:] iff [x,y] in [:X /\ Y, Z:] by Th88;
hence thesis by A10,A12,XBOOLE_0:def 4;
end;
[:Z, X:] /\ [:Z, Y:] c= [:Z, X:] by XBOOLE_1:17;
hence thesis by A11,Lm18;
end;
theorem Th100:
[:X1 /\ X2, Y1 /\ Y2:] = [:X1,Y1:] /\ [:X2, Y2:]
proof
Y1 /\ Y2 c= Y2 & X1 /\ X2 c= X2 by XBOOLE_1:17;
then
A1: [:X1 /\ X2, Y1 /\ Y2:] c= [:X2, Y2:] by Th96;
A2: [:X1, Y1:] /\ [:X2, Y2:] c= [:X1 /\ X2, Y1 /\ Y2:]
proof
let z;
assume z in [:X1, Y1:] /\ [:X2, Y2:];
then ex x,y st z=[x,y] & x in X1 /\ X2 & y in Y1 /\ Y2 by Th85;
hence thesis by Def2;
end;
Y1 /\ Y2 c= Y1 & X1 /\ X2 c= X1 by XBOOLE_1:17;
then [:X1 /\ X2, Y1 /\ Y2:] c= [:X1, Y1:] by Th96;
then [:X1 /\ X2, Y1 /\ Y2:] c= [:X1, Y1:] /\ [:X2, Y2:] by A1,XBOOLE_1:19;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
A c= X & B c= Y implies [:A,Y:] /\ [:X,B:] = [:A,B:]
proof
assume that
A1: A c= X and
A2: B c= Y;
A3: [:A,Y:] /\ [:X,B:] = [:A /\ X, Y /\ B:] by Th100;
A /\ X = A by A1,XBOOLE_1:28;
hence thesis by A2,A3,XBOOLE_1:28;
end;
theorem Th102:
[:X \ Y, Z:] = [:X, Z:] \ [:Y, Z:] & [:Z, X \ Y:] = [:Z, X:] \ [:Z, Y:]
proof
A1: for x,y holds [x,y] in [:X \ Y, Z:] iff [x,y] in [:X, Z:] \ [:Y, Z:]
proof
let x,y;
thus [x,y] in [:X \ Y, Z:] implies [x,y] in [:X, Z:] \ [:Y, Z:]
proof
assume
A2: [x,y] in [:X \ Y, Z:];
then
A3: x in X \ Y by Lm17;
then
A4: x in X by XBOOLE_0:def 5;
not x in Y by A3,XBOOLE_0:def 5;
then
A5: not [x,y] in [:Y,Z:] by Lm17;
y in Z by A2,Lm17;
then [x,y] in [:X,Z:] by A4,Lm17;
hence thesis by A5,XBOOLE_0:def 5;
end;
assume
A6: [x,y] in [:X, Z:] \ [:Y, Z:];
then
A7: [x,y] in [:X, Z:] by XBOOLE_0:def 5;
then
A8: y in Z by Lm17;
not [x,y] in [:Y, Z:] by A6,XBOOLE_0:def 5;
then
A9: not (x in Y & y in Z) by Lm17;
x in X by A7,Lm17;
then x in X \ Y by A7,A9,Lm17,XBOOLE_0:def 5;
hence thesis by A8,Lm17;
end;
[:X, Z:] \ [:Y, Z:] c= [:X, Z:] by XBOOLE_1:36;
hence
A10: [:X \ Y, Z:] = [:X, Z:] \ [:Y, Z:] by A1,Lm18;
A11: for y,x holds [y,x] in [:Z, X \ Y:] iff [y,x] in [:Z, X:] \ [:Z, Y:]
proof
let y,x;
A12: [x,y]in[:X, Z:]& not[x,y]in[:Y,Z:] iff [y,x]in[:Z,X:]& not[y,x]in[:Z,
Y :] by Th88;
[y,x] in [:Z, X \ Y:] iff [x,y] in [:X \ Y, Z:] by Th88;
hence thesis by A10,A12,XBOOLE_0:def 5;
end;
[:Z, X:] \ [:Z, Y:] c= [:Z, X:] by XBOOLE_1:36;
hence thesis by A11,Lm18;
end;
theorem
[:X1,X2:] \ [:Y1,Y2:] = [:X1\Y1,X2:] \/ [:X1,X2\Y2:]
proof
A1: [:Y1,X2:] /\ [:X1,Y2:] = [:Y1 /\ X1, X2 /\ Y2:] by Th100;
Y1 /\ X1 c= Y1 & X2 /\ Y2 c= Y2 by XBOOLE_1:17;
then
A2: [:Y1 /\ X1, X2 /\ Y2:] c= [:Y1,Y2:] by Th96;
A3: [:X1\Y1,X2:] \/ [:X1,X2\Y2:] c= [:X1,X2:] \ [:Y1, Y2:]
proof
let z;
A4: now
assume z in [:X1\Y1,X2:];
then consider x,y such that
A5: x in X1\Y1 and
A6: y in X2 and
A7: z=[x,y] by Def2;
not x in Y1 by A5,XBOOLE_0:def 5;
then
A8: not z in [:Y1,Y2:] by A7,Lm17;
x in X1 by A5,XBOOLE_0:def 5;
then z in [:X1,X2:] by A6,A7,Lm17;
hence thesis by A8,XBOOLE_0:def 5;
end;
A9: now
assume z in [:X1,X2\Y2:];
then consider x,y such that
A10: x in X1 and
A11: y in X2\Y2 and
A12: z=[x,y] by Def2;
not y in Y2 by A11,XBOOLE_0:def 5;
then
A13: not z in [:Y1,Y2:] by A12,Lm17;
y in X2 by A11,XBOOLE_0:def 5;
then z in [:X1,X2:] by A10,A12,Lm17;
hence thesis by A13,XBOOLE_0:def 5;
end;
assume z in [:X1\Y1,X2:] \/ [:X1,X2\Y2:];
hence thesis by A4,A9,XBOOLE_0:def 3;
end;
[:X1\Y1,X2:] = [:X1,X2:] \ [:Y1,X2:] & [:X1,X2\Y2:] = [:X1,X2:] \ [:X1,
Y2 :] by Th102;
then [:X1\Y1,X2:] \/ [:X1,X2\Y2:] = [:X1,X2:] \ [:Y1 /\ X1, X2 /\ Y2:] by A1,
XBOOLE_1:54;
then [:X1,X2:] \ [:Y1,Y2:] c= [:X1\Y1,X2:] \/ [:X1,X2\Y2:] by A2,XBOOLE_1:34;
hence thesis by A3,XBOOLE_0:def 10;
end;
theorem Th104:
X1 misses X2 or Y1 misses Y2 implies [:X1,Y1:] misses [:X2,Y2:]
proof
assume
A1: X1 misses X2 or Y1 misses Y2;
assume not thesis;
then consider z being set such that
A2: z in [:X1,Y1:] /\ [:X2,Y2:] by XBOOLE_0:4;
ex x,y st z=[x,y] & x in X1 /\ X2 & y in Y1 /\ Y2 by A2,Th85;
hence contradiction by A1,XBOOLE_0:4;
end;
theorem
[x,y] in [:{z},Y:] iff x = z & y in Y
proof
A1: x in {z} iff x=z by TARSKI:def 1;
hence [x,y] in [:{z},Y:] implies x=z & y in Y by Lm17;
thus thesis by A1,Lm17;
end;
theorem
[x,y] in [:X,{z}:] iff x in X & y = z
proof
A1: y in {z} iff y=z by TARSKI:def 1;
hence [x,y] in [:X,{z}:] implies x in X & y=z by Lm17;
thus thesis by A1,Lm17;
end;
theorem
X <> {} implies [:{x},X:] <> {} & [:X,{x}:] <> {} by Th90;
theorem
x <> y implies [:{x},X:] misses [:{y},Y:] & [:X,{x}:] misses [:Y,{y}:]
proof
assume x<>y;
then {x} misses {y} by Th11;
hence thesis by Th104;
end;
theorem
[:{x,y},X:] = [:{x},X:] \/ [:{y},X:] & [:X,{x,y}:] = [:X,{x}:] \/ [:X, {y} :]
proof
{x,y}={x} \/ {y} by ENUMSET1:1;
hence thesis by Th97;
end;
theorem Th110:
X1 <> {} & Y1 <> {} & [:X1,Y1:] = [:X2,Y2:] implies X1 = X2 & Y1 = Y2
proof
assume
A1: X1<>{};
then consider x being set such that
A2: x in X1 by XBOOLE_0:7;
assume
A3: Y1<>{};
then consider y being set such that
A4: y in Y1 by XBOOLE_0:7;
assume
A5: [:X1,Y1:] = [:X2,Y2:];
then
A6: [:X2,Y2:] <> {} by A1,A3,Th90;
then
A7: Y2 <> {} by Th90;
z in X1 iff z in X2
proof
consider y2 being set such that
A8: y2 in Y2 by A7,XBOOLE_0:7;
thus z in X1 implies z in X2
proof
assume z in X1;
then [z,y] in [:X2,Y2:] by A4,A5,Lm17;
hence thesis by Lm17;
end;
assume z in X2;
then [z,y2] in [:X2,Y2:] by A8,Lm17;
hence thesis by A5,Lm17;
end;
hence X1 = X2 by TARSKI:1;
A9: X2 <> {} by A6,Th90;
z in Y1 iff z in Y2
proof
consider x2 being set such that
A10: x2 in X2 by A9,XBOOLE_0:7;
thus z in Y1 implies z in Y2
proof
assume z in Y1;
then [x,z] in [:X2,Y2:] by A2,A5,Lm17;
hence thesis by Lm17;
end;
assume z in Y2;
then [x2,z] in [:X2,Y2:] by A10,Lm17;
hence thesis by A5,Lm17;
end;
hence thesis by TARSKI:1;
end;
theorem
X c= [:X,Y:] or X c= [:Y,X:] implies X = {}
proof
assume
A1: X c= [:X,Y:] or X c= [:Y,X:];
assume
A2: X <> {};
A3: now
defpred P[set] means ex Y st $1=Y & ex z st z in Y & z in X;
consider Z such that
A4: for y holds y in Z iff y in union X & P[y] from XBOOLE_0:sch 1;
consider Y2 such that
A5: Y2 in X \/ Z and
A6: X \/ Z misses Y2 by XREGULAR:1,A2;
now
assume
A7: not ex Y2 st Y2 in X & for Y1 st Y1 in Y2 holds for z holds not
z in Y1 or not z in X;
now
assume
A8: Y2 in X;
then consider Y1 such that
A9: Y1 in Y2 and
A10: ex z st z in Y1 & z in X by A7;
Y1 in union X by A8,A9,TARSKI:def 4;
then Y1 in Z by A4,A10;
then Y1 in X \/ Z by XBOOLE_0:def 3;
hence contradiction by A6,A9,XBOOLE_0:3;
end;
then Y2 in Z by A5,XBOOLE_0:def 3;
then ex X2 st Y2=X2 & ex z st z in X2 & z in X by A4;
then consider z such that
A11: z in Y2 and
A12: z in X;
z in X \/ Z by A12,XBOOLE_0:def 3;
hence contradiction by A6,A11,XBOOLE_0:3;
end;
then consider Y1 such that
A13: Y1 in X and
A14: not ex Y2 st Y2 in Y1 & ex z st z in Y2 & z in X;
A15: now
given y,x such that
A16: x in X and
A17: Y1 = [y,x];
A18: x in {y,x} by TARSKI:def 2;
{y,x} in Y1 by A17,TARSKI:def 2;
hence contradiction by A14,A16,A18;
end;
assume X c= [:Y,X:];
then Y1 in [:Y,X:] by A13,TARSKI:def 3;
then ex y,x st y in Y & x in X & Y1 = [y,x] by Def2;
hence contradiction by A15;
end;
now
consider z being set such that
A19: z in X by A2,XBOOLE_0:7;
consider Y1 such that
A20: Y1 in X \/ union X and
A21: X \/ union X misses Y1 by XREGULAR:1,A19;
assume
A22: X c= [:X,Y:];
now
assume
A23: Y1 in X;
then consider x,y such that
A24: Y1 = [x,y] by Lm20,A22,TARSKI:def 3;
A25: {x} in Y1 by A24,TARSKI:def 2;
Y1 c= union X by A23,Lm15;
then {x} in union X by A25,TARSKI:def 3;
then {x} in X \/ union X by XBOOLE_0:def 3;
hence contradiction by A21,A25,XBOOLE_0:3;
end;
then Y1 in union X by A20,XBOOLE_0:def 3;
then consider Y2 such that
A26: Y1 in Y2 and
A27: Y2 in X by TARSKI:def 4;
Y2 in [:X,Y:] by A22,A27,TARSKI:def 3;
then consider x,y such that
A28: x in X and
y in Y and
A29: Y2=[x,y] by Def2;
Y1={x} or Y1={x,y} by A26,A29,TARSKI:def 2;
then
A30: x in Y1 by TARSKI:def 1,def 2;
x in X \/ union X by A28,XBOOLE_0:def 3;
hence contradiction by A21,A30,XBOOLE_0:3;
end;
hence thesis by A1,A3;
end;
theorem
ex M st N in M & (for X,Y holds X in M & Y c= X implies Y in M) & (for
X holds X in M implies bool X in M) & for X holds X c= M implies X,M
are_equipotent or X in M
proof
consider M such that
A1: N in M and
A2: for X,Y holds X in M & Y c= X implies Y in M and
A3: for X st X in M ex Z st Z in M & for Y st Y c= X holds Y in Z and
A4: for X holds X c= M implies X,M are_equipotent or X in M by TARSKI:3;
take M;
thus N in M by A1;
thus for X,Y holds X in M & Y c= X implies Y in M by A2;
thus for X holds X in M implies bool X in M
proof
let X;
assume X in M;
then consider Z such that
A5: Z in M and
A6: for Y st Y c= X holds Y in Z by A3;
now
let Y;
assume Y in bool X;
then Y c= X by Def1;
hence Y in Z by A6;
end;
hence thesis by A2,A5,TARSKI:def 3;
end;
thus thesis by A4;
end;
reserve e,X,X1,X2,Y1,Y2 for set;
theorem
e in [:X1,Y1:] & e in [:X2,Y2:] implies e in [:X1 /\ X2, Y1 /\ Y2:]
proof
assume e in [:X1,Y1:] & e in [:X2,Y2:];
then e in [:X1,Y1:] /\ [:X2,Y2:] by XBOOLE_0:def 4;
hence thesis by Th100;
end;
begin
theorem Th114:
[:X1,X2:] c= [:Y1,Y2:] & [:X1,X2:] <> {} implies X1 c= Y1 & X2 c= Y2
proof
assume that
A1: [:X1,X2:] c= [:Y1,Y2:] and
A2: [:X1,X2:] <> {};
A3: [:X1,X2:] = [:X1,X2:] /\ [:Y1,Y2:] by A1,XBOOLE_1:28
.= [:X1/\Y1,X2/\Y2:] by Th100;
X1 <> {} & X2 <> {} by A2,Th90;
then X1 = X1/\Y1 & X2 = X2/\Y2 by A3,Th110;
hence thesis by XBOOLE_1:17;
end;
theorem
for A being non empty set, B,C,D being set st [:A,B:] c= [:C,D:] or [:
B,A:] c= [:D,C:] holds B c= D
proof
let A be non empty set, B,C,D be set such that
A1: [:A,B:] c= [:C,D:] or [:B,A:] c= [:D,C:];
per cases;
suppose
B = {};
hence thesis by XBOOLE_1:2;
end;
suppose
B <> {};
then [:A,B:] <> {} & [:B,A:] <> {} by Th90;
hence thesis by A1,Th114;
end;
end;
theorem
x in X implies (X\{x})\/{x}=X
proof
assume
A1: x in X;
thus (X\{x})\/{x}c=X
proof
let y;
assume y in (X\{x})\/{x};
then y in X\{x} or y in {x} by XBOOLE_0:def 3;
hence thesis by A1,Th56,TARSKI:def 1;
end;
thus X c= (X\{x})\/{x}
proof
let y;
assume y in X;
then y in {x} or y in X\{x} by XBOOLE_0:def 5;
hence thesis by XBOOLE_0:def 3;
end;
end;
theorem
not x in X implies (X\/{x})\{x}=X
proof
A1: (X \/ {x}) \ {x} = X \ {x} by XBOOLE_1:40;
assume not x in X;
hence thesis by A1,Th57;
end;
theorem
for x,y,z,Z being set holds Z c= {x,y,z} iff Z = {} or Z = {x} or Z =
{y} or Z = {z} or Z = {x,y} or Z = {y,z} or Z = {x,z} or Z = {x,y,z}
proof
let x,y,z,Z be set;
hereby
assume that
A1: Z c= {x,y,z} and
A2: Z <> {} and
A3: Z <> {x} and
A4: Z <> {y} and
A5: Z <> {z} and
A6: Z <> {x,y} and
A7: Z <> {y,z} and
A8: Z <> {x,z};
{x,y,z} c= Z
proof
let a be set;
A9: now
{x,y,z} \ {x} = ({x} \/ {y,z}) \ {x} by ENUMSET1:2
.= {y,z} \ {x} by XBOOLE_1:40;
then
A10: {x,y,z} \ {x} c= {y,z} by XBOOLE_1:36;
assume not x in Z;
then Z c= {x,y,z} \ {x} by A1,Lm2;
hence contradiction by A2,A4,A5,A7,Lm14,A10,XBOOLE_1:1;
end;
A11: now
{x,y,z} \ {y} = ({x,y} \/ {z}) \ {y} by ENUMSET1:3
.= ({x} \/ {y} \/ {z}) \ {y} by ENUMSET1:1
.= ({x} \/ {z} \/ {y}) \ {y} by XBOOLE_1:4
.= ({x,z} \/ {y}) \ {y} by ENUMSET1:1
.= {x,z} \ {y} by XBOOLE_1:40;
then
A12: {x,y,z} \ {y} c= {x,z} by XBOOLE_1:36;
assume not y in Z;
then Z c= {x,y,z} \ {y} by A1,Lm2;
hence contradiction by A2,A3,A5,A8,Lm14,A12,XBOOLE_1:1;
end;
A13: now
{x,y,z} \ {z} = ({x,y} \/ {z}) \ {z} by ENUMSET1:3
.= {x,y} \ {z} by XBOOLE_1:40;
then
A14: {x,y,z} \ {z} c= {x,y} by XBOOLE_1:36;
assume not z in Z;
then Z c= {x,y,z} \ {z} by A1,Lm2;
hence contradiction by A2,A3,A4,A6,Lm14,A14,XBOOLE_1:1;
end;
assume a in {x,y,z};
hence thesis by A9,A11,A13,ENUMSET1:def 1;
end;
hence Z = {x,y,z} by A1,XBOOLE_0:def 10;
end;
assume
A15: Z = {} or Z = {x} or Z = {y} or Z = {z} or Z = {x,y} or Z = {y,z}
or Z = {x,z} or Z = {x,y,z};
per cases by A15;
suppose
Z = {};
hence thesis by XBOOLE_1:2;
end;
suppose
Z = {x};
then Z c= {x} \/ {y,z} by XBOOLE_1:7;
hence thesis by ENUMSET1:2;
end;
suppose
A16: Z = {y};
{x,y} c= {x,y} \/ {z} by XBOOLE_1:7;
then
A17: {x,y} c= {x,y,z} by ENUMSET1:3;
Z c= {x,y} by A16,Th7;
hence thesis by A17,XBOOLE_1:1;
end;
suppose
Z = {z};
then Z c= {x,y} \/ {z} by XBOOLE_1:7;
hence thesis by ENUMSET1:3;
end;
suppose
Z = {x,y};
then Z c= {x,y} \/ {z} by XBOOLE_1:7;
hence thesis by ENUMSET1:3;
end;
suppose
Z = {y,z};
then Z c= {x} \/ {y,z} by XBOOLE_1:7;
hence thesis by ENUMSET1:2;
end;
suppose
A18: Z = {x,z};
A19: {x,z} \/ {y} = {x} \/ {z} \/ {y} by ENUMSET1:1
.= {x} \/ ({y} \/ {z}) by XBOOLE_1:4
.= {x} \/ {y,z} by ENUMSET1:1;
Z c= {x,z} \/ {y} by A18,XBOOLE_1:7;
hence thesis by A19,ENUMSET1:2;
end;
suppose
Z = {x,y,z};
hence thesis;
end;
end;
theorem
N c= [:X1,Y1:] & M c= [:X2,Y2:] implies N \/ M c= [:X1 \/ X2,Y1 \/ Y2 :]
proof
assume N c= [:X1,Y1:] & M c= [:X2,Y2:];
then
A1: N \/ M c= [:X1,Y1:] \/ [:X2,Y2:] by XBOOLE_1:13;
X1 c= X1 \/ X2 & Y1 c= Y1 \/ Y2 by XBOOLE_1:7;
then
A2: [:X1,Y1:] c= [:X1 \/ X2,Y1 \/ Y2:] by Th96;
Y2 c= Y1 \/ Y2 & X2 c= X1 \/ X2 by XBOOLE_1:7;
then [:X2,Y2:] c= [:X1 \/ X2,Y1 \/ Y2:] by Th96;
then [:X1,Y1:] \/ [:X2,Y2:] c= [:X1 \/ X2,Y1 \/ Y2:] by A2,XBOOLE_1:8;
hence thesis by A1,XBOOLE_1:1;
end;
Lm21: not x in X & not y in X implies {x,y} misses X
proof
assume
A1: ( not x in X)& not y in X;
thus {x,y} /\ X c= {}
proof
let z;
assume z in {x,y} /\ X;
then z in {x,y} & z in X by XBOOLE_0:def 4;
hence thesis by A1,TARSKI:def 2;
end;
thus thesis by XBOOLE_1:2;
end;
theorem Th120:
not x in X & not y in X implies X = X \ {x,y}
proof
X \ {x,y} = X iff X misses {x,y} by XBOOLE_1:83;
hence thesis by Lm21;
end;
theorem
not x in X & not y in X implies X = X \/ {x,y} \ {x,y}
proof
A1: (X \/ {x,y}) \ {x,y} = X \ {x,y} by XBOOLE_1:40;
assume ( not x in X)& not y in X;
hence thesis by A1,Th120;
end;
definition
let x1, x2, x3 be set;
pred x1, x2, x3 are_mutually_different means
x1 <> x2 & x1 <> x3 & x2 <> x3;
end;
definition
let x1, x2, x3, x4 be set;
pred x1, x2, x3, x4 are_mutually_different means
x1 <> x2 & x1 <> x3 & x1 <> x4 & x2 <> x3 & x2 <> x4 & x3 <> x4;
end;
definition
let x1, x2, x3, x4, x5 be set;
pred x1, x2, x3, x4, x5 are_mutually_different means
x1 <> x2 & x1 <> x3 &
x1 <> x4 & x1 <> x5 & x2 <> x3 & x2 <> x4 & x2 <> x5 & x3 <> x4 & x3 <> x5 & x4
<> x5;
end;
definition
let x1, x2, x3, x4, x5, x6 be set;
pred x1, x2, x3, x4, x5, x6 are_mutually_different means
x1 <> x2 & x1 <> x3
& x1 <> x4 & x1 <> x5 & x1 <> x6 & x2 <> x3 & x2 <> x4 & x2 <> x5 & x2 <> x6 &
x3 <> x4 & x3 <> x5 & x3 <> x6 & x4 <> x5 & x4 <> x6 & x5 <> x6;
end;
definition
let x1, x2, x3, x4, x5, x6, x7 be set;
pred x1, x2, x3, x4, x5, x6, x7 are_mutually_different means
x1 <> x2 & x1
<> x3 & x1 <> x4 & x1 <> x5 & x1 <> x6 & x1 <> x7 & x2 <> x3 & x2 <> x4 & x2 <>
x5 & x2 <> x6 & x2 <> x7 & x3 <> x4 & x3 <> x5 & x3 <> x6 & x3 <> x7 & x4 <> x5
& x4 <> x6 & x4 <> x7 & x5 <> x6 & x5 <> x7 & x6 <> x7;
end;
theorem
[:{x1,x2},{y1,y2}:] = {[x1,y1],[x1,y2],[x2,y1],[x2,y2]}
proof
thus [:{x1,x2},{y1,y2}:] = [:{x1}\/{x2},{y1,y2}:] by ENUMSET1:1
.= [:{x1},{y1,y2}:] \/ [:{x2},{y1,y2}:] by Th97
.= {[x1,y1],[x1,y2]} \/ [:{x2},{y1,y2}:] by Th30
.= {[x1,y1],[x1,y2]} \/ {[x2,y1],[x2,y2]} by Th30
.= {[x1,y1],[x1,y2],[x2,y1],[x2,y2]} by ENUMSET1:5;
end;
theorem
x <> y implies A \/ {x} \ {y} = A \ {y} \/ {x} by Th11,XBOOLE_1:87;
definition
let X;
attr X is trivial means
:Def10: x in X & y in X implies x = y;
end;
registration
cluster empty -> trivial for set;
coherence
proof
let X;
assume
A1: X is empty;
let x,y;
thus thesis by A1;
end;
end;
registration
cluster non trivial -> non empty for set;
coherence;
end;
registration
let x be set;
cluster {x} -> trivial;
coherence
proof
let y,z;
assume that
A1: y in {x} and
A2: z in {x};
y =x by A1,TARSKI:def 1;
hence thesis by A2,TARSKI:def 1;
end;
end;
registration
cluster trivial non empty for set;
existence
proof
take {{}};
thus thesis;
end;
end;
theorem
for A,B,C,p being set st A c= B & B /\ C = {p} & p in A holds A /\ C = {p}
proof
let A,B,C,p be set such that
A1: A c= B;
assume
A2: B /\ C = {p};
p in B /\ C by A2,TARSKI:def 1;
then
A4: p in C by XBOOLE_0:def 4;
assume p in A;
then p in A /\ C by A4,XBOOLE_0:def 4;
hence thesis by A2,Lm3,A1,XBOOLE_1:26;
end;
theorem
for A,B,C,p being set st A /\ B c= {p} & p in C & C misses B holds A
\/ C misses B
proof
let A,B,C,p be set such that
A1: A /\ B c= {p} and
A2: p in C and
A3: C misses B;
{p} c= C by A2,Lm1;
then A /\ B c= C by A1,XBOOLE_1:1;
then A /\ B /\ B c= C /\ B by XBOOLE_1:27;
then
A4: A /\ (B /\ B) c= C /\ B by XBOOLE_1:16;
(A \/ C) /\ B = A /\ B \/ C /\ B by XBOOLE_1:23
.= C /\ B by A4,XBOOLE_1:12
.= {} by A3,XBOOLE_0:def 7;
hence thesis by XBOOLE_0:def 7;
end;
theorem
for A,B being set st for x,y being set st x in A & y in B holds x
misses y holds union A misses union B
proof
let A,B be set such that
A1: for x,y being set st x in A & y in B holds x misses y;
for y being set st y in B holds union A misses y
proof
let y be set;
assume y in B;
then for x being set st x in A holds x misses y by A1;
hence thesis by Th80;
end;
hence thesis by Th80;
end;
registration
let X be set, Y be empty set;
cluster [:X, Y:] -> empty;
coherence by Th90;
end;
registration
let X be empty set, Y be set;
cluster [:X, Y:] -> empty;
coherence by Th90;
end;
theorem
not A in [:A,B:]
proof
assume A in [:A,B:];
then consider x,y such that
A1: x in A & y in B & A = [x,y] by Th84;
x = {x} or x = {x,y} by A1,TARSKI:def 2;
then x in x by TARSKI:def 1,def 2;
hence contradiction;
end;
theorem
[x,{x}] in [:{x},[x,{x}]:]
proof
[:{x},[x,{x}]:] = { [x,{x}], [x,{x,{x}}] } by Th30;
hence thesis by TARSKI:def 2;
end;
theorem
B in [:A,B:] implies ex x st x in A & B = [x,{x}]
proof
assume B in [:A,B:];
then consider x,y such that
A1: x in A & y in B & B = [x,y] by Th84;
take x;
thus x in A by A1;
per cases by A1,TARSKI:def 2;
suppose y = {x};
hence thesis by A1;
end;
suppose y = {x,y};
then y in y by TARSKI:def 2;
hence thesis;
end;
end;
theorem
B c= A & A is trivial implies B is trivial
proof assume that
A1: B c= A and
A2: A is trivial;
let x,y;
assume x in B & y in B;
then x in A & y in A by A1,TARSKI:def 3;
hence thesis by A2,Def10;
end;
registration
cluster non trivial for set;
existence
proof
take {{},{{}}}, {},{{}};
thus {} in {{},{{}}} & {{}} in {{},{{}}} by TARSKI:def 2;
thus {} <> {{}};
end;
end;
theorem Th131:
X is non empty trivial implies ex x st X = {x}
proof
assume X is non empty;
then consider x such that
A1: x in X by XBOOLE_0:def 1;
assume
A2: X is trivial;
take x;
for y holds y in X iff x = y by A2,A1,Def10;
hence thesis by TARSKI:def 1;
end;
theorem
for x being set, X being trivial set st x in X holds X = {x}
proof
let x be set, X be trivial set;
assume
A1: x in X;
then ex x being set st X = {x} by Th131;
hence thesis by A1,TARSKI:def 1;
end;
theorem
for a,b,c,X being set st a in X & b in X & c in X holds {a,b,c} c= X
proof
let a,b,c,X be set;
assume a in X & b in X & c in X;
then {a,b} c= X & {c} c= X by Lm1,Th32;
then {a,b} \/ {c} c= X by XBOOLE_1:8;
hence thesis by ENUMSET1:3;
end;
theorem
[x,y] in X implies x in union union X & y in union union X
proof
assume
A1: [x,y] in X;
{ x } in [x,y] by TARSKI:def 2;
then
A2: {x} in union X by A1,TARSKI:def 4;
{x,y} in [x,y] by TARSKI:def 2;
then
A3: {x,y} in union X by A1,TARSKI:def 4;
y in {x,y} & x in {x} by TARSKI:def 1,def 2;
hence thesis by A3,A2,TARSKI:def 4;
end;
theorem Th135:
X c= Y \/ {x} implies x in X or X c= Y
proof
assume that
A1: X c= Y \/ {x} and
A2: not x in X;
X = X /\ (Y \/ {x}) by A1,XBOOLE_1:28
.= X /\ Y \/ X /\ {x} by XBOOLE_1:23
.= X /\ Y \/ {} by A2,Lm7,XBOOLE_0:def 7
.= X /\ Y;
hence thesis by XBOOLE_1:17;
end;
theorem
x in X \/ {y} iff x in X or x = y
proof
x in X \/ {y} iff x in X or x in {y} by XBOOLE_0:def 3;
hence thesis by TARSKI:def 1;
end;
theorem
X \/ {x} c= Y iff x in Y & X c= Y
proof
X c= Y & {x} c= Y implies X \/ {x} c= Y by XBOOLE_1:8;
hence thesis by Lm1,XBOOLE_1:11;
end;
theorem
for A, B, a being set st A c= B & B c= A \/ {a} holds A \/ {a} = B or A = B
proof
let A, B, a be set;
assume that
A1: A c= B and
A2: B c= A \/ {a};
assume that
A3: A \/ {a} <> B and
A4: A <> B;
A5: not A \/ {a} c= B by A2,A3,XBOOLE_0:def 10;
A6: not a in B
proof
assume a in B;
then {a} c= B by Lm1;
hence thesis by A1,A5,XBOOLE_1:8;
end;
not B c= A by A1,A4,XBOOLE_0:def 10;
hence thesis by A2,A6,Th135;
end;
begin
reserve E,X,x,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 for set;
registration
let X be set;
cluster bool X -> non empty;
coherence by ZFMISC_1:def 1;
end;
registration
let x1, x2, x3;
cluster { x1, x2, x3 } -> non empty;
coherence by ENUMSET1:def 1;
let x4;
cluster { x1, x2, x3, x4 } -> non empty;
coherence by ENUMSET1:def 2;
let x5;
cluster { x1, x2, x3, x4, x5 } -> non empty;
coherence by ENUMSET1:def 3;
let x6;
cluster { x1, x2, x3, x4, x5, x6 } -> non empty;
coherence by ENUMSET1:def 4;
let x7;
cluster { x1, x2, x3, x4, x5, x6, x7 } -> non empty;
coherence by ENUMSET1:def 5;
let x8;
cluster { x1, x2, x3, x4, x5, x6, x7, x8 } -> non empty;
coherence by ENUMSET1:def 6;
let x9;
cluster { x1, x2, x3, x4, x5, x6, x7, x8, x9 } -> non empty;
coherence by ENUMSET1:def 7;
let x10;
cluster { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 } -> non empty;
coherence by ENUMSET1:def 8;
end;
definition
let X;
mode Element of X means :Def1:
it in X if X is non empty otherwise it is empty;
existence by XBOOLE_0:def 1;
consistency;
sethood
proof
per cases;
case X is non empty;
take X;
thus thesis;
end;
case X is empty;
take {{}};
let y be set;
thus thesis by TARSKI:def 1;
end;
end;
end;
definition
let X;
mode Subset of X is Element of bool X;
end;
registration
let X be non empty set;
cluster non empty for Subset of X;
existence
proof
X in bool X by ZFMISC_1:def 1;
then X is Subset of X by Def1;
hence thesis;
end;
end;
registration
let X1,X2 be non empty set;
cluster [: X1,X2 :] -> non empty;
coherence
proof
consider x2 being set such that
A1: x2 in X2 by XBOOLE_0:def 1;
consider x1 being set such that
A2: x1 in X1 by XBOOLE_0:def 1;
[x1,x2] in [:X1,X2:] by A2,A1,ZFMISC_1:def 2;
hence thesis;
end;
end;
registration
let X1,X2,X3 be non empty set;
cluster [: X1,X2,X3 :] -> non empty;
coherence;
end;
registration
let X1,X2,X3,X4 be non empty set;
cluster [: X1,X2,X3,X4 :] -> non empty;
coherence;
end;
definition
let D be non empty set, X be non empty Subset of D;
redefine mode Element of X -> Element of D;
coherence
proof
let x be Element of X;
X in bool D by Def1;
then
A1: X c= D by ZFMISC_1:def 1;
x in X by Def1;
then x in D by A1,TARSKI:def 3;
hence thesis by Def1;
end;
end;
Lm1: for X being Subset of E, x being set st x in X holds x in E
proof
let X be Subset of E, x be set such that
A1: x in X;
X in bool E by Def1;
then X c= E by ZFMISC_1:def 1;
hence thesis by A1,TARSKI:def 3;
end;
registration
let E;
cluster empty for Subset of E;
existence
proof
{} c= E by XBOOLE_1:2;
then {} in bool E by ZFMISC_1:def 1;
then {} is Subset of E by Def1;
hence thesis;
end;
end;
definition
let E;
func {}E -> Subset of E equals
{};
coherence
proof
{} c= E by XBOOLE_1:2;
then {} in bool E by ZFMISC_1:def 1;
hence thesis by Def1;
end;
correctness;
func [#] E -> Subset of E equals
E;
coherence
proof
E in bool E by ZFMISC_1:def 1;
hence thesis by Def1;
end;
correctness;
end;
registration
let E;
cluster {}E -> empty;
coherence;
end;
theorem
{} is Subset of X
proof
{}X = {};
hence thesis;
end;
reserve A,B,C for Subset of E;
theorem Th2:
(for x being Element of E holds x in A implies x in B) implies A c= B
proof
assume
A1: for x being Element of E holds x in A implies x in B;
let x be set;
assume
A2: x in A;
then x in E by Lm1;
then x is Element of E by Def1;
hence thesis by A1,A2;
end;
theorem Th3:
(for x being Element of E holds x in A iff x in B) implies A = B
proof
assume for x being Element of E holds x in A iff x in B;
hence A c= B & B c= A by Th2;
end;
theorem Th4:
A <> {} implies ex x being Element of E st x in A
proof
assume A <> {};
then consider x being set such that
A1: x in A by XBOOLE_0:def 1;
x in E by A1,Lm1;
then x is Element of E by Def1;
hence thesis by A1;
end;
definition
let E,A;
func A` -> Subset of E equals
E \ A;
coherence
proof
E \ A c= E by XBOOLE_1:36;
then E \ A in bool E by ZFMISC_1:def 1;
hence thesis by Def1;
end;
correctness;
involutiveness
proof
let S,T be Subset of E;
assume
A1: S = E \ T;
T in bool E by Def1;
then T c= E by ZFMISC_1:def 1;
hence T = {} \/ E /\ T by XBOOLE_1:28
.= (E \ E) \/ E /\ T by XBOOLE_1:37
.= E \ S by A1,XBOOLE_1:52;
end;
let B;
redefine func A \/ B -> Subset of E;
coherence
proof
B in bool E by Def1;
then
A2: B c= E by ZFMISC_1:def 1;
A in bool E by Def1;
then A c= E by ZFMISC_1:def 1;
then A \/ B c= E by A2,XBOOLE_1:8;
then A \/ B in bool E by ZFMISC_1:def 1;
hence thesis by Def1;
end;
redefine func A \+\ B -> Subset of E;
coherence
proof
B in bool E by Def1;
then B \ A c= B & B c= E by XBOOLE_1:36,ZFMISC_1:def 1;
then
A3: B \ A c= E by XBOOLE_1:1;
A in bool E by Def1;
then A \ B c= A & A c= E by XBOOLE_1:36,ZFMISC_1:def 1;
then A \ B c= E by XBOOLE_1:1;
then (A \ B) \/ (B \ A) c= E by A3,XBOOLE_1:8;
then A \+\ B in bool E by ZFMISC_1:def 1;
hence thesis by Def1;
end;
end;
definition
let X,Y be set;
redefine func X \ Y -> Subset of X;
coherence
proof
X \ Y c= X by XBOOLE_1:36;
then X \ Y in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
end;
definition
let E,A,X;
redefine func A \ X -> Subset of E;
coherence
proof
A in bool E by Def1;
then A \ X c= A & A c= E by XBOOLE_1:36,ZFMISC_1:def 1;
then A \ X c= E by XBOOLE_1:1;
then A \ X in bool E by ZFMISC_1:def 1;
hence A \ X is Subset of E by Def1;
end;
end;
definition
let E,A,X;
redefine func A /\ X -> Subset of E;
coherence
proof
A in bool E by Def1;
then A /\ X c= A & A c= E by XBOOLE_1:17,ZFMISC_1:def 1;
then A /\ X c= E by XBOOLE_1:1;
then A /\ X in bool E by ZFMISC_1:def 1;
hence thesis by Def1;
end;
end;
definition
let E,X,A;
redefine func X /\ A -> Subset of E;
coherence
proof
A /\ X is Subset of E;
hence thesis;
end;
end;
theorem
(for x being Element of E holds x in A iff x in B or x in C) implies A
= B \/ C
proof
assume
A1: for x being Element of E holds x in A iff x in B or x in C;
now
let x be Element of E;
assume x in A;
then x in B or x in C by A1;
hence x in B \/ C by XBOOLE_0:def 3;
end;
hence A c= B \/ C by Th2;
now
let x be Element of E;
assume x in B \/ C;
then x in B or x in C by XBOOLE_0:def 3;
hence x in A by A1;
end;
hence thesis by Th2;
end;
theorem
(for x being Element of E holds x in A iff x in B & x in C) implies A
= B /\ C
proof
assume
A1: for x being Element of E holds x in A iff x in B & x in C;
now
let x be Element of E;
assume x in A;
then x in B & x in C by A1;
hence x in B /\ C by XBOOLE_0:def 4;
end;
hence A c= B /\ C by Th2;
now
let x be Element of E;
assume x in B /\ C;
then x in B & x in C by XBOOLE_0:def 4;
hence x in A by A1;
end;
hence thesis by Th2;
end;
theorem
(for x being Element of E holds x in A iff x in B & not x in C)
implies A = B \ C
proof
assume
A1: for x being Element of E holds x in A iff x in B & not x in C;
now
let x be Element of E;
assume x in A;
then x in B & not x in C by A1;
hence x in B \ C by XBOOLE_0:def 5;
end;
hence A c= B \ C by Th2;
now
let x be Element of E;
assume x in B \ C;
then x in B & not x in C by XBOOLE_0:def 5;
hence x in A by A1;
end;
hence thesis by Th2;
end;
theorem
(for x being Element of E holds x in A iff not(x in B iff x in C))
implies A = B \+\ C
proof
assume
A1: for x being Element of E holds x in A iff not(x in B iff x in C);
now
let x be Element of E;
assume x in A;
then x in B & not x in C or x in C & not x in B by A1;
then x in B \ C or x in C \ B by XBOOLE_0:def 5;
hence x in B \+\ C by XBOOLE_0:def 3;
end;
hence A c= B \+\ C by Th2;
now
let x be Element of E;
assume x in B \+\ C;
then x in B \ C or x in C \ B by XBOOLE_0:def 3;
then x in B & not x in C or x in C & not x in B by XBOOLE_0:def 5;
hence x in A by A1;
end;
hence thesis by Th2;
end;
theorem
[#] E = ({} E)`;
theorem Th10:
A \/ A` = [#]E
proof
A in bool E by Def1;
then A c= E by ZFMISC_1:def 1;
hence thesis by XBOOLE_1:45;
end;
theorem
A \/ [#]E = [#]E
proof
A in bool E by Def1;
then A c= E by ZFMISC_1:def 1;
hence thesis by XBOOLE_1:12;
end;
theorem Th12:
A c= B iff B` c= A`
proof
thus A c= B implies B` c= A` by XBOOLE_1:34;
A1: E \ B` = B`` .= B;
E \ A` = A`` .= A;
hence thesis by A1,XBOOLE_1:34;
end;
theorem
A \ B = A /\ B`
proof
A in bool E by Def1;
then
A1: A c= E by ZFMISC_1:def 1;
thus A /\ B` = (A /\ E) \ B by XBOOLE_1:49
.= A \ B by A1,XBOOLE_1:28;
end;
theorem
(A \ B)` = A` \/ B
proof
B in bool E by Def1;
then
A1: B c= E by ZFMISC_1:def 1;
thus (A \ B)` = (E \ A) \/ E /\ B by XBOOLE_1:52
.= A` \/ B by A1,XBOOLE_1:28;
end;
theorem
(A \+\ B)` = A /\ B \/ A` /\ B`
proof
A in bool E by Def1;
then
A1: A c= E by ZFMISC_1:def 1;
thus (A \+\ B)` = E \ (A \/ B) \/ E /\ A /\ B by XBOOLE_1:102
.= A /\ B \/ (E \ (A \/ B)) by A1,XBOOLE_1:28
.= A /\ B \/ (A`) /\ (B`) by XBOOLE_1:53;
end;
theorem
A c= B` implies B c= A`
proof
assume A c= B`;
then B``c= A` by Th12;
hence thesis;
end;
theorem
A` c= B implies B` c= A
proof
assume A` c= B;
then B` c= A`` by Th12;
hence thesis;
end;
theorem
A c= A` iff A = {}E
proof
thus A c= A` implies A = {}E by XBOOLE_1:38;
A in bool E by Def1;
hence thesis by ZFMISC_1:def 1;
end;
theorem
A` c= A iff A = [#]E
proof
thus A` c= A implies A = [#]E
proof
assume A` c= A;
hence A = A \/ A` by XBOOLE_1:12
.= [#]E by Th10;
end;
assume A = [#]E;
then A` = {} by XBOOLE_1:37;
hence thesis by XBOOLE_1:2;
end;
theorem
X c= A & X c= A` implies X = {} by XBOOLE_1:67,79;
theorem
(A \/ B)` c= A`
proof
A c= A \/ B by XBOOLE_1:7;
hence thesis by Th12;
end;
theorem
A` c= (A /\ B)`
proof
A /\ B c= A by XBOOLE_1:17;
hence thesis by Th12;
end;
theorem Th23:
A misses B iff A c= B`
proof
thus A misses B implies A c= B`
proof
assume
A1: A misses B;
let x;
assume
A2: x in A;
then
A3: not x in B by A1,XBOOLE_0:3;
x in E by A2,Lm1;
hence thesis by A3,XBOOLE_0:def 5;
end;
assume
A4: A c= B`;
assume A meets B;
then consider x such that
A5: x in A and
A6: x in B by XBOOLE_0:3;
x in E \ B by A4,A5,TARSKI:def 3;
hence thesis by A6,XBOOLE_0:def 5;
end;
theorem
A misses B` iff A c= B
proof
B``= B;
hence thesis by Th23;
end;
theorem
A misses B & A` misses B` implies A = B`
proof
assume that
A1: A misses B and
A2: A` misses B`;
A3: A in bool E by Def1;
thus A c= B`
proof
let x;
assume
A4: x in A;
then
A5: not x in B by A1,XBOOLE_0:3;
A c= E by A3,ZFMISC_1:def 1;
then x in E by A4,TARSKI:def 3;
hence thesis by A5,XBOOLE_0:def 5;
end;
let x;
A6: x in A` implies not x in B` by A2,XBOOLE_0:3;
assume
A7: x in B`;
then x in E by XBOOLE_0:def 5;
hence thesis by A7,A6,XBOOLE_0:def 5;
end;
theorem
A c= B & C misses B implies A c= C`
proof
assume A c= B & C misses B;
then A misses C by XBOOLE_1:63;
hence thesis by Th23;
end;
theorem
(for a being Element of A holds a in B) implies A c= B
proof
assume
A1: for a being Element of A holds a in B;
let a be set;
assume a in A;
then a is Element of A by Def1;
hence thesis by A1;
end;
theorem
(for x being Element of E holds x in A) implies E = A
proof
assume
A1: for x being Element of E holds x in A;
thus E c= A
proof
let a be set;
assume a in E;
then a is Element of E by Def1;
hence thesis by A1;
end;
A in bool E by Def1;
hence thesis by ZFMISC_1:def 1;
end;
theorem
E <> {} implies for B for x being Element of E st not x in B holds x in B`
proof
assume
A1: E <> {};
let B be Subset of E;
let x be Element of E;
assume
A2: not x in B;
x in E by A1,Def1;
hence thesis by A2,XBOOLE_0:def 5;
end;
theorem Th30:
for A,B st for x being Element of E holds x in A iff not x in B holds A = B`
proof
let A,B be Subset of E;
assume
A1: for x being Element of E holds x in A iff not x in B;
thus A c= B`
proof
let x be set;
assume
A2: x in A;
A in bool E by Def1;
then A c= E by ZFMISC_1:def 1;
then x in E by A2,TARSKI:def 3;
then x is Element of E by Def1;
then
A3: not x in B by A1,A2;
x in E by A2,Lm1;
hence thesis by A3,XBOOLE_0:def 5;
end;
let x be set;
assume
A4: x in B`;
B` in bool E by Def1;
then B` c= E by ZFMISC_1:def 1;
then x in E by A4,TARSKI:def 3;
then reconsider x as Element of E by Def1;
not x in B by A4,XBOOLE_0:def 5;
hence thesis by A1;
end;
theorem
for A,B st for x being Element of E holds not x in A iff x in B holds A = B`
proof
let A,B;
assume for x being Element of E holds not x in A iff x in B;
then for x being Element of E holds x in A iff not x in B;
hence thesis by Th30;
end;
theorem
for A,B st for x being Element of E holds not(x in A iff x in B) holds A = B`
proof
let A,B;
assume for x being Element of E holds not(x in A iff x in B);
then for x being Element of E holds x in A iff not x in B;
hence thesis by Th30;
end;
reserve x1,x2,x3,x4,x5,x6,x7,x8 for Element of X;
theorem
X <> {} implies {x1} is Subset of X
proof
assume X <> {};
then
A1: x1 in X by Def1;
{x1} c= X
proof
let x;
assume x in {x1};
hence thesis by A1,TARSKI:def 1;
end;
then {x1} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
X <> {} implies {x1,x2} is Subset of X
proof
assume X <> {};
then
A1: x1 in X & x2 in X by Def1;
{x1,x2} c= X
proof
let x;
assume x in {x1,x2};
hence thesis by A1,TARSKI:def 2;
end;
then {x1,x2} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
X <> {} implies {x1,x2,x3} is Subset of X
proof
assume
A1: X <> {};
then
A2: x3 in X by Def1;
A3: x1 in X & x2 in X by A1,Def1;
{x1,x2,x3} c= X
proof
let x;
assume x in {x1,x2,x3};
hence thesis by A3,A2,ENUMSET1:def 1;
end;
then {x1,x2,x3} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
X <> {} implies {x1,x2,x3,x4} is Subset of X
proof
assume
A1: X <> {};
then
A2: x3 in X & x4 in X by Def1;
A3: x1 in X & x2 in X by A1,Def1;
{x1,x2,x3,x4} c= X
proof
let x;
assume x in {x1,x2,x3,x4};
hence thesis by A3,A2,ENUMSET1:def 2;
end;
then {x1,x2,x3,x4} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
X <> {} implies {x1,x2,x3,x4,x5} is Subset of X
proof
assume
A1: X <> {};
{x1,x2,x3,x4,x5} c= X
proof
let x;
A2: x in { x1,x2,x3,x4,x5 } implies x=x1 or x=x2 or x=x3 or x=x4 or x=x5
by ENUMSET1:def 3;
assume x in {x1,x2,x3,x4,x5};
hence thesis by A1,A2,Def1;
end;
then {x1,x2,x3,x4,x5} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
X <> {} implies {x1,x2,x3,x4,x5,x6} is Subset of X
proof
assume
A1: X <> {};
{x1,x2,x3,x4,x5,x6} c= X
proof
let x;
A2: x in { x1,x2,x3,x4,x5,x6} implies x=x1 or x=x2 or x=x3 or x=x4 or x=x5
or x=x6 by ENUMSET1:def 4;
assume x in {x1,x2,x3,x4,x5,x6};
hence thesis by A1,A2,Def1;
end;
then {x1,x2,x3,x4,x5,x6} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
X <> {} implies {x1,x2,x3,x4,x5,x6,x7} is Subset of X
proof
assume
A1: X <> {};
{x1,x2,x3,x4,x5,x6,x7} c= X
proof
let x;
A2: x in { x1,x2,x3,x4,x5,x6,x7} implies x=x1 or x=x2 or x=x3 or x=x4 or x
=x5 or x=x6 or x=x7 by ENUMSET1:def 5;
assume x in {x1,x2,x3,x4,x5,x6,x7};
hence thesis by A1,A2,Def1;
end;
then {x1,x2,x3,x4,x5,x6,x7} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
X <> {} implies {x1,x2,x3,x4,x5,x6,x7,x8} is Subset of X
proof
assume
A1: X <> {};
{x1,x2,x3,x4,x5,x6,x7,x8} c= X
proof
let x;
A2: x in { x1,x2,x3,x4,x5,x6,x7,x8} implies x=x1 or x=x2 or x=x3 or x=x4
or x=x5 or x=x6 or x=x7 or x=x8 by ENUMSET1:def 6;
assume x in {x1,x2,x3,x4,x5,x6,x7,x8};
hence thesis by A1,A2,Def1;
end;
then {x1,x2,x3,x4,x5,x6,x7,x8} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
theorem
x in X implies {x} is Subset of X
proof
assume x in X;
then {x} c= X by ZFMISC_1:31;
then {x} in bool X by ZFMISC_1:def 1;
hence thesis by Def1;
end;
scheme
SubsetEx { A()-> set, P[set] } : ex X being Subset of A() st for x holds x
in X iff x in A() & P[x] proof
consider X being set such that
A1: for x holds x in X iff x in A() & P[x] from XBOOLE_0:sch 1;
X c= A()
proof
let x;
thus thesis by A1;
end;
then X in bool A() by ZFMISC_1:def 1;
then reconsider X as Subset of A() by Def1;
take X;
thus thesis by A1;
end;
scheme
SubsetEq {X() -> set, X1,X2()-> Subset of X(), P[set]}: X1() = X2()
provided
A1: for y being Element of X() holds y in X1() iff P[y] and
A2: for y being Element of X() holds y in X2() iff P[y]
proof
for x being Element of X() holds x in X1() iff x in X2()
proof
let x be Element of X();
hereby
assume x in X1();
then P[x] by A1;
hence x in X2() by A2;
end;
assume x in X2();
then P[x] by A2;
hence thesis by A1;
end;
hence thesis by Th3;
end;
definition
let X, Y be non empty set;
redefine pred X misses Y;
irreflexivity
proof
let A be non empty set;
ex x being set st x in A by XBOOLE_0:def 1;
hence thesis by XBOOLE_0:3;
end;
end;
definition
let X, Y be non empty set;
redefine pred X meets Y;
reflexivity
proof
let A be non empty set;
thus not A misses A;
end;
end;
definition
let S be set;
func choose S -> Element of S equals
the Element of S;
correctness;
end;
begin
reserve Y for set;
Lm2: (for x st x in X holds x in Y) implies X is Subset of Y
proof
assume for x st x in X holds x in Y;
then X c= Y by TARSKI:def 3;
then X in bool Y by ZFMISC_1:def 1;
hence thesis by Def1;
end;
Lm3: x in A implies x is Element of E
proof
assume x in A;
then x in E by Lm1;
hence thesis by Def1;
end;
scheme
SubsetEx { A() -> non empty set, P[set] } : ex B being Subset of A() st for
x being Element of A() holds x in B iff P[x] proof
consider B being set such that
A1: for x being set holds x in B iff x in A() & P[x] from XBOOLE_0:sch 1;
for x being set holds x in B implies x in A() by A1;
then reconsider B as Subset of A() by Lm2;
take B;
let x be Element of A();
x in A() by Def1;
hence thesis by A1;
end;
scheme
SubComp{A() -> set, F1,F2() -> Subset of A(), P[set]}: F1() = F2()
provided
A1: for X being Element of A() holds X in F1() iff P[X] and
A2: for X being Element of A() holds X in F2() iff P[X]
proof
thus F1() c= F2()
proof
let x;
assume
A3: x in F1();
then reconsider X = x as Element of A() by Lm3;
P[X] by A1,A3;
hence thesis by A2;
end;
let x;
assume
A4: x in F2();
then reconsider X = x as Element of A() by Lm3;
P[X] by A2,A4;
hence thesis by A1;
end;
theorem
A` = B` implies A = B
proof
assume A` = B`;
hence A = B`` .= B;
end;
registration
let X be empty set;
cluster -> empty for Subset of X;
coherence
proof
let Y be Subset of X;
Y in bool X by Def1;
then Y c= X by ZFMISC_1:def 1;
hence thesis by XBOOLE_1:3;
end;
end;
definition
let E be set;
let A be Subset of E;
attr A is proper means
A <> E;
end;
registration
let E be set;
cluster [#]E -> non proper;
coherence
proof
thus [#]E = E;
end;
end;
registration
let E be set;
cluster non proper for Subset of E;
existence
proof
take [#]E;
thus thesis;
end;
end;
registration
let E be non empty set;
cluster non proper -> non empty for Subset of E;
coherence
proof
let A be Subset of E;
assume A = E;
hence thesis;
end;
cluster empty -> proper for Subset of E;
coherence;
end;
registration
let E be non empty set;
cluster proper for Subset of E;
existence
proof
take {} E;
thus {} E <> E;
end;
end;
registration
let E be empty set;
cluster -> non proper for Subset of E;
coherence
proof
let A be Subset of E;
thus A = E;
end;
end;
theorem
for X,Y,A being set, z being set st z in A & A c= [:X,Y:] ex x
being Element of X, y being Element of Y st z = [x,y]
proof
let X,Y,A be set, z be set;
assume z in A & A c= [:X,Y:];
then consider x,y being set such that
A1: x in X and
A2: y in Y and
A3: z = [x,y] by ZFMISC_1:84;
reconsider y as Element of Y by A2,Def1;
reconsider x as Element of X by A1,Def1;
take x,y;
thus thesis by A3;
end;
theorem
for X being non empty set, A, B being non empty Subset of X st A c< B
ex p being Element of X st p in B & A c= B \ {p}
proof
let X be non empty set, A, B be non empty Subset of X;
assume
A1: A c< B;
then consider p being Element of X such that
A2: p in B \ A by Th4,XBOOLE_1:105;
A3: not p in A by A2,XBOOLE_0:def 5;
take p;
A c= B by A1,XBOOLE_0:def 8;
hence thesis by A2,A3,XBOOLE_0:def 5,ZFMISC_1:34;
end;
definition
let X be non empty set;
redefine attr X is trivial means
for x,y being Element of X holds x = y;
compatibility
proof
thus X is trivial implies for x,y being Element of X holds x = y
proof assume
A1: X is trivial;
let x,y be Element of X;
x in X & y in X by Def1;
hence x = y by A1,ZFMISC_1:def 10;
end;
assume
A2: for x,y being Element of X holds x = y;
let x,y be set;
assume x in X & y in X;
then x is Element of X & y is Element of X by Def1;
hence thesis by A2;
end;
end;
registration let X be non empty set;
cluster non empty trivial for Subset of X;
existence
proof
the Element of X in X by Def1;
then {the Element of X} c= X by ZFMISC_1:31;
then {the Element of X} in bool X by ZFMISC_1:def 1;
then reconsider A = {the Element of X} as Subset of X by Def1;
take A;
thus A is non empty;
let x,y be set;
assume x in A & y in A;
then x = the Element of X & y = the Element of X by TARSKI:def 1;
hence thesis;
end;
end;
registration
let X be trivial set;
cluster -> trivial for Subset of X;
coherence
proof
let Y be Subset of X;
let x,y be set;
assume x in Y & y in Y;
then x in X & y in X by Lm1;
hence thesis by ZFMISC_1:def 10;
end;
end;
registration
let X be non trivial set;
cluster non trivial for Subset of X;
existence
proof
take [#]X;
thus thesis;
end;
end;
theorem
for D being set, A being Subset of D st A is non trivial
ex d1,d2 being Element of D st d1 in A & d2 in A & d1 <> d2
proof
let D be set, A be Subset of D;
assume A is non trivial;
then consider d1,d2 being set such that
A1: d1 in A & d2 in A and
A2: d1 <> d2 by ZFMISC_1:def 10;
d1 in D & d2 in D by A1,Lm1;
then reconsider d1,d2 as Element of D by Def1;
take d1,d2;
thus d1 in A & d2 in A & d1 <> d2 by A1,A2;
end;
theorem Th46:
for X being trivial non empty set
ex x being Element of X st X = {x}
proof let X be trivial non empty set;
consider x being set such that
A1: X = {x} by ZFMISC_1:131;
x in X by A1,TARSKI:def 1;
then reconsider x as Element of X by Def1;
take x;
thus X = {x} by A1;
end;
theorem
for X being non empty set, A being non empty Subset of X holds A
is trivial implies ex x being Element of X st A = {x}
proof
let X be non empty set, A be non empty Subset of X;
assume A is trivial;
then ex s being Element of A st A = {s} by Th46;
hence thesis;
end;
theorem
for X be non trivial set, x being Element of X
ex y be set st y in X & x <> y
proof
let X be non trivial set;
let x be Element of X;
consider d1,d2 being set such that
A1: d1 in X & d2 in X and
A2: d1 <> d2 by ZFMISC_1:def 10;
x <> d1 or x <> d2 by A2;
hence thesis by A1;
end;
begin
theorem
for a, b being set st a in b holds a is Element of b by SUBSET_1:def 1;
theorem
for a, b being set st a is Element of b & b is non empty holds a in b
by SUBSET_1:def 1;
theorem Th3:
for a, b being set holds a is Subset of b iff a c= b
proof
let a, b be set;
hereby
assume a is Subset of b;
then a in bool b by SUBSET_1:def 1;
hence a c= b by ZFMISC_1:def 1;
end;
assume a c= b;
then a in bool b by ZFMISC_1:def 1;
hence thesis by SUBSET_1:def 1;
end;
theorem
for a, b, c being set st a in b & b is Subset of c holds a is Element of c
proof
let a, b, c be set;
assume that
A1: a in b and
A2: b is Subset of c;
b c= c by A2,Th3;
then a in c by A1,TARSKI:def 3;
hence thesis by SUBSET_1:def 1;
end;
theorem
for a, b, c being set st a in b & b is Subset of c holds c is non empty;
begin
reserve X,Y,Z,Z1,Z2,D,x,y for set;
definition
let X;
func meet X means
:Def1:
for x holds x in it iff for Y holds Y in X implies
x in Y if X <> {} otherwise it = {};
existence
proof
thus X <> {} implies ex Z1 st for x holds x in Z1 iff for Z st Z in X
holds x in Z
proof
defpred X[set] means for Z st Z in X holds $1 in Z;
assume
A1: X <> {};
consider Y such that
A2: for x holds x in Y iff x in union X & X[x] from XBOOLE_0:sch 1;
take Y;
for x holds (for Z st Z in X holds x in Z) implies x in Y
proof
set y = the Element of X;
let x such that
A3: for Z st Z in X holds x in Z;
x in y by A1,A3;
then x in union X by A1,TARSKI:def 4;
hence thesis by A2,A3;
end;
hence thesis by A2;
end;
thus thesis;
end;
uniqueness
proof
let Z1,Z2;
now
assume that
X <> {} and
A4: for x holds x in Z1 iff for Y holds Y in X implies x in Y and
A5: for x holds x in Z2 iff for Y holds Y in X implies x in Y;
now
let x;
x in Z1 iff for Y holds Y in X implies x in Y by A4;
hence x in Z1 iff x in Z2 by A5;
end;
hence Z1 = Z2 by TARSKI:1;
end;
hence thesis;
end;
consistency;
end;
theorem
meet {} = {} by Def1;
theorem Th2:
meet X c= union X
proof
A1: now
assume
A2: X <> {};
now
set y = the Element of X;
let x;
assume x in meet X;
then x in y by A2,Def1;
hence x in union X by A2,TARSKI:def 4;
end;
hence thesis by TARSKI:def 3;
end;
now
assume X = {};
then meet X = {} by Def1;
hence thesis by XBOOLE_1:2;
end;
hence thesis by A1;
end;
theorem Th3:
Z in X implies meet X c= Z
proof
assume
A1: Z in X;
meet X c= Z
proof
let x;
assume x in meet X;
hence thesis by A1,Def1;
end;
hence thesis;
end;
theorem
{} in X implies meet X = {} by Th3,XBOOLE_1:3;
theorem
X <> {} & (for Z1 st Z1 in X holds Z c= Z1) implies Z c= meet X
proof
assume that
A1: X <> {} and
A2: for Z1 st Z1 in X holds Z c= Z1;
thus Z c= meet X
proof
let x such that
A3: x in Z;
for Y st Y in X holds x in Y
proof
let Y;
assume Y in X;
then Z c= Y by A2;
hence thesis by A3;
end;
hence thesis by A1,Def1;
end;
end;
theorem Th6:
X <> {} & X c= Y implies meet Y c= meet X
proof
assume that
A1: X <> {} and
A2: X c= Y;
let x;
assume x in meet Y;
then for Z st Z in X holds x in Z by A2,Def1;
hence thesis by A1,Def1;
end;
theorem
X in Y & X c= Z implies meet Y c= Z
proof
assume that
A1: X in Y and
A2: X c= Z;
meet Y c= X by A1,Th3;
hence thesis by A2,XBOOLE_1:1;
end;
theorem
X in Y & X misses Z implies meet Y misses Z by Th3,XBOOLE_1:63;
theorem
X <> {} & Y <> {} implies meet (X \/ Y) = meet X /\ meet Y
proof
assume that
A1: X <> {} and
A2: Y <> {};
A3: meet X /\ meet Y c= meet (X \/ Y)
proof
let x;
assume x in meet X /\ meet Y;
then
A4: x in meet X & x in meet Y by XBOOLE_0:def 4;
now
let Z;
assume Z in X \/ Y;
then Z in X or Z in Y by XBOOLE_0:def 3;
hence x in Z by A4,Def1;
end;
hence thesis by A1,Def1;
end;
meet (X \/ Y) c= meet X & meet (X \/ Y) c= meet Y by A1,A2,Th6,XBOOLE_1:7;
then meet (X \/ Y) c= meet X /\ meet Y by XBOOLE_1:19;
hence thesis by A3,XBOOLE_0:def 10;
end;
theorem
meet {x} = x
proof
A1: x c= meet {x}
proof
let y;
assume y in x;
then for Z st Z in {x} holds y in Z by TARSKI:def 1;
hence thesis by Def1;
end;
x in {x} by TARSKI:def 1;
then meet {x} c= x by Th3;
hence thesis by A1,XBOOLE_0:def 10;
end;
theorem
meet {X,Y} = X /\ Y
proof
A1: X in {X,Y} & Y in {X,Y} by TARSKI:def 2;
x in meet {X,Y} iff x in X & x in Y
proof
thus x in meet {X,Y} implies x in X & x in Y by A1,Def1;
assume x in X & x in Y;
then for Z holds Z in {X,Y} implies x in Z by TARSKI:def 2;
hence thesis by Def1;
end;
hence thesis by XBOOLE_0:def 4;
end;
reserve SFX,SFY,SFZ for set;
definition
let SFX,SFY;
pred SFX is_finer_than SFY means
for X st X in SFX ex Y st Y in SFY & X c= Y;
reflexivity;
pred SFY is_coarser_than SFX means
for Y st Y in SFY ex X st X in SFX & X c= Y;
reflexivity;
end;
theorem
SFX c= SFY implies SFX is_finer_than SFY
proof
assume
A1: SFX c= SFY;
let X such that
A2: X in SFX;
take X;
thus thesis by A1,A2;
end;
theorem
SFX is_finer_than SFY implies union SFX c= union SFY
proof
assume
A1: for X st X in SFX ex Y st Y in SFY & X c= Y;
thus union SFX c= union SFY
proof
let x;
assume x in union SFX;
then consider Y such that
A2: x in Y and
A3: Y in SFX by TARSKI:def 4;
ex Z st Z in SFY & Y c= Z by A1,A3;
hence thesis by A2,TARSKI:def 4;
end;
end;
theorem
SFY <> {} & SFY is_coarser_than SFX implies meet SFX c= meet SFY
proof
assume that
A1: SFY <> {} and
A2: for Z2 st Z2 in SFY ex Z1 st Z1 in SFX & Z1 c= Z2;
meet SFX c= meet SFY
proof
let x such that
A3: x in meet SFX;
for Z st Z in SFY holds x in Z
proof
let Z;
assume Z in SFY;
then consider Z1 such that
A4: Z1 in SFX and
A5: Z1 c= Z by A2;
x in Z1 by A3,A4,Def1;
hence thesis by A5;
end;
hence thesis by A1,Def1;
end;
hence thesis;
end;
theorem
{} is_finer_than SFX
proof
let X;
assume X in {};
hence thesis;
end;
theorem
SFX is_finer_than {} implies SFX = {}
proof
assume
A1: for X st X in SFX ex Y st Y in {} & X c= Y;
set x = the Element of SFX;
assume not thesis;
then ex Y st Y in {} & x c= Y by A1;
hence contradiction;
end;
theorem
SFX is_finer_than SFY & SFY is_finer_than SFZ implies SFX is_finer_than SFZ
proof
assume that
A1: for X st X in SFX ex Y st Y in SFY & X c= Y and
A2: for X st X in SFY ex Y st Y in SFZ & X c= Y;
let X;
assume X in SFX;
then consider Y such that
A3: Y in SFY and
A4: X c= Y by A1;
consider Z such that
A5: Z in SFZ & Y c= Z by A2,A3;
take Z;
thus thesis by A4,A5,XBOOLE_1:1;
end;
theorem
SFX is_finer_than {Y} implies for X st X in SFX holds X c= Y
proof
assume
A1: for X st X in SFX ex Z st Z in {Y} & X c= Z;
let X;
assume X in SFX;
then ex Z st Z in {Y} & X c= Z by A1;
hence thesis by TARSKI:def 1;
end;
theorem
SFX is_finer_than {X,Y} implies for Z st Z in SFX holds Z c= X or Z c= Y
proof
assume
A1: for Z1 st Z1 in SFX ex Z2 st Z2 in {X,Y} & Z1 c= Z2;
let Z;
assume Z in SFX;
then consider Z2 such that
A2: Z2 in {X,Y} and
A3: Z c= Z2 by A1;
{X,Y} = {X} \/ {Y} by ENUMSET1:1;
then Z2 in {X} or Z2 in {Y} by A2,XBOOLE_0:def 3;
hence thesis by A3,TARSKI:def 1;
end;
definition
let SFX,SFY;
func UNION (SFX,SFY) means
:Def4:
Z in it iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y;
existence
proof
defpred X[set] means ex Z being set st $1 = Z & ex X,Y st X in SFX & Y in
SFY & Z = X \/ Y;
consider XX being set such that
A1: for x holds x in XX iff x in bool(union SFX \/ union SFY) & X[x]
from XBOOLE_0:sch 1;
take XX;
for Z holds Z in XX iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y
proof
let Z;
A2: now
given X,Y such that
A3: X in SFX & Y in SFY and
A4: Z = X \/ Y;
X c= union SFX & Y c= union SFY by A3,ZFMISC_1:74;
then Z c= union SFX \/ union SFY by A4,XBOOLE_1:13;
hence Z in XX by A1,A3,A4;
end;
now
assume Z in XX;
then ex Z1 st Z = Z1 & ex X,Y st X in SFX & Y in SFY & Z1 = X \/ Y by
A1;
hence ex X,Y st X in SFX & Y in SFY & Z = X \/ Y;
end;
hence thesis by A2;
end;
hence thesis;
end;
uniqueness
proof
let Z1,Z2 be set;
assume that
A5: for Z holds Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y and
A6: for Z holds Z in Z2 iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y;
now
let Z;
Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y by A5;
hence Z in Z1 iff Z in Z2 by A6;
end;
hence thesis by TARSKI:1;
end;
commutativity
proof
let SFZ,SFX,SFY;
assume
A7: for Z holds Z in SFZ iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y;
let Z;
hereby
assume Z in SFZ;
then ex X,Y st X in SFX & Y in SFY & Z = X \/ Y by A7;
hence ex Y,X st Y in SFY & X in SFX & Z = Y \/ X;
end;
thus thesis by A7;
end;
func INTERSECTION (SFX,SFY) means
:Def5:
Z in it iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y;
existence
proof
defpred X[set] means ex Z being set st $1 = Z & ex X,Y st X in SFX & Y in
SFY & Z = X /\ Y;
consider XX being set such that
A8: for x holds x in XX iff x in bool(union SFX /\ union SFY) & X[x]
from XBOOLE_0:sch 1;
take XX;
for Z holds Z in XX iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y
proof
let Z;
A9: now
given X,Y such that
A10: X in SFX & Y in SFY and
A11: Z = X /\ Y;
X c= union SFX & Y c= union SFY by A10,ZFMISC_1:74;
then Z c= union SFX /\ union SFY by A11,XBOOLE_1:27;
hence Z in XX by A8,A10,A11;
end;
now
assume Z in XX;
then ex Z1 st Z = Z1 & ex X,Y st X in SFX & Y in SFY & Z1 = X /\ Y by
A8;
hence ex X,Y st X in SFX & Y in SFY & Z = X /\ Y;
end;
hence thesis by A9;
end;
hence thesis;
end;
uniqueness
proof
let Z1,Z2 be set;
assume that
A12: for Z holds Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y and
A13: for Z holds Z in Z2 iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y;
now
let Z;
Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y by A12;
hence Z in Z1 iff Z in Z2 by A13;
end;
hence thesis by TARSKI:1;
end;
commutativity
proof
let SFZ,SFX,SFY;
assume
A14: for Z holds Z in SFZ iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y;
let Z;
hereby
assume Z in SFZ;
then ex X,Y st X in SFX & Y in SFY & Z = X /\ Y by A14;
hence ex Y,X st Y in SFY & X in SFX & Z = Y /\ X;
end;
thus thesis by A14;
end;
func DIFFERENCE (SFX,SFY) means
:Def6:
Z in it iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y;
existence
proof
defpred X[set] means ex Z being set st $1 = Z & ex X,Y st X in SFX & Y in
SFY & Z = X \ Y;
consider XX being set such that
A15: for x holds x in XX iff x in bool union SFX & X[x] from XBOOLE_0:
sch 1;
take XX;
for Z holds Z in XX iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y
proof
let Z;
A16: now
given X,Y such that
A17: X in SFX and
A18: Y in SFY and
A19: Z = X \ Y;
X c= union SFX by A17,ZFMISC_1:74;
then Z c= union SFX by A19,XBOOLE_1:1;
hence Z in XX by A15,A17,A18,A19;
end;
now
assume Z in XX;
then ex Z1 st Z = Z1 & ex X,Y st X in SFX & Y in SFY & Z1 = X \ Y by
A15;
hence ex X,Y st X in SFX & Y in SFY & Z = X \ Y;
end;
hence thesis by A16;
end;
hence thesis;
end;
uniqueness
proof
let Z1,Z2 be set;
assume that
A20: for Z holds Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y and
A21: for Z holds Z in Z2 iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y;
now
let Z;
Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y by A20;
hence Z in Z1 iff Z in Z2 by A21;
end;
hence thesis by TARSKI:1;
end;
end;
theorem
SFX is_finer_than UNION(SFX,SFX)
proof
let X such that
A1: X in SFX;
take X;
X = X \/ X;
hence thesis by A1,Def4;
end;
theorem
INTERSECTION(SFX,SFX) is_finer_than SFX
proof
let X;
assume X in INTERSECTION(SFX,SFX);
then consider Z1,Z2 such that
A1: Z1 in SFX and
Z2 in SFX and
A2: X = Z1 /\ Z2 by Def5;
take Z1;
thus thesis by A1,A2,XBOOLE_1:17;
end;
theorem
DIFFERENCE(SFX,SFX) is_finer_than SFX
proof
let X;
assume X in DIFFERENCE(SFX,SFX);
then consider Z1,Z2 such that
A1: Z1 in SFX and
Z2 in SFX and
A2: X = Z1 \ Z2 by Def6;
take Z1;
thus thesis by A1,A2;
end;
theorem
SFX meets SFY implies meet SFX /\ meet SFY = meet INTERSECTION(SFX,SFY )
proof
set y = the Element of SFX /\ SFY;
assume
A1: SFX /\ SFY <> {};
then
A2: SFY <> {};
A3: y in SFX by A1,XBOOLE_0:def 4;
A4: y in SFY by A1,XBOOLE_0:def 4;
A5: SFX <> {} by A1;
A6: meet INTERSECTION(SFX,SFY) c= meet SFX /\ meet SFY
proof
let x such that
A7: x in meet INTERSECTION(SFX,SFY);
for Z st Z in SFY holds x in Z
proof
let Z;
assume Z in SFY;
then y /\ Z in INTERSECTION(SFX,SFY) by A3,Def5;
then x in y /\ Z by A7,Def1;
hence thesis by XBOOLE_0:def 4;
end;
then
A8: x in meet SFY by A2,Def1;
for Z st Z in SFX holds x in Z
proof
let Z;
assume Z in SFX;
then Z /\ y in INTERSECTION(SFX,SFY) by A4,Def5;
then x in Z /\ y by A7,Def1;
hence thesis by XBOOLE_0:def 4;
end;
then x in meet SFX by A5,Def1;
hence thesis by A8,XBOOLE_0:def 4;
end;
A9: y /\ y in INTERSECTION(SFX,SFY) by A3,A4,Def5;
meet SFX /\ meet SFY c= meet INTERSECTION(SFX,SFY)
proof
let x;
assume x in meet SFX /\ meet SFY;
then
A10: x in meet SFX & x in meet SFY by XBOOLE_0:def 4;
for Z st Z in INTERSECTION(SFX,SFY) holds x in Z
proof
let Z;
assume Z in INTERSECTION(SFX,SFY);
then consider Z1,Z2 such that
A11: Z1 in SFX & Z2 in SFY and
A12: Z = Z1 /\ Z2 by Def5;
x in Z1 & x in Z2 by A10,A11,Def1;
hence thesis by A12,XBOOLE_0:def 4;
end;
hence thesis by A9,Def1;
end;
hence thesis by A6,XBOOLE_0:def 10;
end;
theorem
SFY <> {} implies X \/ meet SFY = meet UNION({X},SFY)
proof
assume
A1: SFY <> {};
set y = the Element of SFY;
X in {X} by TARSKI:def 1;
then
A2: X \/ y in UNION({X},SFY) by A1,Def4;
A3: X \/ meet SFY c= meet UNION({X},SFY)
proof
let x;
assume x in X \/ meet SFY;
then
A4: x in X or x in meet SFY by XBOOLE_0:def 3;
for Z st Z in UNION({X},SFY) holds x in Z
proof
let Z;
assume Z in UNION({X},SFY);
then consider Z1,Z2 such that
A5: Z1 in {X} & Z2 in SFY and
A6: Z = Z1 \/ Z2 by Def4;
x in Z1 or x in Z2 by A4,A5,Def1,TARSKI:def 1;
hence thesis by A6,XBOOLE_0:def 3;
end;
hence thesis by A2,Def1;
end;
meet UNION({X},SFY) c= X \/ meet SFY
proof
let x;
assume
A7: x in meet UNION({X},SFY);
assume
A8: not x in X \/ meet SFY;
then
A9: not x in X by XBOOLE_0:def 3;
not x in meet SFY by A8,XBOOLE_0:def 3;
then consider Z such that
A10: Z in SFY and
A11: not x in Z by A1,Def1;
X in {X} by TARSKI:def 1;
then X \/ Z in UNION({X},SFY) by A10,Def4;
then x in X \/ Z by A7,Def1;
hence contradiction by A9,A11,XBOOLE_0:def 3;
end;
hence thesis by A3,XBOOLE_0:def 10;
end;
theorem
X /\ union SFY = union INTERSECTION({X},SFY)
proof
A1: union INTERSECTION({X},SFY) c= X /\ union SFY
proof
let x;
assume x in union INTERSECTION({X},SFY);
then consider Z such that
A2: x in Z and
A3: Z in INTERSECTION({X},SFY) by TARSKI:def 4;
consider X1,X2 be set such that
A4: X1 in {X} and
A5: X2 in SFY and
A6: Z = X1 /\ X2 by A3,Def5;
x in X2 by A2,A6,XBOOLE_0:def 4;
then
A7: x in union SFY by A5,TARSKI:def 4;
X1 = X by A4,TARSKI:def 1;
then x in X by A2,A6,XBOOLE_0:def 4;
hence thesis by A7,XBOOLE_0:def 4;
end;
X /\ union SFY c= union INTERSECTION({X},SFY)
proof
let x;
assume
A8: x in X /\ union SFY;
then x in union SFY by XBOOLE_0:def 4;
then consider Y such that
A9: x in Y and
A10: Y in SFY by TARSKI:def 4;
x in X by A8,XBOOLE_0:def 4;
then
A11: x in X /\ Y by A9,XBOOLE_0:def 4;
X in {X} by TARSKI:def 1;
then X /\ Y in INTERSECTION({X},SFY) by A10,Def5;
hence thesis by A11,TARSKI:def 4;
end;
hence thesis by A1,XBOOLE_0:def 10;
end;
theorem
SFY <> {} implies X \ union SFY = meet DIFFERENCE({X},SFY)
proof
set y = the Element of SFY;
A1: X in {X} by TARSKI:def 1;
assume SFY <> {};
then
A2: X \ y in DIFFERENCE({X},SFY) by A1,Def6;
A3: meet DIFFERENCE({X},SFY) c= X \ union SFY
proof
let x;
assume
A4: x in meet DIFFERENCE({X},SFY);
for Z st Z in SFY holds not x in Z
proof
let Z;
assume Z in SFY;
then X \ Z in DIFFERENCE({X},SFY) by A1,Def6;
then x in X \ Z by A4,Def1;
hence thesis by XBOOLE_0:def 5;
end;
then for Z st x in Z holds not Z in SFY;
then
A5: not x in union SFY by TARSKI:def 4;
x in X \ y by A2,A4,Def1;
hence thesis by A5,XBOOLE_0:def 5;
end;
X \ union SFY c= meet DIFFERENCE({X},SFY)
proof
let x;
assume x in X \ union SFY;
then
A6: x in X & not x in union SFY by XBOOLE_0:def 5;
for Z st Z in DIFFERENCE({X},SFY) holds x in Z
proof
let Z;
assume Z in DIFFERENCE({X},SFY);
then consider Z1,Z2 such that
A7: Z1 in {X} & Z2 in SFY and
A8: Z = Z1 \ Z2 by Def6;
x in Z1 & not x in Z2 by A6,A7,TARSKI:def 1,def 4;
hence thesis by A8,XBOOLE_0:def 5;
end;
hence thesis by A2,Def1;
end;
hence thesis by A3,XBOOLE_0:def 10;
end;
theorem
SFY <> {} implies X \ meet SFY = union DIFFERENCE ({X},SFY)
proof
A1: X in {X} by TARSKI:def 1;
A2: union DIFFERENCE({X},SFY) c= X \ meet SFY
proof
let x;
assume x in union DIFFERENCE({X},SFY);
then consider Z such that
A3: x in Z and
A4: Z in DIFFERENCE({X},SFY) by TARSKI:def 4;
consider Z1,Z2 such that
A5: Z1 in {X} and
A6: Z2 in SFY and
A7: Z = Z1 \ Z2 by A4,Def6;
not x in Z2 by A3,A7,XBOOLE_0:def 5;
then
A8: not x in meet SFY by A6,Def1;
Z1 = X by A5,TARSKI:def 1;
hence thesis by A3,A7,A8,XBOOLE_0:def 5;
end;
assume
A9: SFY <> {};
X \ meet SFY c= union DIFFERENCE({X},SFY)
proof
let x;
assume
A10: x in X \ meet SFY;
then not x in meet SFY by XBOOLE_0:def 5;
then consider Z such that
A11: Z in SFY and
A12: not x in Z by A9,Def1;
A13: x in X \ Z by A10,A12,XBOOLE_0:def 5;
X \ Z in DIFFERENCE({X},SFY) by A1,A11,Def6;
hence thesis by A13,TARSKI:def 4;
end;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
union INTERSECTION (SFX,SFY) = union SFX /\ union SFY
proof
thus union INTERSECTION(SFX,SFY) c= union SFX /\ union SFY
proof
let x;
assume x in union INTERSECTION(SFX,SFY);
then consider Z such that
A1: x in Z and
A2: Z in INTERSECTION(SFX,SFY) by TARSKI:def 4;
consider X,Y such that
A3: X in SFX and
A4: Y in SFY and
A5: Z = X /\ Y by A2,Def5;
x in Y by A1,A5,XBOOLE_0:def 4;
then
A6: x in union SFY by A4,TARSKI:def 4;
x in X by A1,A5,XBOOLE_0:def 4;
then x in union SFX by A3,TARSKI:def 4;
hence thesis by A6,XBOOLE_0:def 4;
end;
let x be set;
assume
A7: x in union SFX /\ union SFY;
then x in union SFX by XBOOLE_0:def 4;
then consider X0 being set such that
A8: x in X0 & X0 in SFX by TARSKI:def 4;
x in union SFY by A7,XBOOLE_0:def 4;
then consider Y0 being set such that
A9: x in Y0 & Y0 in SFY by TARSKI:def 4;
X0 /\ Y0 in INTERSECTION(SFX,SFY) & x in X0 /\ Y0 by A8,A9,Def5,
XBOOLE_0:def 4;
hence thesis by TARSKI:def 4;
end;
theorem
SFX <> {} & SFY <> {} implies meet SFX \/ meet SFY c= meet UNION (SFX, SFY)
proof
set y = the Element of SFX;
set z = the Element of SFY;
assume SFX <> {} & SFY <> {};
then
A1: y \/ z in UNION(SFX,SFY) by Def4;
let x;
assume x in meet SFX \/ meet SFY;
then
A2: x in meet SFX or x in meet SFY by XBOOLE_0:def 3;
for Z st Z in UNION(SFX,SFY) holds x in Z
proof
let Z;
assume Z in UNION(SFX,SFY);
then consider X,Y such that
A3: X in SFX & Y in SFY and
A4: Z = X \/ Y by Def4;
x in X or x in Y by A2,A3,Def1;
hence thesis by A4,XBOOLE_0:def 3;
end;
hence thesis by A1,Def1;
end;
theorem
meet DIFFERENCE (SFX,SFY) c= meet SFX \ meet SFY
proof
per cases;
suppose
A1: SFX = {} or SFY = {};
now
assume DIFFERENCE (SFX,SFY) <> {};
then consider e being set such that
A2: e in DIFFERENCE (SFX,SFY) by XBOOLE_0:def 1;
ex X,Y st X in SFX & Y in SFY & e = X \ Y by A2,Def6;
hence contradiction by A1;
end;
then meet DIFFERENCE (SFX,SFY) = {} by Def1;
hence thesis by XBOOLE_1:2;
end;
suppose
A3: SFX <> {} & SFY <> {};
set z = the Element of SFX;
set y = the Element of SFY;
let x such that
A4: x in meet DIFFERENCE (SFX,SFY);
for Z st Z in SFX holds x in Z
proof
let Z;
assume Z in SFX;
then Z \ y in DIFFERENCE (SFX,SFY) by A3,Def6;
then x in Z \ y by A4,Def1;
hence thesis;
end;
then
A5: x in meet SFX by A3,Def1;
z \ y in DIFFERENCE(SFX,SFY) by A3,Def6;
then x in z \ y by A4,Def1;
then not x in y by XBOOLE_0:def 5;
then not x in meet SFY by A3,Def1;
hence thesis by A5,XBOOLE_0:def 5;
end;
end;
definition
let D be set;
mode Subset-Family of D is Subset of bool D;
end;
reserve F,G for Subset-Family of D;
reserve P for Subset of D;
definition
let D,F;
redefine func union F -> Subset of D;
coherence
proof
union F c= D
proof
let x;
assume x in union F;
then ex Z st x in Z & Z in F by TARSKI:def 4;
hence thesis;
end;
hence thesis;
end;
end;
definition
let D,F;
redefine func meet F -> Subset of D;
coherence
proof
meet F c= D
proof
A1: meet F c= union F by Th2;
let x;
assume x in meet F;
then x in union F by A1;
hence thesis;
end;
hence thesis;
end;
end;
theorem Th31:
(for P holds P in F iff P in G) implies F=G
proof
assume
A1: for P holds P in F iff P in G;
thus F c= G
proof
let x;
assume x in F;
hence thesis by A1;
end;
let x;
assume x in G;
hence thesis by A1;
end;
definition
let D,F;
func COMPLEMENT(F) -> Subset-Family of D means
:Def7:
for P being Subset of D holds P in it iff P` in F;
existence
proof
defpred X[Subset of D] means $1` in F;
thus ex G being Subset-Family of D st for P being Subset of D holds P in G
iff X[P] from SUBSET_1:sch 3;
end;
uniqueness
proof
let G,H be Subset-Family of D;
assume that
A1: for P holds P in G iff P` in F and
A2: for P holds P in H iff P` in F;
now
let P;
P in G iff P` in F by A1;
hence P in G iff P in H by A2;
end;
hence thesis by Th31;
end;
involutiveness
proof
let F,G such that
A3: for P being Subset of D holds P in F iff P` in G;
let P be Subset of D;
P`` = P;
hence thesis by A3;
end;
end;
theorem Th32:
F <> {} implies COMPLEMENT(F) <> {}
proof
set X = the Element of F;
assume
A1: F <> {};
then reconsider X as Subset of D by TARSKI:def 3;
X`` = X;
hence thesis by A1,Def7;
end;
theorem
F <> {} implies [#] D \ union F = meet (COMPLEMENT(F))
proof
A1: for x st x in D holds (for X st X in F holds not x in X) iff for Y st Y
in COMPLEMENT(F) holds x in Y
proof
let x such that
A2: x in D;
thus (for X st X in F holds not x in X) implies for Y st Y in COMPLEMENT(F
) holds x in Y
proof
assume
A3: for X st X in F holds not x in X;
let Y;
assume
A4: Y in COMPLEMENT(F);
then reconsider Y as Subset of D;
Y` in F by A4,Def7;
then not x in Y` by A3;
hence thesis by A2,XBOOLE_0:def 5;
end;
assume
A5: for Y st Y in COMPLEMENT(F) holds x in Y;
let X;
assume
A6: X in F;
then reconsider X as Subset of D;
X`` = X;
then X` in COMPLEMENT(F) by A6,Def7;
then x in X` by A5;
hence thesis by XBOOLE_0:def 5;
end;
assume F <> {};
then
A7: COMPLEMENT(F) <> {} by Th32;
A8: [#] D \ union F c= meet COMPLEMENT(F)
proof
let x;
assume
A9: x in [#] D \ union F;
then not x in union F by XBOOLE_0:def 5;
then for X st X in F holds not x in X by TARSKI:def 4;
then for Y st Y in COMPLEMENT(F) holds x in Y by A1,A9;
hence thesis by A7,Def1;
end;
meet COMPLEMENT(F) c= [#] D \ union F
proof
let x;
assume
A10: x in meet COMPLEMENT(F);
then for X holds X in COMPLEMENT(F) implies x in X by Def1;
then for Y st x in Y holds not Y in F by A1;
then not x in union F by TARSKI:def 4;
hence thesis by A10,XBOOLE_0:def 5;
end;
hence thesis by A8,XBOOLE_0:def 10;
end;
theorem
F <> {} implies union COMPLEMENT(F) = [#] D \ meet F
proof
assume
A1: F <> {};
A2: [#] D \ meet F c= union COMPLEMENT(F)
proof
let x;
assume
A3: x in [#] D \ meet F;
then not x in meet F by XBOOLE_0:def 5;
then consider X such that
A4: X in F and
A5: not x in X by A1,Def1;
reconsider X as Subset of D by A4;
reconsider XX=X` as set;
A6: X`` = X;
ex Y st x in Y & Y in COMPLEMENT(F)
proof
take XX;
thus thesis by A3,A4,A5,A6,Def7,XBOOLE_0:def 5;
end;
hence thesis by TARSKI:def 4;
end;
union COMPLEMENT(F) c= [#] D \ meet F
proof
let x;
assume
A7: x in union COMPLEMENT(F);
then consider X such that
A8: x in X and
A9: X in COMPLEMENT(F) by TARSKI:def 4;
reconsider X as Subset of D by A9;
reconsider XX=X` as set;
ex Y st Y in F & not x in Y
proof
take Y = XX;
thus Y in F by A9,Def7;
thus thesis by A8,XBOOLE_0:def 5;
end;
then not x in meet F by Def1;
hence thesis by A7,XBOOLE_0:def 5;
end;
hence thesis by A2,XBOOLE_0:def 10;
end;
begin
theorem
for X being set, F being Subset-Family of X for P being Subset of X
holds P` in COMPLEMENT F iff P in F
proof
let X be set, F be Subset-Family of X;
let P be Subset of X;
P = P``;
hence thesis by Def7;
end;
theorem Th36:
for X being set, F,G being Subset-Family of X st COMPLEMENT F c=
COMPLEMENT G holds F c= G
proof
let X be set, F,G be Subset-Family of X such that
A1: COMPLEMENT F c= COMPLEMENT G;
let x be set;
assume
A2: x in F;
then reconsider A = x as Subset of X;
A in COMPLEMENT COMPLEMENT F by A2;
then A` in COMPLEMENT F by Def7;
then A`` in G by A1,Def7;
hence thesis;
end;
theorem
for X being set, F,G being Subset-Family of X holds COMPLEMENT F c= G
iff F c= COMPLEMENT G
proof
let X be set, F,G be Subset-Family of X;
hereby
assume COMPLEMENT F c= G;
then COMPLEMENT F c= COMPLEMENT COMPLEMENT G;
hence F c= COMPLEMENT G by Th36;
end;
assume F c= COMPLEMENT G;
then COMPLEMENT COMPLEMENT F c= COMPLEMENT G;
hence thesis by Th36;
end;
theorem
for X being set, F,G being Subset-Family of X st COMPLEMENT F =
COMPLEMENT G holds F = G
proof
let X be set, F,G be Subset-Family of X;
assume COMPLEMENT F = COMPLEMENT G;
hence F = COMPLEMENT COMPLEMENT G .= G;
end;
theorem
for X being set, F,G being Subset-Family of X holds COMPLEMENT(F \/ G)
= COMPLEMENT F \/ COMPLEMENT G
proof
let X be set, F,G be Subset-Family of X;
for P being Subset of X holds P in COMPLEMENT F \/ COMPLEMENT G iff P`
in F \/ G
proof
let P be Subset of X;
P in COMPLEMENT F or P in COMPLEMENT G iff P` in F or P` in G by Def7;
hence thesis by XBOOLE_0:def 3;
end;
hence thesis by Def7;
end;
theorem
for X being set, F being Subset-Family of X st F = {X} holds
COMPLEMENT F = {{}}
proof
let X be set, F be Subset-Family of X such that
A1: F = {X};
{} c= X by XBOOLE_1:2;
then reconsider G = {{}} as Subset-Family of X by ZFMISC_1:31;
reconsider G as Subset-Family of X;
for P being Subset of X holds P in G iff P` in F
proof
let P be Subset of X;
hereby
assume P in G;
then P = {}X by TARSKI:def 1;
hence P` in F by A1,TARSKI:def 1;
end;
assume P` in F;
then
A2: P` = [#]X by A1,TARSKI:def 1;
P = P`` .= {} by A2,XBOOLE_1:37;
hence thesis by TARSKI:def 1;
end;
hence thesis by Def7;
end;
registration
let X be set, F be empty Subset-Family of X;
cluster COMPLEMENT F -> empty;
coherence
proof
assume COMPLEMENT F is not empty;
then ex x being Subset of X st x in COMPLEMENT F by SUBSET_1:4;
hence contradiction by Def7;
end;
end;
definition
let IT be set;
attr IT is with_non-empty_elements means
:Def8:
not {} in IT;
end;
registration
cluster non empty with_non-empty_elements for set;
existence
proof
take {{{}}};
thus {{{}}} is non empty;
assume {} in {{{}}};
hence contradiction by TARSKI:def 1;
end;
end;
registration
let A be non empty set;
cluster { A } -> with_non-empty_elements;
coherence
proof
assume {} in { A };
hence contradiction by TARSKI:def 1;
end;
let B be non empty set;
cluster { A, B } -> with_non-empty_elements;
coherence
proof
assume {} in { A,B };
hence contradiction by TARSKI:def 2;
end;
let C be non empty set;
cluster { A, B, C } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C };
hence contradiction by ENUMSET1:def 1;
end;
let D be non empty set;
cluster { A, B, C, D } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C, D };
hence contradiction by ENUMSET1:def 2;
end;
let E be non empty set;
cluster { A, B, C, D, E } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C, D, E };
hence contradiction by ENUMSET1:def 3;
end;
let F be non empty set;
cluster { A, B, C, D, E, F } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C, D, E, F };
hence contradiction by ENUMSET1:def 4;
end;
let G be non empty set;
cluster { A, B, C, D, E, F, G } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C, D, E, F, G };
hence contradiction by ENUMSET1:def 5;
end;
let H be non empty set;
cluster { A, B, C, D, E, F, G, H } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C, D, E, F, G, H };
hence contradiction by ENUMSET1:def 6;
end;
let I be non empty set;
cluster { A, B, C, D, E, F, G, H, I } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C, D, E, F, G, H, I };
hence contradiction by ENUMSET1:def 7;
end;
let J be non empty set;
cluster { A, B, C, D, E, F, G, H, I, J } -> with_non-empty_elements;
coherence
proof
assume {} in { A, B, C, D, E, F, G, H, I, J };
hence contradiction by ENUMSET1:def 8;
end;
end;
registration
let A,B be with_non-empty_elements set;
cluster A \/ B -> with_non-empty_elements;
coherence
proof
( not {} in A)& not {} in B by Def8;
then not {} in A \/ B by XBOOLE_0:def 3;
hence thesis by Def8;
end;
end;
theorem
union Y c= Z & X in Y implies X c= Z
proof
assume that
A1: union Y c= Z and
A2: X in Y;
thus X c= Z
proof
let x be set;
assume x in X;
then x in union Y by A2,TARSKI:def 4;
hence thesis by A1;
end;
end;
theorem
for A,B,X being set holds ( X c= union (A \/ B) & for Y being set st Y
in B holds Y misses X ) implies X c= union A
proof
let A,B,X be set;
assume X c= union (A \/ B);
then X c= union (A \/ B) /\ X by XBOOLE_1:19;
then X c= (union A \/ union B) /\ X by ZFMISC_1:78;
then
A1: X c= (union A /\ X) \/ (union B /\ X) by XBOOLE_1:23;
assume for Y st Y in B holds Y misses X;
then union B misses X by ZFMISC_1:80;
then
A2: union B /\ X = {} by XBOOLE_0:def 7;
union A /\ X c= union A by XBOOLE_1:17;
hence thesis by A2,A1,XBOOLE_1:1;
end;
definition
let M be set;
let B be Subset-Family of M;
func Intersect B -> Subset of M equals
:Def9:
meet B if B <> {} otherwise M;
coherence
proof
M c= M;
hence thesis;
end;
consistency;
end;
theorem Th43:
for X, x being set, R being Subset-Family of X st x in X holds x
in Intersect R iff for Y being set st Y in R holds x in Y
proof
let X, x be set, R be Subset-Family of X;
assume
A1: x in X;
hereby
assume
A2: x in Intersect R;
let Y be set;
assume
A3: Y in R;
then Intersect R = meet R by Def9;
hence x in Y by A2,A3,Def1;
end;
assume
A4: for Y being set st Y in R holds x in Y;
per cases;
suppose
A5: R <> {};
then x in meet R by A4,Def1;
hence thesis by A5,Def9;
end;
suppose
R = {};
hence thesis by A1,Def9;
end;
end;
theorem
for X being set for H, J being Subset-Family of X st H c= J holds
Intersect J c= Intersect H
proof
let X be set;
let H, J be Subset-Family of X such that
A1: H c= J;
let x be set;
assume
A2: x in Intersect J;
then for Y be set st Y in H holds x in Y by A1,Th43;
hence thesis by A2,Th43;
end;
registration
let X be non empty with_non-empty_elements set;
cluster -> non empty for Element of X;
coherence by Def8;
end;
reserve E for set;
definition
let E;
attr E is empty-membered means
:Def10:
not ex x being non empty set st x in E;
end;
notation
let E;
antonym E is with_non-empty_element for E is empty-membered;
end;
registration
cluster with_non-empty_element for set;
existence
proof
take {{{}}}, {{}};
thus thesis by TARSKI:def 1;
end;
end;
registration
cluster with_non-empty_element -> non empty for set;
coherence
proof
let X be set;
assume X is with_non-empty_element;
then ex x being non empty set st x in X by Def10;
hence thesis;
end;
end;
registration
let X be with_non-empty_element set;
cluster non empty for Element of X;
existence
proof
ex x being non empty set st x in X by Def10;
hence thesis;
end;
end;
registration
let D be non empty with_non-empty_elements set;
cluster union D -> non empty;
coherence
proof
set d = the Element of D;
d c= union D by ZFMISC_1:74;
hence thesis;
end;
end;
registration
cluster non empty with_non-empty_elements -> with_non-empty_element for set;
coherence
proof
let X be set;
assume that
A1: X is non empty and
A2: X is with_non-empty_elements;
consider x being Element of X such that
A3: x in [#]X by A1,SUBSET_1:4;
reconsider x as non empty set by A2,A3;
take x;
thus thesis by A3;
end;
end;
definition
let X be set;
mode Cover of X means
:Def11:
X c= union it;
existence
proof
take {X};
thus thesis by ZFMISC_1:25;
end;
end;
theorem
for X being set, F being Subset-Family of X holds F is Cover of X iff
union F = X
proof
let X be set, F be Subset-Family of X;
thus F is Cover of X implies union F = X
proof
assume
A1: F is Cover of X;
thus union F c= X;
thus thesis by A1,Def11;
end;
thus thesis by Def11;
end;
theorem Th46:
{{}} is Subset-Family of X
proof
{} c= X by XBOOLE_1:2;
hence thesis by ZFMISC_1:31;
end;
definition
let X be set;
let F be Subset-Family of X;
attr F is with_proper_subsets means
:Def12:
not X in F;
end;
theorem
for TS being set, F, G being Subset-Family of TS st F is
with_proper_subsets & G c= F holds G is with_proper_subsets
proof
let TS be set, F, G being Subset-Family of TS;
assume
A1: F is with_proper_subsets & G c= F;
assume not G is with_proper_subsets;
then TS in G by Def12;
hence thesis by A1,Def12;
end;
registration
let TS be non empty set;
cluster with_proper_subsets for Subset-Family of TS;
existence
proof
reconsider F = { {} } as Subset-Family of TS by Th46;
take F;
assume TS in F;
hence thesis by TARSKI:def 1;
end;
end;
theorem
for TS being non empty set, A, B being with_proper_subsets
Subset-Family of TS holds A \/ B is with_proper_subsets
proof
let TS be non empty set, A, B be with_proper_subsets Subset-Family of TS;
assume TS in A \/ B;
then TS in A or TS in B by XBOOLE_0:def 3;
hence thesis by Def12;
end;
registration
cluster non trivial -> with_non-empty_element for set;
coherence
proof
let W be set;
assume W is non trivial;
then consider w1,w2 being set such that
A1: w1 in W & w2 in W and
A2: w1 <> w2 by ZFMISC_1:def 10;
w1 <> {} or w2 <> {} by A2;
hence thesis by A1,Def10;
end;
end;
definition
let X be set;
redefine func bool X -> Subset-Family of X;
coherence by ZFMISC_1:def 1;
end;
theorem
for A being non empty set, b being set st A <> {b} ex a being
Element of A st a <> b
proof
let A be non empty set, b be set such that
A1: A <> {b};
assume
A2: for a being Element of A holds a = b;
now
set a0 = the Element of A;
let a be set;
thus a in A implies a = b by A2;
assume
A3: a = b;
a0 = b by A2;
hence a in A by A3;
end;
hence contradiction by A1,TARSKI:def 1;
end;
begin
reserve A,X,X1,X2,Y,Y1,Y2,a,b,c,d,x,y,z for set;
definition
let IT be set;
attr IT is Relation-like means
:Def1:
x in IT implies ex y,z st x = [y,z];
end;
registration
cluster empty -> Relation-like for set;
coherence
proof
let X be set;
assume X is empty;
hence for p being set st p in X ex x,y st [x,y] = p;
end;
end;
definition
mode Relation is Relation-like set;
end;
reserve P,P1,P2,Q,R,S for Relation;
registration
let R be Relation;
cluster -> Relation-like for Subset of R;
coherence
proof
let A be Subset of R;
let x;
thus thesis by Def1;
end;
end;
scheme
RelExistence{A,B() -> set, P[set,set]}: ex R being Relation st for x,y holds
[x,y] in R iff x in A() & y in B() & P[x,y]
proof
ex R being Relation st for p being set holds p in R iff p in [:A(),B():]
& ex x,y st p=[x,y] & P[x,y]
proof
defpred Q[set] means ex x,y st $1=[x,y] & P[x,y];
consider B being set such that
A1: for p being set holds p in B iff p in [:A(),B():] & Q[p] from
XBOOLE_0:sch 1;
for p being set st p in B holds ex x,y st p = [x,y]
proof
let p be set;
assume p in B;
then ex x,y st p=[x,y] & P[x,y] by A1;
hence thesis;
end;
then B is Relation by Def1;
hence thesis by A1;
end;
then consider R being Relation such that
A2: for p being set holds p in R iff p in [:A(),B():] & ex x,y st p=[x,y] &
P[x,y];
take R;
let x,y;
thus [x,y] in R implies x in A() & y in B() & P[x,y]
proof
assume
A3: [x,y] in R;
then consider xx,yy being set such that
A4: [x,y]=[xx,yy] and
A5: P[xx,yy] by A2;
A6: [x,y] in [:A(),B():] by A2,A3;
x=xx by A4,XTUPLE_0:1;
hence thesis by A4,A5,A6,XTUPLE_0:1,ZFMISC_1:87;
end;
thus x in A() & y in B() & P[x,y] implies [x,y] in R
proof
assume that
A7: x in A() & y in B() and
A8: P[x,y];
[x,y] in [:A(),B():] by A7,ZFMISC_1:87;
hence thesis by A2,A8;
end;
end;
definition
let P,R;
redefine pred P = R means
for a,b holds [a,b] in P iff [a,b] in R;
compatibility
proof
thus P = R implies for a,b holds [a,b] in P iff [a,b] in R;
assume
A1: for a,b holds [a,b] in P iff [a,b] in R;
thus P c= R
proof
let x;
assume
A2: x in P;
then ex y,z st x = [y,z] by Def1;
hence x in R by A1,A2;
end;
let x;
assume
A3: x in R;
then ex y,z st x = [y,z] by Def1;
hence x in P by A1,A3;
end;
end;
registration
let P,X;
cluster P /\ X -> Relation-like;
coherence
proof
P /\ X c= P by XBOOLE_1:17;
hence thesis;
end;
cluster P \ X -> Relation-like;
coherence;
end;
registration
let P,R;
cluster P \/ R -> Relation-like;
coherence
proof
let x;
A1: x in R implies ex y,z st x = [y,z] by Def1;
x in P implies ex y,z st x = [y,z] by Def1;
hence x in P \/ R implies ex y,z st x = [y,z] by A1,XBOOLE_0:def 3;
end;
end;
registration
let R,S be Relation;
cluster R \+\ S -> Relation-like;
coherence;
end;
registration
let a, b be set;
cluster {[a,b]} -> Relation-like;
coherence
proof
let x;
assume x in {[a,b]};
then x = [a,b] by TARSKI:def 1;
hence thesis;
end;
cluster [:a,b:] -> Relation-like;
coherence
proof
let z;
assume z in [:a,b:];
then ex x,y st x in a & y in b & [x,y]=z by ZFMISC_1:def 2;
hence thesis;
end;
end;
registration
let a, b, c, d be set;
cluster {[a,b],[c,d]} -> Relation-like;
coherence
proof
{[a,b],[c,d]} = {[a,b]} \/ {[c,d]} by ENUMSET1:1;
hence thesis;
end;
end;
definition
let P,A;
redefine pred P c= A means
for a,b holds [a,b] in P implies [a,b] in A;
compatibility
proof
thus P c= A implies for a,b holds [a,b] in P implies [a,b] in A;
assume
A1: for a,b holds [a,b] in P implies [a,b] in A;
let x;
assume
A2: x in P;
then ex y,z st x = [y,z] by Def1;
hence thesis by A1,A2;
end;
end;
notation
let R be Relation;
synonym dom R for proj1 R;
end;
theorem Th1:
dom(P \/ R) = dom P \/ dom R by XTUPLE_0:23;
theorem Th2:
dom(P /\ R) c= dom P /\ dom R by XTUPLE_0:24;
theorem
dom P \ dom R c= dom(P \ R) by XTUPLE_0:25;
notation
let R be Relation;
synonym rng R for proj2 R;
end;
canceled 3;
theorem Th7:
R c= [:dom R, rng R:]
proof
let y,z;
assume [y,z] in R;
then y in dom R & z in rng R by XTUPLE_0:def 12,def 13;
hence thesis by ZFMISC_1:87;
end;
theorem
R /\ [:dom R, rng R:] = R by Th7,XBOOLE_1:28;
theorem Th9:
R = {[x,y]} implies dom R = {x} & rng R = {y}
proof
assume
A1: R = {[x,y]};
z in dom R iff z in {x}
proof
thus z in dom R implies z in {x}
proof
assume z in dom R;
then consider b such that
A2: [z,b] in R by XTUPLE_0:def 12;
[z,b] = [x,y] by A1,A2,TARSKI:def 1;
then z=x by XTUPLE_0:1;
hence thesis by TARSKI:def 1;
end;
assume z in {x};
then z=x by TARSKI:def 1;
then [z,y] in R by A1,TARSKI:def 1;
hence thesis by XTUPLE_0:def 12;
end;
hence dom R = {x} by TARSKI:1;
z in rng R iff z in {y}
proof
thus z in rng R implies z in {y}
proof
assume z in rng R;
then consider a such that
A3: [a,z] in R by XTUPLE_0:def 13;
[a,z] = [x,y] by A1,A3,TARSKI:def 1;
then z = y by XTUPLE_0:1;
hence thesis by TARSKI:def 1;
end;
assume z in {y};
then z = y by TARSKI:def 1;
then [x,z] in R by A1,TARSKI:def 1;
hence thesis by XTUPLE_0:def 13;
end;
hence thesis by TARSKI:1;
end;
theorem
R = {[a,b],[x,y]} implies dom R = {a,x} & rng R = {b,y}
proof
assume
A1: R = {[a,b],[x,y]};
thus dom R = {a,x}
proof
thus dom R c= {a,x}
proof
let z;
assume z in dom R;
then consider c such that
A2: [z,c] in R by XTUPLE_0:def 12;
[z,c] = [a,b] or [z,c] = [x,y] by A1,A2,TARSKI:def 2;
then z = a or z = x by XTUPLE_0:1;
hence thesis by TARSKI:def 2;
end;
let z;
assume z in {a,x};
then z = a or z = x by TARSKI:def 2;
then [z,b] in R or [z,y] in R by A1,TARSKI:def 2;
hence thesis by XTUPLE_0:def 12;
end;
thus rng R c= {b,y}
proof
let z;
assume z in rng R;
then consider d such that
A3: [d,z] in R by XTUPLE_0:def 13;
[d,z] = [a,b] or [d,z] = [x,y] by A1,A3,TARSKI:def 2;
then z = b or z = y by XTUPLE_0:1;
hence thesis by TARSKI:def 2;
end;
let z;
assume z in {b,y};
then z = b or z = y by TARSKI:def 2;
then [a,z] in R or [x,z] in R by A1,TARSKI:def 2;
hence thesis by XTUPLE_0:def 13;
end;
theorem Th11:
P c= R implies dom P c= dom R & rng P c= rng R by XTUPLE_0:8,9;
theorem Th12:
rng(P \/ R) = rng P \/ rng R by XTUPLE_0:27;
theorem Th13:
rng(P /\ R) c= rng P /\ rng R by XTUPLE_0:28;
theorem
rng P \ rng R c= rng(P \ R) by XTUPLE_0:29;
definition
canceled 2;
let R;
func field R -> set equals
dom R \/ rng R;
coherence;
end;
theorem
[a,b] in R implies a in field R & b in field R
proof
assume
A1: [a,b] in R;
then a in dom R by XTUPLE_0:def 12;
hence a in field R by XBOOLE_0:def 3;
b in rng R by A1,XTUPLE_0:def 13;
hence thesis by XBOOLE_0:def 3;
end;
theorem
P c= R implies field P c= field R
proof
assume P c= R;
then dom P c= dom R & rng P c= rng R by Th11;
hence thesis by XBOOLE_1:13;
end;
theorem Th17:
field {[x,y]} = {x,y}
proof
set R = {[x,y]};
dom R = {x} & rng R = {y} by Th9;
hence thesis by ENUMSET1:1;
end;
theorem
field(P \/ R) = field P \/ field R
proof
thus field(P \/ R) = dom P \/ dom R \/ rng(P \/ R) by Th1
.= dom P \/ dom R \/ (rng P \/ rng R) by Th12
.= dom P \/ dom R \/ rng P \/ rng R by XBOOLE_1:4
.= field P \/ dom R \/ rng R by XBOOLE_1:4
.= field P \/ field R by XBOOLE_1:4;
end;
theorem
field(P /\ R) c= field P /\ field R
proof
let x;
assume x in field(P /\ R);
then
A1: x in dom(P /\ R) or x in rng(P /\ R) by XBOOLE_0:def 3;
x in dom P /\ dom R or x in rng P /\ rng R implies (x in dom P or x in
rng P) & (x in dom R or x in rng R) by XBOOLE_0:def 4;
then
A2: x in dom P /\ dom R or x in rng P /\ rng R implies x in dom P \/ rng P &
x in dom R \/ rng R by XBOOLE_0:def 3;
dom(P /\ R) c= dom P /\ dom R & rng(P /\ R) c= rng P /\ rng R by Th2,Th13;
hence thesis by A1,A2,XBOOLE_0:def 4;
end;
definition
let R;
func R~ -> Relation means
:Def7:
[x,y] in it iff [y,x] in R;
existence
proof
defpred Q[set,set] means [$2,$1] in R;
consider P such that
A1: for x,y holds [x,y] in P iff x in rng R & y in dom R & Q[x,y] from
RelExistence;
take P;
let x,y;
[y,x] in R implies y in dom R & x in rng R by XTUPLE_0:def 12,def 13;
hence thesis by A1;
end;
uniqueness
proof
let P1,P2;
assume that
A2: [x,y] in P1 iff [y,x] in R and
A3: [x,y] in P2 iff [y,x] in R;
let x,y;
[x,y] in P1 iff [y,x] in R by A2;
hence [x,y] in P1 iff [x,y] in P2 by A3;
end;
involutiveness;
end;
theorem Th20:
rng R = dom(R~) & dom R = rng(R~)
proof
thus rng R c= dom(R~)
proof
let u be set;
assume u in rng R;
then consider x such that
A1: [x,u] in R by XTUPLE_0:def 13;
[u,x] in R~ by A1,Def7;
hence thesis by XTUPLE_0:def 12;
end;
thus dom(R~) c= rng R
proof
let u be set;
assume u in dom(R~);
then consider x such that
A2: [u,x] in R~ by XTUPLE_0:def 12;
[x,u] in R by A2,Def7;
hence thesis by XTUPLE_0:def 13;
end;
thus dom R c= rng(R~)
proof
let u be set;
assume u in dom R;
then consider x such that
A3: [u,x] in R by XTUPLE_0:def 12;
[x,u] in R~ by A3,Def7;
hence thesis by XTUPLE_0:def 13;
end;
let u be set;
assume u in rng(R~);
then consider x such that
A4: [x,u] in R~ by XTUPLE_0:def 13;
[u,x] in R by A4,Def7;
hence thesis by XTUPLE_0:def 12;
end;
theorem
field R = field(R~)
proof
thus field R = rng(R~) \/ rng R by Th20
.= field(R~) by Th20;
end;
theorem
(P /\ R)~ = P~ /\ R~
proof
let x,y;
[x,y] in (P /\ R)~ iff [y,x] in P /\ R by Def7;
then [x,y] in (P /\ R)~ iff [y,x] in P & [y,x] in R by XBOOLE_0:def 4;
then [x,y] in (P /\ R)~ iff [x,y] in P~ & [x,y] in R~ by Def7;
hence thesis by XBOOLE_0:def 4;
end;
theorem
(P \/ R)~ = P~ \/ R~
proof
let x,y;
[x,y] in (P \/ R)~ iff [y,x] in P \/ R by Def7;
then [x,y] in (P \/ R)~ iff [y,x] in P or [y,x] in R by XBOOLE_0:def 3;
then [x,y] in (P \/ R)~ iff [x,y] in P~ or [x,y] in R~ by Def7;
hence thesis by XBOOLE_0:def 3;
end;
theorem
(P \ R)~ = P~ \ R~
proof
let x,y;
[x,y] in (P \ R)~ iff [y,x] in P \ R by Def7;
then [x,y] in (P \ R)~ iff [y,x] in P & not [y,x] in R by XBOOLE_0:def 5;
then [x,y] in (P \ R)~ iff [x,y] in P~ & not [x,y] in R~ by Def7;
hence thesis by XBOOLE_0:def 5;
end;
definition
let P,R be set;
func P(#)R -> Relation means
:Def8:
[x,y] in it iff ex z st [x,z] in P & [z,y] in R;
existence
proof
defpred Z[set,set] means ex z st [$1,z] in P & [z,$2] in R;
consider Q such that
A1: for x,y holds [x,y] in Q iff x in proj1 P & y in proj2 R & Z[x,y] from
RelExistence;
take Q;
let x,y;
thus [x,y] in Q implies ex z st [x,z] in P & [z,y] in R by A1;
given z such that
A2: [x,z] in P & [z,y] in R;
x in proj1 P & y in proj2 R by A2,XTUPLE_0:def 12,def 13;
hence thesis by A1,A2;
end;
uniqueness
proof
let P1,P2;
assume that
A3: [x,y] in P1 iff ex z st [x,z] in P & [z,y] in R and
A4: [x,y] in P2 iff ex z st [x,z] in P & [z,y] in R;
let x,y;
[x,y] in P1 iff ex z st [x,z] in P & [z,y] in R by A3;
hence [x,y] in P1 iff [x,y] in P2 by A4;
end;
end;
notation
let P,R;
synonym P*R for P(#)R;
end;
theorem Th25:
dom(P*R) c= dom P
proof
let x;
assume x in dom(P*R);
then consider y such that
A1: [x,y] in P*R by XTUPLE_0:def 12;
ex z st [x,z] in P & [z,y] in R by A1,Def8;
hence thesis by XTUPLE_0:def 12;
end;
theorem Th26:
rng(P*R) c= rng R
proof
let y;
assume y in rng(P*R);
then consider x such that
A1: [x,y] in P*R by XTUPLE_0:def 13;
ex z st [x,z] in P & [z,y] in R by A1,Def8;
hence thesis by XTUPLE_0:def 13;
end;
theorem
rng R c= dom P implies dom(R*P) = dom R
proof
assume
A1: y in rng R implies y in dom P;
thus dom(R*P) c= dom R by Th25;
let x;
assume x in dom R;
then consider y such that
A2: [x,y] in R by XTUPLE_0:def 12;
y in rng R by A2,XTUPLE_0:def 13;
then y in dom P by A1;
then consider z such that
A3: [y,z] in P by XTUPLE_0:def 12;
[x,z] in R*P by A2,A3,Def8;
hence thesis by XTUPLE_0:def 12;
end;
theorem
dom P c= rng R implies rng(R*P) = rng P
proof
assume
A1: for y st y in dom P holds y in rng R;
thus rng(R*P) c= rng P by Th26;
let z;
assume z in rng P;
then consider y such that
A2: [y,z] in P by XTUPLE_0:def 13;
y in dom P by A2,XTUPLE_0:def 12;
then y in rng R by A1;
then consider x such that
A3: [x,y] in R by XTUPLE_0:def 13;
[x,z] in R*P by A2,A3,Def8;
hence thesis by XTUPLE_0:def 13;
end;
theorem Th29:
P c= R implies Q*P c= Q*R
proof
assume
A1: P c= R;
let x,y;
assume [x,y] in Q*P;
then ex z st [x,z] in Q & [z,y] in P by Def8;
hence thesis by A1,Def8;
end;
theorem Th30:
P c= Q implies P*R c= Q*R
proof
assume
A1: P c= Q;
let x,y;
assume [x,y] in P*R;
then ex z st [x,z] in P & [z,y] in R by Def8;
hence thesis by A1,Def8;
end;
theorem
P c= R & Q c= S implies P*Q c= R*S
proof
assume
A1: P c= R & Q c= S;
let x,y;
assume [x,y] in P*Q;
then ex z st [x,z] in P & [z,y] in Q by Def8;
hence [x,y] in R*S by A1,Def8;
end;
theorem
P*(R \/ Q) = (P*R) \/ (P*Q)
proof
let x,y;
hereby
assume [x,y] in P*(R \/ Q);
then consider z such that
A1: [x,z] in P and
A2: [z,y] in R \/ Q by Def8;
[z,y] in R or [z,y] in Q by A2,XBOOLE_0:def 3;
then [x,y] in P*R or [x,y] in P*Q by A1,Def8;
hence [x,y] in (P*R) \/ (P*Q) by XBOOLE_0:def 3;
end;
assume
A3: [x,y] in (P*R) \/ (P*Q);
per cases by A3,XBOOLE_0:def 3;
suppose [x,y] in P*Q;
then consider z such that
A4: [x,z] in P and
A5: [z,y] in Q by Def8;
[z,y] in R \/ Q by A5,XBOOLE_0:def 3;
hence [x,y] in P*(R \/ Q) by A4,Def8;
end;
suppose [x,y] in P*R;
then consider z such that
A6: [x,z] in P and
A7: [z,y] in R by Def8;
[z,y] in R \/ Q by A7,XBOOLE_0:def 3;
hence [x,y] in P*(R \/ Q) by A6,Def8;
end;
end;
theorem
P*(R /\ Q) c= (P*R) /\ (P*Q)
proof
let x,y;
assume [x,y] in P*(R /\ Q);
then consider z such that
A1: [x,z] in P and
A2: [z,y] in R /\ Q by Def8;
[z,y] in Q by A2,XBOOLE_0:def 4;
then
A3: [x,y] in P*Q by A1,Def8;
[z,y] in R by A2,XBOOLE_0:def 4;
then [x,y] in P*R by A1,Def8;
hence [x,y] in (P*R) /\ (P*Q) by A3,XBOOLE_0:def 4;
end;
theorem
(P*R) \ (P*Q) c= P*(R \ Q)
proof
let a,b;
assume
A1: [a,b] in (P*R) \ (P*Q);
then consider y such that
A2: [a,y] in P and
A3: [y,b] in R by Def8;
not [a,b] in P*Q by A1,XBOOLE_0:def 5;
then not [a,y] in P or not [y,b] in Q by Def8;
then [y,b] in R \ Q by A2,A3,XBOOLE_0:def 5;
hence [a,b] in P*(R \ Q) by A2,Def8;
end;
theorem
(P*R)~ = R~*P~
proof
let a,b;
hereby
assume [a,b] in (P*R)~;
then [b,a] in P*R by Def7;
then consider y such that
A1: [b,y] in P & [y,a] in R by Def8;
[y,b] in P~ & [a,y] in R~ by A1,Def7;
hence [a,b] in R~*P~ by Def8;
end;
assume [a,b] in R~*P~;
then consider y such that
A2: [a,y] in R~ & [y,b] in P~ by Def8;
[y,a] in R & [b,y] in P by A2,Def7;
then [b,a] in P*R by Def8;
hence [a,b] in (P*R)~ by Def7;
end;
theorem Th36:
(P*R)*Q = P*(R*Q)
proof
let a,b;
hereby
assume [a,b] in (P*R)*Q;
then consider y such that
A1: [a,y] in P*R and
A2: [y,b] in Q by Def8;
consider x such that
A3: [a,x] in P and
A4: [x,y] in R by A1,Def8;
[x,b] in R*Q by A2,A4,Def8;
hence [a,b] in P*(R*Q) by A3,Def8;
end;
assume [a,b] in P*(R*Q);
then consider y such that
A5: [a,y] in P and
A6: [y,b] in R*Q by Def8;
consider x such that
A7: [y,x] in R and
A8: [x,b] in Q by A6,Def8;
[a,x] in P*R by A5,A7,Def8;
hence [a,b] in (P*R)*Q by A8,Def8;
end;
registration
cluster non empty for Relation;
existence
proof
{[{},{}]} is non empty;
hence thesis;
end;
end;
registration
let f be non empty Relation;
cluster dom f -> non empty;
coherence
proof
ex x1,x2 being set st the Element of f = [x1,x2] by Def1;
hence thesis by XTUPLE_0:def 12;
end;
cluster rng f -> non empty;
coherence
proof
ex x1,x2 being set st the Element of f = [x1,x2] by Def1;
hence thesis by XTUPLE_0:def 13;
end;
end;
theorem Th37:
(for x,y holds not [x,y] in R) implies R = {}
proof
assume
A1: for x,y holds not [x,y] in R;
assume
A2: not thesis;
then ex x,y st the Element of R = [x,y] by Def1;
hence contradiction by A1,A2;
end;
theorem Th38:
dom {} = {} & rng {} = {}
proof
thus dom {} = {}
proof let x,y be set;
thus [x,y] in dom {} implies [x,y] in {}
proof
assume [x,y] in dom {};
then ex z st [[x,y],z] in {};
hence thesis;
end;
thus thesis;
end;
let x,y be set;
thus [x,y] in rng{} implies [x,y] in {}
proof assume [x,y] in rng{};
then ex z st [z,[x,y]] in {};
hence thesis;
end;
thus thesis;
end;
theorem Th39:
{}*R = {} & R*{} = {}
proof
thus {}*R = {}
proof
let x,y;
hereby
assume [x,y] in {}*R;
then ex z st [x,z] in {} & [z,y] in R by Def8;
hence [x,y] in {};
end;
thus thesis;
end;
let x,y;
hereby
assume [x,y] in R*{};
then ex z st [x,z] in R & [z,y] in {} by Def8;
hence [x,y] in {};
end;
thus thesis;
end;
registration
let X be empty set;
cluster dom X -> empty;
coherence;
cluster rng X -> empty;
coherence;
let R;
cluster X*R -> empty;
coherence by Th39;
cluster R*X -> empty;
coherence by Th39;
end;
theorem
field {} = {};
theorem Th41:
dom R = {} or rng R = {} implies R = {};
theorem
dom R = {} iff rng R = {} by Th38,Th41;
registration
let X be empty set;
cluster X~ -> empty;
coherence
proof
for x,y st [x,y] in {}~ holds contradiction by Def7;
hence thesis by Th37;
end;
end;
theorem
{}~ = {};
theorem
rng R misses dom P implies R*P = {}
proof
assume
A1: rng R /\ dom P = {};
assume R*P <> {};
then consider x,z such that
A2: [x,z] in R*P by Th37;
consider y such that
A3: [x,y] in R & [y,z] in P by A2,Def8;
y in rng R & y in dom P by A3,XTUPLE_0:def 12,def 13;
hence contradiction by A1,XBOOLE_0:def 4;
end;
definition
let R be Relation;
attr R is non-empty means
:Def9:
not {} in rng R;
end;
registration
cluster non-empty for Relation;
existence
proof
take {};
thus not {} in rng {};
end;
end;
registration
let R be Relation, S be non-empty Relation;
cluster R*S -> non-empty;
coherence
proof
rng(R*S) c= rng S by Th26;
hence not {} in rng(R*S) by Def9;
end;
end;
definition
let X;
func id X -> Relation means
:Def10:
[x,y] in it iff x in X & x = y;
existence
proof
defpred Z[set,set] means $1=$2;
consider R such that
A1: for x,y holds [x,y] in R iff x in X & y in X & Z[x,y] from
RelExistence;
take R;
let x,y;
thus thesis by A1;
end;
uniqueness
proof
let P1,P2;
assume that
A2: [x,y] in P1 iff x in X & x=y and
A3: [x,y] in P2 iff x in X & x=y;
let x,y;
[x,y] in P1 iff x in X & x=y by A2;
hence [x,y] in P1 iff [x,y] in P2 by A3;
end;
end;
registration let X;
reduce dom id X to X;
reducibility
proof
thus dom id X c= X
proof
let x;
assume x in dom(id X);
then ex y st [x,y] in id X by XTUPLE_0:def 12;
hence x in X by Def10;
end;
let x;
assume x in X;
then [x,x] in id X by Def10;
hence x in dom(id X) by XTUPLE_0:def 12;
end;
reduce rng id X to X;
reducibility
proof
thus rng id X c= X
proof
let x;
assume x in rng id X;
then consider y such that
A1: [y,x] in id X by XTUPLE_0:def 13;
x = y by A1,Def10;
hence thesis by A1,Def10;
end;
let x;
[x,x] in id X iff x in X by Def10;
hence thesis by XTUPLE_0:def 13;
end;
end;
theorem
dom id X = X & rng id X = X;
registration let X;
reduce (id X)~ to id X;
reducibility
proof
let x,y;
thus [x,y] in (id X)~ implies [x,y] in id X
proof
assume [x,y] in (id X)~;
then [y,x] in id X by Def7;
hence thesis by Def10;
end;
assume
A1: [x,y] in id X;
then x = y by Def10;
hence thesis by A1,Def7;
end;
end;
theorem
(id X)~ = id X;
theorem
(for x st x in X holds [x,x] in R) implies id X c= R
proof
assume
A1: for x st x in X holds [x,x] in R;
let x,y;
assume [x,y] in id X;
then x in X & x=y by Def10;
hence thesis by A1;
end;
theorem Th48:
[x,y] in (id X)*R iff x in X & [x,y] in R
proof
thus [x,y] in (id X)*R implies x in X & [x,y] in R
proof
assume [x,y] in (id X)*R;
then ex z st [x,z] in id X & [z,y] in R by Def8;
hence thesis by Def10;
end;
assume x in X;
then [x,x] in id X by Def10;
hence thesis by Def8;
end;
theorem Th49:
[x,y] in R*id Y iff y in Y & [x,y] in R
proof
thus [x,y] in R*id Y implies y in Y & [x,y] in R
proof
assume [x,y] in R*id Y;
then consider z such that
A1: [x,z] in R and
A2: [z,y] in id Y by Def8;
z = y by A2,Def10;
hence thesis by A1,A2,Def10;
end;
y in Y implies [y,y] in id Y by Def10;
hence thesis by Def8;
end;
theorem Th50:
R*(id X) c= R & (id X)*R c= R
proof
thus [x,y] in R*id X implies [x,y] in R
proof
assume [x,y] in R*id X;
then ex z st [x,z] in R & [z,y] in id X by Def8;
hence thesis by Def10;
end;
thus [x,y] in (id X)*R implies [x,y] in R
proof
assume [x,y] in (id X)*R;
then ex z st [x,z] in id X & [z,y] in R by Def8;
hence thesis by Def10;
end;
end;
theorem Th51:
dom R c= X implies (id X)*R = R
proof
assume
A1: dom R c= X;
A2: R c= (id X)*R
proof
let x,y;
assume
A3: [x,y] in R;
then x in dom R by XTUPLE_0:def 12;
then [x,x] in id X by A1,Def10;
hence thesis by A3,Def8;
end;
(id X)*R c= R by Th50;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
(id dom R)*R = R by Th51;
theorem Th53:
rng R c= Y implies R*(id Y) = R
proof
assume
A1: rng R c= Y;
A2: R c= R*(id Y)
proof
let x,y;
assume
A3: [x,y] in R;
then y in rng R by XTUPLE_0:def 13;
then [y,y] in (id Y) by A1,Def10;
hence thesis by A3,Def8;
end;
R*(id Y) c= R by Th50;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
R*(id rng R) = R by Th53;
theorem
id {} = {}
proof
dom(id {}) = {};
hence thesis;
end;
theorem
rng P2 c= X & P2*R = id dom P1 & R*P1 = id X implies P1 = P2
proof
(P2*R)*P1 = P2*(R*P1) & id(dom P1)*P1 = P1 by Th36,Th51;
hence thesis by Th53;
end;
definition
let R,X;
func R|X -> Relation means
:Def11:
[x,y] in it iff x in X & [x,y] in R;
existence
proof
defpred Z[set,set] means ($1 in X & [$1,$2] in R);
consider P such that
A1: for x,y holds [x,y] in P iff x in dom R & y in rng R & Z[x,y] from
RelExistence;
take P;
let x,y;
x in X & [x,y] in R implies x in dom R & y in rng R
by XTUPLE_0:def 12,def 13;
hence thesis by A1;
end;
uniqueness
proof
let P1,P2;
assume that
A2: [x,y] in P1 iff x in X & [x,y] in R and
A3: [x,y] in P2 iff x in X & [x,y] in R;
let x,y;
[x,y] in P1 iff x in X & [x,y] in R by A2;
hence [x,y] in P1 iff [x,y] in P2 by A3;
end;
end;
registration
let R be Relation, X be empty set;
cluster R|X -> empty;
coherence
proof
not [x,y] in R|{} by Def11;
hence thesis by Th37;
end;
end;
theorem Th57:
x in dom(R|X) iff x in X & x in dom R
proof
thus x in dom(R|X) implies x in X & x in dom R
proof
assume x in dom(R|X);
then consider y such that
A1: [x,y] in R|X by XTUPLE_0:def 12;
[x,y] in R by A1,Def11;
hence thesis by A1,Def11,XTUPLE_0:def 12;
end;
assume
A2: x in X;
assume x in dom R;
then consider y such that
A3: [x,y] in R by XTUPLE_0:def 12;
[x,y] in R|X by A2,A3,Def11;
hence thesis by XTUPLE_0:def 12;
end;
theorem Th58:
dom(R|X) c= X
proof
let x;
thus thesis by Th57;
end;
theorem Th59:
R|X c= R
proof
thus [x,y] in R|X implies [x,y] in R by Def11;
end;
theorem Th60:
dom(R|X) c= dom R
proof
let x;
thus thesis by Th57;
end;
theorem Th61:
dom(R|X) = dom R /\ X
proof
x in dom(R|X) iff x in dom R /\ X
proof
x in dom(R|X) iff x in dom R & x in X by Th57;
hence thesis by XBOOLE_0:def 4;
end;
hence thesis by TARSKI:1;
end;
theorem
X c= dom R implies dom(R|X) = X
proof
dom(R|X) = dom R /\ X by Th61;
hence thesis by XBOOLE_1:28;
end;
theorem
(R|X)*P c= R*P by Th30,Th59;
theorem
P*(R|X) c= P*R by Th29,Th59;
theorem
R|X = (id X)*R
proof
let x,y;
[x,y] in R|X iff [x,y] in R & x in X by Def11;
hence thesis by Th48;
end;
theorem
R|X = {} iff dom R misses X
proof
thus R|X = {} implies dom R misses X
proof
assume
A1: R|X = {};
thus dom R /\ X = {}
proof
thus dom R /\ X c= {}
proof
let x be set;
assume
A2: x in (dom R) /\ X;
then x in dom R by XBOOLE_0:def 4;
then
A3: ex y st [x,y] in R by XTUPLE_0:def 12;
x in X by A2,XBOOLE_0:def 4;
hence thesis by A1,A3,Def11;
end;
thus thesis by XBOOLE_1:2;
end;
end;
assume
A4: (dom R) /\ X = {};
let x,y;
hereby
assume
A5: [x,y] in R|X;
then x in X by Def11;
then
A6: not x in dom R by A4,XBOOLE_0:def 4;
[x,y] in R by A5,Def11;
hence [x,y] in {} by A6,XTUPLE_0:def 12;
end;
thus thesis;
end;
theorem Th67:
R|X = R /\ [:X,rng R:]
proof
set P = R /\ [:X,rng R:];
let x,y;
thus [x,y] in R|X implies [x,y] in P
proof
assume
A1: [x,y] in R|X;
then
A2: x in X by Def11;
A3: [x,y] in R by A1,Def11;
then y in rng R by XTUPLE_0:def 13;
then [x,y] in [:X,rng R:] by A2,ZFMISC_1:def 2;
hence thesis by A3,XBOOLE_0:def 4;
end;
assume
A4: [x,y] in P;
then [x,y] in [:X,rng R:] by XBOOLE_0:def 4;
then
A5: x in X by ZFMISC_1:87;
[x,y] in R by A4,XBOOLE_0:def 4;
hence thesis by A5,Def11;
end;
theorem Th68:
dom R c= X implies R|X = R
proof
assume dom R c= X; then
A1: [:dom R,rng R:] c= [:X,rng R:] by ZFMISC_1:95;
R c= [:dom R,rng R:] & R|X = R /\ [:X,rng R:] by Th7,Th67;
hence thesis by A1,XBOOLE_1:1,28;
end;
registration let R;
reduce R|dom R to R;
reducibility by Th68;
end;
theorem
R|dom R = R;
theorem Th70:
rng(R|X) c= rng R
proof
(R|X) c= R by Th59;
hence thesis by Th11;
end;
theorem Th71:
(R|X)|Y = R|(X /\ Y)
proof
let x,y;
A1: [x,y] in R|X iff [x,y] in R & x in X by Def11;
A2: [x,y] in R|(X /\ Y) iff [x,y] in R & x in X /\ Y by Def11;
[x,y] in (R|X)|Y iff [x,y] in R|X & x in Y by Def11;
hence thesis by A1,A2,XBOOLE_0:def 4;
end;
registration let R,X;
reduce R|X|X to R|X;
reducibility
proof
X /\ X = X;
hence thesis by Th71;
end;
end;
theorem
(R|X)|X = R|X;
theorem
X c= Y implies (R|X)|Y = R|X
proof
X c= Y implies X /\ Y = X by XBOOLE_1:28;
hence thesis by Th71;
end;
theorem
Y c= X implies (R|X)|Y = R|Y
proof
Y c= X implies X /\ Y = Y by XBOOLE_1:28;
hence thesis by Th71;
end;
theorem Th75:
X c= Y implies R|X c= R|Y
proof
assume
A1: X c= Y;
let x,y;
assume [x,y] in R|X;
then x in X & [x,y] in R by Def11;
hence [x,y] in R|Y by A1,Def11;
end;
theorem Th76:
P c= R implies P|X c= R|X
proof
assume
A1: P c= R;
let x,y;
assume [x,y] in P|X;
then [x,y] in P & x in X by Def11;
hence thesis by A1,Def11;
end;
theorem Th77:
P c= R & X c= Y implies P|X c= R|Y
proof
assume P c= R & X c= Y;
then P|X c= R|X & R|X c= R|Y by Th75,Th76;
hence thesis by XBOOLE_1:1;
end;
theorem Th78:
R|(X \/ Y) = (R|X) \/ (R|Y)
proof
let x,y;
hereby
assume
A1: [x,y] in R|(X \/ Y);
then x in X \/ Y by Def11; then
A2: x in X or x in Y by XBOOLE_0:def 3;
[x,y] in R by A1,Def11;
then [x,y] in R|X or [x,y] in R|Y by A2,Def11;
hence [x,y] in (R|X) \/ (R|Y) by XBOOLE_0:def 3;
end;
assume
A3: [x,y] in (R|X) \/ (R|Y);
per cases by A3,XBOOLE_0:def 3;
suppose
A4: [x,y] in R|Y;
then x in Y by Def11;
then
A5: x in X \/ Y by XBOOLE_0:def 3;
[x,y] in R by A4,Def11;
hence [x,y] in R|(X \/ Y) by A5,Def11;
end;
suppose
A6: [x,y] in R|X;
then x in X by Def11;
then
A7: x in X \/ Y by XBOOLE_0:def 3;
[x,y] in R by A6,Def11;
hence [x,y] in R|(X \/ Y) by A7,Def11;
end;
end;
theorem
R|(X /\ Y) = (R|X) /\ (R|Y)
proof
let x,y;
hereby
assume
A1: [x,y] in R|(X /\ Y); then
A2: x in X /\ Y by Def11;
A3: [x,y] in R by A1,Def11;
x in Y by A2,XBOOLE_0:def 4; then
A4: [x,y] in R|Y by A3,Def11;
x in X by A2,XBOOLE_0:def 4;
then [x,y] in R|X by A3,Def11;
hence [x,y] in (R|X) /\ (R|Y) by A4,XBOOLE_0:def 4;
end;
assume
A5: [x,y] in (R|X) /\ (R|Y);
then [x,y] in R|Y by XBOOLE_0:def 4; then
A6: x in Y by Def11;
A7: [x,y] in R|X by A5,XBOOLE_0:def 4;
then x in X by Def11; then
A8: x in X /\ Y by A6,XBOOLE_0:def 4;
[x,y] in R by A7,Def11;
hence [x,y] in R|(X /\ Y) by A8,Def11;
end;
theorem Th80:
R|(X \ Y) = R|X \ R|Y
proof
let x,y;
hereby
assume
A1: [x,y] in R|(X \ Y); then
A2: x in X \ Y by Def11;
then not x in Y by XBOOLE_0:def 5;
then
A3: not [x,y] in R|Y by Def11;
[x,y] in R by A1,Def11;
then [x,y] in R|X by A2,Def11;
hence [x,y] in R|X \ R|Y by A3,XBOOLE_0:def 5;
end;
assume
A4: [x,y] in R|X \ R|Y; then
A5: [x,y] in R by Def11;
not [x,y] in R|Y by A4,XBOOLE_0:def 5; then
A6: not x in Y or not [x,y] in R by Def11;
x in X by A4,Def11;
then x in X \ Y by A4,A6,Def11,XBOOLE_0:def 5;
hence [x,y] in R|(X \ Y) by A5,Def11;
end;
registration
let R be empty Relation, X be set;
cluster R|X -> empty;
coherence
proof
for x,y st [x,y] in {}|X holds contradiction by Def11;
hence thesis by Th37;
end;
end;
theorem
R|{} = {};
theorem
{}|X = {};
theorem
(P*R)|X = (P|X)*R
proof
let x,y;
hereby
assume
A1: [x,y] in (P*R)|X;
then [x,y] in P*R by Def11;
then consider a such that
A2: [x,a] in P and
A3: [a,y] in R by Def8;
x in X by A1,Def11;
then [x,a] in P|X by A2,Def11;
hence [x,y] in (P|X)*R by A3,Def8;
end;
assume [x,y] in (P|X)*R;
then consider a such that
A4: [x,a] in P|X and
A5: [a,y] in R by Def8;
[x,a] in P by A4,Def11;
then
A6: [x,y] in P*R by A5,Def8;
x in X by A4,Def11;
hence [x,y] in (P*R)|X by A6,Def11;
end;
definition
let Y,R;
func Y|`R -> Relation means
:Def12:
[x,y] in it iff y in Y & [x,y] in R;
existence
proof
defpred Z[set,set] means $2 in Y & [$1,$2] in R;
consider P such that
A1: for x,y holds [x,y] in P iff x in dom R & y in rng R & Z[x,y] from
RelExistence;
take P;
let x,y;
y in Y & [x,y] in R implies x in dom R & y in rng R
by XTUPLE_0:def 12,def 13;
hence thesis by A1;
end;
uniqueness
proof
let P1,P2;
assume that
A2: [x,y] in P1 iff y in Y & [x,y] in R and
A3: [x,y] in P2 iff y in Y & [x,y] in R;
let x,y;
[x,y] in P1 iff y in Y & [x,y] in R by A2;
hence [x,y] in P1 iff [x,y] in P2 by A3;
end;
end;
registration
let R be Relation, X be empty set;
cluster X|`R -> empty;
coherence
proof
not [x,y] in X|`R by Def12;
hence thesis by Th37;
end;
end;
theorem Th84:
y in rng(Y|`R) iff y in Y & y in rng R
proof
thus y in rng(Y|`R) implies y in Y & y in rng R
proof
assume y in rng(Y|`R);
then consider x such that
A1: [x,y] in Y|`R by XTUPLE_0:def 13;
[x,y] in R by A1,Def12;
hence thesis by A1,Def12,XTUPLE_0:def 13;
end;
assume
A2: y in Y;
assume y in rng R;
then consider x such that
A3: [x,y] in R by XTUPLE_0:def 13;
[x,y] in Y|`R by A2,A3,Def12;
hence thesis by XTUPLE_0:def 13;
end;
theorem Th85:
rng(Y|`R) c= Y
proof
let y;
thus thesis by Th84;
end;
theorem Th86:
Y|`R c= R
proof
thus [x,y] in Y|`R implies [x,y] in R by Def12;
end;
theorem Th87:
rng(Y|`R) c= rng R
proof
Y|`R c= R by Th86;
hence thesis by Th11;
end;
theorem Th88:
rng(Y|`R) = rng R /\ Y
proof
rng(Y|`R) c= Y & rng(Y|`R) c= rng R by Th85,Th87;
hence rng(Y|`R) c= rng R /\ Y by XBOOLE_1:19;
let y;
assume
A1: y in rng R /\ Y;
then y in rng R by XBOOLE_0:def 4;
then consider x such that
A2: [x,y] in R by XTUPLE_0:def 13;
y in Y by A1,XBOOLE_0:def 4;
then [x,y] in Y|`R by A2,Def12;
hence thesis by XTUPLE_0:def 13;
end;
theorem
Y c= rng R implies rng(Y|`R) = Y
proof
assume Y c= rng R;
then rng R /\ Y = Y by XBOOLE_1:28;
hence thesis by Th88;
end;
theorem
(Y|`R)*P c= R*P by Th30,Th86;
theorem
P*(Y|`R) c= P*R by Th29,Th86;
theorem
Y|`R = R*(id Y)
proof
let x,y;
[x,y] in Y|`R iff y in Y & [x,y] in R by Def12;
hence thesis by Th49;
end;
theorem Th93:
Y|`R = R /\ [:dom R,Y:]
proof
set P = R /\ [:dom R,Y:];
let x,y;
thus [x,y] in Y|`R implies [x,y] in P
proof
assume
A1: [x,y] in Y|`R;
then
A2: y in Y by Def12;
A3: [x,y] in R by A1,Def12;
then x in dom R by XTUPLE_0:def 12;
then [x,y] in [:dom R,Y:] by A2,ZFMISC_1:def 2;
hence thesis by A3,XBOOLE_0:def 4;
end;
assume
A4: [x,y] in P;
then [x,y] in [:dom R,Y:] by XBOOLE_0:def 4; then
A5: y in Y by ZFMISC_1:87;
[x,y] in R by A4,XBOOLE_0:def 4;
hence thesis by A5,Def12;
end;
theorem Th94:
rng R c= Y implies Y|`R = R
proof
assume rng R c= Y; then
A1: [:dom R,rng R:] c= [:dom R,Y:] by ZFMISC_1:95;
R c= [:dom R,rng R:] & Y|`R = R /\ [:dom R,Y:] by Th7,Th93;
hence thesis by A1,XBOOLE_1:1,28;
end;
registration let R;
reduce rng R|`R to R;
reducibility by Th94;
end;
theorem
rng R|`R=R;
theorem Th96:
Y|`(X|`R) = (Y /\ X)|`R
proof
let x,y;
A1: [x,y] in X|`R iff [x,y] in R & y in X by Def12;
A2: [x,y] in (Y /\ X)|`R iff [x,y] in R & y in Y /\ X by Def12;
[x,y] in Y|`(X|`R) iff [x,y] in X|`R & y in Y by Def12;
hence thesis by A1,A2,XBOOLE_0:def 4;
end;
registration let Y,R;
reduce Y|`(Y|`R) to Y|`R;
reducibility
proof
Y /\ Y = Y;
hence thesis by Th96;
end;
end;
theorem
Y|`(Y|`R) = Y|`R;
theorem
X c= Y implies Y|`(X|`R) = X|`R
proof
X c= Y implies Y /\ X = X by XBOOLE_1:28;
hence thesis by Th96;
end;
theorem
Y c= X implies Y|`(X|`R) = Y|`R
proof
Y c= X implies Y /\ X = Y by XBOOLE_1:28;
hence thesis by Th96;
end;
theorem Th100:
X c= Y implies X|`R c= Y|`R
proof
assume
A1: X c= Y;
let x,y; [x,y] in X|`R iff [x,y] in R & y in X by Def12;
hence thesis by A1,Def12;
end;
theorem Th101:
P1 c= P2 implies Y|`P1 c= Y|`P2
proof
assume
A1: P1 c= P2;
let x,y;
assume [x,y] in Y|`P1;
then [x,y] in P1 & y in Y by Def12;
hence thesis by A1,Def12;
end;
theorem
P1 c= P2 & Y1 c= Y2 implies Y1|`P1 c= Y2|`P2
proof
assume P1 c= P2 & Y1 c= Y2;
then Y1|`P1 c= Y1|`P2 & Y1|`P2 c= Y2|`P2 by Th100,Th101;
hence thesis by XBOOLE_1:1;
end;
theorem
(X \/ Y)|`R = (X|`R) \/ (Y|`R)
proof
let x,y;
A1: y in X \/ Y iff y in X or y in Y by XBOOLE_0:def 3;
A2: [x,y] in (X|`R) \/ (Y|`R) iff [x,y] in X|`R or [x,y] in Y|`R
by XBOOLE_0:def 3;
[x,y] in (X \/ Y)|`R iff y in X \/ Y & [x,y] in R by Def12;
hence thesis by A1,A2,Def12;
end;
theorem
(X /\ Y)|`R = X|`R /\ Y|`R
proof
let x,y;
A1: y in X /\ Y iff y in X & y in Y by XBOOLE_0:def 4;
A2: [x,y] in X|`R /\ Y|`R iff [x,y] in X|`R & [x,y] in Y|`R by XBOOLE_0:def 4;
[x,y] in (X /\ Y)|`R iff y in X /\ Y & [x,y] in R by Def12;
hence thesis by A1,A2,Def12;
end;
theorem
(X \ Y)|`R = X|`R \ Y|`R
proof
let x,y;
A1: y in X \ Y iff y in X & not y in Y by XBOOLE_0:def 5;
A2: [x,y] in X|`R \ Y|`R iff [x,y] in X|`R & not [x,y] in Y|`R
by XBOOLE_0:def 5;
[x,y] in X|`R iff y in X & [x,y] in R by Def12;
hence thesis by A1,A2,Def12;
end;
theorem
{}|`R = {};
theorem
Y|`{} = {}
proof
for x,y st [x,y] in Y|`{} holds contradiction by Def12;
hence thesis by Th37;
end;
theorem
Y|`(P*R) = P*(Y|`R)
proof
let x,y;
hereby
assume
A1: [x,y] in Y|`(P*R);
then [x,y] in P*R by Def12;
then consider a such that
A2: [x,a] in P and
A3: [a,y] in R by Def8;
y in Y by A1,Def12;
then [a,y] in Y|`R by A3,Def12;
hence [x,y] in P*(Y|`R) by A2,Def8;
end;
assume [x,y] in P*(Y|`R);
then consider a such that
A4: [x,a] in P and
A5: [a,y] in Y|`R by Def8;
[a,y] in R by A5,Def12;
then
A6: [x,y] in P*R by A4,Def8;
y in Y by A5,Def12;
hence [x,y] in Y|`(P*R) by A6,Def12;
end;
theorem
(Y|`R)|X = Y|`(R|X)
proof
let x,y;
A1: [x,y] in R & x in X iff [x,y] in R|X by Def11;
[x,y] in (Y|`R) iff [x,y] in R & y in Y by Def12;
hence thesis by A1,Def11,Def12;
end;
definition
let R,X;
func R.:X -> set means
:Def13:
y in it iff ex x st [x,y] in R & x in X;
existence
proof
defpred Z[set] means ex x st [x,$1] in R & x in X;
consider Y such that
A1: for y holds y in Y iff y in rng R & Z[y] from XBOOLE_0:sch 1;
take Y;
let y;
thus y in Y implies ex x st [x,y] in R & x in X by A1;
given x such that
A2: [x,y] in R and
A3: x in X;
y in rng R by A2,XTUPLE_0:def 13;
hence thesis by A1,A2,A3;
end;
uniqueness
proof
let Y1,Y2;
assume that
A4: y in Y1 iff ex x st [x,y] in R & x in X and
A5: y in Y2 iff ex x st [x,y] in R & x in X;
now
let y;
y in Y1 iff ex x st [x,y] in R & x in X by A4;
hence y in Y1 iff y in Y2 by A5;
end;
hence thesis by TARSKI:1;
end;
end;
theorem Th110:
y in R.:X iff ex x st x in dom R & [x,y] in R & x in X
proof
thus y in R.:X implies ex x st x in dom R & [x,y] in R & x in X
proof
assume y in R.:X;
then consider x such that
A1: [x,y] in R & x in X by Def13;
take x;
thus thesis by A1,XTUPLE_0:def 12;
end;
thus thesis by Def13;
end;
theorem Th111:
R.:X c= rng R
proof
let y;
assume y in R.:X;
then ex x st [x,y] in R & x in X by Def13;
hence thesis by XTUPLE_0:def 13;
end;
theorem
R.:X = R.:(dom R /\ X)
proof
y in R.:X iff y in R.:(dom R /\ X)
proof
thus y in R.:(X) implies y in R.:(dom R /\ X)
proof
assume y in R.:(X);
then consider x such that
A1: x in dom R and
A2: [x,y] in R and
A3: x in X by Th110;
x in dom R /\ X by A1,A3,XBOOLE_0:def 4;
hence thesis by A2,Def13;
end;
assume y in R.:(dom R /\ X);
then consider x such that
x in dom R and
A4: [x,y] in R and
A5: x in dom R /\ X by Th110;
x in X by A5,XBOOLE_0:def 4;
hence thesis by A4,Def13;
end;
hence thesis by TARSKI:1;
end;
theorem Th113:
R.:dom R = rng R
proof
thus R.:dom R c= rng R by Th111;
let y;
assume y in rng R;
then consider x such that
A1: [x,y] in R by XTUPLE_0:def 13;
x in dom R by A1,XTUPLE_0:def 12;
hence thesis by A1,Def13;
end;
theorem
R.:X c= R.:(dom R)
proof
R.:X c= rng R by Th111;
hence thesis by Th113;
end;
theorem
rng(R|X) = R.:X
proof
y in rng(R|X) iff y in R.:X
proof
thus y in rng(R|X) implies y in R.:X
proof
assume y in rng(R|X);
then consider x such that
A1: [x,y] in R|X by XTUPLE_0:def 13;
x in X & [x,y] in R by A1,Def11;
hence thesis by Def13;
end;
assume y in R.:X;
then consider x such that
A2: [x,y] in R & x in X by Def13;
[x,y] in R|X by A2,Def11;
hence thesis by XTUPLE_0:def 13;
end;
hence thesis by TARSKI:1;
end;
registration let R; let X be empty set;
cluster R.:X -> empty;
coherence
proof
set y = the Element of R.:{};
y in R.:{} implies ex x st [x,y] in R & x in {} by Def13;
hence thesis;
end;
end;
registration let R be empty Relation; let X;
cluster R.:X -> empty;
coherence
proof
assume not thesis;
then ex x st [x,the Element of {}.:X] in {} & x in X by Def13;
hence contradiction;
end;
end;
canceled 2;
theorem
R.:X = {} iff dom R misses X
proof
set y = the Element of R.:X;
thus R.:X = {} implies dom R misses X
proof
assume
A1: R.:X = {};
assume not thesis;
then consider x be set such that
A2: x in dom R and
A3: x in X by XBOOLE_0:3;
ex y st [x,y] in R by A2,XTUPLE_0:def 12;
hence contradiction by A1,A2,A3,Th110;
end;
assume
A4: dom R /\ X ={};
assume not thesis;
then ex x st x in dom R & [x,y] in R & x in X by Th110;
hence contradiction by A4,XBOOLE_0:def 4;
end;
theorem
X <> {} & X c= dom R implies R.:X <> {}
proof
assume that
A1: X <> {} and
A2: X c= dom R;
set x = the Element of X;
A3: x in dom R by A1,A2,TARSKI:def 3;
then ex y st [x,y] in R by XTUPLE_0:def 12;
hence thesis by A1,A3,Th110;
end;
theorem
R.:(X \/ Y) = R.:X \/ R.:Y
proof
thus R.:(X \/ Y) c= R.:X \/ R.:Y
proof
let y;
assume y in R.:(X \/ Y);
then consider x such that
A1: [x,y] in R and
A2: x in X \/ Y by Def13;
x in X or x in Y by A2,XBOOLE_0:def 3;
then y in R.:X or y in R.:Y by A1,Def13;
hence y in R.:X \/ R.:Y by XBOOLE_0:def 3;
end;
let y;
assume
A3: y in R.:X \/ R.:Y;
per cases by A3,XBOOLE_0:def 3;
suppose y in R.:Y;
then consider x such that
A4: [x,y] in R and
A5: x in Y by Def13;
x in X \/ Y by A5,XBOOLE_0:def 3;
hence y in R.:(X \/ Y) by A4,Def13;
end;
suppose y in R.:X;
then consider x such that
A6: [x,y] in R and
A7: x in X by Def13;
x in X \/ Y by A7,XBOOLE_0:def 3;
hence y in R.:(X \/ Y) by A6,Def13;
end;
end;
theorem
R.:(X /\ Y) c= R.:X /\ R.:Y
proof
let y;
assume y in R.:(X /\ Y);
then consider x such that
A1: [x,y] in R and
A2: x in X /\ Y by Def13;
x in Y by A2,XBOOLE_0:def 4;
then
A3: y in R.:Y by A1,Def13;
x in X by A2,XBOOLE_0:def 4;
then y in R.:X by A1,Def13;
hence thesis by A3,XBOOLE_0:def 4;
end;
theorem
R.:X \ R.:Y c= R.:(X \ Y)
proof
let y;
assume
A1: y in R.:X \ R.:Y;
then consider x such that
A2: [x,y] in R and
A3: x in X by Def13;
not y in R.:Y by A1,XBOOLE_0:def 5;
then not x in Y or not [x,y] in R by Def13;
then x in X \ Y by A2,A3,XBOOLE_0:def 5;
hence thesis by A2,Def13;
end;
theorem Th123:
X c= Y implies R.:X c= R.:Y
proof
assume
A1: X c= Y;
let y;
assume y in R.:X;
then ex x st [x,y] in R & x in X by Def13;
hence thesis by A1,Def13;
end;
theorem Th124:
P c= R implies P.:X c= R.:X
proof
assume
A1: P c= R;
let y;
assume y in P.:X;
then ex x st [x,y] in P & x in X by Def13;
hence thesis by A1,Def13;
end;
theorem
P c= R & X c= Y implies P.:X c= R.:Y
proof
assume P c= R & X c= Y;
then P.:X c= R.:X & R.:X c= R.:Y by Th123,Th124;
hence thesis by XBOOLE_1:1;
end;
theorem
(P*R).:X = R.:(P.:X)
proof
y in (P*R).:X iff y in R.:(P.:X)
proof
thus y in (P*R).:X implies y in R.:(P.:X)
proof
assume y in (P*R).:X;
then consider x such that
A1: [x,y] in P*R and
A2: x in X by Def13;
consider z such that
A3: [x,z] in P and
A4: [z,y] in R by A1,Def8;
z in P.:X by A2,A3,Def13;
hence thesis by A4,Def13;
end;
assume y in R.:(P.:X);
then consider x such that
A5: [x,y] in R and
A6: x in P.:X by Def13;
consider z such that
A7: [z,x] in P and
A8: z in X by A6,Def13;
[z,y] in P*R by A5,A7,Def8;
hence thesis by A8,Def13;
end;
hence thesis by TARSKI:1;
end;
theorem Th127:
rng(P*R) = R.:(rng P)
proof
z in rng(P*R) iff z in R.:(rng P)
proof
thus z in rng(P*R) implies z in R.:(rng P)
proof
assume z in rng(P*R);
then consider x such that
A1: [x,z] in P*R by XTUPLE_0:def 13;
consider y such that
A2: [x,y] in P and
A3: [y,z] in R by A1,Def8;
y in rng P by A2,XTUPLE_0:def 13;
hence thesis by A3,Def13;
end;
assume z in R.:(rng P);
then consider y such that
A4: [y,z] in R and
A5: y in rng P by Def13;
consider x such that
A6: [x,y] in P by A5,XTUPLE_0:def 13;
[x,z] in P*R by A4,A6,Def8;
hence thesis by XTUPLE_0:def 13;
end;
hence thesis by TARSKI:1;
end;
theorem
(R|X).:Y c= R.:Y by Th59,Th124;
theorem Th129:
for R be Relation, X, Y be set st X c= Y holds (R|Y).:X = R.:X
proof
let R be Relation, X, Y be set such that
A1: X c= Y;
thus (R|Y).:X c= R.:X by Th59,Th124;
let y be set;
assume y in R.:X;
then consider x1 be set such that
A2: [x1,y] in R and
A3: x1 in X by Def13;
ex x be set st [x,y] in R|Y & x in X
proof
take x1;
thus [x1,y] in R|Y by A1,A2,A3,Def11;
thus thesis by A3;
end;
hence thesis by Def13;
end;
theorem
(dom R) /\ X c= (R~).:(R.:X)
proof
let x;
assume
A1: x in (dom R) /\ X;
then x in dom R by XBOOLE_0:def 4;
then consider y such that
A2: [x,y] in R by XTUPLE_0:def 12;
A3: [y,x] in R~ by A2,Def7;
x in X by A1,XBOOLE_0:def 4;
then y in R.:X by A2,Def13;
hence thesis by A3,Def13;
end;
definition
let R,Y;
func R"Y -> set means
:Def14:
x in it iff ex y st [x,y] in R & y in Y;
existence
proof
defpred Z[set] means ex y st [$1,y] in R & y in Y;
consider X such that
A1: for x holds x in X iff x in dom R & Z[x] from XBOOLE_0:sch 1;
take X;
let x;
thus x in X implies ex y st [x,y] in R & y in Y by A1;
given y such that
A2: [x,y] in R and
A3: y in Y;
x in dom R by A2,XTUPLE_0:def 12;
hence thesis by A1,A2,A3;
end;
uniqueness
proof
let X1,X2;
assume that
A4: x in X1 iff ex y st [x,y] in R & y in Y and
A5: x in X2 iff ex y st [x,y] in R & y in Y;
now
let x;
x in X1 iff ex y st [x,y] in R & y in Y by A4;
hence x in X1 iff x in X2 by A5;
end;
hence thesis by TARSKI:1;
end;
end;
theorem Th131:
x in R"Y iff ex y st y in rng R & [x,y] in R & y in Y
proof
thus x in R"Y implies ex y st y in rng R & [x,y] in R & y in Y
proof
assume x in R"Y;
then consider y such that
A1: [x,y] in R & y in Y by Def14;
take y;
thus thesis by A1,XTUPLE_0:def 13;
end;
thus thesis by Def14;
end;
theorem Th132:
R"Y c= dom R
proof
let x;
assume x in R"Y;
then ex y st [x,y] in R & y in Y by Def14;
hence thesis by XTUPLE_0:def 12;
end;
theorem
R"Y = R"(rng R /\ Y)
proof
x in R"Y iff x in R"(rng R /\ Y)
proof
thus x in R"Y implies x in R"(rng R /\ Y)
proof
assume x in R"Y;
then consider y such that
A1: y in rng R and
A2: [x,y] in R and
A3: y in Y by Th131;
y in rng R /\ Y by A1,A3,XBOOLE_0:def 4;
hence thesis by A2,Def14;
end;
assume x in R"(rng R /\ Y);
then consider y such that
y in rng R and
A4: [x,y] in R and
A5: y in rng R /\ Y by Th131;
y in Y by A5,XBOOLE_0:def 4;
hence thesis by A4,Def14;
end;
hence thesis by TARSKI:1;
end;
theorem Th134:
R"rng R = dom R
proof
thus R"rng R c= dom R by Th132;
let x;
assume x in dom R;
then consider y such that
A1: [x,y] in R by XTUPLE_0:def 12;
y in rng R by A1,XTUPLE_0:def 13;
hence thesis by A1,Def14;
end;
theorem
R"Y c= R"rng R
proof
R"Y c= dom R by Th132;
hence thesis by Th134;
end;
registration let R; let Y be empty set;
cluster R"Y -> empty;
coherence
proof
set x = the Element of R"{};
x in R"{} implies ex y st [x,y] in R & y in {} by Def14;
hence thesis;
end;
end;
registration let R be empty Relation; let Y;
cluster R"Y -> empty;
coherence
proof
assume not thesis;
then ex y st [the Element of {}"Y,y] in {} & y in Y by Def14;
hence contradiction;
end;
end;
canceled 2;
theorem
R"Y = {} iff rng R misses Y
proof
set x = the Element of R"Y;
thus R"Y = {} implies rng R misses Y
proof
assume
A1: R"Y = {};
assume not thesis;
then consider y being set such that
A2: y in rng R and
A3: y in Y by XBOOLE_0:3;
ex x st [x,y] in R by A2,XTUPLE_0:def 13;
hence contradiction by A1,A2,A3,Th131;
end;
assume
A4: rng R /\ Y = {};
assume not thesis;
then ex y st y in rng R & [x,y] in R & y in Y by Th131;
hence contradiction by A4,XBOOLE_0:def 4;
end;
theorem
Y <> {} & Y c= rng R implies R"Y <> {}
proof
assume that
A1: Y <> {} and
A2: Y c= rng R;
set y = the Element of Y;
A3: y in rng R by A1,A2,TARSKI:def 3;
then ex x st [x,y] in R by XTUPLE_0:def 13;
hence thesis by A1,A3,Th131;
end;
theorem
R"(X \/ Y) = R"X \/ R"Y
proof
thus R"(X \/ Y) c= R"X \/ R"Y
proof
let x;
assume x in R"(X \/ Y);
then consider y such that
A1: [x,y] in R and
A2: y in X \/ Y by Def14;
y in X or y in Y by A2,XBOOLE_0:def 3;
then x in R"X or x in R"Y by A1,Def14;
hence x in R"X \/ R"Y by XBOOLE_0:def 3;
end;
let x;
assume
A3: x in R"X \/ R"Y;
per cases by A3,XBOOLE_0:def 3;
suppose x in R"Y;
then consider y such that
A4: [x,y] in R and
A5: y in Y by Def14;
y in X \/ Y by A5,XBOOLE_0:def 3;
hence x in R"(X \/ Y) by A4,Def14;
end;
suppose x in R"X;
then consider y such that
A6: [x,y] in R and
A7: y in X by Def14;
y in X \/ Y by A7,XBOOLE_0:def 3;
hence x in R"(X \/ Y) by A6,Def14;
end;
end;
theorem
R"(X /\ Y) c= R"X /\ R"Y
proof
let x;
assume x in R"(X /\ Y);
then consider y such that
A1: [x,y] in R and
A2: y in X /\ Y by Def14;
y in Y by A2,XBOOLE_0:def 4;
then
A3: x in R"Y by A1,Def14;
y in X by A2,XBOOLE_0:def 4;
then x in R"X by A1,Def14;
hence thesis by A3,XBOOLE_0:def 4;
end;
theorem
R"X \ R"Y c= R"(X \ Y)
proof
let x;
assume
A1: x in R"X \ R"Y;
then consider y such that
A2: [x,y] in R and
A3: y in X by Def14;
not x in R"Y by A1,XBOOLE_0:def 5;
then not y in Y or not [x,y] in R by Def14;
then y in X \ Y by A2,A3,XBOOLE_0:def 5;
hence thesis by A2,Def14;
end;
theorem Th143:
X c= Y implies R"X c= R"Y
proof
assume
A1: X c= Y;
let x;
assume x in R"X;
then ex y st [x,y] in R & y in X by Def14;
hence thesis by A1,Def14;
end;
theorem Th144:
P c= R implies P"Y c= R"Y
proof
assume
A1: P c= R;
let x;
assume x in P"Y;
then ex y st [x,y] in P & y in Y by Def14;
hence thesis by A1,Def14;
end;
theorem
P c= R & X c= Y implies P"X c= R"Y
proof
assume P c= R & X c= Y;
then P"X c= R"X & R"X c= R"Y by Th143,Th144;
hence thesis by XBOOLE_1:1;
end;
theorem
(P*R)"Y = P"(R"Y)
proof
x in (P*R)"Y iff x in P"(R"Y)
proof
thus x in (P*R)"Y implies x in P"(R"Y)
proof
assume x in (P*R)"Y;
then consider y such that
A1: [x,y] in P*R and
A2: y in Y by Def14;
consider z such that
A3: [x,z] in P and
A4: [z,y] in R by A1,Def8;
z in R"Y by A2,A4,Def14;
hence thesis by A3,Def14;
end;
assume x in P"(R"Y);
then consider y such that
A5: [x,y] in P and
A6: y in R"Y by Def14;
consider z such that
A7: [y,z] in R and
A8: z in Y by A6,Def14;
[x,z] in P*R by A5,A7,Def8;
hence thesis by A8,Def14;
end;
hence thesis by TARSKI:1;
end;
theorem Th147:
dom(P*R) = P"(dom R)
proof
z in dom(P*R) iff z in P"(dom R)
proof
thus z in dom(P*R) implies z in P"(dom R)
proof
assume z in dom(P*R);
then consider x such that
A1: [z,x] in P*R by XTUPLE_0:def 12;
consider y such that
A2: [z,y] in P and
A3: [y,x] in R by A1,Def8;
y in dom R by A3,XTUPLE_0:def 12;
hence thesis by A2,Def14;
end;
assume z in P"(dom R);
then consider y such that
A4: [z,y] in P and
A5: y in dom R by Def14;
consider x such that
A6: [y,x] in R by A5,XTUPLE_0:def 12;
[z,x] in P*R by A4,A6,Def8;
hence thesis by XTUPLE_0:def 12;
end;
hence thesis by TARSKI:1;
end;
theorem
(rng R) /\ Y c= (R~)"(R"Y)
proof
let y;
assume
A1: y in (rng R) /\ Y;
then y in rng R by XBOOLE_0:def 4;
then consider x such that
A2: [x,y] in R by XTUPLE_0:def 13;
A3: [y,x] in R~ by A2,Def7;
y in Y by A1,XBOOLE_0:def 4;
then x in R"Y by A2,Def14;
hence thesis by A3,Def14;
end;
begin
definition
let R;
attr R is empty-yielding means
:Def15:
rng R c= {{}};
end;
theorem
R is empty-yielding iff for X st X in rng R holds X = {}
proof
hereby
assume R is empty-yielding;
then rng R c= {{}} by Def15;
hence for X st X in rng R holds X = {} by TARSKI:def 1;
end;
assume
A1: for X st X in rng R holds X = {};
let Y;
assume Y in rng R;
then Y = {} by A1;
hence thesis by TARSKI:def 1;
end;
theorem
for f,g being Relation, A,B being set st f|A = g|A & f|B = g|B holds
f|(A \/ B) = g|(A \/ B)
proof
let f,g be Relation, A,B be set;
assume f|A = g|A & f|B = g|B;
hence f|(A \/ B) = g|A \/ g|B by Th78
.= g|(A \/ B) by Th78;
end;
theorem
for X being set, f,g being Relation st dom g c= X & g c= f holds g c= f|X
proof
let X be set, f,g be Relation;
assume dom g c= X & g c= f;
then g|dom g c= f|X by Th77;
hence thesis;
end;
theorem
for f being Relation, X being set st X misses dom f holds f|X = {}
proof
let f be Relation, X be set such that
A1: X /\ dom f = {};
thus f|X = (f|dom f)|X
.= f|({} qua set) by A1,Th71
.= {};
end;
theorem
for f,g being Relation, A,B being set st A c= B & f|B = g|B holds f|A = g|A
proof
let f,g be Relation, A,B be set;
assume that
A1: A c= B and
A2: f|B = g|B;
A3: A = B /\ A by A1,XBOOLE_1:28;
hence f|A = (f|B)|A by Th71
.= g|A by A2,A3,Th71;
end;
theorem
R|dom S = R|dom(S|dom R)
proof
thus R|dom S = R|dom R|dom S
.= R|(dom S /\ dom R) by Th71
.= R|dom(S|dom R) by Th61;
end;
registration
cluster empty -> empty-yielding for Relation;
coherence
proof
let R be Relation;
assume R is empty;
then rng R = {};
hence rng R c= {{}} by XBOOLE_1:2;
end;
end;
registration
let R be empty-yielding Relation;
let X be set;
cluster R|X -> empty-yielding;
coherence
proof
rng R c= {{}} & rng(R|X) c= rng R by Def15,Th70;
hence rng(R|X) c= {{}} by XBOOLE_1:1;
end;
end;
theorem
R|X is non empty-yielding implies R is non empty-yielding;
definition
let R be Relation, x be set;
func Im(R,x) equals
R.:{x};
correctness;
end;
scheme
ExtensionalityR { A, B() -> Relation, P[set,set] }: A() = B()
provided
A1: for a, b being set holds [a,b] in A() iff P[a,b] and
A2: for a, b being set holds [a,b] in B() iff P[a,b]
proof
let y,z be set;
hereby
assume [y,z] in A();
then P[y,z] by A1;
hence [y,z] in B() by A2;
end;
assume [y,z] in B();
then P[y,z] by A2;
hence thesis by A1;
end;
theorem
dom (R | (dom R \ X)) = dom R \ X
proof
thus dom (R | (dom R \ X)) = dom R /\ (dom R \ X) by Th61
.= (dom R /\ dom R) \ X by XBOOLE_1:49
.= dom R \ X;
end;
theorem
R | X = R | (dom R /\ X)
proof
thus R | X = (R | dom R) | X
.= R | (dom R /\ X) by Th71;
end;
theorem
dom [:X,Y:] c= X
proof
let x;
assume x in dom [:X,Y:];
then ex y st [x,y] in [:X,Y:] by XTUPLE_0:def 12;
hence thesis by ZFMISC_1:87;
end;
theorem
rng [:X,Y:] c= Y
proof
let x;
assume x in rng [:X,Y:];
then ex y st [y,x] in [:X,Y:] by XTUPLE_0:def 13;
hence thesis by ZFMISC_1:87;
end;
theorem
X <> {} & Y <> {} implies dom [:X,Y:] = X & rng [:X,Y:] = Y
proof
assume X <> {};
then consider a such that
A1: a in X by XBOOLE_0:def 1;
assume Y <> {};
then consider b such that
A2: b in Y by XBOOLE_0:def 1;
A3: now
let x;
assume x in X;
then [x,b] in [:X,Y:] by A2,ZFMISC_1:87;
hence ex y st [x,y] in [:X,Y:];
end;
(ex y st [x,y] in [:X,Y:]) implies x in X by ZFMISC_1:87;
hence dom[:X,Y:] = X by A3,XTUPLE_0:def 12;
A4: now
let y;
assume y in Y;
then [a,y] in [:X,Y:] by A1,ZFMISC_1:87;
hence ex x st [x,y] in [:X,Y:];
end;
(ex x st [x,y] in [:X,Y:]) implies y in Y by ZFMISC_1:87;
hence thesis by A4,XTUPLE_0:def 13;
end;
theorem
dom R = {} & dom Q = {} implies R = Q
proof
assume that
A1: dom R = {} and
A2: dom Q = {};
R = {} by A1;
hence thesis by A2;
end;
theorem
rng R = {} & rng Q = {} implies R = Q
proof
assume that
A1: rng R = {} and
A2: rng Q = {};
R = {} by A1;
hence thesis by A2;
end;
theorem
dom R = dom Q implies dom(S*R) = dom (S*Q)
proof
assume
A1: dom R = dom Q;
thus dom(S*R) = S"dom R by Th147
.= dom (S*Q) by A1,Th147;
end;
theorem
rng R = rng Q implies rng(R*S) = rng (Q*S)
proof
assume
A1: rng R = rng Q;
thus rng(R*S) = S.:rng R by Th127
.= rng (Q*S) by A1,Th127;
end;
definition
let R be Relation, x be set;
func Coim(R,x) equals
R"{x};
coherence;
end;
registration
let R be trivial Relation;
cluster dom R -> trivial;
coherence
proof
let x,y;
assume x in dom R;
then consider a such that
A1: [x,a] in R by XTUPLE_0:def 12;
assume y in dom R;
then consider b such that
A2: [y,b] in R by XTUPLE_0:def 12;
[x,a] = [y,b] by A1,A2,ZFMISC_1:def 10;
hence thesis by XTUPLE_0:1;
end;
end;
registration
let R be trivial Relation;
cluster rng R -> trivial;
coherence
proof
let x,y;
assume x in rng R;
then consider a such that
A1: [a,x] in R by XTUPLE_0:def 13;
assume y in rng R;
then consider b such that
A2: [b,y] in R by XTUPLE_0:def 13;
[a,x] = [b,y] by A1,A2,ZFMISC_1:def 10;
hence thesis by XTUPLE_0:1;
end;
end;
theorem
rng R c= dom (S|X) implies R*(S|X) = R*S
proof
assume
A1: rng R c= dom (S|X);
let a,b;
R*(S|X) c= R*S by Th29,Th59;
hence [a,b] in R*(S|X) implies [a,b] in R*S;
assume [a,b] in R*S;
then consider c such that
A2: [a,c] in R and
A3: [c,b] in S by Def8;
c in rng R by A2,XTUPLE_0:def 13;
then c in X by A1,Th57;
then [c,b] in S|X by A3,Def11;
hence thesis by A2,Def8;
end;
theorem
Q|A = R|A implies Q.:A = R.:A
proof
assume Q|A = R|A;
hence Q.:A = (R|A).:A by Th129
.= R.:A by Th129;
end;
definition
let X,R;
attr R is X-defined means
:Def18:
dom R c= X;
attr R is X-valued means
:Def19:
rng R c= X;
end;
Lm1:
{} is X-defined Y-valued
proof
thus dom{} c= X & rng{} c= Y by XBOOLE_1:2;
end;
registration
let X,Y;
cluster X-defined Y-valued for Relation;
existence
proof
take {};
thus thesis by Lm1;
end;
end;
theorem
for D being set, R being D-valued Relation for y being set st y in rng R
holds y in D
proof
let D be set, R be D-valued Relation;
rng R c= D by Def19;
hence thesis;
end;
registration
let X,A;
let R be A-valued Relation;
cluster R|X -> A-valued;
coherence
proof
rng(R|X) c= rng R & rng R c= A by Def19,Th70;
hence rng(R|X) c= A by XBOOLE_1:1;
end;
end;
registration
let X,A;
let R be A-defined Relation;
cluster R|X -> A-defined X-defined;
coherence
proof
dom(R|X) c= dom R & dom R c= A by Def18,Th60;
hence dom(R|X) c= A by XBOOLE_1:1;
thus dom(R|X) c= X by Th58;
end;
end;
registration
let X;
cluster id X -> X-defined X-valued;
coherence
proof
thus dom id X c= X & rng id X c= X;
end;
end;
registration
let A be set;
let R be A-valued Relation, S be Relation;
cluster S*R -> A-valued;
coherence
proof
rng R c= A & rng(S*R) c= rng R by Def19,Th26;
hence rng(S*R) c= A by XBOOLE_1:1;
end;
end;
registration
let A be set;
let R be A-defined Relation, S be Relation;
cluster R*S -> A-defined;
coherence
proof
dom R c= A & dom(R*S) c= dom R by Def18,Th25;
hence dom(R*S) c= A by XBOOLE_1:1;
end;
end;
theorem
x in X implies Im([:X,Y:],x) = Y proof assume
A1: x in X;
thus Im([:X,Y:],x) c= Y proof let y;
assume y in Im([:X,Y:],x);
then ex z st [z,y] in [:X,Y:] & z in {x} by Def13;
hence y in Y by ZFMISC_1:87;
end;
let y;
assume y in Y;
then
A2: [x,y] in [:X,Y:] by A1,ZFMISC_1:87;
x in {x} by TARSKI:def 1;
hence y in Im([:X,Y:],x) by A2,Def13;
end;
theorem Th169:
[x,y] in R iff y in Im(R,x)
proof
thus [x,y] in R implies y in Im(R,x)
proof
x in {x} by TARSKI:def 1;
hence thesis by Def13;
end;
assume y in Im(R,x);
then ex z st [z,y] in R & z in {x} by Def13;
hence [x,y] in R by TARSKI:def 1;
end;
theorem
x in dom R iff Im(R,x) <> {}
proof
thus x in dom R implies Im(R,x) <> {}
proof
assume x in dom R;
then ex y st [x,y] in R by XTUPLE_0:def 12;
hence Im(R,x) <> {} by Th169;
end;
assume Im(R,x) <> {};
then consider y such that
A1: y in Im(R,x) by XBOOLE_0:def 1;
[x,y] in R by A1,Th169;
hence x in dom R by XTUPLE_0:def 12;
end;
theorem
{} is X-defined Y-valued by Lm1;
registration
cluster empty -> non-empty for Relation;
coherence
proof let R be Relation;
assume R is empty;
hence not {} in rng R;
end;
end;
registration let X be set, R be X-defined Relation;
cluster -> X-defined for Subset of R;
coherence
proof let S be Subset of R;
A1: dom R c= X by Def18;
dom S c= dom R by Th11;
hence dom S c= X by A1,XBOOLE_1:1;
end;
end;
registration let X be set, R be X-valued Relation;
cluster -> X-valued for Subset of R;
coherence
proof let S be Subset of R;
A1: rng R c= X by Def19;
rng S c= rng R by Th11;
hence rng S c= X by A1,XBOOLE_1:1;
end;
end;
theorem
X misses Y implies R|X|Y = {}
proof
assume X misses Y;
then X /\ Y = {} by XBOOLE_0:def 7;
hence R|X|Y = R|({} qua set) by Th71
.= {};
end;
theorem
field {[x,x]} = {x}
proof
thus field {[x,x]} = {x,x} by Th17
.= {x} by ENUMSET1:29;
end;
registration let X; let R be X-defined Relation;
reduce R|X to R;
reducibility
proof
dom R c= X by Def18;
hence R|X = R by Th68;
end;
end;
registration let Y; let R be Y-valued Relation;
reduce Y|`R to R;
reducibility
proof
rng R c= Y by Def19;
hence Y|`R = R by Th94;
end;
end;
theorem
for R being X-defined Relation holds R = R|X;
theorem
for S being Relation, R being X-defined Relation st R c= S holds R c= S|X
proof let S be Relation, R be X-defined Relation;
R = R|X;
hence thesis by Th76;
end;
theorem Th176:
dom R c= X implies R \ (R|A) = R|(X\A)
proof
assume dom R c= X;
hence R \ (R|A) = R|X \ R|A by Th68
.= R|(X\A) by Th80;
end;
theorem Th177:
dom(R \ (R|A)) = dom R \ A
proof
R \ (R|A) = R|(dom R \ A) by Th176;
hence dom(R \ (R|A)) = dom R /\ (dom R \ A) by Th61
.= (dom R /\ dom R) \ A by XBOOLE_1:49
.= dom R \ A;
end;
theorem
dom R \ dom(R|A) = dom(R \ (R|A))
proof
thus dom R \ dom(R|A) = dom R \ A /\ dom R by Th61
.= dom R \ A by XBOOLE_1:47
.= dom(R \ (R|A)) by Th177;
end;
theorem
dom R misses dom S implies R misses S
proof
assume
A1: dom R misses dom S;
assume R meets S;
then consider x such that
A2:x in R and
A3:x in S by XBOOLE_0:3;
consider y,z such that
A4:x = [y,z] by A2,Def1;
y in dom R & y in dom S by A2,A3,A4,XTUPLE_0:def 12;
hence contradiction by A1,XBOOLE_0:3;
end;
theorem
rng R misses rng S implies R misses S
proof
assume
A1:rng R misses rng S;
assume R meets S;
then consider x such that
A2: x in R and
A3: x in S by XBOOLE_0:3;
consider y,z such that
A4: x = [y,z] by A2,Def1;
z in rng R & z in rng S by A2,A3,A4,XTUPLE_0:def 13;
hence contradiction by A1,XBOOLE_0:3;
end;
theorem
X c= Y implies (R \ R|Y)|X = {}
proof
assume
A1: X c= Y;
dom R /\ X c= X by XBOOLE_1:17; then
A2: dom R /\ X c= Y by A1,XBOOLE_1:1;
dom(R \ R|Y) = dom R \ Y by Th177;
then dom((R \ R|Y)|X) =(dom R \ Y) /\ X by Th61
.= dom R /\ X \ Y by XBOOLE_1:49
.= {} by A2,XBOOLE_1:37;
hence (R \ R|Y)|X = {};
end;
theorem
X c= Y implies
for R being X-defined Relation holds R is Y-defined
proof assume
A1: X c= Y;
let R be X-defined Relation;
dom R c= X by Def18;
hence dom R c= Y by A1,XBOOLE_1:1;
end;
theorem
X c= Y implies
for R being X-valued Relation holds R is Y-valued
proof assume
A1: X c= Y;
let R be X-valued Relation;
rng R c= X by Def19;
hence rng R c= Y by A1,XBOOLE_1:1;
end;
theorem
R c= S iff R c= S|dom R
proof
thus R c= S implies R c= S|dom R
proof
assume R c= S;
then R|dom R c= S|dom R by Th76;
hence thesis;
end;
S|dom R c= S by Th59;
hence thesis by XBOOLE_1:1;
end;
theorem
for R being X-defined Y-valued Relation holds R c= [:X,Y:]
proof
let R be X-defined Y-valued Relation;
A1: R c= [:dom R,rng R:] by Th7;
dom R c= X & rng R c= Y by Def18,Def19;
then [:dom R,rng R:] c= [:X,Y:] by ZFMISC_1:96;
hence thesis by A1,XBOOLE_1:1;
end;
theorem Th186:
dom(X|`R) c= dom R
proof
X|`R c= R by Th86;
hence thesis by Th11;
end;
registration
let A,X;
let R be A-defined Relation;
cluster X|`R -> A-defined;
coherence
proof
dom(X|`R) c= dom R & dom R c= A by Def18,Th186;
hence dom(X|`R) c= A by XBOOLE_1:1;
end;
end;
registration
let X,A;
let R be A-valued Relation;
cluster X|`R -> A-valued X-valued;
coherence
proof
rng(X|`R) c= rng R & rng R c= A by Def19,Th87;
hence rng(X|`R) c= A by XBOOLE_1:1;
thus rng(X|`R) c= X by Th85;
end;
end;
registration
let X be empty set;
cluster -> empty for X-defined Relation;
coherence
proof let R be X-defined Relation;
dom R c= X by Def18;
hence thesis by XBOOLE_1:3;
end;
cluster -> empty for X-valued Relation;
coherence
proof let R be X-valued Relation;
rng R c= X by Def19;
hence thesis by XBOOLE_1:3;
end;
end;
begin
reserve X,X1,X2,Y,Y1,Y2,p,x,x1,x2,y,y1,y2,z,z1,z2 for set;
definition
let X be set;
attr X is Function-like means
:Def1:
for x,y1,y2 st [x,y1] in X & [x,y2] in X holds y1 = y2;
end;
registration
cluster empty -> Function-like for set;
coherence
proof
let f be set;
assume f is empty;
hence for x,y1,y2 st [x,y1] in f & [x,y2] in f holds y1 = y2;
end;
end;
registration
cluster Function-like for Relation;
existence
proof
take {};
thus thesis;
end;
end;
definition
mode Function is Function-like Relation;
end;
registration
let a, b be set;
cluster {[a,b]} -> Function-like;
coherence
proof
set X = {[a, b]};
A1: [:{a},{b}:] = X by ZFMISC_1:29;
for x,y1,y2 be set st [x,y1] in X & [x,y2] in X holds y1 = y2
proof
let x,y1,y2 be set such that
A2: [x,y1] in X and
A3: [x,y2] in X;
y1 = b by A1,A2,ZFMISC_1:28;
hence thesis by A1,A3,ZFMISC_1:28;
end;
hence thesis by Def1;
end;
end;
reserve f,g,g1,g2,h for Function,
R,S for Relation;
scheme
GraphFunc { A()->set,P[set,set] } :
ex f st for x,y holds [x,y] in f iff x in A() & P[x,y]
provided
A1: for x,y1,y2 st P[x,y1] & P[x,y2] holds y1 = y2
proof
consider Y such that
A2: for y holds y in Y iff ex x st x in A() & P[x,y] from TARSKI:sch 1(A1);
defpred R[set] means ex x,y st [x,y] = $1 & P[x,y];
consider F being set such that
A3: p in F iff p in [:A(),Y:] & R[p] from XBOOLE_0:sch 1;
now
thus p in F implies ex x,y st [x,y] = p
proof
p in F implies ex x,y st [x,y] = p & P[x,y] by A3;
hence thesis;
end;
let x,y1,y2;
assume [x,y1] in F;
then consider x1,z1 such that
A4: [x1,z1] = [x,y1] and
A5: P[x1,z1] by A3;
A6: x = x1 & z1 = y1 by A4,XTUPLE_0:1;
assume [x,y2] in F;
then consider x2,z2 such that
A7: [x2,z2] = [x,y2] and
A8: P[x2,z2] by A3;
x = x2 & z2 = y2 by A7,XTUPLE_0:1;
hence y1 = y2 by A1,A5,A8,A6;
end;
then reconsider f = F as Function by Def1,RELAT_1:def 1;
take f;
let x,y;
thus [x,y] in f implies x in A() & P[x,y]
proof
assume
A9: [x,y] in f;
then consider x1,y1 such that
A10: [x1,y1] = [x,y] and
A11: P[x1,y1] by A3;
[x,y] in [:A(),Y:] by A3,A9;
hence x in A() by ZFMISC_1:87;
x1 = x by A10,XTUPLE_0:1;
hence thesis by A10,A11,XTUPLE_0:1;
end;
assume that
A12: x in A() and
A13: P[x,y];
y in Y by A2,A12,A13;
then [x,y] in [:A(),Y:] by A12,ZFMISC_1:87;
hence thesis by A3,A13;
end;
definition
let f,x;
func f.x -> set means
:Def2:
[x,it] in f if x in dom f otherwise it = {};
existence by XTUPLE_0:def 12;
uniqueness by Def1;
consistency;
end;
theorem Th1:
[x,y] in f iff x in dom f & y = f.x
proof
thus [x,y] in f implies x in dom f & y = f.x
proof
assume
A1: [x,y] in f;
hence x in dom f by XTUPLE_0:def 12;
hence thesis by A1,Def2;
end;
thus thesis by Def2;
end;
theorem Th2:
dom f = dom g & (for x st x in dom f holds f.x = g.x) implies f = g
proof
assume that
A1: dom f = dom g and
A2: for x st x in dom f holds f.x = g.x;
let x,y;
thus [x,y] in f implies [x,y] in g
proof
assume
A3: [x,y] in f;
then
A4: x in dom f by XTUPLE_0:def 12;
then f.x = y by A3,Def2;
then g.x = y by A2,A4;
hence thesis by A1,A4,Def2;
end;
assume
A5: [x,y] in g;
then
A6: x in dom g by XTUPLE_0:def 12;
then g.x = y by A5,Def2;
then f.x = y by A1,A2,A6;
hence thesis by A1,A6,Def2;
end;
definition
let f;
redefine func rng f means
:Def3:
for y holds y in it iff ex x st x in dom f & y = f.x;
compatibility
proof
let Y;
hereby
assume
A1: Y = rng f;
let y;
hereby
assume y in Y;
then consider x such that
A2: [x,y] in f by A1,XTUPLE_0:def 13;
take x;
thus x in dom f & y = f.x by A2,Th1;
end;
given x such that
A3: x in dom f & y = f.x;
[x,y] in f by A3,Def2;
hence y in Y by A1,XTUPLE_0:def 13;
end;
assume
A4: for y holds y in Y iff ex x st x in dom f & y = f.x;
hereby
let y;
assume y in Y;
then consider x such that
A5: x in dom f & y = f.x by A4;
[x,y] in f by A5,Def2;
hence y in rng f by XTUPLE_0:def 13;
end;
let y;
assume y in rng f;
then consider x such that
A6: [x,y] in f by XTUPLE_0:def 13;
x in dom f & y = f.x by A6,Th1;
hence thesis by A4;
end;
end;
theorem
x in dom f implies f.x in rng f by Def3;
theorem Th4:
dom f = {x} implies rng f = {f.x}
proof
assume
A1: dom f = {x};
y in rng f iff y in {f.x}
proof
thus y in rng f implies y in {f.x}
proof
assume y in rng f;
then consider z such that
A2: z in dom f and
A3: y = f.z by Def3;
z = x by A1,A2,TARSKI:def 1;
hence thesis by A3,TARSKI:def 1;
end;
assume y in {f.x};
then
A4: y = f.x by TARSKI:def 1;
x in dom f by A1,TARSKI:def 1;
hence thesis by A4,Def3;
end;
hence thesis by TARSKI:1;
end;
scheme
FuncEx { A()->set,P[set,set] } :
ex f st dom f = A() & for x st x in A() holds P[x,f.x]
provided
A1: for x,y1,y2 st x in A() & P[x,y1] & P[x,y2] holds y1 = y2 and
A2: for x st x in A() ex y st P[x,y]
proof
defpred R[set,set] means $1 in A() & P[$1,$2];
A3: for x,y1,y2 st R[x,y1] & R[x,y2] holds y1 = y2 by A1;
consider f being Function such that
A4: for x,y holds [x,y] in f iff x in A() & R[x,y] from GraphFunc(A3);
take f;
x in dom f iff x in A()
proof
thus x in dom f implies x in A()
proof
assume x in dom f;
then ex y st [x,y] in f by XTUPLE_0:def 12;
hence thesis by A4;
end;
assume
A5: x in A();
then consider y such that
A6: P[x,y] by A2;
[x,y] in f by A4,A5,A6;
hence thesis by XTUPLE_0:def 12;
end;
hence
A7: dom f = A() by TARSKI:1;
let x;
assume
A8: x in A();
then consider y such that
A9: P[x,y] by A2;
[x,y] in f by A4,A8,A9;
hence thesis by A7,A8,A9,Def2;
end;
scheme
Lambda { A() -> set,F(set) -> set } :
ex f being Function st dom f = A() & for x st x in A() holds f.x = F(x)
proof
defpred P[set,set] means $2 = F($1);
A1: for x st x in A() ex y st P[x,y];
A2: for x,y1,y2 st x in A() & P[x,y1] & P[x,y2] holds y1 = y2;
thus ex f being Function st dom f = A() & for x st x in A() holds P[x,f.x]
from FuncEx(A2,A1);
end;
theorem Th5:
X <> {} implies for y ex f st dom f = X & rng f = {y}
proof
assume
A1: X <> {};
let y;
deffunc F(set) = y;
consider f such that
A2: dom f = X and
A3: for x st x in X holds f.x = F(x) from Lambda;
take f;
thus dom f = X by A2;
y1 in rng f iff y1 = y
proof
A4: now
set x = the Element of X;
assume
A5: y1 = y;
f.x = y by A1,A3;
hence y1 in rng f by A1,A2,A5,Def3;
end;
now
assume y1 in rng f;
then ex x st x in dom f & y1 = f.x by Def3;
hence y1 = y by A2,A3;
end;
hence thesis by A4;
end;
hence thesis by TARSKI:def 1;
end;
theorem
(for f,g st dom f = X & dom g = X holds f = g) implies X = {}
proof
deffunc F(set) = {};
assume
A1: for f,g st dom f = X & dom g = X holds f = g;
set x = the Element of X;
consider f being Function such that
A2: dom f = X and
A3: for x st x in X holds f.x = F(x) from Lambda;
assume
A4: not thesis;
then
A5: f.x = {} by A3;
deffunc F(set) = 1;
consider g being Function such that
A6: dom g = X and
A7: for x st x in X holds g.x = F(x) from Lambda;
g.x = 1 by A4,A7;
hence contradiction by A1,A2,A6,A5;
end;
theorem
dom f = dom g & rng f = {y} & rng g = {y} implies f = g
proof
assume that
A1: dom f = dom g and
A2: rng f = {y} and
A3: rng g = {y};
x in dom f implies f.x = g.x
proof
assume
A4: x in dom f;
then f.x in rng f by Def3;
then
A5: f.x = y by A2,TARSKI:def 1;
g.x in rng g by A1,A4,Def3;
hence thesis by A3,A5,TARSKI:def 1;
end;
hence thesis by A1,Th2;
end;
theorem
Y <> {} or X = {} implies ex f st X = dom f & rng f c= Y
proof
assume
A1: Y <> {} or X = {};
A2: now
set y = the Element of Y;
deffunc F(set) = y;
consider f such that
A3: dom f = X and
A4: for x st x in X holds f.x = F(x) from Lambda;
assume X <> {};
then
A5: y in Y by A1;
take f;
thus dom f = X by A3;
z in rng f implies z in Y
proof
assume z in rng f;
then ex x st x in dom f & z = f.x by Def3;
hence thesis by A5,A3,A4;
end;
hence rng f c= Y by TARSKI:def 3;
end;
now
assume
A6: X = {};
take f = {};
thus dom f = X by A6;
thus rng f c= Y by XBOOLE_1:2;
end;
hence thesis by A2;
end;
theorem
(for y st y in Y ex x st x in dom f & y = f.x) implies Y c= rng f
proof
assume
A1: for y st y in Y ex x st x in dom f & y = f.x;
let y;
assume y in Y;
then ex x st x in dom f & y = f.x by A1;
hence thesis by Def3;
end;
notation
let f,g;
synonym g*f for f*g;
end;
registration
let f,g;
cluster g*f -> Function-like;
coherence
proof
let x,y1,y2;
assume [x,y1] in g*f;
then consider z1 such that
A1: [x,z1] in f and
A2: [z1,y1] in g by RELAT_1:def 8;
assume [x,y2] in g*f;
then consider z2 such that
A3: [x,z2] in f and
A4: [z2,y2] in g by RELAT_1:def 8;
z1 = z2 by A1,A3,Def1;
hence thesis by A2,A4,Def1;
end;
end;
theorem
for h st (for x holds x in dom h iff x in dom f & f.x in dom g) & (for
x st x in dom h holds h.x = g.(f.x)) holds h = g*f
proof
let h;
assume that
A1: for x holds x in dom h iff x in dom f & f.x in dom g and
A2: for x st x in dom h holds h.x = g.(f.x);
now
let x,y;
hereby
assume
A3: [x,y] in h;
then
A4: x in dom h by XTUPLE_0:def 12;
then
A5: f.x in dom g by A1;
take y1 = f.x;
x in dom f by A1,A4;
hence [x,y1] in f by Def2;
y = h.x by A3,A4,Def2
.= g.(f.x) by A2,A4;
hence [y1,y] in g by A5,Def2;
end;
given z such that
A6: [x,z] in f and
A7: [z,y] in g;
A8: x in dom f by A6,XTUPLE_0:def 12;
then
A9: z = f.x by A6,Def2;
A10: z in dom g by A7,XTUPLE_0:def 12;
then
A11: x in dom h by A1,A8,A9;
y = g.z by A7,A10,Def2;
then y = h.x by A2,A9,A11;
hence [x,y] in h by A11,Def2;
end;
hence thesis by RELAT_1:def 8;
end;
theorem Th11:
x in dom(g*f) iff x in dom f & f.x in dom g
proof
set h = g*f;
hereby
assume x in dom h;
then consider y such that
A1: [x,y] in h by XTUPLE_0:def 12;
consider z such that
A2: [x,z] in f and
A3: [z,y] in g by A1,RELAT_1:def 8;
thus x in dom f by A2,XTUPLE_0:def 12;
then z = f.x by A2,Def2;
hence f.x in dom g by A3,XTUPLE_0:def 12;
end;
assume
A4: x in dom f;
then consider z such that
A5: [x,z] in f by XTUPLE_0:def 12;
assume f.x in dom g;
then consider y such that
A6: [f.x,y] in g by XTUPLE_0:def 12;
z = f.x by A4,A5,Def2;
then [x,y] in h by A5,A6,RELAT_1:def 8;
hence thesis by XTUPLE_0:def 12;
end;
theorem Th12:
x in dom(g*f) implies (g*f).x = g.(f.x)
proof
set h = g*f;
assume
A1: x in dom h;
then consider y such that
A2: [x,y] in h by XTUPLE_0:def 12;
consider z such that
A3: [x,z] in f and
A4: [z,y] in g by A2,RELAT_1:def 8;
x in dom f by A3,XTUPLE_0:def 12;
then
A5: z = f.x by A3,Def2;
then f.x in dom g by A4,XTUPLE_0:def 12;
then y = g.(f.x) by A4,A5,Def2;
hence thesis by A1,A2,Def2;
end;
theorem Th13:
x in dom f implies (g*f).x = g.(f.x)
proof
assume
A1: x in dom f;
per cases;
suppose
f.x in dom g;
then x in dom(g*f) by A1,Th11;
hence thesis by Th12;
end;
suppose
A2: not f.x in dom g;
then not x in dom(g*f) by Th11;
hence (g*f).x = {} by Def2
.= g.(f.x) by A2,Def2;
end;
end;
theorem
z in rng(g*f) implies z in rng g
proof
assume z in rng(g*f);
then consider x such that
A1: x in dom(g*f) and
A2: z = (g*f).x by Def3;
f.x in dom g & (g*f).x = g.(f.x) by A1,Th11,Th12;
hence thesis by A2,Def3;
end;
theorem Th15:
dom(g*f) = dom f implies rng f c= dom g
proof
assume
A1: dom(g*f) = dom f;
let y;
assume y in rng f;
then ex x st x in dom f & y = f.x by Def3;
hence thesis by A1,Th11;
end;
theorem
rng f c= Y & (for g,h st dom g = Y & dom h = Y & g*f = h*f holds g = h
) implies Y = rng f
proof
assume that
A1: rng f c= Y and
A2: for g,h st dom g = Y & dom h = Y & g*f = h*f holds g = h;
Y c= rng f
proof
deffunc F(set) = {};
let y;
assume that
A3: y in Y and
A4: not y in rng f;
defpred P[set,set] means ($1 = y implies $2 = 1) & ($1 <> y implies $2 =
{});
A5: x in Y implies ex y1 st P[x,y1]
proof
assume x in Y;
x = y implies thesis;
hence thesis;
end;
A6: for x,y1,y2 st x in Y & P[x,y1] & P[x,y2] holds y1 = y2;
consider h being Function such that
A7: dom h = Y and
A8: for x st x in Y holds P[x,h.x] from FuncEx(A6,A5);
A9: dom(h*f) = dom f by A1,A7,RELAT_1:27;
consider g being Function such that
A10: dom g = Y and
A11: x in Y implies g.x = F(x) from Lambda;
A12: dom(g*f) = dom f by A1,A10,RELAT_1:27;
x in dom f implies (g*f).x = (h*f).x
proof
assume
A13: x in dom f;
then f.x in rng f by Def3;
then
A14: g.(f.x) = {} & h.(f.x) = {} by A1,A4,A11,A8;
(g*f).x = g.(f.x) by A12,A13,Th12;
hence thesis by A9,A13,A14,Th12;
end;
then
A15: g = h by A2,A10,A7,A12,A9,Th2;
g.y = {} by A3,A11;
hence contradiction by A3,A8,A15;
end;
hence thesis by A1,XBOOLE_0:def 10;
end;
registration
let X;
cluster id X -> Function-like;
coherence
proof
let x,y1,y2;
assume that
A1: [x,y1] in id X and
A2: [x,y2] in id X;
x = y1 by A1,RELAT_1:def 10;
hence thesis by A2,RELAT_1:def 10;
end;
end;
theorem Th17:
f = id X iff dom f = X & for x st x in X holds f.x = x
proof
hereby
assume
A1: f = id X;
hence
A2: dom f = X by RELAT_1:45;
let x;
assume
A3: x in X;
then [x,x] in f by A1,RELAT_1:def 10;
hence f.x = x by A2,A3,Def2;
end;
assume that
A4: dom f = X and
A5: for x st x in X holds f.x = x;
now
let x,y;
hereby
assume
A6: [x,y] in f;
hence
A7: x in X by A4,Th1;
y = f.x by A6,Th1;
hence x = y by A5,A7;
end;
assume
A8: x in X;
then f.x = x by A5;
hence x = y implies [x,y] in f by A4,A8,Th1;
end;
hence thesis by RELAT_1:def 10;
end;
theorem
x in X implies (id X).x = x by Th17;
theorem Th19:
dom(f*(id X)) = dom f /\ X
proof
x in dom(f*(id X)) iff x in dom f /\ X
proof
x in dom(f*(id X)) iff x in dom f & x in X
proof
thus x in dom(f*(id X)) implies x in dom f & x in X
proof
assume x in dom(f*(id X));
then
A1: x in dom((id X)) & (id X).x in dom f by Th11;
thus thesis by A1,Th17;
end;
assume
A2: x in dom f;
A3: dom((id X)) = X;
assume
A4: x in X;
then (id X).x in dom f by A2,Th17;
hence thesis by A4,A3,Th11;
end;
hence thesis by XBOOLE_0:def 4;
end;
hence thesis by TARSKI:1;
end;
theorem
x in dom f /\ X implies f.x = (f*(id X)).x
proof
assume x in dom f /\ X;
then x in X by XBOOLE_0:def 4;
then (id X).x = x & x in dom id X by Th17;
hence thesis by Th13;
end;
theorem
x in dom((id Y)*f) iff x in dom f & f.x in Y
proof
dom((id Y)) = Y;
hence thesis by Th11;
end;
theorem
(id X)*(id Y) = id(X /\ Y)
proof
A1: dom((id X)*(id Y)) = dom((id X)) /\ Y by Th19
.= X /\ Y;
A2: z in X /\ Y implies ((id X)*(id Y)).z = (id(X /\ Y)).z
proof
assume
A3: z in X /\ Y;
then
A4: z in X by XBOOLE_0:def 4;
A5: z in Y by A3,XBOOLE_0:def 4;
thus ((id X)*(id Y)).z = (id X).((id Y).z) by A1,A3,Th12
.= (id X).z by A5,Th17
.= z by A4,Th17
.= (id(X /\ Y)).z by A3,Th17;
end;
X /\ Y = dom id(X /\ Y);
hence thesis by A1,A2,Th2;
end;
theorem Th23:
rng f = dom g & g*f = f implies g = id dom g
proof
assume that
A1: rng f = dom g and
A2: g*f = f;
set X = dom g;
x in X implies g.x = x
proof
assume x in X;
then ex y st y in dom f & f.y = x by A1,Def3;
hence thesis by A2,Th13;
end;
hence thesis by Th17;
end;
definition
let f;
attr f is one-to-one means
:Def4:
for x1,x2 st x1 in dom f & x2 in dom f & f.x1 = f.x2 holds x1 = x2;
end;
theorem Th24:
f is one-to-one & g is one-to-one implies g*f is one-to-one
proof
assume that
A1: f is one-to-one and
A2: g is one-to-one;
now
let x1,x2;
assume
A3: x1 in dom(g*f) & x2 in dom(g*f);
then
A4: (g*f).x1 = g.(f.x1) & (g*f).x2 = g .(f.x2) by Th12;
A5: x1 in dom f & x2 in dom f by A3,Th11;
assume
A6: (g*f).x1 = (g*f).x2;
f.x1 in dom g & f.x2 in dom g by A3,Th11;
then f.x1 = f.x2 by A2,A4,A6,Def4;
hence x1 = x2 by A1,A5,Def4;
end;
hence thesis by Def4;
end;
theorem Th25:
g*f is one-to-one & rng f c= dom g implies f is one-to-one
proof
assume that
A1: g*f is one-to-one and
A2: rng f c= dom g;
now
let x1,x2;
assume that
A3: x1 in dom f & x2 in dom f and
A4: f.x1 =f.x2;
A5: x1 in dom(g*f) & x2 in dom(g*f) by A2,A3,RELAT_1:27;
(g*f).x1 = g.(f.x1) & (g*f).x2 = g.(f.x2) by A3,Th13;
hence x1 = x2 by A1,A4,A5,Def4;
end;
hence thesis by Def4;
end;
theorem
g*f is one-to-one & rng f = dom g implies f is one-to-one & g is one-to-one
proof
assume that
A1: g*f is one-to-one and
A2: rng f = dom g;
A3: dom(g*f) = dom f by A2,RELAT_1:27;
thus f is one-to-one by A1,A2,Th25;
assume not g is one-to-one;
then consider y1,y2 such that
A4: y1 in dom g and
A5: y2 in dom g and
A6: g.y1 = g.y2 & y1 <> y2 by Def4;
consider x2 such that
A7: x2 in dom f and
A8: f.x2 = y2 by A2,A5,Def3;
A9: (g*f).x2 = g.(f.x2) by A7,Th13;
consider x1 such that
A10: x1 in dom f and
A11: f.x1 = y1 by A2,A4,Def3;
(g*f).x1 = g.(f.x1) by A10,Th13;
hence contradiction by A1,A6,A10,A11,A7,A8,A3,A9,Def4;
end;
theorem
f is one-to-one iff for g,h st rng g c= dom f & rng h c= dom f & dom g
= dom h & f*g = f*h holds g = h
proof
thus f is one-to-one implies for g,h st rng g c=dom f & rng h c=dom f & dom
g = dom h & f*g = f*h holds g = h
proof
assume
A1: f is one-to-one;
let g,h such that
A2: rng g c= dom f & rng h c= dom f and
A3: dom g = dom h and
A4: f*g = f*h;
x in dom g implies g.x = h.x
proof
assume
A5: x in dom g;
then
A6: g.x in rng g & h.x in rng h by A3,Def3;
(f*g).x = f.(g.x) & (f*h).x = f.(h.x) by A3,A5,Th13;
hence thesis by A1,A2,A4,A6,Def4;
end;
hence thesis by A3,Th2;
end;
assume
A7: for g,h st rng g c=dom f & rng h c=dom f & dom g = dom h & f*g = f*
h holds g = h;
x1 in dom f & x2 in dom f & f.x1 = f.x2 implies x1 = x2
proof
assume that
A8: x1 in dom f and
A9: x2 in dom f and
A10: f.x1 = f.x2;
deffunc F(set) = x1;
consider g being Function such that
A11: dom g = {{}} and
A12: for x st x in {{}} holds g.x = F(x) from Lambda;
A13: {} in {{}} by TARSKI:def 1;
then
A14: g.{} = x1 by A12;
then rng g = {x1} by A11,Th4;
then
A15: rng g c= dom f by A8,ZFMISC_1:31;
then
A16: dom(f*g) = dom g by RELAT_1:27;
deffunc F(set) = x2;
consider h being Function such that
A17: dom h = {{}} and
A18: for x st x in {{}} holds h.x = F(x) from Lambda;
A19: h.{} = x2 by A18,A13;
then rng h = {x2} by A17,Th4;
then
A20: rng h c= dom f by A9,ZFMISC_1:31;
then
A21: dom(f*h) = dom h by RELAT_1:27;
x in dom(f*g) implies (f*g).x = (f*h).x
proof
assume
A22: x in dom(f*g);
then
A23: g.x = x1 by A11,A12,A16;
(f*g).x = f.(g.x) & (f*h).x = f.(h.x) by A11,A17,A16,A21,A22,Th12;
hence thesis by A10,A11,A18,A16,A22,A23;
end;
hence thesis by A7,A11,A17,A14,A19,A15,A20,A16,A21,Th2;
end;
hence thesis by Def4;
end;
theorem
dom f = X & dom g = X & rng g c= X & f is one-to-one & f*g = f implies
g = id X
proof
assume that
A1: dom f = X and
A2: dom g = X and
A3: rng g c= X & f is one-to-one and
A4: f*g = f;
x in X implies g.x = x
proof
assume
A5: x in X;
then g.x in rng g & f.x = f.(g.x) by A2,A4,Def3,Th13;
hence thesis by A1,A3,A5,Def4;
end;
hence thesis by A2,Th17;
end;
theorem
rng(g*f) = rng g & g is one-to-one implies dom g c= rng f
proof
assume that
A1: rng(g*f) = rng g and
A2: g is one-to-one;
let y;
assume
A3: y in dom g;
then g.y in rng(g*f) by A1,Def3;
then consider x such that
A4: x in dom(g*f) and
A5: g.y = (g*f).x by Def3;
(g*f).x = g.(f.x) & f.x in dom g by A4,Th11,Th12;
then
A6: y = f.x by A2,A3,A5,Def4;
x in dom f by A4,Th11;
hence thesis by A6,Def3;
end;
registration
let X be set;
cluster id X -> one-to-one;
coherence
proof
let x1,x2;
assume that
A1: x1 in dom id X and
A2: x2 in dom id X;
x1 in X by A1;
then
A3: (id X).x1 = x1 by Th17;
x2 in X by A2;
hence thesis by A3,Th17;
end;
end;
canceled;
theorem
(ex g st g*f = id dom f) implies f is one-to-one
proof
given g such that
A1: g*f = id dom f;
dom(g*f) = dom f by A1,RELAT_1:45;
then rng f c= dom g by Th15;
hence thesis by A1,Th25;
end;
registration
cluster empty -> one-to-one for Function;
coherence
proof
let f be Function;
assume
A1: f is empty;
let x1,x2;
thus thesis by A1;
end;
end;
registration
cluster one-to-one for Function;
existence
proof
take {};
thus thesis;
end;
end;
registration
let f be one-to-one Function;
cluster f~ -> Function-like;
coherence
proof
let x,y1,y2;
assume that
A1: [x,y1] in f~ and
A2: [x,y2] in f~;
A3: [y2,x] in f by A2,RELAT_1:def 7;
then
A4: y2 in dom f by XTUPLE_0:def 12;
then
A5: x = f.y2 by A3,Def2;
A6: [y1,x] in f by A1,RELAT_1:def 7;
then
A7: y1 in dom f by XTUPLE_0:def 12;
then x = f.y1 by A6,Def2;
hence thesis by A7,A4,A5,Def4;
end;
end;
definition
let f;
assume
A1: f is one-to-one;
func f" -> Function equals
:Def5:
f~;
coherence by A1;
end;
theorem Th32:
f is one-to-one implies for g being Function holds g=f" iff dom
g = rng f & for y,x holds y in rng f & x = g.y iff x in dom f & y = f.x
proof
assume
A1: f is one-to-one;
let g be Function;
thus g = f" implies dom g = rng f & for y,x holds y in rng f & x = g.y iff x
in dom f & y = f.x
proof
assume g = f";
then
A2: g = f~ by A1,Def5;
hence dom g = rng f by RELAT_1:20;
let y,x;
thus y in rng f & x = g.y implies x in dom f & y = f.x
proof
assume that
A3: y in rng f and
A4: x = g.y;
y in dom g by A2,A3,RELAT_1:20;
then [y,x] in g by A4,Def2;
then
A5: [x,y] in f by A2,RELAT_1:def 7;
hence x in dom f by XTUPLE_0:def 12;
hence thesis by A5,Def2;
end;
assume x in dom f & y = f.x;
then
A6: [x,y] in f by Def2;
hence y in rng f by XTUPLE_0:def 13;
then
A7: y in dom g by A2,RELAT_1:20;
[y,x] in g by A2,A6,RELAT_1:def 7;
hence thesis by A7,Def2;
end;
assume that
A8: dom g = rng f and
A9: for y,x holds y in rng f & x = g.y iff x in dom f & y = f.x;
let a,b be set;
thus [a,b] in g implies [a,b] in f"
proof
assume
A10: [a,b] in g;
then
A11: a in dom g by XTUPLE_0:def 12;
then b = g.a by A10,Def2;
then b in dom f & a = f.b by A8,A9,A11;
then [b,a] in f by Def2;
then [a,b] in f~ by RELAT_1:def 7;
hence thesis by A1,Def5;
end;
assume [a,b] in f";
then [a,b] in f~ by A1,Def5;
then
A12: [b,a] in f by RELAT_1:def 7;
then
A13: b in dom f by XTUPLE_0:def 12;
then a = f.b by A12,Def2;
then a in rng f & b = g.a by A9,A13;
hence thesis by A8,Def2;
end;
theorem Th33:
f is one-to-one implies rng f = dom(f") & dom f = rng(f")
proof
assume f is one-to-one;
then f" = f~ by Def5;
hence thesis by RELAT_1:20;
end;
theorem Th34:
f is one-to-one & x in dom f implies x = (f").(f.x) & x = (f"*f) .x
proof
assume
A1: f is one-to-one;
assume
A2: x in dom f;
hence x = (f").(f.x) by A1,Th32;
hence thesis by A2,Th13;
end;
theorem Th35:
f is one-to-one & y in rng f implies y = f.((f").y) & y = (f*f") .y
proof
assume
A1: f is one-to-one;
assume
A2: y in rng f;
hence
A3: y = f.((f").y) by A1,Th32;
rng f = dom(f") by A1,Th33;
hence thesis by A2,A3,Th13;
end;
theorem Th36:
f is one-to-one implies dom(f"*f) = dom f & rng(f"*f) = dom f
proof
assume
A1: f is one-to-one;
then
A2: rng f = dom(f") by Th33;
then rng(f"*f) = rng(f") by RELAT_1:28;
hence thesis by A1,A2,Th33,RELAT_1:27;
end;
theorem Th37:
f is one-to-one implies dom(f*f") = rng f & rng(f*f") = rng f
proof
assume
A1: f is one-to-one;
then
A2: rng(f") = dom f by Th33;
then dom(f*f") = dom(f") by RELAT_1:27;
hence thesis by A1,A2,Th33,RELAT_1:28;
end;
theorem
f is one-to-one & dom f = rng g & rng f = dom g & (for x,y st x in dom
f & y in dom g holds f.x = y iff g.y = x) implies g = f"
proof
assume that
A1: f is one-to-one and
A2: dom f = rng g and
A3: rng f = dom g and
A4: for x,y st x in dom f & y in dom g holds f.x = y iff g.y = x;
A5: y in dom g implies g.y = (f").y
proof
assume
A6: y in dom g;
then
A7: g.y in dom f by A2,Def3;
then f.(g.y) = y by A4,A6;
hence thesis by A1,A7,Th32;
end;
rng f = dom(f") by A1,Th32;
hence thesis by A3,A5,Th2;
end;
theorem Th39:
f is one-to-one implies f"*f = id dom f & f*f" = id rng f
proof
assume
A1: f is one-to-one;
A2: x in dom(f"*f) implies (f"*f).x = x
proof
assume x in dom(f"*f);
then x in dom f by A1,Th36;
hence thesis by A1,Th34;
end;
A3: x in dom(f*f") implies (f*f").x = x
proof
assume x in dom(f*f");
then x in rng f by A1,Th37;
hence thesis by A1,Th35;
end;
dom(f"*f) = dom f by A1,Th36;
hence f"*f = id dom f by A2,Th17;
dom(f*f") = rng f by A1,Th37;
hence thesis by A3,Th17;
end;
theorem Th40:
f is one-to-one implies f" is one-to-one
proof
assume
A1: f is one-to-one;
let y1,y2;
assume that
A2: y1 in dom(f") and
A3: y2 in dom(f");
y1 in rng f by A1,A2,Th32;
then
A4: y1 = f.((f").y1) by A1,Th35;
y2 in rng f by A1,A3,Th32;
hence thesis by A1,A4,Th35;
end;
registration
let f be one-to-one Function;
cluster f" -> one-to-one;
coherence by Th40;
let g be one-to-one Function;
cluster g*f -> one-to-one;
coherence by Th24;
end;
Lm1: rng(g2) = X & f*g2 = id dom g1 & g1*f = id X implies g1 = g2
proof
A1: g1*(f*g2) = (g1*f)*g2 & g1*(id dom g1) = g1 by RELAT_1:36,51;
assume rng(g2) = X & f*g2 = id dom g1 & g1*f = id X;
hence thesis by A1,RELAT_1:53;
end;
theorem Th41:
f is one-to-one & rng f = dom g & g*f = id dom f implies g = f"
proof
assume that
A1: f is one-to-one and
A2: rng f = dom g & g*f = id dom f;
f*f" = id rng f & rng(f") = dom f by A1,Th33,Th39;
hence thesis by A2,Lm1;
end;
theorem
f is one-to-one & rng g = dom f & f*g = id rng f implies g = f"
proof
assume that
A1: f is one-to-one and
A2: rng g = dom f & f*g = id rng f;
f"*f = id dom f & dom(f") = rng f by A1,Th33,Th39;
hence thesis by A2,Lm1;
end;
theorem
f is one-to-one implies (f")" = f
proof
assume
A1: f is one-to-one;
then rng f = dom(f") by Th33;
then
A2: f*f" = id dom(f") by A1,Th39;
dom f = rng(f") by A1,Th33;
hence thesis by A1,A2,Th41;
end;
theorem
f is one-to-one & g is one-to-one implies (g*f)" = f"*g"
proof
assume that
A1: f is one-to-one and
A2: g is one-to-one;
y in rng(g*f) iff y in dom(f"*g")
proof
thus y in rng(g*f) implies y in dom(f"*g")
proof
assume y in rng(g*f);
then consider x such that
A3: x in dom(g*f) and
A4: y = (g*f).x by Def3;
A5: f.x in dom g by A3,Th11;
A6: y = g.(f.x) by A3,A4,Th12;
then y in rng g by A5,Def3;
then
A7: y in dom(g") by A2,Th32;
A8: x in dom f by A3,Th11;
(g").(g.(f.x)) = (g"*g).(f.x) by A5,Th13
.= (id dom g).(f.x) by A2,Th39
.= f.x by A5,Th17;
then (g").y in rng f by A8,A6,Def3;
then (g").y in dom(f") by A1,Th32;
hence thesis by A7,Th11;
end;
assume
A9: y in dom(f"*g");
then y in dom(g") by Th11;
then y in rng g by A2,Th32;
then consider z such that
A10: z in dom g and
A11: y = g.z by Def3;
(g").y in dom(f") by A9,Th11;
then (g").(g.z) in rng f by A1,A11,Th32;
then (g"*g).z in rng f by A10,Th13;
then (id dom g).z in rng f by A2,Th39;
then z in rng f by A10,Th17;
then consider x such that
A12: x in dom f & z = f.x by Def3;
x in dom(g*f) & y = (g*f).x by A10,A11,A12,Th11,Th13;
hence thesis by Def3;
end;
then
A13: rng(g*f) = dom(f"*g") by TARSKI:1;
x in dom((f"*g")*(g*f)) iff x in dom(g*f)
proof
thus x in dom((f"*g")*(g*f)) implies x in dom(g*f) by Th11;
assume
A14: x in dom(g*f);
then (g*f).x in rng(g*f) by Def3;
hence thesis by A13,A14,Th11;
end;
then
A15: dom((f"*g")*(g*f)) = dom(g*f) by TARSKI:1;
x in dom(g*f) implies ((f"*g")*(g*f)).x = x
proof
assume
A16: x in dom(g*f);
then
A17: f.x in dom g by Th11;
(g*f).x in rng(g*f) by A16,Def3;
then
A18: g.(f.x) in dom(f"*g") by A13,A16,Th12;
A19: x in dom f by A16,Th11;
thus ((f"*g")*(g*f)).x = (f"*g").((g*f).x) by A15,A16,Th12
.= (f"*g").(g.(f.x)) by A16,Th12
.= (f").((g").(g.(f.x))) by A18,Th12
.= (f").((g"*g).(f.x)) by A17,Th13
.= (f").((id dom g).(f.x)) by A2,Th39
.= (f").(f.x) by A17,Th17
.= x by A1,A19,Th34;
end;
then (f"*g")*(g*f) = id dom(g*f) by A15,Th17;
hence thesis by A1,A2,A13,Th41;
end;
theorem
(id X)" = id X
proof
dom id X = X;
then
A1: (id X)"*(id X) = id X by Th39;
dom((id X)") = rng id X & rng id X = X by Th33;
hence thesis by A1,Th23;
end;
registration
let f,X;
cluster f|X -> Function-like;
coherence
proof
let x,y1,y2;
assume [x,y1] in f|X & [x,y2] in f|X;
then [x,y1] in f & [x,y2] in f by RELAT_1:def 11;
hence thesis by Def1;
end;
end;
theorem
dom g = dom f /\ X & (for x st x in dom g holds g.x = f.x) implies g = f|X
proof
assume that
A1: dom g = dom f /\ X and
A2: for x st x in dom g holds g.x = f.x;
now
let x,y;
hereby
assume
A3: [x,y] in g;
then
A4: x in dom g by XTUPLE_0:def 12;
hence x in X by A1,XBOOLE_0:def 4;
A5: x in dom f by A1,A4,XBOOLE_0:def 4;
y = g.x by A3,A4,Def2
.= f.x by A2,A4;
hence [x,y] in f by A5,Def2;
end;
assume
A6: x in X;
assume
A7: [x,y] in f;
then
A8: x in dom f by XTUPLE_0:def 12;
then
A9: x in dom g by A1,A6,XBOOLE_0:def 4;
y = f.x by A7,A8,Def2
.= g.x by A2,A9;
hence [x,y] in g by A9,Def2;
end;
hence thesis by RELAT_1:def 11;
end;
theorem Th47:
x in dom(f|X) implies (f|X).x = f.x
proof
set g = f|X;
assume
A1: x in dom g;
dom g = dom f /\ X by RELAT_1:61;
then
A2: x in dom f by A1,XBOOLE_0:def 4;
g c= f & [x,g.x] in g by A1,Def2,RELAT_1:59;
hence g.x = f.x by A2,Def2;
end;
theorem Th48:
x in dom f /\ X implies (f|X).x = f.x
proof
assume x in dom f /\ X;
then x in dom(f|X) by RELAT_1:61;
hence thesis by Th47;
end;
theorem Th49:
x in X implies (f|X).x = f.x
proof
assume
A1: x in X;
per cases;
suppose
x in dom f;
then x in dom(f|X) by A1,RELAT_1:57;
hence thesis by Th47;
end;
suppose
A2: not x in dom f;
then not x in dom(f|X) by RELAT_1:57;
hence (f|X).x = {} by Def2
.= f.x by A2,Def2;
end;
end;
theorem
x in dom f & x in X implies f.x in rng(f|X)
proof
assume that
A1: x in dom f and
A2: x in X;
x in dom f /\ X by A1,A2,XBOOLE_0:def 4;
then
A3: x in dom(f|X) by RELAT_1:61;
(f|X).x = f.x by A2,Th49;
hence thesis by A3,Def3;
end;
theorem
X c= Y implies (f|X)|Y = f|X & (f|Y)|X = f|X by RELAT_1:73,74;
theorem
f is one-to-one implies f|X is one-to-one
proof
assume
A1: f is one-to-one;
let x1,x2;
assume that
A2: x1 in dom(f|X) and
A3: x2 in dom(f|X);
x1 in dom f /\ X by A2,RELAT_1:61;
then
A4: x1 in dom f by XBOOLE_0:def 4;
x2 in dom f /\ X by A3,RELAT_1:61;
then
A5: x2 in dom f by XBOOLE_0:def 4;
(f|X).x1 = f.x1 & (f|X).x2 = f.x2 by A2,A3,Th47;
hence thesis by A1,A4,A5,Def4;
end;
registration
let Y,f;
cluster Y|`f -> Function-like;
coherence
proof
let x,y1,y2;
assume [x,y1] in Y|`f & [x,y2] in Y|`f;
then [x,y1] in f & [x,y2] in f by RELAT_1:def 12;
hence thesis by Def1;
end;
end;
theorem Th53:
g = Y|`f iff (for x holds x in dom g iff x in dom f & f.x in Y) &
for x st x in dom g holds g.x = f.x
proof
hereby
assume
A1: g = Y|`f;
hereby
let x;
hereby
assume x in dom g;
then
A2: [x,g.x] in g by Def2;
then
A3: [x,g.x] in f by A1,RELAT_1:def 12;
hence x in dom f by XTUPLE_0:def 12;
then f.x = g.x by A3,Def2;
hence f.x in Y by A1,A2,RELAT_1:def 12;
end;
assume x in dom f;
then
A4: [x,f.x] in f by Def2;
assume f.x in Y;
then [x,f.x] in g by A1,A4,RELAT_1:def 12;
hence x in dom g by XTUPLE_0:def 12;
end;
let x;
assume x in dom g;
then [x,g.x] in g by Def2;
then
A5: [x,g.x] in f by A1,RELAT_1:def 12;
then x in dom f by XTUPLE_0:def 12;
hence f.x = g.x by A5,Def2;
end;
assume that
A6: for x holds x in dom g iff x in dom f & f.x in Y and
A7: for x st x in dom g holds g.x = f.x;
now
let x,y;
hereby
assume
A8: [x,y] in g;
then
A9: x in dom g by XTUPLE_0:def 12;
then
A10: y = g.x by A8,Def2
.= f.x by A7,A9;
hence y in Y by A6,A9;
x in dom f by A6,A9;
hence [x,y] in f by A10,Def2;
end;
assume
A11: y in Y;
assume
A12: [x,y] in f;
then
A13: y = f.x by Th1;
x in dom f by A12,XTUPLE_0:def 12;
then
A14: x in dom g by A6,A11,A13;
then y = g.x by A7,A13;
hence [x,y] in g by A14,Def2;
end;
hence thesis by RELAT_1:def 12;
end;
theorem
x in dom(Y|`f) iff x in dom f & f.x in Y by Th53;
theorem
x in dom(Y|`f) implies (Y|`f).x = f.x by Th53;
theorem
dom(Y|`f) c= dom f
proof
let x;
thus thesis by Th53;
end;
theorem
X c= Y implies Y|`(X|`f) = X|`f & X|`(Y|`f) = X|`f by RELAT_1:98,99;
theorem
f is one-to-one implies Y|`f is one-to-one
proof
assume
A1: f is one-to-one;
let x1,x2 such that
A2: x1 in dom(Y|`f) & x2 in dom(Y|`f) and
A3: (Y|`f).x1 = (Y|`f).x2;
A4: x1 in dom f & x2 in dom f by A2,Th53;
(Y|`f).x1 = f.x1 & (Y|`f).x2 = f.x2 by A2,Th53;
hence thesis by A1,A3,A4,Def4;
end;
definition
let f,X;
redefine func f.:X means
:Def6:
for y holds y in it iff ex x st x in dom f & x in X & y = f.x;
compatibility
proof
let Y;
hereby
assume
A1: Y = f.:X;
let y;
hereby
assume y in Y;
then consider x such that
A2: [x,y] in f and
A3: x in X by A1,RELAT_1:def 13;
take x;
thus
A4: x in dom f by A2,XTUPLE_0:def 12;
thus x in X by A3;
thus y = f.x by A2,A4,Def2;
end;
given x such that
A5: x in dom f and
A6: x in X and
A7: y = f.x;
[x,y] in f by A5,A7,Def2;
hence y in Y by A1,A6,RELAT_1:def 13;
end;
assume
A8: for y holds y in Y iff ex x st x in dom f & x in X & y = f.x;
now
let y;
hereby
assume y in Y;
then consider x such that
A9: x in dom f and
A10: x in X and
A11: y = f.x by A8;
take x;
thus [x,y] in f by A9,A11,Def2;
thus x in X by A10;
end;
given x such that
A12: [x,y] in f and
A13: x in X;
x in dom f & y = f.x by A12,Th1;
hence y in Y by A8,A13;
end;
hence thesis by RELAT_1:def 13;
end;
end;
theorem Th59:
x in dom f implies Im(f,x) = {f.x}
proof
assume
A1: x in dom f;
y in f.:{x} iff y in {f.x}
proof
thus y in f.:{x} implies y in {f.x}
proof
assume y in f.:{x};
then consider z such that
z in dom f and
A2: z in {x} and
A3: y = f.z by Def6;
z = x by A2,TARSKI:def 1;
hence thesis by A3,TARSKI:def 1;
end;
assume y in {f.x};
then
A4: y = f.x by TARSKI:def 1;
x in {x} by TARSKI:def 1;
hence thesis by A1,A4,Def6;
end;
hence thesis by TARSKI:1;
end;
theorem
x1 in dom f & x2 in dom f implies f.:{x1,x2} = {f.x1,f.x2}
proof
assume
A1: x1 in dom f & x2 in dom f;
y in f.:{x1,x2} iff y = f.x1 or y = f.x2
proof
A2: x1 in {x1,x2} & x2 in {x1,x2} by TARSKI:def 2;
thus y in f.:{x1,x2} implies y = f.x1 or y = f.x2
proof
assume y in f.:{x1,x2};
then ex x st x in dom f & x in {x1,x2} & y = f.x by Def6;
hence thesis by TARSKI:def 2;
end;
assume y = f.x1 or y = f.x2;
hence thesis by A1,A2,Def6;
end;
hence thesis by TARSKI:def 2;
end;
theorem
(Y|`f).:X c= f.:X
proof
let y;
assume y in (Y|`f).:X;
then consider x such that
A1: x in dom(Y|`f) and
A2: x in X and
A3: y = (Y|`f).x by Def6;
y = f.x & x in dom f by A1,A3,Th53;
hence thesis by A2,Def6;
end;
theorem Th62:
f is one-to-one implies f.:(X1 /\ X2) = f.:X1 /\ f.:X2
proof
assume
A1: f is one-to-one;
A2: f.:X1 /\ f.:X2 c= f.:(X1 /\ X2)
proof
let y;
assume
A3: y in f.:X1 /\ f.:X2;
then y in f.:X1 by XBOOLE_0:def 4;
then consider x1 such that
A4: x1 in dom f and
A5: x1 in X1 and
A6: y = f.x1 by Def6;
y in f.:X2 by A3,XBOOLE_0:def 4;
then consider x2 such that
A7: x2 in dom f and
A8: x2 in X2 and
A9: y = f.x2 by Def6;
x1 = x2 by A1,A4,A6,A7,A9,Def4;
then x1 in X1 /\ X2 by A5,A8,XBOOLE_0:def 4;
hence thesis by A4,A6,Def6;
end;
f.:(X1 /\ X2)c=f.:X1 /\ f.:X2 by RELAT_1:121;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
(for X1,X2 holds f.:(X1 /\ X2) = f.:X1 /\ f.:X2) implies f is one-to-one
proof
assume
A1: for X1,X2 holds f.:(X1 /\ X2) = f.:X1 /\ f.:X2;
given x1,x2 such that
A2: x1 in dom f & x2 in dom f and
A3: f.x1 = f.x2 and
A4: x1 <> x2;
A5: f.:({x1}/\{x2}) = f.:{x1}/\f.: {x2} by A1;
{x1} misses {x2} by A4,ZFMISC_1:11;
then
A6: {x1} /\ {x2} = {} by XBOOLE_0:def 7;
Im(f,x1) = {f.x1} & Im(f,x2) = {f.x2} by A2,Th59;
hence contradiction by A3,A6,A5;
end;
theorem
f is one-to-one implies f.:(X1 \ X2) = f.:X1 \ f.:X2
proof
assume
A1: f is one-to-one;
A2: f.:(X1 \ X2) c= f.:X1 \ f.:X2
proof
let y;
assume y in f.:(X1\X2);
then consider x such that
A3: x in dom f and
A4: x in X1\X2 and
A5: y = f.x by Def6;
A6: not x in X2 by A4,XBOOLE_0:def 5;
A7: now
assume y in f.:X2;
then ex z st z in dom f & z in X2 & y = f.z by Def6;
hence contradiction by A1,A3,A5,A6,Def4;
end;
y in f.:X1 by A3,A4,A5,Def6;
hence thesis by A7,XBOOLE_0:def 5;
end;
f.:X1 \ f.: X2 c= f.:(X1 \ X2) by RELAT_1:122;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
(for X1,X2 holds f.:(X1 \ X2) = f.:X1 \ f.:X2) implies f is one-to-one
proof
assume
A1: for X1,X2 holds f.:(X1 \ X2) = f.:X1 \ f.:X2;
given x1,x2 such that
A2: x1 in dom f & x2 in dom f and
A3: f.x1 = f.x2 and
A4: x1 <> x2;
A5: f.:({x1}\{x2}) = f.:{x1} by A4,ZFMISC_1:14;
A6: f.:({x1}\{x2}) = f.:{x1}\f.:{x2} by A1;
Im(f,x1) = {f.x1} & Im(f,x2) = {f.x2} by A2,Th59;
hence contradiction by A3,A5,A6,XBOOLE_1:37;
end;
theorem
X misses Y & f is one-to-one implies f.:X misses f.:Y
proof
assume X /\ Y = {} & f is one-to-one;
then f.:(X /\ Y) = {} & f.:(X /\ Y) = f.:X /\ f.:Y by Th62;
hence thesis by XBOOLE_0:def 7;
end;
theorem
(Y|`f).:X = Y /\ f.:X
proof
y in (Y|`f).:X iff y in Y /\ f.:X
proof
thus y in (Y|`f).:X implies y in Y /\ f.:X
proof
assume y in (Y|`f).:X;
then consider x such that
A1: x in dom(Y|`f) and
A2: x in X and
A3: y = (Y|`f).x by Def6;
A4: y = f.x by A1,A3,Th53;
then
A5: y in Y by A1,Th53;
x in dom f by A1,Th53;
then y in f.:X by A2,A4,Def6;
hence thesis by A5,XBOOLE_0:def 4;
end;
assume
A6: y in Y /\ f.:X;
then y in f.:X by XBOOLE_0:def 4;
then consider x such that
A7: x in dom f and
A8: x in X and
A9: y = f.x by Def6;
y in Y by A6,XBOOLE_0:def 4;
then
A10: x in dom(Y|`f) by A7,A9,Th53;
then (Y|`f).x = f.x by Th53;
hence thesis by A8,A9,A10,Def6;
end;
hence thesis by TARSKI:1;
end;
definition
let f,Y;
redefine func f"Y means
:Def7:
for x holds x in it iff x in dom f & f.x in Y;
compatibility
proof
let X;
hereby
assume
A1: X = f"Y;
let x;
hereby
assume x in X;
then
A2: ex y st [x,y] in f & y in Y by A1,RELAT_1:def 14;
hence x in dom f by XTUPLE_0:def 12;
thus f.x in Y by A2,Th1;
end;
assume that
A3: x in dom f and
A4: f.x in Y;
[x,f.x] in f by A3,Th1;
hence x in X by A1,A4,RELAT_1:def 14;
end;
assume
A5: for x holds x in X iff x in dom f & f.x in Y;
now
let x;
hereby
assume
A6: x in X;
take y = f.x;
x in dom f by A5,A6;
hence [x,y] in f by Def2;
thus y in Y by A5,A6;
end;
given y such that
A7: [x,y] in f and
A8: y in Y;
x in dom f & y = f.x by A7,Th1;
hence x in X by A5,A8;
end;
hence thesis by RELAT_1:def 14;
end;
end;
theorem Th68:
f"(Y1 /\ Y2) = f"Y1 /\ f"Y2
proof
x in f"(Y1 /\ Y2) iff x in f"Y1 /\ f"Y2
proof
A1: x in f"Y2 iff f.x in Y2 & x in dom f by Def7;
A2: x in f"(Y1 /\ Y2) iff f.x in Y1 /\ Y2 & x in dom f by Def7;
x in f"Y1 iff f.x in Y1 & x in dom f by Def7;
hence thesis by A1,A2,XBOOLE_0:def 4;
end;
hence thesis by TARSKI:1;
end;
theorem
f"(Y1 \ Y2) = f"Y1 \ f"Y2
proof
x in f"(Y1 \ Y2) iff x in f"Y1 \ f"Y2
proof
A1: x in f"Y2 iff f.x in Y2 & x in dom f by Def7;
A2: x in f"(Y1 \ Y2) iff f.x in Y1 \ Y2 & x in dom f by Def7;
x in f"Y1 iff f.x in Y1 & x in dom f by Def7;
hence thesis by A1,A2,XBOOLE_0:def 5;
end;
hence thesis by TARSKI:1;
end;
theorem
(R|X)"Y = X /\ (R"Y)
proof
hereby
let x;
assume x in (R|X)"Y;
then
A1: ex y st [x,y] in R|X & y in Y by RELAT_1:def 14;
then
A2: x in X by RELAT_1:def 11;
R|X c= R by RELAT_1:59;
then x in R"Y by A1,RELAT_1:def 14;
hence x in X /\ (R"Y) by A2,XBOOLE_0:def 4;
end;
let x;
assume
A3: x in X /\ (R"Y);
then x in R"Y by XBOOLE_0:def 4;
then consider y such that
A4: [x,y] in R and
A5: y in Y by RELAT_1:def 14;
x in X by A3,XBOOLE_0:def 4;
then [x,y] in R|X by A4,RELAT_1:def 11;
hence thesis by A5,RELAT_1:def 14;
end;
theorem
for f being Function, A,B being set st A misses B holds f"A misses f"B
proof
let f be Function, A,B be set;
assume A misses B;
then A /\ B = {} by XBOOLE_0:def 7;
then {} = f"(A /\ B)
.= f"A /\ f"B by Th68;
hence thesis by XBOOLE_0:def 7;
end;
theorem Th72:
y in rng R iff R"{y} <> {}
proof
thus y in rng R implies R"{y} <> {}
proof
assume y in rng R;
then
A1: ex x st [x,y] in R by XTUPLE_0:def 13;
y in {y} by TARSKI:def 1;
hence thesis by A1,RELAT_1:def 14;
end;
assume R"{y} <> {};
then consider x such that
A2: x in R"{y} by XBOOLE_0:def 1;
consider z such that
A3: [x,z] in R and
A4: z in {y} by A2,RELAT_1:def 14;
z = y by A4,TARSKI:def 1;
hence thesis by A3,XTUPLE_0:def 13;
end;
theorem
(for y st y in Y holds R"{y} <> {}) implies Y c= rng R
proof
assume
A1: for y st y in Y holds R"{y} <> {};
let y;
assume y in Y;
then R"{y} <> {} by A1;
hence thesis by Th72;
end;
theorem Th74:
(for y st y in rng f ex x st f"{y} = {x}) iff f is one-to-one
proof
thus (for y st y in rng f ex x st f"{y} = {x}) implies f is one-to-one
proof
assume
A1: for y st y in rng f ex x st f"{y} = {x};
let x1,x2;
assume that
A2: x1 in dom f and
A3: x2 in dom f;
f.x1 in rng f by A2,Def3;
then consider y1 such that
A4: f"{f.x1} = {y1} by A1;
f.x2 in rng f by A3,Def3;
then consider y2 such that
A5: f"{f.x2} = {y2} by A1;
f.x1 in {f.x1} by TARSKI:def 1;
then x1 in {y1} by A2,A4,Def7;
then
A6: y1 = x1 by TARSKI:def 1;
f.x2 in {f.x2} by TARSKI:def 1;
then x2 in {y2} by A3,A5,Def7;
hence thesis by A4,A5,A6,TARSKI:def 1;
end;
assume
A7: f is one-to-one;
let y;
assume y in rng f;
then consider x such that
A8: x in dom f & y = f.x by Def3;
take x;
z in f"{y} iff z = x
proof
thus z in f"{y} implies z = x
proof
assume
A9: z in f"{y};
then f.z in {y} by Def7;
then
A10: f.z = y by TARSKI:def 1;
z in dom f by A9,Def7;
hence thesis by A7,A8,A10,Def4;
end;
y in {y} by TARSKI:def 1;
hence thesis by A8,Def7;
end;
hence thesis by TARSKI:def 1;
end;
theorem Th75:
f.:(f"Y) c= Y
proof
let y;
assume y in f.:(f"Y);
then ex x st x in dom f & x in f"Y & y = f.x by Def6;
hence thesis by Def7;
end;
theorem Th76:
X c= dom R implies X c= R"(R.:X)
proof
assume
A1: X c= dom R;
let x;
assume
A2: x in X;
then consider Rx being set such that
A3: [x,Rx] in R by A1,XTUPLE_0:def 12;
Rx in R.:X by A2,A3,RELAT_1:def 13;
hence thesis by A3,RELAT_1:def 14;
end;
theorem
Y c= rng f implies f.:(f"Y) = Y
proof
assume
A1: Y c= rng f;
thus f.:(f"Y) c= Y by Th75;
let y;
assume
A2: y in Y;
then consider x such that
A3: x in dom f & y = f.x by A1,Def3;
x in f"Y by A2,A3,Def7;
hence thesis by A3,Def6;
end;
theorem
f.:(f"Y) = Y /\ f.:(dom f)
proof
f.:(f"Y) c= Y & f.:(f"(Y)) c= f.:(dom f) by Th75,RELAT_1:114;
hence f.:(f"Y) c= Y /\ f.:(dom f) by XBOOLE_1:19;
let y;
assume
A1: y in Y /\ f.:(dom f);
then y in f.:(dom f) by XBOOLE_0:def 4;
then consider x such that
A2: x in dom f and
x in dom f and
A3: y = f.x by Def6;
y in Y by A1,XBOOLE_0:def 4;
then x in f"Y by A2,A3,Def7;
hence thesis by A2,A3,Def6;
end;
theorem Th79:
f.:(X /\ f"Y) c= (f.:X) /\ Y
proof
let y;
assume y in f.:(X /\ f"Y);
then consider x such that
A1: x in dom f and
A2: x in X /\ f"Y and
A3: y = f.x by Def6;
x in f"Y by A2,XBOOLE_0:def 4;
then
A4: y in Y by A3,Def7;
x in X by A2,XBOOLE_0:def 4;
then y in f.:X by A1,A3,Def6;
hence thesis by A4,XBOOLE_0:def 4;
end;
theorem
f.:(X /\ f"Y) = (f.:X) /\ Y
proof
thus f.:(X /\ f"Y)c=(f.:X) /\ Y by Th79;
let y;
assume
A1: y in (f.:X) /\ Y;
then y in f.:X by XBOOLE_0:def 4;
then consider x such that
A2: x in dom f and
A3: x in X and
A4: y = f.x by Def6;
y in Y by A1,XBOOLE_0:def 4;
then x in f"Y by A2,A4,Def7;
then x in X /\ f"Y by A3,XBOOLE_0:def 4;
hence thesis by A2,A4,Def6;
end;
theorem
X /\ R"Y c= R"(R.:X /\ Y)
proof
let x;
assume
A1: x in X /\ R"Y;
then x in R"Y by XBOOLE_0:def 4;
then consider Rx being set such that
A2: [x,Rx] in R and
A3: Rx in Y by RELAT_1:def 14;
x in X by A1,XBOOLE_0:def 4;
then Rx in R.:X by A2,RELAT_1:def 13;
then Rx in R.:X /\ Y by A3,XBOOLE_0:def 4;
hence thesis by A2,RELAT_1:def 14;
end;
theorem Th82:
f is one-to-one implies f"(f.:X) c= X
proof
assume
A1: f is one-to-one;
let x;
assume
A2: x in f"(f.:X);
then f.x in f.:X by Def7;
then
A3: ex z st z in dom f & z in X & f.x = f.z by Def6;
x in dom f by A2,Def7;
hence thesis by A1,A3,Def4;
end;
theorem
(for X holds f"(f.:X) c= X) implies f is one-to-one
proof
assume
A1: for X holds f"(f.:X) c= X;
given x1,x2 such that
A2: x1 in dom f and
A3: x2 in dom f and
A4: f.x1 = f.x2 & x1 <> x2;
A5: f"(f.:{x1}) c= {x1} by A1;
A6: Im(f,x2) = {f.x2} by A3,Th59;
A7: Im(f,x1) = {f.x1} by A2,Th59;
f.x1 in rng f by A2,Def3;
then f"(f.:{x1}) <> {} by A7,Th72;
then f"(f.:{x1}) = {x1} by A5,ZFMISC_1:33;
hence contradiction by A1,A4,A7,A6,ZFMISC_1:3;
end;
theorem
f is one-to-one implies f.:X = (f")"X
proof
assume
A1: f is one-to-one;
y in f.:X iff y in (f")"X
proof
thus y in f.:X implies y in (f")"X
proof
assume y in f.:X;
then consider x such that
A2: x in dom f and
A3: x in X and
A4: y = f.x by Def6;
y in rng f by A2,A4,Def3;
then
A5: y in dom(f") by A1,Th32;
(f").(f.x) = x by A1,A2,Th32;
hence thesis by A3,A4,A5,Def7;
end;
assume
A6: y in (f")"X;
then
A7: (f").y in X by Def7;
y in dom(f") by A6,Def7;
then y in rng(f) by A1,Th32;
then consider x such that
A8: x in dom(f) & y = f.x by Def3;
(f").y = x by A1,A8,Th34;
hence thesis by A7,A8,Def6;
end;
hence thesis by TARSKI:1;
end;
theorem
f is one-to-one implies f"Y = (f").:Y
proof
assume
A1: f is one-to-one;
x in f"Y iff x in (f").:Y
proof
thus x in f"Y implies x in (f").:Y
proof
assume
A2: x in f"Y;
then
A3: f.x in Y by Def7;
A4: x in dom f by A2,Def7;
then f.x in rng(f) by Def3;
then
A5: f.x in dom(f") by A1,Th32;
(f").(f.x) = x by A1,A4,Th32;
hence thesis by A3,A5,Def6;
end;
assume x in (f").:Y;
then consider y such that
A6: y in dom(f") and
A7: y in Y and
A8: x = (f").y by Def6;
dom(f") = rng f by A1,Th32;
then y = f.x & x in dom f by A1,A6,A8,Th32;
hence thesis by A7,Def7;
end;
hence thesis by TARSKI:1;
end;
theorem
Y = rng f & dom g = Y & dom h = Y & g*f = h*f implies g = h
proof
assume that
A1: Y = rng f and
A2: dom g = Y & dom h = Y and
A3: g*f = h*f;
y in Y implies g.y = h.y
proof
assume y in Y;
then consider x such that
A4: x in dom f & y = f.x by A1,Def3;
(g*f).x = g.y by A4,Th13;
hence thesis by A3,A4,Th13;
end;
hence thesis by A2,Th2;
end;
theorem
f.:X1 c= f.:X2 & X1 c= dom f & f is one-to-one implies X1 c= X2
proof
assume that
A1: f.:X1 c= f.:X2 and
A2: X1 c= dom f and
A3: f is one-to-one;
let x;
assume
A4: x in X1;
then f.x in f.:X1 by A2,Def6;
then ex x2 st x2 in dom f & x2 in X2 & f.x = f.x2 by A1,Def6;
hence thesis by A2,A3,A4,Def4;
end;
theorem Th88:
f"Y1 c= f"Y2 & Y1 c= rng f implies Y1 c= Y2
proof
assume that
A1: f"Y1 c= f"Y2 and
A2: Y1 c= rng f;
let y;
assume
A3: y in Y1;
then consider x such that
A4: x in dom f and
A5: y = f.x by A2,Def3;
x in f"Y1 by A3,A4,A5,Def7;
hence thesis by A1,A5,Def7;
end;
theorem
f is one-to-one iff for y ex x st f"{y} c= {x}
proof
(for y ex x st f"{y} c= {x}) iff for y st y in rng f ex x st f"{y} = {x}
proof
thus (for y ex x st f"{y} c= {x}) implies for y st y in rng f ex x st f"{y
} = {x}
proof
assume
A1: for y ex x st f"{y} c= {x};
let y;
consider x such that
A2: f"{y} c= {x} by A1;
assume y in rng f;
then consider x1 such that
A3: x1 in dom f and
A4: y = f.x1 by Def3;
take x;
f.x1 in {y} by A4,TARSKI:def 1;
then f"{y} <> {} by A3,Def7;
hence thesis by A2,ZFMISC_1:33;
end;
assume
A5: for y st y in rng f ex x st f"{y} = {x};
let y;
A6: now
set x = the set;
assume
A7: not y in rng f;
take x;
rng f misses {y} by A7,ZFMISC_1:50;
then f"{y} = {} by RELAT_1:138;
hence f"{y} c= {x} by XBOOLE_1:2;
end;
now
assume y in rng f;
then consider x such that
A8: f"{y} = {x} by A5;
take x;
thus f"{y} c= {x} by A8;
end;
hence thesis by A6;
end;
hence thesis by Th74;
end;
theorem
rng R c= dom S implies R"X c= (R*S)"(S.:X)
proof
assume
A1: rng R c= dom S;
let x;
assume x in R"X;
then consider Rx being set such that
A2: [x,Rx] in R and
A3: Rx in X by RELAT_1:def 14;
Rx in rng R by A2,XTUPLE_0:def 13;
then consider SRx being set such that
A4: [Rx,SRx] in S by A1,XTUPLE_0:def 12;
SRx in S.:X & [x,SRx] in R*S by A2,A3,A4,RELAT_1:def 8,def 13;
hence thesis by RELAT_1:def 14;
end;
theorem
for f being Function st f " X = f " Y & X c= rng f & Y c= rng f holds X = Y
proof
let f be Function;
assume f " X = f " Y & X c= rng f & Y c= rng f;
then X c= Y & Y c= X by Th88;
hence thesis by XBOOLE_0:def 10;
end;
begin
reserve e,u for set,
A for Subset of X;
theorem
(id X).:A = A
proof
now
let e;
thus e in A implies ex u st u in dom id X & u in A & e = (id X).u
proof
assume
A1: e in A;
take e;
thus e in dom id X by A1;
thus e in A by A1;
thus thesis by A1,Th17;
end;
assume ex u st u in dom id X & u in A & e = (id X).u;
hence e in A by Th17;
end;
hence thesis by Def6;
end;
definition
let f be Function;
redefine attr f is empty-yielding means
:Def8: for x st x in dom f holds f.x is empty;
compatibility
proof
hereby
assume
A1: f is empty-yielding;
let x;
assume x in dom f;
then f.x in rng f by Def3;
hence f.x is empty by A1,RELAT_1:149;
end;
assume
A2: for x st x in dom f holds f.x is empty;
let s be set;
assume s in rng f;
then ex e being set st e in dom f & s = f.e by Def3;
then s = {} by A2;
hence thesis by TARSKI:def 1;
end;
end;
definition
let F be Function;
redefine attr F is non-empty means
:Def9:
for n being set st n in dom F holds F.n is non empty;
compatibility
proof
hereby
assume F is non-empty;
then
A1: not {} in rng F by RELAT_1:def 9;
let i be set;
assume i in dom F;
hence F.i is non empty by A1,Def3;
end;
assume
A2: for n being set st n in dom F holds F.n is non empty;
assume {} in rng F;
then ex i being set st i in dom F & F.i = {} by Def3;
hence contradiction by A2;
end;
end;
registration
cluster non-empty for Function;
existence
proof
take {};
let x be set;
thus thesis;
end;
end;
scheme
LambdaB { D()->non empty set, F(set)->set } :
ex f be Function st dom f = D() & for d be Element of D() holds f.d = F(d)
proof
consider f be Function such that
A1: dom f = D() & for d be set st d in D() holds f.d = F(d) from Lambda;
take f;
thus thesis by A1;
end;
registration
let f be non-empty Function;
cluster rng f -> with_non-empty_elements;
coherence
proof
assume {} in rng f;
then ex x being set st x in dom f & {} = f.x by Def3;
hence thesis by Def9;
end;
end;
definition
let f be Function;
attr f is constant means
:Def10:
x in dom f & y in dom f implies f.x = f.y;
end;
theorem
for A,B being set, f being Function st A c= dom f & f.:A c= B holds A c= f"B
proof
let A,B be set, f being Function;
assume A c= dom f;
then
A1: A c= f"(f.:A) by Th76;
assume f.:A c= B;
then f"(f.:A) c= f"B by RELAT_1:143;
hence thesis by A1,XBOOLE_1:1;
end;
theorem
for f being Function st X c= dom f & f is one-to-one holds f"(f.:X) = X
proof
let f be Function such that
A1: X c= dom f and
A2: f is one-to-one;
thus f"(f.:X) c= X by A2,Th82;
let x;
assume
A3: x in X;
then f.x in f.:X by A1,Def6;
hence thesis by A1,A3,Def7;
end;
definition
let f,g;
redefine pred f = g means
dom f = dom g & for x st x in dom f holds f.x = g.x;
compatibility by Th2;
end;
registration
cluster non-empty non empty for Function;
existence
proof
consider f such that
A1: dom f = {{}} and
A2: rng f = {{{}}} by Th5;
take f;
not {} in rng f by A2,TARSKI:def 1;
hence f is non-empty by RELAT_1:def 9;
thus thesis by A1;
end;
end;
registration
let a be non-empty non empty Function;
let i be Element of dom a;
cluster a.i -> non empty;
coherence
proof
a.i in rng a by Def3;
hence thesis by RELAT_1:def 9;
end;
end;
registration
let f be Function;
cluster -> Function-like for Subset of f;
coherence
proof
let g be Subset of f;
let x,y1,y2;
assume [x,y1] in g & [x,y2] in g;
hence thesis by Def1;
end;
end;
theorem
for f,g being Function, D being set st D c= dom f & D c= dom g holds f
| D = g | D iff for x being set st x in D holds f.x = g.x
proof
let f,g be Function;
let D be set;
assume that
A1: D c= dom f and
A2: D c= dom g;
A3: dom (g | D) = dom g /\ D by RELAT_1:61
.= D by A2,XBOOLE_1:28;
hereby
assume
A4: f | D = g | D;
hereby
let x be set;
assume
A5: x in D;
hence f.x = (g | D).x by A4,Th49
.= g.x by A5,Th49;
end;
end;
assume
A6: for x being set st x in D holds f.x = g.x;
A7: now
let x be set;
assume
A8: x in D;
hence (f | D).x = f.x by Th49
.= g.x by A6,A8
.= (g | D).x by A8,Th49;
end;
dom (f | D) = dom f /\ D by RELAT_1:61
.= D by A1,XBOOLE_1:28;
hence thesis by A3,A7,Th2;
end;
theorem
for f,g being Function, X being set st dom f = dom g & (for x being
set st x in X holds f.x = g.x) holds f|X = g|X
proof
let f,g be Function, X be set such that
A1: dom f = dom g and
A2: for x being set st x in X holds f.x = g.x;
A3: dom (f|X) =dom f /\ X by RELAT_1:61;
then
A4: dom (f|X) = dom (g|X) by A1,RELAT_1:61;
now
let x be set;
assume
A5: x in dom (f|X);
then
A6: x in X by A3,XBOOLE_0:def 4;
(f|X).x = f.x & (g|X).x = g.x by A4,A5,Th47;
hence (f|X).x = (g|X).x by A2,A6;
end;
hence thesis by A4,Th2;
end;
theorem Th97:
rng(f|{X}) c= {f.X}
proof
let x;
assume x in rng(f|{X});
then consider y such that
A1: y in dom(f|{X}) and
A2: x = (f|{X}).y by Def3;
dom(f|{X}) c= {X} by RELAT_1:58;
then y = X by A1,TARSKI:def 1;
then x = f.X by A1,A2,Th47;
hence thesis by TARSKI:def 1;
end;
theorem
X in dom f implies rng(f|{X}) ={f.X}
proof
A1: X in {X} by TARSKI:def 1;
assume X in dom f;
then
A2: X in dom(f|{X}) by A1,RELAT_1:57;
thus rng(f|{X}) c= {f.X} by Th97;
let x;
assume x in {f.X};
then x = f.X by TARSKI:def 1;
then x = (f|{X}).X by A2,Th47;
hence thesis by A2,Def3;
end;
registration
cluster empty -> constant for Function;
coherence
proof
let f be Function;
assume
A1: f is empty;
let x be set;
thus thesis by A1;
end;
end;
registration
let f be constant Function;
cluster rng f -> trivial;
coherence
proof
per cases;
suppose
f is empty;
then reconsider g = f as empty Function;
rng g is empty;
hence thesis;
end;
suppose
f <> {};
then consider x being set such that
A1: x in dom f by XBOOLE_0:def 1;
for y being set holds y in {f.x} iff ex z being set st z in dom f &
y = f.z
proof
let y be set;
hereby
assume
A2: y in {f.x};
take x;
thus x in dom f & y = f.x by A1,A2,TARSKI:def 1;
end;
given z being set such that
A3: z in dom f & y = f.z;
y = f.x by A1,A3,Def10;
hence thesis by TARSKI:def 1;
end;
hence thesis by Def3;
end;
end;
end;
registration
cluster non constant for Function;
existence
proof
set f = {[1,1],[2,2]};
f is Function-like
proof
let x,y,z be set;
assume that
A1: [x,y] in f and
A2: [x,z] in f;
[x,y] = [1,1] or [x,y] =[2,2] by A1,TARSKI:def 2;
then
A3: x = 1 & y = 1 or x = 2 & y = 2 by XTUPLE_0:1;
[x,z] = [1,1] or [x,z] =[2,2] by A2,TARSKI:def 2;
hence thesis by A3,XTUPLE_0:1;
end;
then reconsider f as Function;
take f, 1, 2;
A4: [2,2] in f by TARSKI:def 2;
A5: [1,1] in f by TARSKI:def 2;
hence
A6: 1 in dom f & 2 in dom f by A4,XTUPLE_0:def 12;
then f.1 = 1 by A5,Def2;
hence thesis by A4,A6,Def2;
end;
end;
registration
let f be non constant Function;
cluster rng f -> non trivial;
coherence
proof
assume
A1: rng f is trivial;
per cases;
suppose
rng f is empty;
then reconsider f as empty Function;
f is trivial;
hence thesis;
end;
suppose
rng f is non empty;
then consider x being set such that
A2: x in rng f by XBOOLE_0:def 1;
f is constant
proof
let y,z be set;
assume that
A3: y in dom f and
A4: z in dom f;
A5: f.z in rng f by A4,Def3;
f.y in rng f by A3,Def3;
hence f.y = x by A1,A2,ZFMISC_1:def 10
.= f.z by A1,A2,A5,ZFMISC_1:def 10;
end;
hence thesis;
end;
end;
end;
registration
cluster non constant -> non trivial for Function;
coherence
proof
let f be Function;
assume f is non constant;
then consider n1,n2 being set such that
A1: n1 in dom f and
A2: n2 in dom f and
A3: f.n1 <> f.n2 by Def10;
reconsider f as non empty Function by A1;
f is non trivial
proof
reconsider x = [n1,f.n1], y = [n2,f.n2] as Element of f by A1,A2,Th1;
take x,y;
thus x in f & y in f;
thus thesis by A3,XTUPLE_0:1;
end;
hence thesis;
end;
end;
registration
cluster trivial -> constant for Function;
coherence;
end;
theorem
for F,G be Function, X holds (G|(F.:X))*(F|X) = (G*F)|X
proof
let F,G be Function,X;
set Y = dom ((G*F)|X);
now
let x;
thus x in dom ((G|(F.:X))*(F|X)) implies x in Y
proof
assume
A1: x in dom ((G|(F.:X))*(F|X));
then
A2: x in dom (F|X) by Th11;
then
A3: x in dom F /\ X by RELAT_1:61;
then
A4: x in X by XBOOLE_0:def 4;
(F|X).x in dom (G|(F.:X)) by A1,Th11;
then F.x in dom (G|(F.:X)) by A2,Th47;
then F.x in dom G /\ (F.:X) by RELAT_1:61;
then
A5: F.x in dom G by XBOOLE_0:def 4;
x in dom F by A3,XBOOLE_0:def 4;
then x in dom (G*F) by A5,Th11;
then x in dom (G*F)/\ X by A4,XBOOLE_0:def 4;
hence thesis by RELAT_1:61;
end;
assume x in Y;
then
A6: x in dom (G*F) /\ X by RELAT_1:61;
then
A7: x in dom (G*F) by XBOOLE_0:def 4;
then
A8: F.x in dom G by Th11;
A9: x in X by A6,XBOOLE_0:def 4;
x in dom F by A7,Th11;
then x in dom F /\ X by A9,XBOOLE_0:def 4;
then
A10: x in dom (F|X) by RELAT_1:61;
x in dom F by A7,Th11;
then F.x in F.:X by A9,Def6;
then F.x in dom G /\ (F.:X) by A8,XBOOLE_0:def 4;
then F.x in dom (G|(F.:X)) by RELAT_1:61;
then (F|X).x in dom (G|(F.:X)) by A10,Th47;
hence x in dom ((G|(F.:X))*(F|X)) by A10,Th11;
end;
then
A11: Y = dom ((G|(F.:X))*(F|X)) by TARSKI:1;
now
let x;
assume
A12: x in Y;
then
A13: x in dom (G*F) /\ X by RELAT_1:61;
then x in dom (G*F) by XBOOLE_0:def 4;
then
A14: x in dom F by Th11;
A15: x in X by A13,XBOOLE_0:def 4;
then
A16: F.x in F.:X by A14,Def6;
thus ((G|(F.:X))*(F|X)).x =(G|(F.:X)).((F|X).x) by A11,A12,Th12
.= (G|(F.:X)).(F.x) by A15,Th49
.= G.(F.x) by A16,Th49
.= (G*F).x by A14,Th13
.= ((G*F)|X).x by A13,Th48;
end;
hence thesis by A11,Th2;
end;
theorem
for F,G be Function, X,X1 holds (G|X1)*(F|X) = (G*F)|(X /\ (F"X1))
proof
let F,G be Function,X,X1;
set Y = dom ((G|X1)*(F|X));
now
let x;
thus x in dom ((G*F)|(X /\ (F"X1))) implies x in Y
proof
assume x in dom ((G*F)|(X /\ (F"X1)));
then
A1: x in dom (G*F) /\ (X /\ (F"X1)) by RELAT_1:61;
then
A2: x in dom (G*F) by XBOOLE_0:def 4;
A3: x in X /\ (F"X1) by A1,XBOOLE_0:def 4;
then
A4: x in X by XBOOLE_0:def 4;
x in dom F by A2,Th11;
then x in dom F /\ X by A4,XBOOLE_0:def 4;
then
A5: x in dom (F|X) by RELAT_1:61;
x in (F"X1) by A3,XBOOLE_0:def 4;
then
A6: F.x in X1 by Def7;
F.x in dom G by A2,Th11;
then F.x in dom G /\ X1 by A6,XBOOLE_0:def 4;
then F.x in dom (G|X1) by RELAT_1:61;
then (F|X).x in dom (G|X1) by A5,Th47;
hence thesis by A5,Th11;
end;
assume
A7: x in Y;
then
A8: x in dom(F|X) by Th11;
then
A9: x in dom F /\ X by RELAT_1:61;
then
A10: x in dom F by XBOOLE_0:def 4;
A11: x in X by A9,XBOOLE_0:def 4;
(F|X).x in dom(G|X1) by A7,Th11;
then F.x in dom (G|X1) by A8,Th47;
then
A12: F.x in dom G /\ X1 by RELAT_1:61;
then F.x in X1 by XBOOLE_0:def 4;
then x in F"X1 by A10,Def7;
then
A13: x in X /\ F"X1 by A11,XBOOLE_0:def 4;
F.x in dom G by A12,XBOOLE_0:def 4;
then x in dom (G*F) by A10,Th11;
then x in dom (G*F) /\ (X/\(F"X1)) by A13,XBOOLE_0:def 4;
hence x in dom ((G*F)|(X /\ (F"X1))) by RELAT_1:61;
end;
then
A14: Y = dom ((G*F)|(X /\ (F"X1))) by TARSKI:1;
now
let x;
assume
A15: x in Y;
then
A16: x in dom (F|X) by Th11;
then
A17: x in dom F /\ X by RELAT_1:61;
then
A18: x in dom F by XBOOLE_0:def 4;
A19: (F|X).x in dom (G|X1) by A15,Th11;
then
A20: F.x in dom (G|X1) by A16,Th47;
A21: x in X by A17,XBOOLE_0:def 4;
F.x in dom (G|X1) by A16,A19,Th47;
then F.x in dom G /\ X1 by RELAT_1:61;
then F.x in X1 by XBOOLE_0:def 4;
then x in F"X1 by A18,Def7;
then
A22: x in X /\ F"X1 by A21,XBOOLE_0:def 4;
thus ((G|X1)*(F|X)).x =(G|X1).((F|X).x) by A15,Th12
.= (G|X1).(F.x) by A16,Th47
.= G.(F.x) by A20,Th47
.= (G*F).x by A18,Th13
.= ((G*F)|(X/\(F"X1))).x by A22,Th49;
end;
hence thesis by A14,Th2;
end;
theorem
for F,G be Function,X holds X c= dom (G*F) iff X c= dom F & F.:X c= dom G
proof
let F,G be Function,X;
thus X c= dom (G*F) implies X c= dom F & F.:X c= dom G
proof
assume
A1: X c= dom (G*F);
then for x st x in X holds x in dom F by Th11;
hence X c= dom F by TARSKI:def 3;
let x;
assume x in F.:X;
then ex y st y in dom F & y in X & x=F.y by Def6;
hence thesis by A1,Th11;
end;
assume that
A2: X c= dom F and
A3: F.:X c= dom G;
let x;
assume
A4: x in X;
then F.x in F.:X by A2,Def6;
hence thesis by A2,A3,A4,Th11;
end;
definition
let f be Function;
assume
A1: f is non empty constant;
func the_value_of f means
ex x being set st x in dom f & it = f.x;
existence
proof
consider x being set such that
A2: x in dom f by A1,XBOOLE_0:def 1;
take f.x;
thus thesis by A2;
end;
uniqueness by A1,Def10;
end;
registration
let X,Y;
cluster X-defined Y-valued for Function;
existence
proof
take {};
thus dom{} c= X & rng{} c= Y by XBOOLE_1:2;
end;
end;
theorem
for X being set, f being X-valued Function for x being set st x in dom
f holds f.x in X
proof
let X be set, f be X-valued Function;
let x be set;
assume x in dom f;
then
A1: f.x in rng f by Def3;
rng f c= X by RELAT_1:def 19;
hence thesis by A1;
end;
definition
let IT be set;
attr IT is functional means
:Def13:
for x being set st x in IT holds x is Function;
end;
registration
cluster empty -> functional for set;
coherence
proof
let A be set;
assume
A1: A is empty;
let x be set;
thus thesis by A1;
end;
let f be Function;
cluster { f } -> functional;
coherence
proof
let x be set;
thus thesis by TARSKI:def 1;
end;
let g be Function;
cluster { f,g } -> functional;
coherence
proof
let x be set;
thus thesis by TARSKI:def 2;
end;
end;
registration
cluster non empty functional for set;
existence
proof
take { {} };
thus thesis;
end;
end;
registration
let P be functional set;
cluster -> Function-like Relation-like for Element of P;
coherence
proof
let x be Element of P;
per cases;
suppose
P is empty;
hence thesis by SUBSET_1:def 1;
end;
suppose
P is non empty;
hence thesis by Def13;
end;
end;
end;
registration
let A be functional set;
cluster -> functional for Subset of A;
coherence
proof
let B be Subset of A;
let x be set;
thus thesis;
end;
end;
definition let g,f be Function;
attr f is g-compatible means
:Def14: x in dom f implies f.x in g.x;
end;
theorem
f is g-compatible & dom f = dom g implies g is non-empty proof assume
A1: f is g-compatible & dom f = dom g;
let x;
assume x in dom g;
hence g.x is non empty by A1,Def14;
end;
theorem Th104:
{} is f-compatible
proof
let x;
thus thesis;
end;
registration
let I be set, f be Function;
cluster empty I-defined f-compatible for Function;
existence
proof
take {};
thus thesis by Th104,RELAT_1:171;
end;
end;
registration let X be set;
let f be Function, g be f-compatible Function;
cluster g|X -> f-compatible;
coherence
proof let x;
A1: dom(g|X) c= dom g by RELAT_1:60;
assume
A2: x in dom(g|X);
then g.x in f.x by A1,Def14;
hence (g|X).x in f.x by A2,Th47;
end;
end;
registration let I be set;
cluster non-empty I-defined for Function;
existence
proof
take {};
thus {} is non-empty;
thus dom {} c= I by XBOOLE_1:2;
end;
end;
theorem Th105:
for g being f-compatible Function holds dom g c= dom f
proof
let g be f-compatible Function;
let x be set;
assume x in dom g;
then g.x in f.x by Def14;
hence x in dom f by Def2;
end;
registration let X;
let f be X-defined Function;
cluster f-compatible -> X-defined for Function;
coherence
proof let g be Function;
assume g is f-compatible;
then
A1: dom g c= dom f by Th105;
dom f c= X by RELAT_1:def 18;
hence dom g c= X by A1,XBOOLE_1:1;
end;
end;
theorem
for f being X-valued Function st x in dom f holds f.x is Element of X
proof let f be X-valued Function;
assume x in dom f;
then
A1: f.x in rng f by Def3;
rng f c= X by RELAT_1:def 19;
hence f.x is Element of X by A1;
end;
theorem
for f being Function,A being set st f is one-to-one & A c= dom f
holds f".:(f.:A)=A
proof
let f be Function,A be set;
set B = f.:A;
assume that
A1: f is one-to-one and
A2: A c= dom f;
A3: f".:B c= A
proof
let y be set;
assume y in f".:B;
then consider x being set such that
x in dom (f") and
A4: x in B and
A5: y=f".x by Def6;
ex y2 being set st ( y2 in dom f)&( y2 in A)&( x=f.y2) by A4,Def6
;
hence thesis by A1,A5,Th32;
end;
A c= f".:B
proof
let x be set;
assume
A6: x in A;
set y0=f.x;
A7: f".y0=x by A1,A2,A6,Th34;
y0 in rng f by A2,A6,Def3;
then
A8: y0 in dom (f") by A1,Th33;
y0 in B by A2,A6,Def6;
hence thesis by A7,A8,Def6;
end;
hence thesis by A3,XBOOLE_0:def 10;
end;
registration
let A be functional set, x be set;
let F be A-valued Function;
cluster F.x -> Function-like Relation-like;
coherence
proof
per cases;
suppose x in dom F;
then
A1: F.x in rng F by Def3;
rng F c= A by RELAT_1:def 19;
hence thesis by A1;
end;
suppose not x in dom F;
hence thesis by Def2;
end;
end;
end;
theorem Th108:
x in X & x in dom f implies f.x in f.:X
proof assume that
A1: x in X and
A2: x in dom f;
x in X /\ dom f by A1,A2,XBOOLE_0:def 4;
then x in dom(f|X) by RELAT_1:61;
then
A3: (f|X).x in rng(f|X) by Def3;
(f|X).x = f.x by A1,Th49;
hence f.x in f.:X by A3,RELAT_1:115;
end;
theorem
X <> {} & X c= dom f implies f.:X <> {}
proof assume X <> {};
then ex x st x in X by XBOOLE_0:def 1;
hence thesis by Th108;
end;
registration
let f be non trivial Function;
cluster dom f -> non trivial;
coherence
proof
consider u,w being set such that
A1: u in f and
A2: w in f and
A3: u <> w by ZFMISC_1:def 10;
consider u1,u2 being set such that
A4: u = [u1,u2] by A1,RELAT_1:def 1;
consider w1,w2 being set such that
A5: w = [w1,w2] by A2,RELAT_1:def 1;
take u1,w1;
thus u1 in dom f & w1 in dom f by A4,A5,A1,A2,XTUPLE_0:def 12;
thus u1 <> w1 by A1,A2,A3,A4,A5,Def1;
end;
end;
theorem
for B being non empty functional set, f being Function
st f = union B
holds dom f = union { dom g where g is Element of B: not contradiction}
& rng f = union { rng g where g is Element of B: not contradiction }
proof
let B be non empty functional set, f be Function such that
A1: f = union B;
set X = { dom g where g is Element of B: not contradiction };
now
let x be set;
hereby
assume x in dom f;
then [x,f.x] in f by Th1;
then consider g being set such that
A2: [x,f.x] in g and
A3: g in B by A1,TARSKI:def 4;
reconsider g as Function by A3;
take Z = dom g;
thus x in Z & Z in X by A2,A3,Th1;
end;
given Z being set such that
A4: x in Z and
A5: Z in X;
consider g being Element of B such that
A6: Z = dom g by A5;
[x,g.x] in g by A4,A6,Th1;
then [x,g.x] in f by A1,TARSKI:def 4;
hence x in dom f by Th1;
end;
hence dom f = union X by TARSKI:def 4;
set X = { rng g where g is Element of B: not contradiction };
now
let y be set;
hereby
assume y in rng f;
then consider x being set such that
A7: x in dom f & y = f.x by Def3;
[x,y] in f by A7,Th1;
then consider g being set such that
A8: [x,y] in g and
A9: g in B by A1,TARSKI:def 4;
reconsider g as Function by A9;
take Z = rng g;
x in dom g & y = g.x by A8,Th1;
hence y in Z & Z in X by A9,Def3;
end;
given Z being set such that
A10: y in Z and
A11: Z in X;
consider g being Element of B such that
A12: Z = rng g by A11;
consider x being set such that
A13: x in dom g & y = g.x by A10,A12,Def3;
[x,y] in g by A13,Th1;
then [x,y] in f by A1,TARSKI:def 4;
hence y in rng f by XTUPLE_0:def 13;
end;
hence thesis by TARSKI:def 4;
end;
theorem Th111:
for M being set
st for X st X in M holds X <> {}
ex f being Function
st dom f = M & for X st X in M holds f.X in X
proof let M be set;
assume
A1: for X st X in M holds X <> {};
deffunc F(set) = the Element of $1;
consider f being Function such that
A2: dom f = M and
A3: for x st x in M holds f.x = F(x) from Lambda;
take f;
thus dom f = M by A2;
let X;
assume
A4: X in M;
then
A5: f.X = the Element of X by A3;
X <> {} by A1,A4;
hence f.X in X by A5;
end;
scheme
NonUniqBoundFuncEx { X() -> set, Y() -> set, P[set,set] }:
ex f being Function st dom f = X() & rng f c= Y()
& for x st x in X() holds P[x,f.x]
provided
A1: for x st x in X() ex y st y in Y() & P[x,y]
proof
per cases;
suppose
A2: X() = {};
take {};
thus thesis by A2,XBOOLE_1:2;
end;
suppose
A3: X() <> {};
defpred Q[set,set] means for y holds y in $2 iff y in Y() & P[$1,y];
A4: for e,u1,u2 being set st e in X() & Q[e,u1] & Q[e,u2] holds u1 = u2
proof
let e,u1,u2 be set such that
e in X();
assume
A5: for y holds y in u1 iff y in Y() & P[e,y];
defpred A[set] means $1 in Y() & P[e,$1];
A6: for x be set holds x in u1 iff A[x] by A5;
assume
A7: for y holds y in u2 iff y in Y() & P[e,y];
A8: for x be set holds x in u2 iff A[x] by A7;
u1 = u2 from XBOOLE_0:sch 2(A6,A8);
hence thesis;
end;
A9: for x st x in X() ex y st Q[x,y]
proof
let x such that
x in X();
defpred R[set] means P[x,$1];
consider X such that
A10: y in X iff y in Y() & R[y] from XBOOLE_0:sch 1;
take X;
thus thesis by A10;
end;
consider G being Function such that
A11: dom G = X() & for x st x in X() holds Q[x,G.x] from FuncEx(A4,A9);
reconsider D = rng G as non empty set by A11,A3,RELAT_1:42;
now
let X;
assume X in D;
then consider x such that
A12: x in dom G & X = G.x by Def3;
(for y holds y in X iff y in Y() & P[x,y]) &
ex y st y in Y() & P[x,y] by A1,A11,A12;
hence X <> {};
end;
then consider F be Function such that
A13: dom F = D and
A14: for X st X in D holds F.X in X by Th111;
A15: dom (F*G) = X() by A11,A13,RELAT_1:27;
take f = F*G;
thus dom f = X() by A11,A13,RELAT_1:27;
rng F c= Y()
proof
let x;
assume x in rng F;
then consider y such that
A16: y in dom F and
A17: x = F.y by Def3;
A18: ex z st z in dom G & y = G.z by A13,A16,Def3;
x in y by A13,A14,A16,A17;
hence thesis by A11,A18;
end;
hence rng f c= Y() by A13,RELAT_1:28;
let x;
assume
A19: x in X();
then f.x = F.(G.x) & G.x in D by A11,A15,Th12,Def3;
then f.x in G.x by A14;
hence thesis by A11,A19;
end;
end;
registration
let f be empty-yielding Function;
let x;
cluster f.x -> empty;
coherence
proof
x in dom f or not x in dom f;
hence thesis by Def2,Def8;
end;
end;
begin
reserve X,Y,p,x,x1,x2,y,y1,y2,z,z1,z2 for set;
reserve f,g,h for Function;
theorem Th1:
for G being set st G c= f holds G is Function;
theorem Th2:
f c= g iff dom f c= dom g & for x st x in dom f holds f.x = g.x
proof
thus f c= g implies dom f c= dom g & for x st x in dom f holds f.x = g.x
proof
assume
A1: f c= g;
hence dom f c= dom g by RELAT_1:11;
let x;
assume x in dom f;
then [x,f.x] in f by FUNCT_1:def 2;
hence thesis by A1,FUNCT_1:1;
end;
assume that
A2: dom f c= dom g and
A3: for x st x in dom f holds f.x = g.x;
let x,y;
assume
A4: [x,y] in f;
then
A5: x in dom f by FUNCT_1:1;
y = f.x by A4,FUNCT_1:1;
then y = g.x by A3,A5;
hence thesis by A2,A5,FUNCT_1:def 2;
end;
theorem
dom f = dom g & f c= g implies f = g
proof
assume that
A1: dom f = dom g and
A2: f c= g;
[x,y] in f iff [x,y] in g
proof
thus [x,y] in f implies [x,y] in g by A2;
assume
A3: [x,y] in g;
then x in dom f by A1,XTUPLE_0:def 12;
then [x,f.x] in f by FUNCT_1:1;
hence thesis by A2,A3,FUNCT_1:def 1;
end;
hence thesis by RELAT_1:def 2;
end;
Lm1: rng f /\ rng h = {} & x in dom f & y in dom h implies f.x <> h.y
proof
assume
A1: rng f /\ rng h = {};
assume x in dom f & y in dom h;
then f.x in rng f & h.y in rng h by FUNCT_1:def 3;
hence thesis by A1,XBOOLE_0:def 4;
end;
theorem
[x,z] in (g*f) implies [x,f.x] in f & [f.x,z] in g
proof
assume [x,z] in (g*f);
then ex y st [x,y] in f & [y,z] in g by RELAT_1:def 8;
hence thesis by FUNCT_1:1;
end;
theorem
{[x,y]} is Function;
Lm2: [x,y] in {[x1,y1]} implies x = x1 & y = y1
proof
assume [x,y] in {[x1,y1]};
then [x,y] = [x1,y1] by TARSKI:def 1;
hence thesis by XTUPLE_0:1;
end;
theorem
f = {[x,y]} implies f.x = y
proof
assume f = {[x,y]};
then [x,y] in f by TARSKI:def 1;
hence thesis by FUNCT_1:1;
end;
theorem Th7:
dom f = {x} implies f = {[x,f.x]}
proof
reconsider g = {[x,f.x]} as Function;
assume
A1: dom f = {x};
[y,z] in f iff [y,z] in g
proof
thus [y,z] in f implies [y,z] in g
proof
assume
A2: [y,z] in f;
then y in {x} by A1,XTUPLE_0:def 12;
then
A3: y = x by TARSKI:def 1;
A4: rng f = {f.x} by A1,FUNCT_1:4;
z in rng f by A2,XTUPLE_0:def 13;
then z = f.x by A4,TARSKI:def 1;
hence thesis by A3,TARSKI:def 1;
end;
assume [y,z] in g;
then
A5: y = x & z = f.x by Lm2;
x in dom f by A1,TARSKI:def 1;
hence thesis by A5,FUNCT_1:def 2;
end;
hence thesis by RELAT_1:def 2;
end;
theorem
{[x1,y1],[x2,y2]} is Function iff (x1 = x2 implies y1 = y2)
proof
thus {[x1,y1],[x2,y2]} is Function & x1 = x2 implies y1 = y2
proof
A1: [x1,y1] in {[x1,y1],[x2,y2]} & [x2,y2] in {[x1,y1],[x2,y2]} by TARSKI:def 2
;
assume {[x1,y1],[x2,y2]} is Function;
hence thesis by A1,FUNCT_1:def 1;
end;
assume
A2: x1 = x2 implies y1 = y2;
now
thus p in {[x1,y1],[x2,y2]} implies ex x,y st [x,y] = p
proof
assume p in {[x1,y1],[x2,y2]};
then p = [x1,y1] or p = [x2,y2] by TARSKI:def 2;
hence thesis;
end;
let x,z1,z2;
A3: [x,z1] = [x1,y1] & [x,z2] = [x1,y1] or [x,z1] = [x2,y2] & [x,z2] = [
x2,y2] implies z1 = y1 & z2 = y1 or z1 = y2 & z2 = y2 by XTUPLE_0:1;
A4: now
assume
A5: [x,z1] = [x1,y1] & [x,z2] = [x2,y2] or [x,z1] = [x2,y2] & [x,z2
] = [x1,y1];
then x = x1 & x = x2 by XTUPLE_0:1;
hence z1 = z2 by A2,A5,XTUPLE_0:1;
end;
assume [x,z1] in {[x1,y1],[x2,y2]} & [x,z2] in {[x1,y1],[x2,y2]};
hence z1 = z2 by A3,A4,TARSKI:def 2;
end;
hence thesis by FUNCT_1:def 1;
end;
theorem Th9:
f is one-to-one iff for x1,x2,y st [x1,y] in f & [x2,y] in f holds x1 = x2
proof
thus f is one-to-one implies for x1,x2,y st [x1,y] in f & [x2,y] in f holds
x1 = x2
proof
assume
A1: f is one-to-one;
let x1,x2,y;
assume
A2: [x1,y] in f & [x2,y] in f;
then
A3: f.x1 = y & f.x2 = y by FUNCT_1:1;
x1 in dom f & x2 in dom f by A2,FUNCT_1:1;
hence thesis by A1,A3,FUNCT_1:def 4;
end;
assume
A4: for x1,x2,y st [x1,y] in f & [x2,y] in f holds x1 = x2;
let x1,x2;
assume x1 in dom f & x2 in dom f & f.x1 = f.x2;
then [x1,f.x1] in f & [x2,f.x1] in f by FUNCT_1:1;
hence thesis by A4;
end;
theorem Th10:
g c= f & f is one-to-one implies g is one-to-one
proof
assume g c= f & f is one-to-one;
then for x1,x2,y st [x1,y] in g & [x2,y] in g holds x1 = x2 by Th9;
hence thesis by Th9;
end;
registration
let f,X;
cluster f /\ X -> Function-like;
coherence by Th1,XBOOLE_1:17;
end;
theorem
x in dom(f /\ g) implies (f /\ g).x = f.x
proof
set y = (f /\ g).x;
assume x in dom(f /\ g);
then [x,y] in (f /\ g) by FUNCT_1:def 2;
then [x,y] in f by XBOOLE_0:def 4;
hence thesis by FUNCT_1:1;
end;
theorem
f is one-to-one implies f /\ g is one-to-one by Th10,XBOOLE_1:17;
theorem
dom f misses dom g implies f \/ g is Function
proof
assume
A1: dom f /\ dom g = {};
now
thus p in f \/ g implies ex x,y st [x,y] = p by RELAT_1:def 1;
let x,y1,y2;
assume [x,y1] in f \/ g;
then
A2: [x,y1] in f or [x,y1] in g by XBOOLE_0:def 3;
assume [x,y2] in f \/ g;
then
A3: [x,y2] in f or [x,y2] in g by XBOOLE_0:def 3;
not (x in dom f & x in dom g) by A1,XBOOLE_0:def 4;
hence y1 = y2 by A2,A3,FUNCT_1:def 1,XTUPLE_0:def 12;
end;
hence thesis by FUNCT_1:def 1;
end;
theorem
f c= h & g c= h implies f \/ g is Function by Th1,XBOOLE_1:8;
Lm3: h = f \/ g implies (x in dom h iff x in dom f or x in dom g)
proof
assume
A1: h = f \/ g;
thus x in dom h implies x in dom f or x in dom g
proof
assume x in dom h;
then [x,h.x] in h by FUNCT_1:def 2;
then [x,h.x] in f or [x,h.x] in g by A1,XBOOLE_0:def 3;
hence thesis by XTUPLE_0:def 12;
end;
assume x in dom f or x in dom g;
then [x,f.x] in f or [x,g.x] in g by FUNCT_1:def 2;
then [x,f.x] in h or [x,g.x] in h by A1,XBOOLE_0:def 3;
hence thesis by XTUPLE_0:def 12;
end;
theorem Th15:
x in dom g & h = f \/ g implies h.x = g.x
proof
assume x in dom g;
then [x,g.x] in g by FUNCT_1:def 2;
then h = f \/ g implies [x,g.x] in h by XBOOLE_0:def 3;
hence thesis by FUNCT_1:1;
end;
theorem
x in dom h & h = f \/ g implies h.x = f.x or h.x = g.x
proof
assume x in dom h;
then [x,h.x] in h by FUNCT_1:def 2;
then h = f \/ g implies [x,h.x] in f or [x,h.x] in g by XBOOLE_0:def 3;
hence thesis by FUNCT_1:1;
end;
theorem
f is one-to-one & g is one-to-one & h = f \/ g & rng f misses rng g
implies h is one-to-one
proof
assume that
A1: f is one-to-one & g is one-to-one and
A2: h = f \/ g and
A3: rng f /\ rng g = {};
now
let x1,x2;
assume that
A4: x1 in dom h & x2 in dom h and
A5: h.x1 = h.x2;
A6: now
assume x1 in dom f & x2 in dom g or x1 in dom g & x2 in dom f;
then
h.x1 = f.x1 & h.x2 = g.x2 & f.x1 <> g.x2 or h.x1 = g.x1 & h.x2 = f.
x2 & f.x2 <> g.x1 by A2,A3,Lm1,Th15;
hence x1 = x2 by A5;
end;
A7: x1 in dom g & x2 in dom g implies h.x1 = g.x1 & h.x2 = g.x2 by A2,Th15;
x1 in dom f & x2 in dom f implies h.x1 = f.x1 & h.x2 = f.x2 by A2,Th15;
then x1 in dom f & x2 in dom f or x1 in dom g & x2 in dom g implies x1 =
x2 by A1,A5,A7,FUNCT_1:def 4;
hence x1 = x2 by A2,A4,A6,Lm3;
end;
hence thesis by FUNCT_1:def 4;
end;
canceled 2;
theorem
f is one-to-one implies for x,y holds [y,x] in f" iff [x,y] in f
proof
assume
A1: f is one-to-one;
let x,y;
dom(f") = rng(f) by A1,FUNCT_1:33;
then y in dom(f") & x = (f").y iff x in dom f & y = f.x by A1,FUNCT_1:32;
hence thesis by FUNCT_1:1;
end;
theorem
f = {} implies f" = {}
proof
assume f = {};
then dom(f") = {} by FUNCT_1:33,RELAT_1:38;
hence thesis;
end;
theorem
x in dom f & x in X iff [x,f.x] in f|X
proof
x in dom f iff [x,f.x] in f by FUNCT_1:def 2,XTUPLE_0:def 12;
hence thesis by RELAT_1:def 11;
end;
theorem Th23:
g c= f implies f|dom g = g
proof
assume
A1: g c= f;
[x,y] in (f|dom g) implies [x,y] in g
proof
assume
A2: [x,y] in (f|dom g);
then x in dom g by RELAT_1:def 11;
then
A3: [x,g.x] in g by FUNCT_1:def 2;
[x,y] in f by A2,RELAT_1:def 11;
hence thesis by A1,A3,FUNCT_1:def 1;
end;
then
A4: (f|dom g) c= g by RELAT_1:def 3;
(g|dom g) c= (f|dom g) by A1,RELAT_1:76;
then g c= (f|dom g);
hence thesis by A4,XBOOLE_0:def 10;
end;
theorem
x in dom f & f.x in Y iff [x,f.x] in Y|`f
proof
x in dom f iff [x,f.x] in f by FUNCT_1:def 2,XTUPLE_0:def 12;
hence thesis by RELAT_1:def 12;
end;
theorem
g c= f & f is one-to-one implies rng g|`f = g
proof
assume
A1: g c= f;
assume
A2: f is one-to-one;
[x,y] in (rng g|`f) implies [x,y] in g
proof
assume
A3: [x,y] in (rng g|`f);
then y in rng g by RELAT_1:def 12;
then
A4: ex x1 st [x1,y] in g by XTUPLE_0:def 13;
[x,y] in f by A3,RELAT_1:def 12;
hence thesis by A1,A2,A4,Th9;
end;
then
A5: (rng g|`f) c= g by RELAT_1:def 3;
(rng g|`g) c= (rng g|`f) by A1,RELAT_1:101;
then g c= (rng g|`f);
hence thesis by A5,XBOOLE_0:def 10;
end;
theorem
x in f"Y iff [x,f.x] in f & f.x in Y
proof
thus x in f"Y implies [x,f.x] in f & f.x in Y
proof
assume x in f"Y;
then ex y st [x,y] in f & y in Y by RELAT_1:def 14;
hence thesis by FUNCT_1:1;
end;
thus thesis by RELAT_1:def 14;
end;
begin
theorem
for X being set, f,g being Function st X c= dom f & f c= g holds f|X = g|X
proof
let X be set, f,g be Function such that
A1: X c= dom f;
assume f c= g;
hence f|X = g|(dom f)|X by Th23
.= g|((dom f) /\ X) by RELAT_1:71
.= g|X by A1,XBOOLE_1:28;
end;
theorem Th28:
for f being Function, x being set st x in dom f holds f|{x} = {[ x,f.x]}
proof
let f be Function, x be set such that
A1: x in dom f;
A2: x in {x} by TARSKI:def 1;
dom(f|{x} qua Function) = dom f /\ {x} by RELAT_1:61
.= {x} by A1,ZFMISC_1:46;
hence f|{x} = {[x,(f|{x}).x]} by Th7
.= {[x,f.x]} by A2,FUNCT_1:49;
end;
theorem Th29:
for f,g being Function, x being set st dom f = dom g & f.x = g.x
holds f|{x} = g|{x}
proof
let f,g be Function, x be set such that
A1: dom f = dom g and
A2: f.x = g.x;
per cases;
suppose
A3: x in dom f;
hence f|{x} = {[x,g.x]} by A2,Th28
.= g|{x} by A1,A3,Th28;
end;
suppose
not x in dom f;
then
A4: {x} misses dom f by ZFMISC_1:50;
hence f|{x} = {} by RELAT_1:66
.= g|{x} by A1,A4,RELAT_1:66;
end;
end;
theorem Th30:
for f,g being Function, x,y being set st dom f = dom g & f.x = g
.x & f.y = g.y holds f|{x,y} = g|{x,y}
proof
let f,g be Function, x,y be set;
assume dom f = dom g & f.x = g.x & f.y = g.y;
then
A1: f|{x} = g|{x} & f|{y} = g|{y} by Th29;
{x,y} = {x} \/ {y} by ENUMSET1:1;
hence thesis by A1,RELAT_1:150;
end;
theorem
for f,g being Function, x,y,z being set st dom f = dom g & f.x = g.x &
f.y = g.y & f.z = g.z holds f|{x,y,z} = g|{x,y,z}
proof
let f,g be Function, x,y,z be set;
assume dom f = dom g & f.x = g.x & f.y = g.y & f.z = g.z;
then
A1: f|{x,y} = g|{x,y} & f|{z} = g|{z} by Th29,Th30;
{x,y,z} = {x,y} \/ {z} by ENUMSET1:3;
hence thesis by A1,RELAT_1:150;
end;
registration
let f be Function, A be set;
cluster f \ A -> Function-like;
coherence;
end;
theorem
for f, g being Function st x in dom f \ dom g holds (f \ g).x = f.x
proof
let f, g be Function such that
A1: x in dom f \ dom g;
f \ g c= f & dom f \ dom g c= dom (f \ g) by RELAT_1:3;
hence thesis by A1,Th2;
end;
theorem
f c= g & f c= h implies g|dom f = h|dom f
proof
assume that
A1: f c= g and
A2: f c= h;
thus g|dom f = f by A1,Th23
.= h|dom f by A2,Th23;
end;
registration let f be Function, g be Subset of f;
cluster g-compatible -> f-compatible for Function;
coherence
proof let F be Function such that
A1: F is g-compatible;
let x;
assume x in dom F;
then
A2: F.x in g.x by A1,FUNCT_1:def 14;
then x in dom g by FUNCT_1:def 2;
hence F.x in f.x by A2,Th2;
end;
end;
theorem Th34:
g c= f implies g = f|dom g
proof
assume
A1: g c= f;
then dom g c= dom f by RELAT_1:11;
hence dom g = dom(f|dom g) by RELAT_1:62;
let x;
assume
A2: x in dom g;
hence g.x = f.x by A1,Th2
.= (f|dom g).x by A2,FUNCT_1:49;
end;
registration
let f be Function, g be f-compatible Function;
cluster -> f-compatible for Subset of g;
coherence
proof let h be Subset of g;
h = g|dom h by Th34;
hence thesis;
end;
end;
theorem
g c= f & x in X & X /\ dom f c= dom g
implies f.x = g.x
proof assume that
A1: g c= f and
A2: x in X and
A3: X /\ dom f c= dom g;
per cases;
suppose x in dom g;
hence f.x = g.x by A1,Th2;
end;
suppose
A4: not x in dom g;
then not x in X /\ dom f by A3;
then not x in dom f by A2,XBOOLE_0:def 4;
hence f.x = {} by FUNCT_1:def 2
.= g.x by A4,FUNCT_1:def 2;
end;
end;
begin
reserve X,a,b,c,x,y,z for set;
reserve P,R for Relation;
definition
let R,X;
pred R is_reflexive_in X means
:Def1:
x in X implies [x,x] in R;
pred R is_irreflexive_in X means
:Def2:
x in X implies not [x,x] in R;
pred R is_symmetric_in X means
:Def3:
x in X & y in X & [x,y] in R implies [ y,x] in R;
pred R is_antisymmetric_in X means
:Def4:
x in X & y in X & [x,y] in R & [y, x] in R implies x = y;
pred R is_asymmetric_in X means
:Def5:
x in X & y in X & [x,y] in R implies not [y,x] in R;
pred R is_connected_in X means
:Def6:
x in X & y in X & x <>y implies [x,y] in R or [y,x] in R;
pred R is_strongly_connected_in X means
:Def7:
x in X & y in X implies [x,y] in R or [y,x] in R;
pred R is_transitive_in X means
:Def8:
x in X & y in X & z in X & [x,y] in R & [y,z] in R implies [x,z] in R;
end;
definition
let R;
attr R is reflexive means
:Def9:
R is_reflexive_in field R;
attr R is irreflexive means
:Def10:
R is_irreflexive_in field R;
attr R is symmetric means
:Def11:
R is_symmetric_in field R;
attr R is antisymmetric means
:Def12:
R is_antisymmetric_in field R;
attr R is asymmetric means
:Def13:
R is_asymmetric_in field R;
attr R is connected means
:Def14:
R is_connected_in field R;
attr R is strongly_connected means
:Def15:
R is_strongly_connected_in field R;
attr R is transitive means
:Def16:
R is_transitive_in field R;
end;
registration
cluster empty -> reflexive irreflexive symmetric antisymmetric asymmetric
connected strongly_connected transitive for Relation;
coherence
proof
let R be Relation;
assume
A1: R is empty;
thus R is reflexive
proof
let x;
thus thesis by A1,RELAT_1:40;
end;
thus R is irreflexive
proof
let x;
thus thesis by A1;
end;
thus R is symmetric
proof
let x;
thus thesis by A1;
end;
thus R is antisymmetric
proof
let x;
thus thesis by A1;
end;
thus R is asymmetric
proof
let x;
thus thesis by A1;
end;
thus R is connected
proof
let x;
thus thesis by A1,RELAT_1:40;
end;
thus R is strongly_connected
proof
let x;
thus thesis by A1,RELAT_1:40;
end;
let x;
thus thesis by A1;
end;
end;
theorem
R is reflexive iff id field R c= R
proof
hereby
assume
A3: R is reflexive;
thus id field R c= R
proof
let a,b;
assume [a,b] in id field R;
then a in field R & a = b by RELAT_1:def 10;
hence [a,b] in R by A3,Def1,Def9;
end;
end;
assume
A2: id field R c= R;
let a;
assume a in field R;
then [a,a] in id field R by RELAT_1:def 10;
hence [a,a] in R by A2;
end;
theorem
R is irreflexive iff id field R misses R
proof
hereby
assume R is irreflexive;
then
A2: R is_irreflexive_in field R by Def10;
now
let a,b;
assume
A3: [a,b] in id (field R) /\ R;
then [a,b] in id (field R) by XBOOLE_0:def 4;
then
A4: a in field R & a = b by RELAT_1:def 10;
[a,b] in R by A3,XBOOLE_0:def 4;
hence contradiction by A2,A4,Def2;
end;
hence id (field R) misses R by RELAT_1:37,XBOOLE_0:def 7;
end;
assume
A5: id (field R) misses R;
let a;
assume a in field R;
then [a,a] in id field R by RELAT_1:def 10;
hence thesis by A5,XBOOLE_0:3;
end;
theorem
R is_antisymmetric_in X iff R \ id X is_asymmetric_in X
proof
hereby
assume
A1: R is_antisymmetric_in X;
thus R \ id X is_asymmetric_in X
proof
let x,y;
assume that
A2: x in X and
A3: y in X and
A4: [x,y] in R \ id X;
not [x,y] in id X by A4,XBOOLE_0:def 5;
then
A5: x <> y by A2,RELAT_1:def 10;
[x,y] in R by A4,XBOOLE_0:def 5;
then not [y,x] in R by A1,A2,A3,A5,Def4;
hence not [y,x] in R \ id X by XBOOLE_0:def 5;
end;
end;
assume
A6: R \ id X is_asymmetric_in X;
let x,y;
assume that
A7: x in X & y in X and
A8: [x,y] in R and
A9: [y,x] in R;
assume
A10: x <> y;
then not [y,x] in id X by RELAT_1:def 10;
then
A11: [y,x] in R \ id X by A9,XBOOLE_0:def 5;
not [x,y] in id X by A10,RELAT_1:def 10;
then [x,y] in R \ id X by A8,XBOOLE_0:def 5;
hence contradiction by A6,A7,A11,Def5;
end;
theorem
R is_asymmetric_in X implies R \/ id X is_antisymmetric_in X
proof
assume
A1: R is_asymmetric_in X;
let x,y;
assume that
A2: x in X & y in X and
A3: [x,y] in R \/ id X and
A4: [y,x] in R \/ id X;
assume
A5: x <> y;
then not [y,x] in id X by RELAT_1:def 10;
then
A6: [y,x] in R by A4,XBOOLE_0:def 3;
not [x,y] in id X by A5,RELAT_1:def 10;
then [x,y] in R by A3,XBOOLE_0:def 3;
hence contradiction by A1,A2,A6,Def5;
end;
canceled 7;
registration
cluster symmetric transitive -> reflexive for Relation;
coherence
proof
let R be Relation;
assume that
A1: R is symmetric and
A2: R is transitive;
A3: R is_transitive_in field R by A2,Def16;
A4: R is_symmetric_in field R by A1,Def11;
let a;
A5: now
assume a in dom R;
then consider b such that
A6: [a,b] in R by XTUPLE_0:def 12;
A7: a in field R & b in field R by A6,RELAT_1:15;
then [b,a] in R by A4,A6,Def3;
hence [a,a] in R by A3,A6,A7,Def8;
end;
now
assume a in rng R;
then consider b such that
A9: [b,a] in R by XTUPLE_0:def 13;
A10: a in field R & b in field R by A9,RELAT_1:15;
then [a,b] in R by A4,A9,Def3;
hence [a,a] in R by A3,A9,A10,Def8;
end;
hence thesis by A5,XBOOLE_0:def 3;
end;
end;
registration
let X;
cluster id X -> symmetric transitive antisymmetric;
coherence
proof
thus id X is symmetric
proof
let a,b;
assume that
a in field(id X) and
b in field(id X) and
A1: [a,b] in id X;
a = b by A1,RELAT_1:def 10;
hence thesis by A1;
end;
thus id X is transitive
proof
let a,b,c;
thus thesis by RELAT_1:def 10;
end;
thus id X is antisymmetric
proof
let a,b;
thus thesis by RELAT_1:def 10;
end;
end;
end;
registration
cluster irreflexive transitive -> asymmetric for Relation;
coherence
proof
let R be Relation;
assume that
A4: R is_irreflexive_in field R and
A3: R is_transitive_in field R;
let a,b;
assume that
A5: a in field R and
A6: b in field R;
not [a,a] in R by A4,A5,Def2;
hence thesis by A3,A5,A6,Def8;
end;
cluster asymmetric -> irreflexive antisymmetric for Relation;
coherence
proof
let R be Relation;
assume
A1: R is_asymmetric_in field R;
then for x holds x in field R implies not [x,x] in R by Def5;
hence R is irreflexive by Def2,Def10;
for x,y holds x in field R & y in field R & [x,y] in R & [y,x] in R
implies x = y by A1,Def5;
hence thesis by Def4,Def12;
end;
end;
registration
let R be reflexive Relation;
cluster R~ -> reflexive;
coherence
proof
A1: R is_reflexive_in field R by Def9;
let x;
assume x in field(R~);
then x in field R by RELAT_1:21;
then [x,x] in R by A1,Def1;
hence [x,x] in R~ by RELAT_1:def 7;
end;
end;
registration
let R be irreflexive Relation;
cluster R~ -> irreflexive;
coherence
proof
A1: R is_irreflexive_in field R by Def10;
let x;
assume x in field(R~);
then x in field R by RELAT_1:21;
then not [x,x] in R by A1,Def2;
hence thesis by RELAT_1:def 7;
end;
end;
theorem
R is reflexive implies dom R = dom(R~) & rng R = rng(R~)
proof
assume
A1: R is reflexive; then
A2: R is_reflexive_in field R by Def9;
A3: R~ is_reflexive_in field(R~) by A1,Def9;
now
let x;
A4: now
assume x in dom(R~);
then x in field(R~) by XBOOLE_0:def 3;
then [x,x] in R~ by A1,Def1,Def9;
then [x,x] in R by RELAT_1:def 7;
hence x in dom R by XTUPLE_0:def 12;
end;
now
assume x in dom R;
then x in field R by XBOOLE_0:def 3;
then [x,x] in R by A1,Def1,Def9;
then [x,x] in R~ by RELAT_1:def 7;
hence x in dom(R~) by XTUPLE_0:def 12;
end;
hence x in dom R iff x in dom(R~) by A4;
end;
hence dom R = dom(R~) by TARSKI:1;
now
let x;
A5: now
assume x in rng(R~);
then x in field(R~) by XBOOLE_0:def 3;
then [x,x] in R~ by A3,Def1;
then [x,x] in R by RELAT_1:def 7;
hence x in rng R by XTUPLE_0:def 13;
end;
now
assume x in rng R;
then x in field R by XBOOLE_0:def 3;
then [x,x] in R by A2,Def1;
then [x,x] in R~ by RELAT_1:def 7;
hence x in rng(R~) by XTUPLE_0:def 13;
end;
hence x in rng R iff x in rng(R~) by A5;
end;
hence thesis by TARSKI:1;
end;
theorem Th13:
R is symmetric iff R = R~
proof
hereby
assume R is symmetric;
then
A2: R is_symmetric_in field R by Def11;
now
let a,b;
A3: now
assume [a,b] in R~;
then
A4: [b,a] in R by RELAT_1:def 7;
then a in field R & b in field R by RELAT_1:15;
hence [a,b] in R by A2,A4,Def3;
end;
now
assume
A5: [a,b] in R;
then a in field R & b in field R by RELAT_1:15;
then [b,a] in R by A2,A5,Def3;
hence [a,b] in R~ by RELAT_1:def 7;
end;
hence [a,b] in R iff [a,b] in R~ by A3;
end;
hence R = R~ by RELAT_1:def 2;
end;
assume R = R~;
then for a,b holds a in field R & b in field R & [a,b] in R implies [b,a]
in R by RELAT_1:def 7;
hence thesis by Def3,Def11;
end;
registration
let P,R be reflexive Relation;
cluster P \/ R -> reflexive;
coherence
proof
A3: R is_reflexive_in field R by Def9;
A4: P is_reflexive_in field P by Def9;
now
let a;
A5: now
assume a in field P;
then [a,a] in P by A4,Def1;
hence [a,a] in P \/ R by XBOOLE_0:def 3;
end;
A6: now
assume a in field R;
then [a,a] in R by A3,Def1;
hence [a,a] in P \/ R by XBOOLE_0:def 3;
end;
assume a in field(P \/ R);
then a in field P \/ field R by RELAT_1:18;
hence [a,a] in P \/ R by A5,A6,XBOOLE_0:def 3;
end;
hence P \/ R is reflexive by Def1,Def9;
end;
cluster P /\ R -> reflexive;
coherence
proof
A3: R is_reflexive_in field R by Def9;
A4: P is_reflexive_in field P by Def9;
now
let a;
assume
A7: a in field(P /\ R);
A8: field(P /\ R) c= field P /\ field R by RELAT_1:19;
then a in field R by A7,XBOOLE_0:def 4;
then
A9: [a,a] in R by A3,Def1;
a in field P by A8,A7,XBOOLE_0:def 4;
then [a,a] in P by A4,Def1;
hence [a,a] in P /\ R by A9,XBOOLE_0:def 4;
end;
hence thesis by Def1,Def9;
end;
end;
registration
let P,R be irreflexive Relation;
cluster P \/ R -> irreflexive;
coherence
proof
A3: P is_irreflexive_in field P by Def10;
A4: R is_irreflexive_in field R by Def10;
let a;
A5: now
assume a in field P;
then
A6: not [a,a] in P by A3,Def2;
A7: not a in field R implies not [a,a] in R by RELAT_1:15;
a in field R implies not [a,a] in R by A4,Def2;
hence not [a,a] in P \/ R by A6,A7,XBOOLE_0:def 3;
end;
A8: now
assume a in field R;
then
A9: not [a,a] in R by A4,Def2;
A10: not a in field P implies not [a,a] in P by RELAT_1:15;
a in field P implies not [a,a] in P by A3,Def2;
hence not [a,a] in P \/ R by A9,A10,XBOOLE_0:def 3;
end;
assume a in field(P \/ R);
then a in field P \/ field R by RELAT_1:18;
hence not [a,a] in P \/ R by A5,A8,XBOOLE_0:def 3;
end;
cluster P /\ R -> irreflexive;
coherence
proof
let a;
assume
A11: a in field(P /\ R);
field(P /\ R) c= (field P) /\ (field R) by RELAT_1:19;
then a in field P by A11,XBOOLE_0:def 4;
then not [a,a] in P by Def10,Def2;
hence thesis by XBOOLE_0:def 4;
end;
end;
registration
let P be irreflexive Relation;
let R be Relation;
cluster P \ R -> irreflexive;
coherence
proof
A1: P is_irreflexive_in field P by Def10;
let a;
A2: now
assume a in dom(P \ R);
then consider b such that
A3: [a,b] in P \ R by XTUPLE_0:def 12;
[a,b] in P by A3,XBOOLE_0:def 5;
then a in field P by RELAT_1:15;
hence not [a,a] in P by A1,Def2;
end;
now
assume a in rng(P \ R);
then consider b such that
A5: [b,a] in P \ R by XTUPLE_0:def 13;
[b,a] in P by A5,XBOOLE_0:def 5;
then a in field P by RELAT_1:15;
hence not [a,a] in P by A1,Def2;
end;
hence thesis by A2,XBOOLE_0:def 3,def 5;
end;
end;
registration
let R be symmetric Relation;
cluster R~ -> symmetric;
coherence by Th13;
end;
registration
let P,R be symmetric Relation;
cluster P \/ R -> symmetric;
coherence
proof
A3: R is_symmetric_in field R by Def11;
A4: P is_symmetric_in field P by Def11;
now
let a,b;
assume that
a in field(P \/ R) and
b in field(P \/ R) and
A5: [a,b] in P \/ R;
A6: now
assume
A7: [a,b] in R;
then a in field R & b in field R by RELAT_1:15;
then [b,a] in R by A3,A7,Def3;
hence [b,a] in P \/ R by XBOOLE_0:def 3;
end;
now
assume
A8: [a,b] in P;
then a in field P & b in field P by RELAT_1:15;
then [b,a] in P by A4,A8,Def3;
hence [b,a] in P \/ R by XBOOLE_0:def 3;
end;
hence [b,a] in P \/ R by A5,A6,XBOOLE_0:def 3;
end;
hence thesis by Def3,Def11;
end;
cluster P /\ R -> symmetric;
coherence
proof
A3: R is_symmetric_in field R by Def11;
A4: P is_symmetric_in field P by Def11;
now
let a,b;
assume that
A9: a in field(P /\ R) & b in field(P /\ R) and
A10: [a,b] in P /\ R;
A11: [a,b] in R by A10,XBOOLE_0:def 4;
A12: field(P /\ R) c= field P /\ field R by RELAT_1:19;
then a in field R & b in field R by A9,XBOOLE_0:def 4;
then
A13: [b,a] in R by A3,A11,Def3;
A14: [a,b] in P by A10,XBOOLE_0:def 4;
a in field P & b in field P by A12,A9,XBOOLE_0:def 4;
then [b,a] in P by A4,A14,Def3;
hence [b,a] in P /\ R by A13,XBOOLE_0:def 4;
end;
hence thesis by Def3,Def11;
end;
cluster P \ R -> symmetric;
coherence
proof
A3: R is_symmetric_in field R by Def11;
A4: P is_symmetric_in field P by Def11;
now
let a,b;
assume that
a in field(P \ R) and
b in field(P \ R) and
A15: [a,b] in P \ R;
not [a,b] in R by A15,XBOOLE_0:def 5;
then
A16: not b in field R or not a in field R or not [b,a] in R by A3,Def3;
A17: [a,b] in P by A15,XBOOLE_0:def 5;
then a in field P & b in field P by RELAT_1:15;
then
A18: [b,a] in P by A4,A17,Def3;
( not b in field R or not a in field R ) implies not [b,a] in R
by RELAT_1:15;
hence [b,a] in P \ R by A18,A16,XBOOLE_0:def 5;
end;
hence thesis by Def3,Def11;
end;
end;
registration
let R be asymmetric Relation;
cluster R~ -> asymmetric;
coherence
proof
A1: R is_asymmetric_in field R by Def13;
let x,y;
assume that
A2: x in field(R~) & y in field(R~) and
A3: [x,y] in R~;
A4: [y,x] in R by A3,RELAT_1:def 7;
x in field R & y in field R by A2,RELAT_1:21;
then not [x,y] in R by A1,A4,Def5;
hence thesis by RELAT_1:def 7;
end;
end;
registration
let P be Relation;
let R be asymmetric Relation;
cluster P /\ R -> asymmetric;
coherence
proof
A1: R is_asymmetric_in field R by Def13;
A2: field(P /\ R) c= (field P) /\ (field R) by RELAT_1:19;
let a,b;
assume that
A3: a in field(P /\ R) & b in field(P /\ R) and
A4: [a,b] in P /\ R;
A5: [a,b] in R by A4,XBOOLE_0:def 4;
a in field R & b in field R by A2,A3,XBOOLE_0:def 4;
then not [b,a] in R by A1,A5,Def5;
hence thesis by XBOOLE_0:def 4;
end;
cluster R /\ P -> asymmetric;
coherence;
end;
registration
let P be asymmetric Relation;
let R be Relation;
cluster P \ R -> asymmetric;
coherence
proof
A1: P is_asymmetric_in field P by Def13;
let a,b;
assume that
a in field(P \ R) and
b in field(P \ R) and
A2: [a,b] in P \ R;
A3: [a,b] in P by A2,XBOOLE_0:def 5;
then a in field P & b in field P by RELAT_1:15;
then not [b,a] in P by A1,A3,Def5;
hence thesis by XBOOLE_0:def 5;
end;
end;
canceled 8;
theorem
R is antisymmetric iff R /\ (R~) c= id (dom R)
proof
A1: now
assume R is antisymmetric;
then
A2: R is_antisymmetric_in field R by Def12;
now
let a,b;
assume
A3: [a,b] in R /\ (R~);
then [a,b] in R~ by XBOOLE_0:def 4;
then
A4: [b,a] in R by RELAT_1:def 7;
then
A5: b in dom R by XTUPLE_0:def 12;
A6: [a,b] in R by A3,XBOOLE_0:def 4;
then a in field R & b in field R by RELAT_1:15;
then a = b by A2,A6,A4,Def4;
hence [a,b] in id (dom R) by A5,RELAT_1:def 10;
end;
hence R /\ (R~) c= id (dom R) by RELAT_1:def 3;
end;
now
assume
A7: R /\ (R~) c= id (dom R);
now
let a,b;
assume that
a in field R and
b in field R and
A8: [a,b] in R and
A9: [b,a] in R;
[a,b] in R~ by A9,RELAT_1:def 7;
then [a,b] in R /\ (R~) by A8,XBOOLE_0:def 4;
hence a = b by A7,RELAT_1:def 10;
end;
hence R is antisymmetric by Def4,Def12;
end;
hence thesis by A1;
end;
registration
let R be antisymmetric Relation;
cluster R~ -> antisymmetric;
coherence
proof
let x,y;
assume that
A2: x in field(R~) & y in field(R~) and
A3: [x,y] in R~ & [y,x] in R~;
A4: [y,x] in R & [x,y] in R by A3,RELAT_1:def 7;
x in field R & y in field R by A2,RELAT_1:21;
hence x = y by A4,Def4,Def12;
end;
end;
registration
let P be antisymmetric Relation;
let R be Relation;
cluster P /\ R -> antisymmetric;
coherence
proof
A1: P is_antisymmetric_in field P by Def12;
let a,b;
assume that
a in field(P /\ R) & b in field(P /\ R) and
A2: [a,b] in (P /\ R) and
A3: [b,a] in (P /\ R);
A4: [b,a] in P by A3,XBOOLE_0:def 4;
A5: [a,b] in P by A2,XBOOLE_0:def 4;
then a in field P & b in field P by RELAT_1:15;
hence a = b by A1,A5,A4,Def4;
end;
cluster R /\ P -> antisymmetric;
coherence;
cluster P \ R -> antisymmetric;
coherence
proof
A1: P is_antisymmetric_in field P by Def12;
let a,b;
assume that
a in field(P \ R) & b in field(P \ R) and
A6: [a,b] in P \ R and
A7: [b,a] in P \ R;
A8: [b,a] in P by A7,XBOOLE_0:def 5;
A9: [a,b] in P by A6,XBOOLE_0:def 5;
then a in field P & b in field P by RELAT_1:15;
hence thesis by A1,A9,A8,Def4;
end;
end;
registration
let R be transitive Relation;
cluster R~ -> transitive;
coherence
proof
A1: R is_transitive_in field R by Def16;
let x,y,z;
assume that
A2: x in field(R~) & y in field(R~) and
A3: z in field(R~) and
A4: [x,y] in R~ and
A5: [y,z] in R~;
A6: x in field R & y in field R by A2,RELAT_1:21;
A7: [y,x] in R by A4,RELAT_1:def 7;
z in field R & [z,y] in R by A3,A5,RELAT_1:21,def 7;
then [z,x] in R by A1,A6,A7,Def8;
hence thesis by RELAT_1:def 7;
end;
end;
registration
let P,R be transitive Relation;
cluster P /\ R -> transitive;
coherence
proof
A3: R is_transitive_in field R by Def16;
A4: P is_transitive_in field P by Def16;
let a,b,c;
assume that
a in field(P /\ R) & b in field(P /\ R) & c in field(P /\ R) and
A5: [a,b] in P /\ R and
A6: [b,c] in P /\ R;
A7: [b,c] in R by A6,XBOOLE_0:def 4;
then
A8: c in field R by RELAT_1:15;
A9: [a,b] in R by A5,XBOOLE_0:def 4;
then a in field R & b in field R by RELAT_1:15;
then
A10: [a,c] in R by A3,A9,A7,A8,Def8;
A11: [b,c] in P by A6,XBOOLE_0:def 4;
then
A12: c in field P by RELAT_1:15;
A13: [a,b] in P by A5,XBOOLE_0:def 4;
then a in field P & b in field P by RELAT_1:15;
then [a,c] in P by A4,A13,A11,A12,Def8;
hence thesis by A10,XBOOLE_0:def 4;
end;
end;
canceled 4;
theorem
R is transitive iff R*R c= R
proof
hereby
assume R is transitive;
then
A2: R is_transitive_in field R by Def16;
now
let a,b;
assume [a,b] in R*R;
then consider c such that
A3: [a,c] in R and
A4: [c,b] in R by RELAT_1:def 8;
A5: c in field R by A3,RELAT_1:15;
a in field R & b in field R by A3,A4,RELAT_1:15;
hence [a,b] in R by A2,A3,A4,A5,Def8;
end;
hence R*R c= R by RELAT_1:def 3;
end;
assume
A6: R*R c= R;
let a,b,c;
assume a in field R & b in field R & c in field R;
assume [a,b] in R & [b,c] in R;
then [a,c] in R*R by RELAT_1:def 8;
hence thesis by A6;
end;
theorem
R is connected iff [:field R,field R:] \ id (field R) c= R \/ R~
proof
hereby
assume R is connected;
then
A2: R is_connected_in field R by Def14;
now
let x;
now
assume
A3: x in [:field R, field R:] \ id (field R);
then x in [:field R, field R:] by XBOOLE_0:def 5;
then consider y,z such that
A4: y in field R and
A5: z in field R and
A6: x = [y,z] by ZFMISC_1:def 2;
not x in id (field R) by A3,XBOOLE_0:def 5;
then y <> z by A4,A6,RELAT_1:def 10;
then [y,z] in R or [z,y] in R by A2,A4,A5,Def6;
then [y,z] in R or [y,z] in R~ by RELAT_1:def 7;
hence x in R \/ R~ by A6,XBOOLE_0:def 3;
end;
hence x in [:field R, field R:] \ id (field R) implies x in R \/ R~;
end;
hence [:field R, field R:] \ id (field R) c= R \/ R~ by TARSKI:def 3;
end;
assume
A7: [:field R, field R:] \ id (field R) c= R \/ R~;
let a,b;
[a,b] in [:field R, field R:] \ id (field R) implies [a,b] in R \/ R~ by A7;
then
[a,b] in [:field R, field R:] & not [a,b] in id (field R) implies
[a,b] in R \/ R~ by XBOOLE_0:def 5;
then a in field R & b in field R & a <> b implies
[a,b] in R or [a,b] in R~ by RELAT_1:def 10,XBOOLE_0:def 3,ZFMISC_1:87;
hence thesis by RELAT_1:def 7;
end;
registration
cluster strongly_connected -> connected reflexive for Relation;
coherence
proof
let R be Relation;
assume
A1: R is_strongly_connected_in field R;
then
for x,y holds x in field R & y in field R & x <> y implies ( [x,y] in R
or [y,x] in R) by Def7;
hence R is connected by Def6,Def14;
let x;
thus thesis by A1,Def7;
end;
end;
canceled;
theorem
R is strongly_connected iff [:field R, field R:] = R \/ R~
proof
hereby
assume
A2: R is strongly_connected;
now
let x;
A3: now
assume
A4: x in R \/ R~;
then consider y,z such that
A5: x = [y,z] by RELAT_1:def 1;
[y,z] in R or [y,z] in R~ by A4,A5,XBOOLE_0:def 3;
then [y,z] in R or [z,y] in R by RELAT_1:def 7;
then y in field R & z in field R by RELAT_1:15;
hence x in [:field R, field R:] by A5,ZFMISC_1:87;
end;
now
assume x in [:field R, field R:];
then consider y,z such that
A6: y in field R & z in field R and
A7: x = [y,z] by ZFMISC_1:def 2;
[y,z] in R or [z,y] in R by A2,A6,Def7,Def15;
then [y,z] in R or [y,z] in R~ by RELAT_1:def 7;
hence x in R \/ R~ by A7,XBOOLE_0:def 3;
end;
hence x in [:field R, field R:] iff x in R \/ R~ by A3;
end;
hence [:field R, field R:] = R \/ R~ by TARSKI:1;
end;
assume
A8: [:field R, field R:] = R \/ R~;
let a,b;
a in field R & b in field R implies [a,b] in R \/ R~ by A8,ZFMISC_1:87;
then a in field R & b in field R implies [a,b] in R or [a,b] in R~
by XBOOLE_0:def 3;
hence thesis by RELAT_1:def 7;
end;
theorem
R is transitive iff for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R
proof
hereby
assume
A1: R is transitive;
let x,y,z;
assume that
A2: [x,y] in R and
A3: [y,z] in R;
A4: z in field R by A3,RELAT_1:15;
x in field R & y in field R by A2,RELAT_1:15;
hence [x,z] in R by A1,A2,A3,A4,Def8,Def16;
end;
assume for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R;
then x in field R & y in field R & z in field R & [x,y] in R & [y,z] in R
implies [x,z] in R;
hence R is_transitive_in field R by Def8;
end;
begin
reserve X,Y,Z,X1,X2,X3,X4,X5,X6,x,y for set;
canceled 4;
theorem Th5:
Y in X implies not X c= Y
proof
assume
A1: Y in X;
assume X c= Y;
then Y in Y by A1;
hence contradiction;
end;
definition
let X;
func succ X -> set equals
X \/ { X };
coherence;
end;
registration
let X;
cluster succ X -> non empty;
coherence;
end;
theorem Th6:
X in succ X
proof
X in { X } by TARSKI:def 1;
hence thesis by XBOOLE_0:def 3;
end;
theorem
succ X = succ Y implies X = Y
proof
assume that
A1: succ X = succ Y and
A2: X <> Y;
Y in X \/ { X } by A1,Th6;
then
A3: Y in X or Y in { X } by XBOOLE_0:def 3;
X in Y \/ { Y } by A1,Th6;
then X in Y or X in { Y } by XBOOLE_0:def 3;
hence contradiction by A2,A3,TARSKI:def 1;
end;
theorem Th8:
x in succ X iff x in X or x = X
proof
thus x in succ X implies x in X or x = X
proof
assume x in succ X;
then x in X or x in { X } by XBOOLE_0:def 3;
hence thesis by TARSKI:def 1;
end;
assume x in X or x = X;
then x in X or x in { X } by TARSKI:def 1;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th9:
X <> succ X
proof
assume
A1: X = succ X;
X in succ X by Th6;
hence contradiction by A1;
end;
reserve a,b,c,X,Y,Z,x,y,z for set;
definition
let X;
attr X is epsilon-transitive means
:Def2:
for x st x in X holds x c= X;
attr X is epsilon-connected means
:Def3:
for x,y st x in X & y in X holds x in y or x = y or y in x;
end;
Lm1: {} is epsilon-transitive & {} is epsilon-connected
proof
thus x in {} implies x c= {};
thus x in {} & y in {} implies x in y or x = y or y in x;
end;
definition
let IT be set;
attr IT is ordinal means
:Def4:
IT is epsilon-transitive epsilon-connected;
end;
registration
cluster ordinal -> epsilon-transitive epsilon-connected for set;
coherence by Def4;
cluster epsilon-transitive epsilon-connected -> ordinal for set;
coherence by Def4;
end;
notation
synonym number for set;
end;
registration
cluster ordinal for number;
existence by Lm1;
end;
definition
mode Ordinal is ordinal number;
end;
reserve A,B,C,D for Ordinal;
theorem Th10:
for A,B being set, C being epsilon-transitive set st A in B & B in C
holds A in C
proof
let A,B be set, C be epsilon-transitive set;
assume that
A1: A in B and
A2: B in C;
B c= C by A2,Def2;
hence thesis by A1;
end;
theorem Th11:
for x being epsilon-transitive set, A being Ordinal st x c< A holds x in A
proof
let x be epsilon-transitive set, A be Ordinal;
set a = the Element of A \ x;
assume
A1: x c< A;
then
A2: x c= A by XBOOLE_0:def 8;
A \ x <> {}
proof
assume A \ x = {};
then A c= x by XBOOLE_1:37;
hence contradiction by A1,XBOOLE_1:60;
end;
then a in A \ x;
then consider y such that
A3: y in A \ x and
A4: not ex a st a in A \ x & a in y by TARSKI:2;
A5: not y in x by A3,XBOOLE_0:def 5;
now
let a;
assume a in x;
then consider z such that
A6: z = a and
A7: z in x;
z c= x by A7,Def2;
then not y in z by A3,XBOOLE_0:def 5;
hence a in y by A2,A3,A5,A6,A7,Def3;
end;
then
A8: x c= y by TARSKI:def 3;
A9: y c= A by A3,Def2;
now
let a;
assume
A10: a in y;
then not a in A \ x by A4;
hence a in x by A9,A10,XBOOLE_0:def 5;
end;
then
A11: y c= x by TARSKI:def 3;
y in A by A3;
hence thesis by A11,A8,XBOOLE_0:def 10;
end;
theorem
for A being epsilon-transitive set, B, C being Ordinal st A c= B & B
in C holds A in C
proof
let A be epsilon-transitive set, B, C be Ordinal;
assume that
A1: A c= B and
A2: B in C;
B c= C by A2,Def2;
then
A3: A c= C by A1,XBOOLE_1:1;
A <> C by A1,A2,Th5;
then A c< C by A3,XBOOLE_0:def 8;
hence thesis by Th11;
end;
theorem Th13:
a in A implies a is Ordinal
proof
assume
A1: a in A;
then
A2: a c= A by Def2;
now
let y;
assume
A3: y in a;
then
A4: y c= A by A2,Def2;
assume not y c= a;
then consider b such that
A5: b in y & not b in a by TARSKI:def 3;
b in y \ a by A5,XBOOLE_0:def 5;
then consider z such that
A6: z in y \ a and
not ex c st c in y \ a & c in z by TARSKI:2;
z in y by A6;
then z in a or z = a or a in z by A1,A4,Def3;
hence contradiction by A3,A6,XREGULAR:7,XBOOLE_0:def 5;
end;
then
A7: a is epsilon-transitive by Def2;
for y,z st y in a & z in a holds y in z or y = z or z in y by A2,Def3;
then a is epsilon-connected by Def3;
hence thesis by A7;
end;
theorem Th14:
A in B or A = B or B in A
proof
assume that
A1: not A in B and
A2: A <> B;
not A c< B by A1,Th11;
then not A c= B by A2,XBOOLE_0:def 8;
then consider a such that
A3: a in A & not a in B by TARSKI:def 3;
a in A \ B by A3,XBOOLE_0:def 5;
then consider X such that
A4: X in A \ B and
A5: not ex a st a in A \ B & a in X by TARSKI:2;
A6: X c= A by A4,Def2;
now
let b;
assume
A7: b in X;
then not b in A \ B by A5;
hence b in B by A6,A7,XBOOLE_0:def 5;
end;
then X c= B by TARSKI:def 3;
then
A8: X c< B or X = B by XBOOLE_0:def 8;
( not X in B)& X is Ordinal by A4,Th13,XBOOLE_0:def 5;
hence thesis by A4,A8,Th11;
end;
definition
let A,B;
redefine pred A c= B means
for C st C in A holds C in B;
compatibility
proof
thus A c= B implies for C st C in A holds C in B;
assume
A1: for C st C in A holds C in B;
let x;
assume
A2: x in A;
then reconsider C = x as Ordinal by Th13;
C in B by A1,A2;
hence thesis;
end;
connectedness
proof
let A,B;
given C such that
A3: C in A & not C in B;
let D;
A in B or A = B or B in A by Th14;
hence thesis by A3,Th10;
end;
end;
theorem
A,B are_c=-comparable
proof
A c= B or B c= A;
hence thesis by XBOOLE_0:def 9;
end;
theorem Th16:
A c= B or B in A
proof
A in B or A = B or B in A by Th14;
hence thesis by Def2;
end;
registration
cluster empty -> ordinal for number;
coherence by Lm1;
end;
theorem Th17:
x is Ordinal implies succ x is Ordinal
proof
A1: now
let y;
A2: y in { x } implies y = x by TARSKI:def 1;
assume y in succ x;
hence y in x or y = x by A2,XBOOLE_0:def 3;
end;
assume
A3: x is Ordinal;
now
let y;
A4: y = x implies y c= succ x by XBOOLE_1:7;
A5: now
assume y in x;
then
A6: y c= x by A3,Def2;
x c= x \/ { x } by XBOOLE_1:7;
hence y c= succ x by A6,XBOOLE_1:1;
end;
assume y in succ x;
hence y c= succ x by A1,A5,A4;
end;
then
A7: succ x is epsilon-transitive by Def2;
now
let y,z;
assume that
A8: y in succ x and
A9: z in succ x;
A10: z in x or z = x by A1,A9;
y in x or y = x by A1,A8;
hence y in z or y = z or z in y by A3,A10,Def3;
end;
then succ x is epsilon-connected by Def3;
hence thesis by A7;
end;
theorem Th18:
x is ordinal implies union x is ordinal
proof
assume x is epsilon-transitive & x is epsilon-connected;
then reconsider A = x as Ordinal;
thus y in union x implies y c= union x
proof
assume y in union x;
then consider z such that
A1: y in z and
A2: z in x by TARSKI:def 4;
z in A by A2;
then reconsider z as Ordinal by Th13;
z c= A by A2,Def2;
hence thesis by A1,ZFMISC_1:74;
end;
let y,z;
assume that
A3: y in union x and
A4: z in union x;
consider X such that
A5: y in X and
A6: X in x by A3,TARSKI:def 4;
A7: X in A by A6;
consider Y such that
A8: z in Y and
A9: Y in x by A4,TARSKI:def 4;
reconsider X,Y as Ordinal by A9,A7,Th13;
z in Y by A8;
then
A10: z is Ordinal by Th13;
y in X by A5;
then y is Ordinal by Th13;
hence thesis by A10,Th14;
end;
registration
cluster non empty for Ordinal;
existence
proof
reconsider A = succ {} as Ordinal by Th17;
take A;
thus thesis;
end;
end;
registration
let A;
cluster succ A -> non empty ordinal;
coherence by Th17;
cluster union A -> ordinal;
coherence by Th18;
end;
theorem Th19:
(for x st x in X holds x is Ordinal & x c= X) implies X is ordinal
proof
assume
A1: for x st x in X holds x is Ordinal & x c= X;
thus X is epsilon-transitive
proof
let x;
assume x in X;
hence thesis by A1;
end;
let x,y;
assume x in X & y in X;
then x is Ordinal & y is Ordinal by A1;
hence thesis by Th14;
end;
theorem Th20:
X c= A & X <> {} implies ex C st C in X & for B st B in X holds C c= B
proof
set a = the Element of X;
assume that
A1: X c= A and
A2: X <> {};
a in X by A2;
then consider Y such that
A3: Y in X and
A4: not ex a st a in X & a in Y by TARSKI:2;
Y is Ordinal by A1,A3,Th13;
then consider C such that
A5: C = Y;
take C;
thus C in X by A3,A5;
let B;
assume B in X;
then not B in C by A4,A5;
then B = C or C in B by Th14;
hence thesis by Def2;
end;
theorem Th21:
A in B iff succ A c= B
proof
thus A in B implies succ A c= B
proof
assume
A1: A in B;
then a in { A } implies a in B by TARSKI:def 1;
then
A2: { A } c= B by TARSKI:def 3;
A c= B by A1,Def2;
hence thesis by A2,XBOOLE_1:8;
end;
assume
A3: succ A c= B;
A in succ A by Th6;
hence thesis by A3;
end;
theorem Th22:
A in succ C iff A c= C
proof
thus A in succ C implies A c= C
proof
assume A in succ C;
then A in C or A in { C } by XBOOLE_0:def 3;
hence thesis by Def2,TARSKI:def 1;
end;
assume
A1: A c= C;
assume not A in succ C;
then A = succ C or succ C in A by Th14;
then
A2: succ C c= C by A1,Def2;
C in succ C by Th6;
then C c= succ C by Def2;
then succ C = C by A2,XBOOLE_0:def 10;
hence contradiction by Th9;
end;
scheme
OrdinalMin { P[Ordinal] } : ex A st P[A] & for B st P[B] holds A c= B
provided
A1: ex A st P[A]
proof
consider A such that
A2: P[A] by A1;
defpred R[set] means ex B st $1 = B & P[B];
consider X such that
A3: x in X iff x in succ A & R[x] from XBOOLE_0:sch 1;
for a holds a in X implies a in succ A by A3;
then
A4: X c= succ A by TARSKI:def 3;
A in succ A by Th6;
then X <> {} by A2,A3;
then consider C such that
A5: C in X and
A6: for B st B in X holds C c= B by A4,Th20;
C in succ A by A3,A5;
then
A7: C c= succ A by Def2;
take C;
ex B st C = B & P[B] by A3,A5;
hence P[C];
let B;
assume
A8: P[B];
assume
A9: not C c= B;
then B c< C by XBOOLE_0:def 8;
then B in C by Th11;
then B in X by A3,A8,A7;
hence contradiction by A6,A9;
end;
scheme
TransfiniteInd { P[Ordinal] } : for A holds P[A]
provided
A1: for A st for C st C in A holds P[C] holds P[A]
proof
defpred R[set] means ex B st $1 = B & P[B];
let A;
set Y = succ A;
consider Z such that
A2: x in Z iff x in Y & R[x] from XBOOLE_0:sch 1;
now
assume Y \ Z <> {};
then consider C such that
A3: C in Y \ Z and
A4: for B st B in Y \ Z holds C c= B by Th20;
now
let B such that
A5: B in C;
A6: C c= Y by A3,Def2;
now
assume not B in Z;
then B in Y \ Z by A5,A6,XBOOLE_0:def 5;
then
A7: C c= B by A4;
C <> B by A5;
then C c< B by A7,XBOOLE_0:def 8;
hence contradiction by A5,Th11;
end;
then ex B9 being Ordinal st B = B9 & P[B9] by A2;
hence P[B];
end;
then
A8: P[C] by A1;
not C in Z by A3,XBOOLE_0:def 5;
hence contradiction by A2,A3,A8;
end;
then not A in Y or A in Z by XBOOLE_0:def 5;
then ex B st A = B & P[B] by A2,Th6;
hence thesis;
end;
theorem Th23:
for X st for a st a in X holds a is Ordinal holds union X is ordinal
proof
let X such that
A1: for a st a in X holds a is Ordinal;
thus union X is epsilon-transitive
proof
let x;
assume x in union X;
then consider Y such that
A2: x in Y and
A3: Y in X by TARSKI:def 4;
Y is Ordinal by A1,A3;
then
A4: x c= Y by A2,Def2;
let a;
assume a in x;
hence thesis by A3,A4,TARSKI:def 4;
end;
let x,y;
assume that
A5: x in union X and
A6: y in union X;
consider Z such that
A7: y in Z and
A8: Z in X by A6,TARSKI:def 4;
Z is Ordinal by A1,A8;
then
A9: y is Ordinal by A7,Th13;
consider Y such that
A10: x in Y and
A11: Y in X by A5,TARSKI:def 4;
Y is Ordinal by A1,A11;
then x is Ordinal by A10,Th13;
hence thesis by A9,Th14;
end;
theorem Th24:
for X st for a st a in X holds a is Ordinal ex A st X c= A
proof
let X;
assume
A1: for a st a in X holds a is Ordinal;
then
A2: union X is Ordinal by Th23;
then reconsider A = succ(union X) as Ordinal;
take A;
let a;
assume
A3: a in X;
then reconsider B = a as Ordinal by A1;
b in B implies b in union X by A3,TARSKI:def 4;
then B c= union X by TARSKI:def 3;
hence thesis by A2,Th22;
end;
theorem Th25:
not ex X st for x holds x in X iff x is Ordinal
proof
given X such that
A1: for x holds x in X iff x is Ordinal;
A2: X is epsilon-transitive
proof
let x;
assume x in X;
then
A3: x is Ordinal by A1;
thus thesis
proof
let a;
assume a in x;
then a is Ordinal by A3,Th13;
hence thesis by A1;
end;
end;
X is epsilon-connected
proof
let x,y;
assume x in X & y in X;
then x is Ordinal & y is Ordinal by A1;
hence thesis by Th14;
end;
then X in X by A1,A2;
hence contradiction;
end;
theorem Th26:
not ex X st for A holds A in X
proof
defpred P[set] means $1 is Ordinal;
given X such that
A1: A in X;
consider Y such that
A2: a in Y iff a in X & P[a] from XBOOLE_0:sch 1;
now
let x;
assume
A3: x is Ordinal;
then x in X by A1;
hence x in Y by A2,A3;
end;
then x in Y iff x is Ordinal by A2;
hence contradiction by Th25;
end;
theorem
for X ex A st not A in X & for B st not B in X holds A c= B
proof
let X;
defpred P[set] means not $1 in X;
consider B such that
A1: not B in X by Th26;
consider Y such that
A2: a in Y iff a in succ B & P[a] from XBOOLE_0:sch 1;
for a holds a in Y implies a in succ B by A2;
then
A3: Y c= succ B by TARSKI:def 3;
B in succ B by Th6;
then Y <> {} by A1,A2;
then consider A such that
A4: A in Y and
A5: for B st B in Y holds A c= B by A3,Th20;
A in succ B by A2,A4;
then
A6: A c= succ B by Def2;
take A;
thus not A in X by A2,A4;
let C;
assume
A7: not C in X;
assume
A8: not A c= C;
then not A in C by Def2;
then C in A by A8,Th14;
then C in Y by A2,A7,A6;
hence contradiction by A5,A8;
end;
definition
let A be set;
attr A is limit_ordinal means
:Def6:
A = union A;
end;
theorem Th28:
for A holds A is limit_ordinal iff for C st C in A holds succ C in A
proof
let A;
thus A is limit_ordinal implies for C st C in A holds succ C in A
proof
assume A is limit_ordinal;
then
A1: A = union A by Def6;
let C;
assume C in A;
then consider z such that
A2: C in z and
A3: z in A by A1,TARSKI:def 4;
for b holds b in { C } implies b in z by A2,TARSKI:def 1;
then
A4: { C } c= z by TARSKI:def 3;
A5: z is Ordinal by A3,Th13;
then C c= z by A2,Def2;
then succ C c= z by A4,XBOOLE_1:8;
then succ C = z or succ C c< z by XBOOLE_0:def 8;
then
A6: succ C = z or succ C in z by A5,Th11;
z c= A by A3,Def2;
hence thesis by A3,A6;
end;
assume
A7: for C st C in A holds succ C in A;
now
let a;
assume
A8: a in A;
then a is Ordinal by Th13;
then
A9: succ a in A by A7,A8;
a in succ a by Th6;
hence a in union A by A9,TARSKI:def 4;
end;
then
A10: A c= union A by TARSKI:def 3;
now
let a;
assume a in union A;
then consider z such that
A11: a in z and
A12: z in A by TARSKI:def 4;
z c= A by A12,Def2;
hence a in A by A11;
end;
then union A c= A by TARSKI:def 3;
then A = union A by A10,XBOOLE_0:def 10;
hence thesis by Def6;
end;
theorem
not A is limit_ordinal iff ex B st A = succ B
proof
thus not A is limit_ordinal implies ex B st A = succ B
proof
assume not A is limit_ordinal;
then consider B such that
A1: B in A and
A2: not succ B in A by Th28;
take B;
assume
A3: A <> succ B;
succ B c= A by A1,Th21;
then succ B c< A by A3,XBOOLE_0:def 8;
hence contradiction by A2,Th11;
end;
given B such that
A4: A = succ B;
B in A & not succ B in A by A4,Th6;
hence thesis by Th28;
end;
reserve F,G for Function;
definition
let IT be set;
attr IT is T-Sequence-like means
:Def7:
proj1 IT is ordinal;
end;
registration
cluster empty -> T-Sequence-like for set;
coherence
proof
let E be set;
assume E is empty;
then proj1 E = {};
hence thesis by Def7;
end;
end;
definition
mode T-Sequence is T-Sequence-like Function;
end;
registration
let Z;
cluster Z-valued for T-Sequence;
existence
proof
reconsider L = {} as T-Sequence;
take L;
rng {} = {};
hence rng L c= Z by XBOOLE_1:2;
end;
end;
definition
let Z;
mode T-Sequence of Z is Z-valued T-Sequence;
end;
theorem
{} is T-Sequence of Z
proof
reconsider L = {} as T-Sequence;
rng L = {};
then rng L c= Z by XBOOLE_1:2;
hence thesis by RELAT_1:def 19;
end;
reserve L,L1 for T-Sequence;
theorem
dom F is Ordinal implies F is T-Sequence of rng F by Def7,RELAT_1:def 19;
registration
let L;
cluster dom L -> ordinal;
coherence by Def7;
end;
theorem
X c= Y implies for L being T-Sequence of X holds L is T-Sequence of Y
proof
assume
A1: X c= Y;
let L be T-Sequence of X;
rng L c= X by RELAT_1:def 19;
then rng L c= Y by A1,XBOOLE_1:1;
hence thesis by RELAT_1:def 19;
end;
registration
let L,A;
cluster L|A -> rng L-valued T-Sequence-like;
coherence
proof
A1: rng(L|A) c= rng L by RELAT_1:70;
A c= dom L implies dom(L|A) = A by RELAT_1:62;
hence thesis by A1,Def7,RELAT_1:68,def 19;
end;
end;
theorem
for L being T-Sequence of X for A holds L|A is T-Sequence of X;
definition
let IT be set;
attr IT is c=-linear means
:Def8:
for x,y being set st x in IT & y in IT holds x,y are_c=-comparable;
end;
theorem
(for a st a in X holds a is T-Sequence) & X is c=-linear implies
union X is T-Sequence
proof
assume that
A1: for a st a in X holds a is T-Sequence and
A2: X is c=-linear;
union X is Relation-like Function-like
proof
thus a in union X implies ex b,c st [b,c] = a
proof
assume a in union X;
then consider x such that
A3: a in x and
A4: x in X by TARSKI:def 4;
reconsider x as T-Sequence by A1,A4;
for a st a in x holds ex b,c st [b,c] = a by RELAT_1:def 1;
hence thesis by A3;
end;
let a,b,c;
assume that
A5: [a,b] in union X and
A6: [a,c] in union X;
consider y such that
A7: [a,c] in y and
A8: y in X by A6,TARSKI:def 4;
reconsider y as T-Sequence by A1,A8;
consider x such that
A9: [a,b] in x and
A10: x in X by A5,TARSKI:def 4;
reconsider x as T-Sequence by A1,A10;
x,y are_c=-comparable by A2,A10,A8,Def8;
then x c= y or y c= x by XBOOLE_0:def 9;
hence thesis by A9,A7,FUNCT_1:def 1;
end;
then reconsider F = union X as Function;
defpred P[set,set] means $1 in X & for L st L = $1 holds dom L = $2;
A11: for a,b,c st P[a,b] & P[a,c] holds b = c
proof
let a,b,c;
assume that
A12: a in X and
A13: for L st L = a holds dom L = b and
a in X and
A14: for L st L = a holds dom L = c;
reconsider a as T-Sequence by A1,A12;
dom a = b by A13;
hence thesis by A14;
end;
consider G such that
A15: [a,b] in G iff a in X & P[a,b] from FUNCT_1:sch 1(A11);
A16: [a,b] in G implies b is Ordinal
proof
assume
A17: [a,b] in G;
then a in X by A15;
then reconsider a as T-Sequence by A1;
dom a = b by A15,A17;
hence thesis;
end;
a in rng G implies a is Ordinal
proof
assume a in rng G;
then consider b such that
A18: b in dom G & a = G.b by FUNCT_1:def 3;
[b,a] in G by A18,FUNCT_1:1;
hence thesis by A16;
end;
then consider A such that
A19: rng G c= A by Th24;
defpred P[Ordinal] means for B st B in rng G holds B c= $1;
for B st B in rng G holds B c= A by A19,Def2;
then
A20: ex A st P[A];
consider A such that
A21: P[A] & for C st P[C] holds A c= C from OrdinalMin(A20);
dom F = A
proof
thus a in dom F implies a in A
proof
assume a in dom F;
then consider b such that
A22: [a,b] in F by XTUPLE_0:def 12;
consider x such that
A23: [a,b] in x and
A24: x in X by A22,TARSKI:def 4;
reconsider x as T-Sequence by A1,A24;
for L st L = x holds dom L = dom x;
then [x,dom x] in G by A15,A24;
then x in dom G & dom x = G.x by FUNCT_1:1;
then dom x in rng G by FUNCT_1:def 3;
then
A25: dom x c= A by A21;
a in dom x by A23,XTUPLE_0:def 12;
hence thesis by A25;
end;
let a;
assume
A26: a in A;
then reconsider a9 = a as Ordinal by Th13;
now
assume
A27: for L st L in X holds not a9 in dom L;
now
let B;
assume B in rng G;
then consider c such that
A28: c in dom G & B = G.c by FUNCT_1:def 3;
A29: [c,B] in G by A28,FUNCT_1:1;
then c in X by A15;
then reconsider c as T-Sequence by A1;
c in X & dom c = B by A15,A29;
hence B c= a9 by A27,Th16;
end;
then
A30: A c= a9 by A21;
a9 c= A by A26,Def2;
then A = a by A30,XBOOLE_0:def 10;
hence contradiction by A26;
end;
then consider L such that
A31: L in X & a in dom L;
L c= F & ex b st [a,b] in L by A31,XTUPLE_0:def 12,ZFMISC_1:74;
hence thesis by XTUPLE_0:def 12;
end;
hence thesis by Def7;
end;
scheme
TSUniq { A()->Ordinal, H(T-Sequence)->set, L1, L2() -> T-Sequence } : L1() =
L2()
provided
A1: dom L1() = A() & for B,L st B in A() & L = L1()|B holds L1().B = H(L ) and
A2: dom L2() = A() & for B,L st B in A() & L = L2()|B holds L2().B = H(L )
proof
defpred P[set] means L1().$1 <> L2().$1;
consider X such that
A3: x in X iff x in A() & P[x] from XBOOLE_0:sch 1;
for b holds b in X implies b in A() by A3;
then
A4: X c= A() by TARSKI:def 3;
assume L1() <> L2();
then ex a st a in A() & L1().a <> L2().a by A1,A2,FUNCT_1:2;
then X <> {} by A3;
then consider B such that
A5: B in X and
A6: for C st C in X holds B c= C by A4,Th20;
A7: B in A() by A3,A5;
then
A8: B c= A() by Def2;
then
A9: dom(L1()|B) = B by A1,RELAT_1:62;
A10: dom(L2()|B) = B by A2,A8,RELAT_1:62;
A11: now
let C;
assume
A12: C in B;
then not C in X by A6,Th5;
hence L1().C = L2().C by A3,A8,A12;
end;
now
let a;
assume
A13: a in B;
then reconsider a9 = a as Ordinal by Th13;
L1().a9 = L2().a9 & L1()|B.a = L1().a by A11,A9,A13,FUNCT_1:47;
hence L1()|B.a = L2()|B.a by A10,A13,FUNCT_1:47;
end;
then
A14: L1()|B = L2()|B by A9,A10,FUNCT_1:2;
L1().B = H(L1()|B) & L2().B = H(L2()|B) by A1,A2,A7;
hence contradiction by A3,A5,A14;
end;
scheme
TSExist { A()->Ordinal,H(T-Sequence)->set } : ex L st dom L = A() & for B,L1
st B in A() & L1 = L|B holds L.B = H(L1) proof
defpred S[Ordinal] means ex L st dom L = $1 & for B st B in $1 holds L.B = H
(L|B);
A1: for B st for C st C in B holds S[C] holds S[B]
proof
defpred P[set,set] means $1 is Ordinal & $2 is T-Sequence & for A,L st A =
$1 & L = $2 holds dom L = A & for B st B in A holds L.B = H(L|B);
let B such that
A2: for C st C in B ex L st dom L = C & for D st D in C holds L.D = H( L|D);
A3: for a,b,c st P[a,b] & P[a,c] holds b = c
proof
let a,b,c;
assume that
A4: a is Ordinal and
A5: b is T-Sequence and
A6: for A,L st A = a & L = b holds dom L = A & for B st B in A holds
L.B = H(L|B) and
a is Ordinal and
A7: c is T-Sequence and
A8: for A,L st A = a & L = c holds dom L = A & for B st B in A holds
L.B = H(L|B);
reconsider c as T-Sequence by A7;
reconsider a as Ordinal by A4;
A9: dom c = a & for B,L st B in a & L=c|B holds c.B = H(L) by A8;
reconsider b as T-Sequence by A5;
A10: dom b = a & for B,L st B in a & L=b|B holds b.B = H(L) by A6;
b = c from TSUniq(A10,A9);
hence thesis;
end;
consider G such that
A11: [a,b] in G iff a in B & P[a,b] from FUNCT_1:sch 1(A3);
defpred R[set,set] means ex L st L = G.$1 & $2 = H(L);
A12: dom G = B
proof
thus a in dom G implies a in B
proof
assume a in dom G;
then ex b st [a,b] in G by XTUPLE_0:def 12;
hence thesis by A11;
end;
let a;
assume
A13: a in B;
then reconsider a9 = a as Ordinal by Th13;
consider L such that
A14: dom L = a9 & for D st D in a9 holds L.D = H(L|D) by A2,A13;
for A holds for K be T-Sequence holds A = a9 & K = L implies dom K
= A & for B holds B in A implies K.B = H(K|B) by A14;
then [a9,L] in G by A11,A13;
hence thesis by XTUPLE_0:def 12;
end;
A15: for a st a in B ex b st R[a,b]
proof
let a;
assume a in B;
then consider c such that
A16: [a,c] in G by A12,XTUPLE_0:def 12;
reconsider L = c as T-Sequence by A11,A16;
take H(L), L;
thus L = G.a by A16,FUNCT_1:1;
thus thesis;
end;
A17: for a,b,c st a in B & R[a,b] & R[a,c] holds b = c;
consider F such that
A18: dom F = B & for a being set st a in B holds R[a,F.a] from FUNCT_1
:sch 2(A17,A15);
reconsider L = F as T-Sequence by A18,Def7;
take L;
thus dom L = B by A18;
let D;
assume
A19: D in B;
then consider K being T-Sequence such that
A20: K = G.D and
A21: F.D = H(K) by A18;
A22: [D,K] in G by A12,A19,A20,FUNCT_1:1;
then
A23: dom K = D by A11;
A24: now
let C;
assume
A25: C in D;
A26: now
let A,L such that
A27: A = C and
A28: L = K|C;
A29: C c= D by A25,Def2;
hence
A30: dom L = A by A23,A27,A28,RELAT_1:62;
let B;
assume
A31: B in A;
then B c= A by Def2;
then
A32: K|B = L|B by A27,A28,FUNCT_1:51;
K.B = H(K|B) by A11,A22,A27,A29,A31;
hence L.B = H(L|B) by A28,A30,A31,A32,FUNCT_1:47;
end;
C in B by A19,A25,Th10;
then [C,K|C] in G by A11,A26;
hence G.C = K|C by FUNCT_1:1;
end;
A33: now
let a;
assume
A34: a in D;
then reconsider A = a as Ordinal by Th13;
A35: G.A = K|A & L|D.A = L.A by A24,A34,FUNCT_1:49;
ex J being T-Sequence st J = G.A & F.A = H(J) by A18,A19,A34,Th10;
hence L|D.a = K.a by A11,A22,A34,A35;
end;
D c= dom L by A18,A19,Def2;
then dom(L|D) = D by RELAT_1:62;
hence thesis by A21,A23,A33,FUNCT_1:2;
end;
for A holds S[A] from TransfiniteInd(A1);
then consider L such that
A36: dom L = A() and
A37: for B st B in A() holds L.B = H(L|B);
take L;
thus dom L = A() by A36;
let B,L1;
assume B in A() & L1 = L|B;
hence thesis by A37;
end;
scheme
FuncTS { L() -> T-Sequence, F(Ordinal)->set, H(T-Sequence)->set } : for B st
B in dom L() holds L().B = H(L()|B)
provided
A1: for A,a holds a = F(A) iff ex L st a = H(L) & dom L = A & for B st B
in A holds L.B = H(L|B) and
A2: for A st A in dom L() holds L().A = F(A)
proof
consider L such that
F(dom L()) = H(L) and
A3: dom L = dom L() and
A4: for B st B in dom L() holds L.B = H(L|B) by A1;
now
let b;
assume
A5: b in dom L;
then reconsider B = b as Ordinal by Th13;
now
take K = L|B;
thus H(L|B) = H(K);
A6: B c= dom L by A5,Def2;
hence dom K = B by RELAT_1:62;
let C;
assume
A7: C in B;
then C c= B by Def2;
then
A8: L|C = K|C by FUNCT_1:51;
K.C = L.C by A7,FUNCT_1:49;
hence K.C = H(K|C) by A3,A4,A6,A7,A8;
end;
then F(B) = H(L|B) by A1
.= L.B by A3,A4,A5;
hence L().b = L.b by A2,A3,A5;
end;
then L() = L by A3,FUNCT_1:2;
hence thesis by A4;
end;
theorem
A c< B or A = B or B c< A
proof
assume that
A1: ( not A c< B)& not A = B and
A2: not B c< A;
not A c= B by A1,XBOOLE_0:def 8;
hence contradiction by A2,XBOOLE_0:def 8;
end;
begin
definition
let X;
func On X -> set means
:Def9:
x in it iff x in X & x is Ordinal;
existence
proof
defpred P[set] means $1 is Ordinal;
thus ex Y being set st for x being set holds x in Y iff x in X & P[x] from
XBOOLE_0:sch 1;
end;
uniqueness
proof
defpred P[set] means $1 in X & $1 is Ordinal;
let Y,Z such that
A1: x in Y iff P[x] and
A2: x in Z iff P[x];
thus Y = Z from XBOOLE_0:sch 2(A1,A2);
end;
func Lim X -> set means
x in it iff x in X & ex A st x = A & A is limit_ordinal;
existence
proof
defpred P[set] means ex A st $1 = A & A is limit_ordinal;
thus ex Y being set st for x being set holds x in Y iff x in X & P[x] from
XBOOLE_0:sch 1;
end;
uniqueness
proof
defpred P[set] means $1 in X & ex A st $1 = A & A is limit_ordinal;
let Y,Z such that
A3: x in Y iff P[x] and
A4: x in Z iff P[x];
thus Y = Z from XBOOLE_0:sch 2(A3,A4);
end;
end;
theorem Th36:
for D ex A st D in A & A is limit_ordinal
proof
let D;
consider Field being set such that
A1: D in Field and
A2: for X,Y holds X in Field & Y c= X implies Y in Field and
A3: for X holds X in Field implies bool X in Field and
for X holds X c= Field implies X,Field are_equipotent or X in Field by
ZFMISC_1:112;
for X st X in On Field holds X is Ordinal & X c= On Field
proof
let X;
assume
A4: X in On Field;
then reconsider A = X as Ordinal by Def9;
A5: A in Field by A4,Def9;
thus X is Ordinal by A4,Def9;
let y;
assume
A6: y in X;
then y in A;
then reconsider B = y as Ordinal by Th13;
B c= A by A6,Def2;
then B in Field by A2,A5;
hence thesis by Def9;
end;
then reconsider ON = On Field as Ordinal by Th19;
take ON;
thus D in ON by A1,Def9;
A in ON implies succ A in ON
proof
A7: succ A c= bool A
proof
let x;
assume x in succ A;
then x in A or x = A by Th8;
then x c= A by Def2;
hence thesis;
end;
assume A in ON;
then A in Field by Def9;
then bool A in Field by A3;
then succ A in Field by A2,A7;
hence thesis by Def9;
end;
hence thesis by Th28;
end;
definition
func omega -> set means
:Def11:
{} in it & it is limit_ordinal & it is
ordinal & for A st {} in A & A is limit_ordinal holds it c= A;
existence
proof
defpred P[Ordinal] means {} in $1 & $1 is limit_ordinal;
A1: ex A st P[A] by Th36;
ex C st P[C] & for A st P[A] holds C c= A from OrdinalMin(A1);
hence thesis;
end;
uniqueness
proof
let B,C be set;
assume {} in B & B is limit_ordinal &( B is ordinal & for A st {} in A &
A is limit_ordinal holds B c= A ) & {} in C & C is limit_ordinal &( C is
ordinal & for A st {} in A & A is limit_ordinal holds C c= A );
hence B c= C & C c= B;
end;
end;
registration
cluster omega -> non empty ordinal;
coherence by Def11;
end;
definition
let A be set;
attr A is natural means
:Def12:
A in omega;
end;
registration
cluster natural for number;
existence
proof
take n = the Element of omega;
thus n in omega;
end;
end;
definition
mode Nat is natural number;
end;
registration
sethood of natural number
proof
take omega;
let y be Nat;
thus y in omega by Def12;
end;
end;
registration
let A be Ordinal;
cluster -> ordinal for Element of A;
coherence
proof
let x be Element of A;
A is empty or A is non empty;
hence thesis by Th13,SUBSET_1:def 1;
end;
end;
registration
cluster natural -> ordinal for number;
coherence
proof
let n be number;
assume n is natural;
then reconsider n as Element of omega by Def12;
n is ordinal;
hence thesis;
end;
end;
scheme
ALFA { D() -> non empty set, P[set,set] }: ex F st dom F = D() & for d being
Element of D() ex A st A = F.d & P[d,A] & for B st P[d,B] holds A c= B
provided
A1: for d being Element of D() ex A st P[d,A]
proof
defpred Q[set,set] means ex A st A = $2 & P[$1,A] & for B st P[$1,B] holds A
c= B;
A2: for x st x in D() ex y st Q[x,y]
proof
let x;
assume x in D();
then reconsider d = x as Element of D();
defpred Q[Ordinal] means P[d,$1];
A3: ex A st Q[A] by A1;
consider A such that
A4: Q[A] & for B st Q[B] holds A c= B from OrdinalMin(A3);
reconsider y = A as set;
take y,A;
thus thesis by A4;
end;
A5: for x,y,z st x in D() & Q[x,y] & Q[x,z] holds y = z
proof
let x,y,z such that
x in D();
given A1 being Ordinal such that
A6: A1 = y and
A7: ( P[x,A1])& for B st P[x,B] holds A1 c= B;
given A2 being Ordinal such that
A8: A2 = z and
A9: ( P[x,A2])& for B st P[x,B] holds A2 c= B;
A1 c= A2 & A2 c= A1 by A7,A9;
hence thesis by A6,A8,XBOOLE_0:def 10;
end;
consider F such that
A10: dom F = D() & for x st x in D() holds Q[x,F.x] from FUNCT_1:sch 2(
A5, A2);
take F;
thus dom F = D() by A10;
let d be Element of D();
thus thesis by A10;
end;
theorem
succ X \ {X} = X
proof
thus succ X \ {X} c= X
proof
let x;
assume
A1: x in succ X \ {X};
then
A2: not x in {X} by XBOOLE_0:def 5;
x in X or x = X by A1,Th8;
hence thesis by A2,TARSKI:def 1;
end;
let x;
assume
A3: x in X;
then x <> X;
then
A4: not x in {X} by TARSKI:def 1;
x in succ X by A3,Th8;
hence thesis by A4,XBOOLE_0:def 5;
end;
registration
cluster empty -> natural for number;
coherence
proof
{} in omega by Def11;
hence thesis by Def12;
end;
cluster -> natural for Element of omega;
coherence by Def12;
end;
registration
cluster non empty natural for number;
existence
proof
take succ{};
thus succ{} is non empty;
omega is limit_ordinal & {} in omega by Def11;
hence succ{} in omega by Th28;
end;
end;
registration
let a be natural Ordinal;
cluster succ a -> natural;
coherence
proof
omega is limit_ordinal & a in omega by Def11,Def12;
hence succ a in omega by Th28;
end;
end;
registration
cluster empty -> c=-linear for set;
coherence
proof let X be set such that
A1: X is empty;
let x be set;
thus thesis by A1;
end;
end;
registration let X be c=-linear set;
cluster -> c=-linear for Subset of X;
coherence
proof
let Y be Subset of X;
let x, y be set;
assume x in Y & y in Y;
hence x,y are_c=-comparable by Def8;
end;
end;
begin
reserve a,b,c,d,x,y,z,X,Y,Z for set;
reserve R,S,T for Relation;
Lm1: R is reflexive iff for x st x in field R holds [x,x] in R
proof
R is reflexive iff R is_reflexive_in field R by RELAT_2:def 9;
hence thesis by RELAT_2:def 1;
end;
Lm2: R is transitive iff for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R
proof
thus R is transitive implies for x,y,z st [x,y] in R & [y,z] in R holds [x,z
] in R
proof
assume R is transitive;
then
A1: R is_transitive_in field R by RELAT_2:def 16;
let x,y,z;
assume that
A2: [x,y] in R and
A3: [y,z] in R;
A4: z in field R by A3,RELAT_1:15;
x in field R & y in field R by A2,RELAT_1:15;
hence thesis by A1,A2,A3,A4,RELAT_2:def 8;
end;
assume for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R;
then
for x,y,z st x in field R & y in field R & z in field R & [x,y] in R & [
y,z] in R holds [x,z] in R;
then R is_transitive_in field R by RELAT_2:def 8;
hence thesis by RELAT_2:def 16;
end;
Lm3: R is antisymmetric iff for x,y st [x,y] in R & [y,x] in R holds x = y
proof
thus R is antisymmetric implies for x,y st [x,y] in R & [y,x] in R holds x =
y
proof
assume R is antisymmetric;
then
A1: R is_antisymmetric_in field R by RELAT_2:def 12;
let x,y;
assume that
A2: [x,y] in R and
A3: [y,x] in R;
x in field R & y in field R by A2,RELAT_1:15;
hence thesis by A1,A2,A3,RELAT_2:def 4;
end;
assume for x,y st [x,y] in R & [y,x] in R holds x = y;
then
for x,y st x in field R & y in field R & [x,y] in R & [y,x] in R holds x = y;
then R is_antisymmetric_in field R by RELAT_2:def 4;
hence thesis by RELAT_2:def 12;
end;
Lm4: R is connected iff for x,y st x in field R & y in field R & x <> y holds
[x,y] in R or [y,x] in R
proof
R is connected iff R is_connected_in field R by RELAT_2:def 14;
hence thesis by RELAT_2:def 6;
end;
definition
let R,a;
func R-Seg(a) equals
Coim(R,a) \ {a};
coherence;
end;
theorem Th1:
x in R-Seg a iff x <> a & [x,a] in R
proof
hereby
assume
A1: x in R-Seg a;
hence x <> a by ZFMISC_1:56;
ex y st [x,y] in R & y in {a} by A1,RELAT_1:def 14;
hence [x,a] in R by TARSKI:def 1;
end;
assume that
A2: x <> a and
A3: [x,a] in R;
a in {a} by TARSKI:def 1;
then x in Coim(R,a) by A3,RELAT_1:def 14;
hence thesis by A2,ZFMISC_1:56;
end;
theorem Th2:
x in field R or R-Seg(x) = {}
proof
assume
A1: not x in field R;
set y = the Element of R-Seg(x);
assume R-Seg(x) <> {};
then [y,x] in R by Th1;
hence contradiction by A1,RELAT_1:15;
end;
definition
let R;
attr R is well_founded means
:Def2:
for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg a misses Y;
let X;
pred R is_well_founded_in X means
:Def3:
for Y st Y c= X & Y <> {} ex a st a in Y & R-Seg a misses Y;
end;
theorem Th3:
R is well_founded iff R is_well_founded_in field R
proof
thus R is well_founded implies R is_well_founded_in field R
proof
assume for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y;
hence for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y;
end;
assume for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y;
hence for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y;
end;
definition
let R;
attr R is well-ordering means
:Def4:
R is reflexive & R is transitive & R is
antisymmetric & R is connected & R is well_founded;
let X;
pred R well_orders X means
:Def5:
R is_reflexive_in X & R is_transitive_in X
& R is_antisymmetric_in X & R is_connected_in X & R is_well_founded_in X;
end;
registration
cluster well-ordering ->
reflexive transitive antisymmetric connected well_founded
for Relation;
coherence by Def4;
cluster reflexive transitive antisymmetric connected well_founded
-> well-ordering for Relation;
coherence by Def4;
end;
theorem
R well_orders field R iff R is well-ordering
proof
thus R well_orders field R implies R is well-ordering
proof
assume R is_reflexive_in field R & R is_transitive_in field R & R
is_antisymmetric_in field R & R is_connected_in field R & R is_well_founded_in
field R;
hence R is reflexive & R is transitive & R is antisymmetric & R is
connected & R is well_founded by Th3,RELAT_2:def 9,def 12,def 14,def 16;
end;
assume R is reflexive & R is transitive & R is antisymmetric & R is
connected & R is well_founded;
hence R is_reflexive_in field R & R is_transitive_in field R & R
is_antisymmetric_in field R & R is_connected_in field R & R is_well_founded_in
field R by Th3,RELAT_2:def 9,def 12,def 14,def 16;
end;
theorem
R well_orders X implies for Y st Y c= X & Y <> {} ex a st a in Y & for
b st b in Y holds [a,b] in R
proof
assume
A1: R well_orders X;
then
A2: R is_reflexive_in X by Def5;
A3: R is_connected_in X by A1,Def5;
let Y;
assume that
A4: Y c= X and
A5: Y <> {};
R is_well_founded_in X by A1,Def5;
then consider a such that
A6: a in Y and
A7: R-Seg(a) misses Y by A4,A5,Def3;
take a;
thus a in Y by A6;
let b;
assume
A8: b in Y;
then not b in R-Seg(a) by A7,XBOOLE_0:3;
then a = b or not [b,a] in R by Th1;
then a <> b implies [a,b] in R by A3,A4,A6,A8,RELAT_2:def 6;
hence thesis by A2,A4,A6,RELAT_2:def 1;
end;
theorem Th6:
R is well-ordering implies for Y st Y c= field R & Y <> {} ex a
st a in Y & for b st b in Y holds [a,b] in R
proof
assume
A1: R is well-ordering;
let Y;
assume that
A2: Y c= field R and
A3: Y <> {};
consider a such that
A4: a in Y and
A5: R-Seg(a) misses Y by A1,A2,A3,Def2;
take a;
thus a in Y by A4;
let b;
assume
A6: b in Y;
then not b in R-Seg(a) by A5,XBOOLE_0:3;
then a = b or not [b,a] in R by Th1;
then a <> b implies [a,b] in R by A1,A2,A4,A6,Lm4;
hence thesis by A1,A2,A4,Lm1;
end;
theorem
for R st R is well-ordering & field R <> {} ex a st a in field R & for
b st b in field R holds [a,b] in R by Th6;
theorem
for R st R is well-ordering for a st a in field R holds (for b st b in
field R holds [b,a] in R) or ex b st b in field R & [a,b] in R & for c st c in
field R & [a,c] in R holds c = a or [b,c] in R
proof
let R;
assume
A1: R is well-ordering;
let a such that
A2: a in field R;
defpred P[set] means not [$1,a] in R;
given b such that
A3: b in field R & not [b,a] in R;
consider Z such that
A4: c in Z iff c in field R & P[c] from XBOOLE_0:sch 1;
for b holds b in Z implies b in field R by A4;
then
A5: Z c= field R by TARSKI:def 3;
Z <> {} by A3,A4;
then consider d such that
A6: d in Z and
A7: for c st c in Z holds [d,c] in R by A1,A5,Th6;
take d;
thus
A8: d in field R by A4,A6;
A9: not [d,a] in R by A4,A6;
then a <> d by A6,A7;
hence [a,d] in R by A1,A2,A8,A9,Lm4;
let c;
assume that
A10: c in field R and
A11: [a,c] in R;
assume c <> a;
then not [c,a] in R by A1,A11,Lm3;
then c in Z by A4,A10;
hence thesis by A7;
end;
reserve F,G for Function;
theorem Th9:
R-Seg(a) c= field R
proof
let b;
assume b in R-Seg(a);
then [b,a] in R by Th1;
hence thesis by RELAT_1:15;
end;
definition
let R,Y;
func R |_2 Y -> Relation equals
R /\ [:Y,Y:];
coherence;
end;
theorem Th10:
R |_2 X = X|`R|X
proof
let x,y;
thus [x,y] in R |_2 X implies [x,y] in X|`R|X
proof
assume
A1: [x,y] in R |_2 X;
then
A2: [x,y] in [:X,X:] by XBOOLE_0:def 4;
then
A3: x in X by ZFMISC_1:87;
A4: y in X by A2,ZFMISC_1:87;
[x,y] in R by A1,XBOOLE_0:def 4;
then [x,y] in X|`R by A4,RELAT_1:def 12;
hence thesis by A3,RELAT_1:def 11;
end;
assume
A5: [x,y] in X|`R|X;
then
A6: [x,y] in X|`R by RELAT_1:def 11;
then
A7: [x,y] in R by RELAT_1:def 12;
A8: y in X by A6,RELAT_1:def 12;
x in X by A5,RELAT_1:def 11;
then [x,y] in [:X,X:] by A8,ZFMISC_1:87;
hence thesis by A7,XBOOLE_0:def 4;
end;
theorem Th11:
R |_2 X = X|`(R|X)
proof
thus R |_2 X = X|`R|X by Th10
.= X|`(R|X) by RELAT_1:109;
end;
Lm5: dom(X|`R) c= dom R
proof
let x;
assume x in dom(X|`R);
then consider y such that
A1: [x,y] in X|`R by XTUPLE_0:def 12;
[x,y] in R by A1,RELAT_1:def 12;
hence thesis by XTUPLE_0:def 12;
end;
theorem Th12:
x in field(R |_2 X) implies x in field R & x in X
proof
A1: dom(X|`R|X) = dom(X|`R) /\ X & rng(X|`(R|X)) = rng(R|X) /\ X
by RELAT_1:61,88;
assume x in field(R |_2 X);
then
A2: x in dom(R |_2 X) or x in rng(R |_2 X) by XBOOLE_0:def 3;
A3: dom(X|`R) c= dom R & rng(R|X) c= rng R by Lm5,RELAT_1:70;
R |_2 X = X|`R|X & R |_2 X = X|`(R|X) by Th10,Th11;
then x in dom(X|`R) & x in X or x in rng(R|X) & x in X
by A2,A1,XBOOLE_0:def 4;
hence thesis by A3,XBOOLE_0:def 3;
end;
theorem Th13:
field(R |_2 X) c= field R & field(R |_2 X) c= X
proof
( for x st x in field(R |_2 X) holds x in field R)& for x st x in field(
R |_2 X) holds x in X by Th12;
hence thesis by TARSKI:def 3;
end;
theorem Th14:
(R |_2 X)-Seg(a) c= R-Seg(a)
proof
let x;
assume
A1: x in (R |_2 X)-Seg(a);
then [x,a] in R |_2 X by Th1;
then
A2: [x,a] in R by XBOOLE_0:def 4;
x <> a by A1,Th1;
hence thesis by A2,Th1;
end;
theorem Th15:
R is reflexive implies R |_2 X is reflexive
proof
assume
A1: R is reflexive;
now
let a;
assume
A2: a in field(R |_2 X);
then a in X by Th12;
then
A3: [a,a] in [:X,X:] by ZFMISC_1:87;
a in field R by A2,Th12;
then [a,a] in R by A1,Lm1;
hence [a,a] in R |_2 X by A3,XBOOLE_0:def 4;
end;
hence thesis by Lm1;
end;
theorem Th16:
R is connected implies R |_2 Y is connected
proof
assume
A1: R is connected;
now
let a,b;
assume that
A2: a in field(R |_2 Y) & b in field(R |_2 Y) and
A3: a <> b;
a in Y & b in Y by A2,Th12;
then
A4: [a,b] in [:Y,Y:] & [b,a] in [:Y,Y:] by ZFMISC_1:87;
a in field R & b in field R by A2,Th12;
then [a,b] in R or [b,a] in R by A1,A3,Lm4;
hence [a,b] in R |_2 Y or [b,a] in R |_2 Y by A4,XBOOLE_0:def 4;
end;
hence thesis by Lm4;
end;
theorem Th17:
R is transitive implies R |_2 Y is transitive
proof
assume
A1: R is transitive;
now
let a,b,c;
assume that
A2: [a,b] in R |_2 Y and
A3: [b,c] in R |_2 Y;
[a,b] in R & [b,c] in R by A2,A3,XBOOLE_0:def 4;
then
A4: [a,c] in R by A1,Lm2;
[b,c] in [:Y,Y:] by A3,XBOOLE_0:def 4;
then
A5: c in Y by ZFMISC_1:87;
[a,b] in [:Y,Y:] by A2,XBOOLE_0:def 4;
then a in Y by ZFMISC_1:87;
then [a,c] in [:Y,Y:] by A5,ZFMISC_1:87;
hence [a,c] in R |_2 Y by A4,XBOOLE_0:def 4;
end;
hence thesis by Lm2;
end;
theorem Th18:
R is antisymmetric implies R |_2 Y is antisymmetric
proof
assume
A1: R is antisymmetric;
now
let a,b;
assume [a,b] in R |_2 Y & [b,a] in R |_2 Y;
then [a,b] in R & [b,a] in R by XBOOLE_0:def 4;
hence a = b by A1,Lm3;
end;
hence thesis by Lm3;
end;
theorem Th19:
(R |_2 X) |_2 Y = R |_2 (X /\ Y)
proof
thus (R |_2 X) |_2 Y = R /\ ([:X,X:] /\ [:Y,Y:]) by XBOOLE_1:16
.= R |_2 (X /\ Y) by ZFMISC_1:100;
end;
theorem
(R |_2 X) |_2 Y = (R |_2 Y) |_2 X
proof
thus (R |_2 X) |_2 Y = R |_2 (Y /\ X) by Th19
.= (R |_2 Y) |_2 X by Th19;
end;
theorem
(R |_2 Y) |_2 Y = R |_2 Y
proof
let a,b;
thus [a,b] in (R |_2 Y) |_2 Y implies [a,b] in R |_2 Y by XBOOLE_0:def 4;
assume
A1: [a,b] in R |_2 Y;
then [a,b] in [:Y,Y:] by XBOOLE_0:def 4;
hence thesis by A1,XBOOLE_0:def 4;
end;
theorem Th22:
Z c= Y implies (R |_2 Y) |_2 Z = R |_2 Z
proof
assume
A1: Z c= Y;
let a,b;
thus [a,b] in (R |_2 Y) |_2 Z implies [a,b] in R |_2 Z
proof
assume
A2: [a,b] in (R |_2 Y) |_2 Z;
then [a,b] in R |_2 Y by XBOOLE_0:def 4;
then
A3: [a,b] in R by XBOOLE_0:def 4;
[a,b] in [:Z,Z:] by A2,XBOOLE_0:def 4;
hence thesis by A3,XBOOLE_0:def 4;
end;
assume
A4: [a,b] in R |_2 Z;
then
A5: [a,b] in R by XBOOLE_0:def 4;
A6: [a,b] in [:Z,Z:] by A4,XBOOLE_0:def 4;
then a in Z & b in Z by ZFMISC_1:87;
then [a,b] in [:Y,Y:] by A1,ZFMISC_1:87;
then [a,b] in R |_2 Y by A5,XBOOLE_0:def 4;
hence thesis by A6,XBOOLE_0:def 4;
end;
theorem Th23:
R |_2 field R = R
proof
let x,y;
thus [x,y] in R |_2 field R implies [x,y] in R by XBOOLE_0:def 4;
assume
A1: [x,y] in R;
then x in field R & y in field R by RELAT_1:15;
then [x,y] in [:field R,field R:] by ZFMISC_1:87;
hence thesis by A1,XBOOLE_0:def 4;
end;
theorem Th24:
R is well_founded implies R |_2 X is well_founded
proof
assume
A1: for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y;
A2: field(R |_2 X) c= field R by Th13;
let Y;
assume Y c= field(R |_2 X) & Y <> {};
then consider a such that
A3: a in Y and
A4: R-Seg(a) misses Y by A1,A2,XBOOLE_1:1;
take a;
thus a in Y by A3;
assume not thesis;
then
A5: ex b being set st b in (R |_2 X)-Seg(a) & b in Y by XBOOLE_0:3;
(R |_2 X)-Seg(a) c= R-Seg(a) by Th14;
hence contradiction by A4,A5,XBOOLE_0:3;
end;
theorem Th25:
R is well-ordering implies R |_2 Y is well-ordering
proof
assume R is well-ordering;
hence
R |_2 Y is reflexive transitive antisymmetric connected well_founded by Th15
,Th16,Th17,Th18,Th24;
end;
theorem Th26:
R is well-ordering implies R-Seg(a),R-Seg(b) are_c=-comparable
proof
assume
A1: R is well-ordering;
A2: now
assume
A3: a in field R & b in field R;
now
assume a <> b;
A4: now
assume
A5: [b,a] in R;
now
let c;
assume
A6: c in R-Seg(b);
then
A7: [c,b] in R by Th1;
then
A8: [c,a] in R by A1,A5,Lm2;
c <> b by A6,Th1;
then c <> a by A1,A5,A7,Lm3;
hence c in R-Seg(a) by A8,Th1;
end;
hence R-Seg(b) c= R-Seg(a) by TARSKI:def 3;
end;
now
assume
A9: [a,b] in R;
now
let c;
assume
A10: c in R-Seg(a);
then
A11: [c,a] in R by Th1;
then
A12: [c,b] in R by A1,A9,Lm2;
c <> a by A10,Th1;
then c <> b by A1,A9,A11,Lm3;
hence c in R-Seg(b) by A12,Th1;
end;
hence R-Seg(a) c= R-Seg(b) by TARSKI:def 3;
end;
hence thesis by A1,A3,A4,Lm4,XBOOLE_0:def 9;
end;
hence thesis;
end;
now
assume R-Seg(a) = {} or R-Seg(b) = {};
then R-Seg(a) c= R-Seg(b) or R-Seg(b) c= R-Seg(a) by XBOOLE_1:2;
hence thesis by XBOOLE_0:def 9;
end;
hence thesis by A2,Th2;
end;
theorem Th27:
R is well-ordering & b in R-Seg(a) implies (R |_2 (R-Seg(a)))
-Seg(b) = R-Seg(b)
proof
assume that
A1: R is well-ordering and
A2: b in R-Seg(a);
set S = R |_2 (R-Seg(a));
now
let c;
assume
A3: c in R-Seg(b);
then
A4: [c,b] in R by Th1;
A5: [b,a] in R by A2,Th1;
then
A6: [c,a] in R by A1,A4,Lm2;
A7: c <> b by A3,Th1;
then c <> a by A1,A4,A5,Lm3;
then c in R-Seg(a) by A6,Th1;
then [c,b] in [:R-Seg(a),R-Seg(a):] by A2,ZFMISC_1:87;
then [c,b] in S by A4,XBOOLE_0:def 4;
hence c in S-Seg(b) by A7,Th1;
end;
then
A8: R-Seg(b) c= S-Seg(b) by TARSKI:def 3;
now
let c;
assume
A9: c in S-Seg(b);
then [c,b] in S by Th1;
then
A10: [c,b] in R by XBOOLE_0:def 4;
c <> b by A9,Th1;
hence c in R-Seg(b) by A10,Th1;
end;
then S-Seg(b) c= R-Seg(b) by TARSKI:def 3;
hence thesis by A8,XBOOLE_0:def 10;
end;
theorem Th28:
R is well-ordering & Y c= field R implies (Y = field R or (ex a
st a in field R & Y = R-Seg(a) ) iff for a st a in Y for b st [b,a] in R holds
b in Y )
proof
assume that
A1: R is well-ordering and
A2: Y c= field R;
now
given a such that
a in field R and
A3: Y = R-Seg(a);
let b such that
A4: b in Y;
A5: [b,a] in R by A3,A4,Th1;
let c such that
A6: [c,b] in R;
A7: [c,a] in R by A1,A6,A5,Lm2;
b <> a by A3,A4,Th1;
then c <> a by A1,A6,A5,Lm3;
hence c in Y by A3,A7,Th1;
end;
hence Y = field R or (ex a st a in field R & Y = R-Seg(a) ) implies for a st
a in Y for b st [b,a] in R holds b in Y by RELAT_1:15;
assume
A8: for a st a in Y for b st [b,a] in R holds b in Y;
assume Y <> field R;
then ex d st not ( d in field R iff d in Y ) by TARSKI:1;
then field R \ Y <> {} by A2,XBOOLE_0:def 5;
then consider a such that
A9: a in field R \ Y and
A10: for b st b in field R \ Y holds [a,b] in R by A1,Th6;
A11: now
let b;
assume
A12: b in R-Seg(a);
then
A13: [b,a] in R by Th1;
assume
A14: not b in Y;
b in field R by A13,RELAT_1:15;
then b in field R \ Y by A14,XBOOLE_0:def 5;
then
A15: [a,b] in R by A10;
b <> a by A12,Th1;
hence contradiction by A1,A13,A15,Lm3;
end;
take a;
thus a in field R by A9;
now
A16: not a in Y by A9,XBOOLE_0:def 5;
let b;
assume
A17: b in Y;
assume not b in R-Seg(a);
then
A18: not [b,a] in R or a = b by Th1;
a <> b by A9,A17,XBOOLE_0:def 5;
then [a,b] in R by A2,A1,A9,A17,A18,Lm4;
hence contradiction by A8,A17,A16;
end;
hence Y = R-Seg(a) by A11,TARSKI:1;
end;
theorem Th29:
R is well-ordering & a in field R & b in field R implies ( [a,b]
in R iff R-Seg(a) c= R-Seg(b) )
proof
assume that
A1: R is well-ordering and
A2: a in field R and
A3: b in field R;
thus [a,b] in R implies R-Seg(a) c= R-Seg(b)
proof
assume
A4: [a,b] in R;
let c;
assume
A5: c in R-Seg(a);
then
A6: [c,a] in R by Th1;
then
A7: [c,b] in R by A1,A4,Lm2;
c <> a by A5,Th1;
then c <> b by A1,A4,A6,Lm3;
hence thesis by A7,Th1;
end;
assume
A8: R-Seg(a) c= R-Seg(b);
now
assume
A9: a <> b;
assume not [a,b] in R;
then [b,a] in R by A2,A3,A1,A9,Lm4;
then b in R-Seg(a) by A9,Th1;
hence contradiction by A8,Th1;
end;
hence thesis by A1,A2,Lm1;
end;
theorem Th30:
R is well-ordering & a in field R & b in field R implies ( R-Seg
(a) c= R-Seg(b) iff a = b or a in R-Seg(b) )
proof
assume
A1: R is well-ordering & a in field R & b in field R;
thus R-Seg(a) c= R-Seg(b) implies a = b or a in R-Seg(b)
proof
assume R-Seg(a) c= R-Seg(b);
then [a,b] in R by A1,Th29;
hence thesis by Th1;
end;
now
assume a in R-Seg(b);
then [a,b] in R by Th1;
hence R-Seg(a) c= R-Seg(b) by A1,Th29;
end;
hence thesis;
end;
theorem Th31:
R is well-ordering & X c= field R implies field(R |_2 X) = X
proof
assume that
A1: R is well-ordering and
A2: X c= field R;
thus field(R |_2 X) c= X by Th13;
let x;
assume
A3: x in X;
then
A4: [x,x] in [:X,X:] by ZFMISC_1:87;
[x,x] in R by A1,A2,A3,Lm1;
then [x,x] in R |_2 X by A4,XBOOLE_0:def 4;
hence thesis by RELAT_1:15;
end;
theorem Th32:
R is well-ordering implies field(R |_2 R-Seg(a)) = R-Seg(a)
proof
R-Seg(a) c= field R by Th9;
hence thesis by Th31;
end;
theorem Th33:
R is well-ordering implies for Z st for a st a in field R & R
-Seg(a) c= Z holds a in Z holds field R c= Z
proof
assume
A1: R is well-ordering;
let Z such that
A2: for a st a in field R & R-Seg(a) c= Z holds a in Z;
A3: now
let a such that
A4: a in field R and
A5: for b st [b,a] in R & a <> b holds b in Z;
now
let b;
assume b in R-Seg(a);
then [b,a] in R & b <> a by Th1;
hence b in Z by A5;
end;
then R-Seg(a) c= Z by TARSKI:def 3;
hence a in Z by A2,A4;
end;
given a such that
A6: a in field R & not a in Z;
field R \ Z <> {} by A6,XBOOLE_0:def 5;
then consider a such that
A7: a in field R \ Z and
A8: for b st b in field R \ Z holds [a,b] in R by A1,Th6;
not a in Z by A7,XBOOLE_0:def 5;
then consider b such that
A9: [b,a] in R and
A10: b <> a and
A11: not b in Z by A3,A7;
b in field R by A9,RELAT_1:15;
then b in field R \ Z by A11,XBOOLE_0:def 5;
then [a,b] in R by A8;
hence contradiction by A1,A9,A10,Lm3;
end;
theorem Th34:
R is well-ordering & a in field R & b in field R & (for c st c
in R-Seg(a) holds [c,b] in R & c <> b) implies [a,b] in R
proof
assume that
A1: R is well-ordering & a in field R & b in field R and
A2: c in R-Seg(a) implies [c,b] in R & c <> b;
assume
A3: not [a,b] in R;
a <> b by A1,A3,Lm1;
then [b,a] in R by A1,A3,Lm4;
then b in R-Seg(a) by A3,Th1;
hence contradiction by A2;
end;
theorem Th35:
R is well-ordering & dom F = field R & rng F c= field R & (for a
,b st [a,b] in R & a <> b holds [F.a,F.b] in R & F.a <> F.b) implies for a st a
in field R holds [a,F.a] in R
proof
assume that
A1: R is well-ordering & dom F = field R & rng F c= field R and
A2: [a,b] in R & a <> b implies [F.a,F.b] in R & F.a <> F.b;
defpred P[set] means [$1,F.$1] in R;
consider Z such that
A3: a in Z iff a in field R & P[a] from XBOOLE_0:sch 1;
now
let a;
assume
A4: a in field R;
assume
A5: R-Seg(a) c= Z;
A6: now
let b;
assume
A7: b in R-Seg(a);
then
A8: [b,F.b] in R by A3,A5;
A9: [b,a] in R & b <> a by A7,Th1;
then
A10: [F.b,F.a] in R by A2;
hence [b,F.a] in R by A1,A8,Lm2;
F.b <> F.a by A2,A9;
hence b <> F.a by A1,A8,A10,Lm3;
end;
F.a in rng F by A1,A4,FUNCT_1:def 3;
then [a,F.a] in R by A1,A4,A6,Th34;
hence a in Z by A3,A4;
end;
then
A11: field R c= Z by A1,Th33;
let a;
assume a in field R;
hence thesis by A3,A11;
end;
definition
let R,S,F;
pred F is_isomorphism_of R,S means
:Def7:
dom F = field R & rng F = field S
& F is one-to-one & for a,b holds [a,b] in R iff a in field R & b in field R &
[F.a,F.b] in S;
end;
theorem Th36:
F is_isomorphism_of R,S implies for a,b st [a,b] in R & a <> b
holds [F.a,F.b] in S & F.a <> F.b
proof
assume
A1: F is_isomorphism_of R,S;
then
A2: dom F = field R & F is one-to-one by Def7;
let a,b;
assume that
A3: [a,b] in R and
A4: a <> b;
a in field R & b in field R by A1,A3,Def7;
hence thesis by A1,A2,A3,A4,Def7,FUNCT_1:def 4;
end;
definition
let R,S;
pred R,S are_isomorphic means
:Def8:
ex F st F is_isomorphism_of R,S;
end;
theorem Th37:
id(field R) is_isomorphism_of R,R
proof
A1: now
let a,b;
thus [a,b] in R implies a in field R & b in field R & [id(field R).a,id(
field R).b] in R
proof
assume
A2: [a,b] in R;
hence
A3: a in field R & b in field R by RELAT_1:15;
then id(field R).a = a by FUNCT_1:18;
hence thesis by A2,A3,FUNCT_1:18;
end;
assume that
A4: a in field R and
A5: b in field R & [id(field R).a,id(field R).b] in R;
id(field R).a = a by A4,FUNCT_1:18;
hence [a,b] in R by A5,FUNCT_1:18;
end;
dom(id(field R)) = field R & rng(id(field R)) = field R;
hence thesis by A1,Def7;
end;
theorem
R,R are_isomorphic
proof
take id(field R);
thus thesis by Th37;
end;
theorem Th39:
F is_isomorphism_of R,S implies F" is_isomorphism_of S,R
proof
assume
A1: F is_isomorphism_of R,S;
then
A2: F is one-to-one by Def7;
A3: rng F = field S by A1,Def7;
hence
A4: dom(F") = field S by A2,FUNCT_1:33;
A5: dom F = field R by A1,Def7;
hence rng(F") = field R by A2,FUNCT_1:33;
thus F" is one-to-one by A2;
let a,b;
thus [a,b] in S implies a in field S & b in field S & [F".a,F".b] in R
proof
A6: dom F = rng(F") by A2,FUNCT_1:33;
assume
A7: [a,b] in S;
hence
A8: a in field S & b in field S by RELAT_1:15;
then
A9: F".a in rng(F") & F".b in rng(F") by A4,FUNCT_1:def 3;
a = F.(F".a) & b = F.(F".b) by A3,A2,A8,FUNCT_1:35;
hence thesis by A1,A5,A7,A6,A9,Def7;
end;
assume that
A10: a in field S & b in field S and
A11: [F".a,F".b] in R;
F.(F".a) = a & F.(F".b) = b by A3,A2,A10,FUNCT_1:35;
hence thesis by A1,A11,Def7;
end;
theorem Th40:
R,S are_isomorphic implies S,R are_isomorphic
proof
given F such that
A1: F is_isomorphism_of R,S;
take F";
thus thesis by A1,Th39;
end;
theorem Th41:
F is_isomorphism_of R,S & G is_isomorphism_of S,T implies G*F
is_isomorphism_of R,T
proof
assume that
A1: dom F = field R and
A2: rng F = field S and
A3: F is one-to-one and
A4: for a,b holds [a,b] in R iff a in field R & b in field R & [F.a,F.b] in S;
assume that
A5: dom G = field S and
A6: rng G = field T and
A7: G is one-to-one and
A8: for a,b holds [a,b] in S iff a in field S & b in field S & [G.a,G.b] in T;
thus dom(G*F) = field R by A1,A2,A5,RELAT_1:27;
thus rng(G*F) = field T by A2,A5,A6,RELAT_1:28;
thus G*F is one-to-one by A3,A7;
let a,b;
thus [a,b] in R implies a in field R & b in field R & [(G*F).a,(G*F).b] in T
proof
assume
A9: [a,b] in R;
hence a in field R & b in field R by RELAT_1:15;
then
A10: (G*F).a = G.(F.a) & (G*F).b = G.(F.b) by A1,FUNCT_1:13;
[F.a,F.b] in S by A4,A9;
hence thesis by A8,A10;
end;
assume that
A11: a in field R & b in field R and
A12: [(G*F).a,(G*F).b] in T;
A13: (G*F).a = G.(F.a) & (G*F).b = G.(F.b) by A1,A11,FUNCT_1:13;
F.a in field S & F.b in field S by A1,A2,A11,FUNCT_1:def 3;
then [F.a,F.b] in S by A8,A12,A13;
hence thesis by A4,A11;
end;
theorem Th42:
R,S are_isomorphic & S,T are_isomorphic implies R,T are_isomorphic
proof
given F such that
A1: F is_isomorphism_of R,S;
given G such that
A2: G is_isomorphism_of S,T;
take G*F;
thus thesis by A1,A2,Th41;
end;
theorem Th43:
F is_isomorphism_of R,S implies ( R is reflexive implies S is
reflexive ) & ( R is transitive implies S is transitive ) & ( R is connected
implies S is connected ) & ( R is antisymmetric implies S is antisymmetric ) &
( R is well_founded implies S is well_founded )
proof
assume
A1: F is_isomorphism_of R,S;
then
A2: dom F = field R by Def7;
A3: rng F = field S by A1,Def7;
A4: F is one-to-one by A1,Def7;
then
A5: rng(F") = dom F & dom(F") = rng F by FUNCT_1:33;
thus R is reflexive implies S is reflexive
proof
assume
A6: R is reflexive;
now
let a;
assume
A7: a in field S;
then F".a in field R by A2,A3,A5,FUNCT_1:def 3;
then
A8: [F".a,F".a] in R by A6,Lm1;
a = F.(F".a) by A3,A4,A7,FUNCT_1:35;
hence [a,a] in S by A1,A8,Def7;
end;
hence thesis by Lm1;
end;
thus R is transitive implies S is transitive
proof
assume
A9: R is transitive;
now
let a,b,c;
assume that
A10: [a,b] in S and
A11: [b,c] in S;
A12: c in field S by A11,RELAT_1:15;
then
A13: c = F.(F".c) by A3,A4,FUNCT_1:35;
b in field S by A10,RELAT_1:15;
then
A14: b = F.(F".b) & F".b in field R by A2,A3,A4,A5,FUNCT_1:35,def 3;
F".c in field R by A2,A3,A5,A12,FUNCT_1:def 3;
then
A15: [F".b,F".c] in R by A1,A11,A13,A14,Def7;
A16: a in field S by A10,RELAT_1:15;
then
A17: a = F.(F".a) by A3,A4,FUNCT_1:35;
F".a in field R by A2,A3,A5,A16,FUNCT_1:def 3;
then [F".a,F".b] in R by A1,A10,A17,A14,Def7;
then [F".a,F".c] in R by A9,A15,Lm2;
hence [a,c] in S by A1,A17,A13,Def7;
end;
hence thesis by Lm2;
end;
thus R is connected implies S is connected
proof
assume
A18: R is connected;
now
let a,b;
assume that
A19: a in field S & b in field S and
A20: a <> b;
A21: a = F.(F".a) & b = F.(F".b) by A3,A4,A19,FUNCT_1:35;
F".a in field R & F".b in field R by A2,A3,A5,A19,FUNCT_1:def 3;
then [F".a,F".b] in R or [F".b,F".a] in R by A18,A20,A21,Lm4;
hence [a,b] in S or [b,a] in S by A1,A21,Def7;
end;
hence thesis by Lm4;
end;
thus R is antisymmetric implies S is antisymmetric
proof
assume
A22: R is antisymmetric;
now
let a,b;
assume that
A23: [a,b] in S and
A24: [b,a] in S;
A25: a in field S by A23,RELAT_1:15;
then
A26: a = F.(F".a) by A3,A4,FUNCT_1:35;
A27: b in field S by A23,RELAT_1:15;
then
A28: b = F.(F".b) by A3,A4,FUNCT_1:35;
A29: F".b in field R by A2,A3,A5,A27,FUNCT_1:def 3;
F".a in field R by A2,A3,A5,A25,FUNCT_1:def 3;
then [F".a,F".b] in R & [F".b,F".a] in R by A1,A23,A24,A26,A28,A29,Def7;
hence a = b by A22,A26,A28,Lm3;
end;
hence thesis by Lm3;
end;
assume
A30: for Y st Y c= field R & Y <> {} ex x st x in Y & R-Seg(x) misses Y;
let Z;
assume that
A31: Z c= field S and
A32: Z <> {};
A33: F"Z c= dom F by RELAT_1:132;
then consider x such that
A34: x in F"Z and
A35: R-Seg(x) misses F"Z by A2,A3,A30,A31,A32,RELAT_1:139;
take F.x;
thus F.x in Z by A34,FUNCT_1:def 7;
assume not thesis;
then consider y being set such that
A36: y in S-Seg(F.x) and
A37: y in Z by XBOOLE_0:3;
A38: F".y in dom F by A3,A5,A31,A37,FUNCT_1:def 3;
A39: [y,F.x] in S by A36,Th1;
A40: y = F.(F".y) by A3,A4,A31,A37,FUNCT_1:35;
then F".y in F"Z by A37,A38,FUNCT_1:def 7;
then not F".y in R-Seg(x) by A35,XBOOLE_0:3;
then not [F".y,x] in R or F".y = x by Th1;
hence contradiction by A1,A2,A33,A34,A36,A40,A38,A39,Th1,Def7;
end;
theorem Th44:
R is well-ordering & F is_isomorphism_of R,S implies S is well-ordering
proof
assume R is reflexive transitive antisymmetric connected well_founded & F
is_isomorphism_of R,S;
hence S is reflexive transitive antisymmetric connected well_founded by Th43;
end;
theorem Th45:
R is well-ordering implies for F,G st F is_isomorphism_of R,S &
G is_isomorphism_of R,S holds F = G
proof
assume
A1: R is well-ordering;
let F,G;
assume that
A2: F is_isomorphism_of R,S and
A3: G is_isomorphism_of R,S;
A4: dom F = field R by A2,Def7;
A5: S is well-ordering by A1,A2,Th44;
A6: rng F = field S by A2,Def7;
A7: G is one-to-one by A3,Def7;
A8: dom G = field R by A3,Def7;
A9: G" is_isomorphism_of S,R by A3,Th39;
then
A10: G" is one-to-one by Def7;
A11: F is one-to-one by A2,Def7;
A12: rng G = field S by A3,Def7;
A13: F" is_isomorphism_of S,R by A2,Th39;
then
A14: F" is one-to-one by Def7;
for a st a in field R holds F.a = G.a
proof
A15: dom(F") = field S by A6,A11,FUNCT_1:33;
then
A16: dom(F"*G) = field R by A8,A12,RELAT_1:27;
A17: now
let a,b;
assume that
A18: [a,b] in R and
A19: a <> b;
A20: [G.a,G.b] in S by A3,A18,Def7;
A21: b in field R by A18,RELAT_1:15;
then
A22: F".(G.b) = (F"*G).b by A8,FUNCT_1:13;
A23: a in field R by A18,RELAT_1:15;
then F".(G.a) = (F"*G).a by A8,FUNCT_1:13;
hence [(F"*G).a,(F"*G).b] in R by A13,A20,A22,Def7;
thus (F"*G).a <> (F"*G).b by A14,A7,A16,A19,A23,A21,FUNCT_1:def 4;
end;
A24: dom(G") = field S by A12,A7,FUNCT_1:33;
then
A25: dom(G"*F) = field R by A4,A6,RELAT_1:27;
A26: now
let a,b;
assume that
A27: [a,b] in R and
A28: a <> b;
A29: [F.a,F.b] in S by A2,A27,Def7;
A30: b in field R by A27,RELAT_1:15;
then
A31: G".(F.b) = (G"*F).b by A4,FUNCT_1:13;
A32: a in field R by A27,RELAT_1:15;
then G".(F.a) = (G"*F).a by A4,FUNCT_1:13;
hence [(G"*F).a,(G"*F).b] in R by A9,A29,A31,Def7;
thus (G"*F).a <> (G"*F).b by A11,A10,A25,A28,A32,A30,FUNCT_1:def 4;
end;
let a such that
A33: a in field R;
A34: F".(G.a) = (F"*G).a by A8,A33,FUNCT_1:13;
G.a in rng F by A6,A8,A12,A33,FUNCT_1:def 3;
then
A35: F.(F".(G.a)) = G.a by A11,FUNCT_1:35;
rng(F") = field R by A4,A11,FUNCT_1:33;
then rng(F"*G) = field R by A12,A15,RELAT_1:28;
then [a,(F"*G).a] in R by A1,A33,A16,A17,Th35;
then
A36: [F.a,G.a] in S by A2,A34,A35,Def7;
F.a in rng G by A4,A6,A12,A33,FUNCT_1:def 3;
then
A37: G.(G".(F.a)) = F.a by A7,FUNCT_1:35;
A38: G".(F.a) = (G"*F).a by A4,A33,FUNCT_1:13;
rng(G") = field R by A8,A7,FUNCT_1:33;
then rng(G"*F) = field R by A6,A24,RELAT_1:28;
then [a,(G"*F).a] in R by A1,A33,A25,A26,Th35;
then [G.a,F.a] in S by A3,A38,A37,Def7;
hence thesis by A5,A36,Lm3;
end;
hence thesis by A4,A8,FUNCT_1:2;
end;
definition
let R,S;
assume that
A1: R is well-ordering and
A2: R,S are_isomorphic;
func canonical_isomorphism_of(R,S) -> Function means
:Def9:
it is_isomorphism_of R,S;
existence by A2,Def8;
uniqueness by A1,Th45;
end;
theorem Th46:
R is well-ordering implies for a st a in field R holds
not R,R |_2 (R-Seg(a)) are_isomorphic
proof
assume
A1: R is well-ordering;
let a such that
A2: a in field R;
set S = R |_2 (R-Seg(a));
set F = canonical_isomorphism_of(R,S);
assume R,R |_2 (R-Seg(a)) are_isomorphic;
then
A3: F is_isomorphism_of R,S by A1,Def9;
then
A4: dom F = field R by Def7;
A5: F is one-to-one by A3,Def7;
A6: now
let b,c;
assume that
A7: [b,c] in R and
A8: b <> c;
[F.b,F.c] in R |_2 (R-Seg(a)) by A3,A7,Def7;
hence [F.b,F.c] in R by XBOOLE_0:def 4;
b in field R & c in field R by A7,RELAT_1:15;
hence F.b <> F.c by A4,A5,A8,FUNCT_1:def 4;
end;
A9: rng F = field S by A3,Def7;
field S = R-Seg(a) by A1,Th32;
then F.a in R-Seg(a) by A2,A4,A9,FUNCT_1:def 3;
then
A10: [F.a,a] in R & F.a <> a by Th1;
rng F c= field R by A9,Th13;
then [a,F.a] in R by A1,A2,A4,A6,Th35;
hence contradiction by A1,A10,Lm3;
end;
theorem Th47:
R is well-ordering & a in field R & b in field R & a <> b
implies not R |_2 (R-Seg(a)),R |_2 (R-Seg(b)) are_isomorphic
proof
assume that
A1: R is well-ordering and
A2: a in field R & b in field R and
A3: a <> b;
A4: now
set S = R |_2 (R-Seg(a));
assume
A5: R-Seg(b) c= R-Seg(a);
then
A6: S |_2 (R-Seg(b)) = R |_2 (R-Seg(b)) by Th22;
A7: field S = R-Seg(a) by A1,Th32;
A8: b in R-Seg(a)
proof
assume not b in R-Seg(a);
then not [b,a] in R by A3,Th1;
then [a,b] in R by A2,A3,A1,Lm4;
then a in R-Seg(b) by A3,Th1;
hence contradiction by A5,Th1;
end;
then R-Seg(b) = S-Seg(b) by A1,Th27;
hence thesis by A1,A7,A8,A6,Th25,Th46;
end;
A9: now
set S = R |_2 (R-Seg(b));
assume
A10: R-Seg(a) c= R-Seg(b);
then
A11: S |_2 (R-Seg(a)) = R |_2 (R-Seg(a)) by Th22;
A12: field S = R-Seg(b) & S is well-ordering by A1,Th25,Th32;
A13: a in R-Seg(b)
proof
assume not a in R-Seg(b);
then not [a,b] in R by A3,Th1;
then [b,a] in R by A2,A3,A1,Lm4;
then b in R-Seg(a) by A3,Th1;
hence contradiction by A10,Th1;
end;
then R-Seg(a) = S-Seg(a) by A1,Th27;
hence thesis by A13,A11,A12,Th40,Th46;
end;
R-Seg(a),R-Seg(b) are_c=-comparable by A1,Th26;
hence thesis by A9,A4,XBOOLE_0:def 9;
end;
theorem Th48:
R is well-ordering & Z c= field R & F is_isomorphism_of R,S
implies F|Z is_isomorphism_of R |_2 Z,S |_2 (F.:Z) & R |_2 Z,S |_2 (F.:Z)
are_isomorphic
proof
assume that
A1: R is well-ordering and
A2: Z c= field R and
A3: F is_isomorphism_of R,S;
A4: F.:Z c= rng F by RELAT_1:111;
rng F = field S by A3,Def7;
then
A5: F.:Z = field(S |_2 (F.:Z)) by A1,A3,A4,Th31,Th44;
A6: F is one-to-one by A3,Def7;
A7: Z = field(R |_2 Z) by A1,A2,Th31;
A8: dom F = field R by A3,Def7;
thus F|Z is_isomorphism_of R |_2 Z,S |_2 (F.:Z)
proof
thus
A9: dom(F|Z) = field(R |_2 Z) by A2,A8,A7,RELAT_1:62;
thus
A10: rng(F|Z) = field(S |_2 (F.:Z)) by A5,RELAT_1:115;
thus F|Z is one-to-one by A6,FUNCT_1:52;
let a,b;
thus [a,b] in R |_2 Z implies a in field(R |_2 Z) & b in field(R |_2 Z) &
[F|Z.a,F|Z.b] in S |_2 (F.:Z)
proof
assume
A11: [a,b] in R |_2 Z;
then [a,b] in R by XBOOLE_0:def 4;
then
A12: [F.a,F.b] in S by A3,Def7;
thus
A13: a in field(R |_2 Z) & b in field(R |_2 Z) by A11,RELAT_1:15;
then F|Z.a in rng(F|Z) & F|Z.b in rng(F|Z) by A9,FUNCT_1:def 3;
then
A14: [F|Z.a,F|Z.b] in [:F.:Z,F.:Z:] by A5,A10,ZFMISC_1:87;
F.a = F|Z.a & F.b = F|Z.b by A9,A13,FUNCT_1:47;
hence thesis by A12,A14,XBOOLE_0:def 4;
end;
assume that
A15: a in field(R |_2 Z) & b in field(R |_2 Z) and
A16: [F|Z.a,F|Z.b] in S |_2 (F.:Z);
F.a = F|Z.a & F.b = F|Z.b by A9,A15,FUNCT_1:47;
then
A17: [F.a,F.b] in S by A16,XBOOLE_0:def 4;
A18: [a,b] in [:Z,Z:] by A7,A15,ZFMISC_1:87;
a in field R & b in field R by A15,Th12;
then [a,b] in R by A3,A17,Def7;
hence thesis by A18,XBOOLE_0:def 4;
end;
hence thesis by Def8;
end;
theorem Th49:
F is_isomorphism_of R,S implies for a st a in field R ex b st b
in field S & F.:(R-Seg(a)) = S-Seg(b)
proof
assume
A1: F is_isomorphism_of R,S;
then
A2: dom F = field R by Def7;
let a;
assume
A3: a in field R;
take b = F.a;
A4: rng F = field S by A1,Def7;
hence b in field S by A3,A2,FUNCT_1:def 3;
A5: F is one-to-one by A1,Def7;
A6: c in S-Seg(b) implies c in F.:(R-Seg(a))
proof
assume
A7: c in S-Seg(b);
then
A8: c <> b by Th1;
A9: [c,b] in S by A7,Th1;
then
A10: c in field S by RELAT_1:15;
then
A11: c = F.(F".c) by A4,A5,FUNCT_1:35;
rng(F") = dom F & dom(F") = rng F by A5,FUNCT_1:33;
then
A12: F".c in field R by A2,A4,A10,FUNCT_1:def 3;
then [F".c,a] in R by A1,A3,A9,A11,Def7;
then F".c in R-Seg(a) by A8,A11,Th1;
hence thesis by A2,A11,A12,FUNCT_1:def 6;
end;
c in F.:(R-Seg(a)) implies c in S-Seg(b)
proof
assume c in F.:(R-Seg(a));
then consider d such that
A13: d in dom F and
A14: d in R-Seg(a) and
A15: c = F.d by FUNCT_1:def 6;
[d,a] in R by A14,Th1;
then
A16: [c,b] in S by A1,A15,Def7;
d <> a by A14,Th1;
then c <> b by A3,A2,A5,A13,A15,FUNCT_1:def 4;
hence thesis by A16,Th1;
end;
hence thesis by A6,TARSKI:1;
end;
theorem Th50:
R is well-ordering & F is_isomorphism_of R,S implies for a st a
in field R ex b st b in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(b))
are_isomorphic
proof
assume that
A1: R is well-ordering and
A2: F is_isomorphism_of R,S;
let a;
assume a in field R;
then consider b such that
A3: b in field S & F.:(R-Seg(a)) = S-Seg(b) by A2,Th49;
take b;
R-Seg(a) c= field R by Th9;
hence thesis by A1,A2,A3,Th48;
end;
theorem Th51:
R is well-ordering & S is well-ordering & a in field R & b in
field S & c in field S & R,S |_2 (S-Seg(b)) are_isomorphic & R |_2 (R-Seg(a)),S
|_2 (S-Seg(c)) are_isomorphic implies S-Seg(c) c= S-Seg(b) & [c,b] in S
proof
assume that
A1: R is well-ordering and
A2: S is well-ordering and
A3: a in field R and
A4: b in field S and
A5: c in field S and
A6: R,S |_2 (S-Seg(b)) are_isomorphic and
A7: R |_2 (R-Seg(a)),S |_2 (S-Seg(c)) are_isomorphic;
set Q = S |_2 (S-Seg(b));
set F1 = canonical_isomorphism_of(R,Q);
A8: F1 is_isomorphism_of R,Q by A1,A6,Def9;
then consider d such that
A9: d in field Q and
A10: F1.:(R-Seg(a)) = Q-Seg(d) by A3,Th49;
A11: S-Seg(b) = field Q by A2,Th32;
then
A12: Q-Seg(d) = S-Seg(d) by A2,A9,Th27;
A13: rng F1 = S-Seg(b) by A8,A11,Def7;
then
A14: Q-Seg(d) c= S-Seg(b) by A10,RELAT_1:111;
set T = S |_2 (S-Seg(c));
set P = R |_2 (R-Seg(a));
A15: T,P are_isomorphic by A7,Th40;
A16: d in field S by A9,Th12;
R-Seg(a) c= field R by Th9;
then P,Q |_2 (F1.:(R-Seg(a))) are_isomorphic by A1,A8,Th48;
then T,Q |_2 (Q-Seg(d)) are_isomorphic by A10,A15,Th42;
then T,S |_2 (S-Seg(d)) are_isomorphic by A10,A12,A13,Th22,RELAT_1:111;
hence S-Seg(c) c= S-Seg(b) by A2,A5,A12,A14,A16,Th47;
hence thesis by A2,A4,A5,Th29;
end;
theorem Th52:
R is well-ordering & S is well-ordering implies R,S
are_isomorphic or (ex a st a in field R & R |_2 (R-Seg(a)),S are_isomorphic )
or ex a st a in field S & R,S |_2 (S-Seg(a)) are_isomorphic
proof
assume that
A1: R is well-ordering and
A2: S is well-ordering;
defpred P[set] means ex b st b in field S & R |_2 (R-Seg($1)),S |_2 (S-Seg(b
)) are_isomorphic;
consider Z such that
A3: a in Z iff a in field R & P[a] from XBOOLE_0:sch 1;
A4: Z c= field R
proof
let x;
thus thesis by A3;
end;
defpred P[set,set] means $2 in field S & R |_2 (R-Seg $1),S |_2 (S-Seg $2)
are_isomorphic;
A5: for a,b,c st P[a, b] & P[a, c] holds b = c
proof
let a,b,c;
assume that
A6: b in field S and
A7: R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic and
A8: c in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(c)) are_isomorphic;
S |_2 (S-Seg(b)),R |_2 (R-Seg(a)) are_isomorphic by A7,Th40;
hence thesis by A2,A6,A8,Th42,Th47;
end;
consider F such that
A9: [a,b] in F iff a in field R & P[a,b] from FUNCT_1:sch 1(A5);
A10: Z = dom F
proof
thus a in Z implies a in dom F
proof
assume
A11: a in Z;
then consider b such that
A12: b in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic by A3;
a in field R by A3,A11;
then [a,b] in F by A9,A12;
hence thesis by XTUPLE_0:def 12;
end;
let a;
assume a in dom F;
then consider b such that
A13: [a,b] in F by XTUPLE_0:def 12;
A14: R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic by A9,A13;
a in field R & b in field S by A9,A13;
hence thesis by A3,A14;
end;
A15: rng F c= field S
proof
let a;
assume a in rng F;
then consider b such that
A16: b in dom F & a = F.b by FUNCT_1:def 3;
[b,a] in F by A16,FUNCT_1:1;
hence thesis by A9;
end;
A17: F is_isomorphism_of R |_2 (dom F),S |_2 (rng F)
proof
thus dom F = field(R |_2 (dom F)) & rng F = field(S |_2 (rng F)) by A1,A2
,A4,A15,A10,Th31;
thus
A18: F is one-to-one
proof
let a,b;
assume that
A19: a in dom F and
A20: b in dom F and
A21: F.a = F.b;
A22: [b,F.b] in F by A20,FUNCT_1:1;
then R |_2 (R-Seg(b)),S |_2 (S-Seg(F.a)) are_isomorphic by A9,A21;
then
A23: S |_2 (S-Seg(F.a)),R |_2 (R-Seg(b)) are_isomorphic by Th40;
[a,F.a] in F by A19,FUNCT_1:1;
then
A24: a in field R & R |_2 (R-Seg(a)),S |_2 (S-Seg(F.a)) are_isomorphic by A9;
b in field R by A9,A22;
hence thesis by A1,A24,A23,Th42,Th47;
end;
let a,b;
set P = R |_2 (R-Seg(a));
A25: field P = R-Seg(a) & P is well-ordering by A1,Th25,Th32;
thus [a,b] in R |_2 (dom F) implies a in field(R |_2 (dom F)) & b in field
(R |_2 (dom F)) & [F.a,F.b] in S |_2 (rng F)
proof
assume
A26: [a,b] in R |_2 (dom F);
hence
A27: a in field(R |_2 (dom F)) & b in field(R |_2 (dom F)) by RELAT_1:15;
then
A28: a in dom F by Th12;
then
A29: [a,F.a] in F by FUNCT_1:1;
then
A30: F.a in field S by A9;
A31: b in dom F by A27,Th12;
then
A32: [b,F.b] in F by FUNCT_1:1;
then
A33: b in field R by A9;
A34: F.b in field S & R |_2 (R-Seg(b)),S |_2 (S-Seg(F.b))
are_isomorphic by A9,A32;
A35: [a,b] in R by A26,XBOOLE_0:def 4;
A36: F.b in rng F by A31,FUNCT_1:def 3;
F.a in rng F by A28,FUNCT_1:def 3;
then
A37: [F.a,F.b] in [:rng F,rng F:] by A36,ZFMISC_1:87;
a in field R by A9,A29;
then
A38: R-Seg(a) c= R-Seg(b) by A1,A33,A35,Th29;
A39: R |_2 (R-Seg(a)),S |_2 (S-Seg(F.a)) are_isomorphic by A9,A29;
A40: now
set P = R |_2 (R-Seg(b));
A41: field P = R-Seg(b) & P is well-ordering by A1,Th25,Th32;
assume a <> b;
then
A42: a in R-Seg(b) by A35,Th1;
then P-Seg(a) = R-Seg(a) by A1,Th27;
then P |_2(P-Seg(a)),S |_2(S-Seg(F.a)) are_isomorphic by A39,A38,Th22;
then [F.a,F.b] in S by A2,A30,A34,A42,A41,Th51;
hence thesis by A37,XBOOLE_0:def 4;
end;
a = b implies thesis
proof
assume a = b;
then [F.a,F.b] in S by A2,A30,Lm1;
hence thesis by A37,XBOOLE_0:def 4;
end;
hence thesis by A40;
end;
assume that
A43: a in field(R |_2 (dom F)) and
A44: b in field(R |_2 (dom F)) and
A45: [F.a,F.b] in S |_2 (rng F);
A46: [F.a,F.b] in S by A45,XBOOLE_0:def 4;
A47: a in dom F by A43,Th12;
then
A48: [a,F.a] in F by FUNCT_1:1;
then
A49: a in field R by A9;
assume not [a,b] in R |_2 (dom F);
then
A50: not [a,b] in R or not [a,b] in [:dom F,dom F:] by XBOOLE_0:def 4;
then
A51: a <> b by A1,A47,A49,Lm1,ZFMISC_1:87;
A52: b in dom F by A44,Th12;
then
A53: [b,F.b] in F by FUNCT_1:1;
then
A54: R |_2 (R-Seg(b)),S |_2 (S-Seg(F.b)) are_isomorphic by A9;
A55: b in field R by A9,A53;
then
A56: [b,a] in R by A1,A47,A52,A50,A49,A51,Lm4,ZFMISC_1:87;
then
A57: R-Seg(b) c= R-Seg(a) by A1,A49,A55,Th29;
A58: b in R-Seg(a) by A47,A52,A50,A56,Th1,ZFMISC_1:87;
then P-Seg(b) = R-Seg(b) by A1,Th27;
then
A59: P |_2 (P-Seg(b)),S |_2 (S-Seg(F.b)) are_isomorphic by A54,A57,Th22;
A60: F.b in field S by A9,A53;
F.a in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(F.a)) are_isomorphic
by A9,A48;
then [F.b,F.a] in S by A2,A60,A58,A25,A59,Th51;
then F.a = F.b by A2,A46,Lm3;
hence contradiction by A18,A47,A52,A51,FUNCT_1:def 4;
end;
A61: now
given a such that
A62: a in field R and
A63: Z = R-Seg(a);
given b such that
A64: b in field S and
A65: rng F = S-Seg(b);
R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic by A10,A17,A63,A65,Def8;
then a in Z by A3,A62,A64;
hence contradiction by A63,Th1;
end;
A66: now
let a such that
A67: a in Z;
consider c such that
A68: c in field S and
A69: R |_2 (R-Seg(a)),S |_2 (S-Seg(c)) are_isomorphic by A3,A67;
let b such that
A70: [b,a] in R;
A71: a in field R by A3,A67;
now
set Q = S |_2 (S-Seg(c));
set P = R |_2 (R-Seg(a));
P is well-ordering by A1,Th25;
then
A72: canonical_isomorphism_of(P,Q) is_isomorphism_of P,Q by A69,Def9;
assume a <> b;
then
A73: b in R-Seg(a) by A70,Th1;
then
A74: P-Seg(b) = R-Seg(b) by A1,Th27;
A75: b in field R by A70,RELAT_1:15;
then R-Seg(b) c= R-Seg(a) by A1,A71,A73,Th30;
then
A76: P |_2 (R-Seg(b)) = R |_2 (R-Seg(b)) by Th22;
field P = R-Seg(a) by A1,Th32;
then consider d such that
A77: d in field Q and
A78: P |_2 (P-Seg(b)),Q |_2 (Q-Seg(d)) are_isomorphic by A1,A72,A73,Th25,Th50;
A79: S-Seg(c) = field Q by A2,Th32;
then
A80: Q-Seg(d) = S-Seg(d) by A2,A77,Th27;
[d,c] in S by A77,A79,Th1;
then
A81: d in field S by RELAT_1:15;
then S-Seg(d) c= S-Seg(c) by A2,A68,A77,A79,Th30;
then
R |_2 (R-Seg(b)),S |_2 (S-Seg(d)) are_isomorphic by A78,A74,A80,A76,Th22;
hence b in Z by A3,A75,A81;
end;
hence b in Z by A67;
end;
A82: R |_2 Z,S |_2 (rng F) are_isomorphic by A10,A17,Def8;
A83: now
assume
A84: Z = field R;
given a such that
A85: a in field S and
A86: rng F = S-Seg(a);
take a;
thus a in field S by A85;
thus R,S |_2 (S-Seg(a)) are_isomorphic by A82,A84,A86,Th23;
end;
A87: now
let a such that
A88: a in rng F;
consider c such that
A89: c in dom F & a = F.c by A88,FUNCT_1:def 3;
A90: [c,a] in F by A89,FUNCT_1:1;
then
A91: a in field S by A9;
let b such that
A92: [b,a] in S;
A93: R |_2 (R-Seg(c)),S |_2 (S-Seg(a)) are_isomorphic by A9,A90;
A94: c in field R by A9,A90;
now
set Q = S |_2 (S-Seg(a));
set P = R |_2 (R-Seg(c));
assume a <> b;
then
A95: b in S-Seg(a) by A92,Th1;
then
A96: Q-Seg(b) = S-Seg(b) by A2,Th27;
A97: b in field S by A92,RELAT_1:15;
then S-Seg(b) c= S-Seg(a) by A2,A91,A95,Th30;
then
A98: Q |_2 (S-Seg(b)) = S |_2 (S-Seg(b)) by Th22;
Q,P are_isomorphic & Q is well-ordering by A2,A93,Th25,Th40;
then
A99: canonical_isomorphism_of(Q,P) is_isomorphism_of Q,P by Def9;
field Q = S-Seg(a) by A2,Th32;
then consider d such that
A100: d in field P and
A101: Q |_2 (Q-Seg(b)),P |_2 (P-Seg(d)) are_isomorphic by A2,A99,A95,Th25,Th50
;
A102: R-Seg(c) = field P by A1,Th32;
then
A103: P-Seg(d) = R-Seg(d) by A1,A100,Th27;
[d,c] in R by A100,A102,Th1;
then
A104: d in field R by RELAT_1:15;
then R-Seg(d) c= R-Seg(c) by A1,A94,A100,A102,Th30;
then
S |_2 (S-Seg(b)),R |_2 (R-Seg(d)) are_isomorphic by A101,A96,A103,A98,Th22;
then R |_2 (R-Seg(d)),S |_2 (S-Seg(b)) are_isomorphic by Th40;
then [d,b] in F by A9,A97,A104;
then d in dom F & b = F.d by FUNCT_1:1;
hence b in rng F by FUNCT_1:def 3;
end;
hence b in rng F by A88;
end;
A105: now
assume
A106: rng F = field S;
given a such that
A107: a in field R and
A108: Z = R-Seg(a);
take a;
thus a in field R by A107;
thus R |_2 (R-Seg(a)),S are_isomorphic by A82,A106,A108,Th23;
end;
now
assume
A109: Z = field R & rng F = field S;
R |_2 field R = R & S |_2 field S = S by Th23;
hence R,S are_isomorphic by A10,A17,A109,Def8;
end;
hence thesis by A1,A2,A4,A15,A66,A87,A61,A83,A105,Th28;
end;
theorem
Y c= field R & R is well-ordering implies R,R |_2 Y are_isomorphic or
ex a st a in field R & R |_2 (R-Seg(a)),R |_2 Y are_isomorphic
proof
assume that
A1: Y c= field R and
A2: R is well-ordering;
A3: now
given a such that
A4: a in field(R |_2 Y) and
A5: R,(R |_2 Y) |_2 ((R |_2 Y)-Seg(a)) are_isomorphic;
consider F such that
A6: F is_isomorphism_of R,(R |_2 Y) |_2 ((R |_2 Y)-Seg(a)) by A5,Def8;
A7: now
let c,b;
assume
A8: [c,b] in R & c <> b;
then [F.c,F.b] in (R |_2 Y) |_2 ((R |_2 Y)-Seg(a)) by A6,Th36;
then [F.c,F.b] in R |_2 Y by XBOOLE_0:def 4;
hence [F.c,F.b] in R & F.c <> F.b by A6,A8,Th36,XBOOLE_0:def 4;
end;
A9: field(R |_2 Y) = Y by A1,A2,Th31;
field((R |_2 Y) |_2 ((R |_2 Y)-Seg(a))) = (R |_2 Y)-Seg(a) by A2,Th25,Th32;
then
A10: rng F = (R |_2 Y)-Seg(a) by A6,Def7;
A11: dom F = field R by A6,Def7;
then
A12: F.a in rng F by A1,A4,A9,FUNCT_1:def 3;
then
A13: F.a <> a by A10,Th1;
[F.a,a] in R |_2 Y by A10,A12,Th1;
then
A14: [F.a,a] in R by XBOOLE_0:def 4;
(R |_2 Y)-Seg(a) c= Y by A9,Th9;
then rng F c= field R by A1,A10,XBOOLE_1:1;
then [a,F.a] in R by A1,A2,A4,A9,A11,A7,Th35;
hence contradiction by A13,A14,A2,Lm3;
end;
R |_2 Y is well-ordering by A2,Th25;
hence thesis by A2,A3,Th52;
end;
theorem
R,S are_isomorphic & R is well-ordering implies S is well-ordering
proof
assume R,S are_isomorphic;
then ex F being Function st F is_isomorphism_of R,S by Def8;
hence thesis by Th44;
end;
begin
reserve A,B,X,X1,Y,Y1,Y2,Z,a,x,y,z for set;
definition
let X,Y;
mode Relation of X,Y is Subset of [:X,Y:];
end;
registration
let X,Y;
cluster -> Relation-like for Subset of [:X,Y:];
coherence;
end;
registration
let X,Y;
cluster -> X-defined Y-valued for Relation of X,Y;
coherence
proof
let R be Relation of X,Y;
thus dom R c= X
proof
let x;
assume x in dom R;
then ex y st [x,y] in R by XTUPLE_0:def 12;
hence thesis by ZFMISC_1:87;
end;
let y;
assume y in rng R;
then ex x st [x,y] in R by XTUPLE_0:def 13;
hence thesis by ZFMISC_1:87;
end;
end;
reserve P,R for Relation of X,Y;
definition
let X,Y,R,Z;
redefine pred R c= Z means
for x being Element of X, y being Element of Y
holds [x,y] in R implies [x,y] in Z;
compatibility
proof
thus R c= Z implies for x being Element of X, y being Element of Y holds [
x,y] in R implies [x,y] in Z;
assume
A1: for x being Element of X, y being Element of Y holds [x,y] in R
implies [x,y] in Z;
let a,b be set;
assume
A2: [a,b] in R;
then reconsider a9=a as Element of X by ZFMISC_1:87;
reconsider b9=b as Element of Y by A2,ZFMISC_1:87;
[a9,b9] in Z by A1,A2;
hence thesis;
end;
end;
definition
let X,Y,P,R;
redefine pred P = R means
for x being Element of X, y being Element of Y
holds [x,y] in P iff [x,y] in R;
compatibility
proof
thus P = R implies for x being Element of X, y being Element of Y holds [x
,y] in P iff [x,y] in R;
assume
A1: for x being Element of X, y being Element of Y holds [x,y] in P
iff [x,y] in R;
let a,b be set;
hereby
assume
A2: [a,b] in P;
then reconsider a9=a as Element of X by ZFMISC_1:87;
reconsider b9=b as Element of Y by A2,ZFMISC_1:87;
[a9,b9] in R by A1,A2;
hence [a,b] in R;
end;
assume
A3: [a,b] in R;
then reconsider a9=a as Element of X by ZFMISC_1:87;
reconsider b9=b as Element of Y by A3,ZFMISC_1:87;
[a9,b9] in P by A1,A3;
hence thesis;
end;
end;
theorem
A c= R implies A is Relation of X,Y by XBOOLE_1:1;
theorem
a in R implies ex x,y st a = [x,y] & x in X & y in Y
proof
assume
A1: a in R;
then consider x,y such that
A2: a = [x,y] by RELAT_1:def 1;
x in X & y in Y by A1,A2,ZFMISC_1:87;
hence thesis by A2;
end;
theorem
x in X & y in Y implies {[x,y]} is Relation of X,Y
proof
assume x in X & y in Y;
then [x,y] in [:X,Y:] by ZFMISC_1:87;
hence thesis by ZFMISC_1:31;
end;
theorem
for R being Relation st dom R c= X & rng R c= Y holds R is Relation of X,Y
proof
let R be Relation;
assume dom R c= X & rng R c= Y;
then R c= [:dom R, rng R:] & [:dom R, rng R:] c= [:X,Y:] by RELAT_1:7
,ZFMISC_1:96;
hence thesis by XBOOLE_1:1;
end;
theorem
dom R c= X1 implies R is Relation of X1,Y
proof
A1: rng R c= Y by RELAT_1:def 19;
assume dom R c= X1;
then R c= [:dom R, rng R:] & [:dom R, rng R:] c= [:X1,Y:] by A1,RELAT_1:7
,ZFMISC_1:96;
hence thesis by XBOOLE_1:1;
end;
theorem
rng R c= Y1 implies R is Relation of X,Y1
proof
A1: dom R c= X by RELAT_1:def 18;
assume rng R c= Y1;
then R c= [:dom R, rng R:] & [:dom R, rng R:] c= [:X,Y1:] by A1,RELAT_1:7
,ZFMISC_1:96;
hence thesis by XBOOLE_1:1;
end;
theorem
X c= X1 & Y c= Y1 implies R is Relation of X1,Y1
proof
assume X c= X1 & Y c= Y1;
then [:X,Y:] c= [:X1,Y1:] by ZFMISC_1:96;
hence thesis by XBOOLE_1:1;
end;
registration
let X;
let R,S be X-defined Relation;
cluster R \/ S -> X-defined;
coherence
proof
A1: dom(R \/ S) = dom R \/ dom S by RELAT_1:1;
dom R c= X & dom S c= X by RELAT_1:def 18;
hence dom(R \/ S) c= X by A1,XBOOLE_1:8;
end;
end;
registration
let X;
let R be X-defined Relation, S be Relation;
cluster R /\ S -> X-defined;
coherence
proof
R /\ S c= R by XBOOLE_1:17;
then dom R c= X & dom(R /\ S) c= dom R by RELAT_1:11,def 18;
hence dom(R /\ S) c= X by XBOOLE_1:1;
end;
cluster R \ S -> X-defined;
coherence;
end;
registration
let X;
let R,S be X-valued Relation;
cluster R \/ S -> X-valued;
coherence
proof
A1: rng(R \/ S) = rng R \/ rng S by RELAT_1:12;
rng R c= X & rng S c= X by RELAT_1:def 19;
hence rng(R \/ S) c= X by A1,XBOOLE_1:8;
end;
end;
registration
let X;
let R be X-valued Relation, S be Relation;
cluster R /\ S -> X-valued;
coherence
proof
R /\ S c= R by XBOOLE_1:17;
then rng R c= X & rng(R /\ S) c= rng R by RELAT_1:11,def 19;
hence rng(R /\ S) c= X by XBOOLE_1:1;
end;
cluster R \ S -> X-valued;
coherence;
end;
definition let X; let R be X-defined Relation;
redefine func dom R -> Subset of X;
coherence by RELAT_1:def 18;
end;
definition let X; let R be X-valued Relation;
redefine func rng R -> Subset of X;
coherence by RELAT_1:def 19;
end;
theorem
field R c= X \/ Y
proof
dom R \/ rng R c= X \/ Y by XBOOLE_1:13;
hence thesis;
end;
theorem
(for x st x in X ex y st [x,y] in R) iff dom R = X
proof
thus (for x st x in X ex y st [x,y] in R) implies dom R = X
proof
assume
A1: for x st x in X ex y st [x,y] in R;
now
let x;
now
assume x in X;
then ex y st [x,y] in R by A1;
hence x in dom R by XTUPLE_0:def 12;
end;
hence x in dom R iff x in X;
end;
hence dom R = X by TARSKI:1;
end;
thus thesis by XTUPLE_0:def 12;
end;
theorem
(for y st y in Y ex x st [x,y] in R) iff rng R = Y
proof
thus (for y st y in Y ex x st [x,y] in R) implies rng R = Y
proof
assume
A1: for y st y in Y ex x st [x,y] in R;
now
let y;
now
assume y in Y;
then ex x st [x,y] in R by A1;
hence y in rng R by XTUPLE_0:def 13;
end;
hence y in rng R iff y in Y;
end;
hence rng R = Y by TARSKI:1;
end;
thus thesis by XTUPLE_0:def 13;
end;
definition
let X,Y,R;
redefine func R~ -> Relation of Y,X;
coherence
proof
now
let x,y;
assume [x,y] in R~;
then [y,x] in R by RELAT_1:def 7;
hence [x,y] in [:Y,X:] by ZFMISC_1:88;
end;
hence thesis by RELAT_1:def 3;
end;
end;
definition
let X,Y1,Y2,Z;
let P be Relation of X,Y1;
let R be Relation of Y2,Z;
redefine func P*R -> Relation of X,Z;
coherence
proof
now
let x,z;
assume [x,z] in P*R;
then ex y st [x,y] in P & [y,z] in R by RELAT_1:def 8;
then x in X & z in Z by ZFMISC_1:87;
hence [x,z] in [:X,Z:] by ZFMISC_1:87;
end;
hence thesis by RELAT_1:def 3;
end;
end;
theorem
dom (R~) = rng R & rng (R~) = dom R
proof
now
let x;
A1: now
assume x in rng R;
then consider y such that
A2: [y,x] in R by XTUPLE_0:def 13;
[x,y] in R~ by A2,RELAT_1:def 7;
hence x in dom (R~) by XTUPLE_0:def 12;
end;
now
assume x in dom (R~);
then consider y such that
A3: [x,y] in R~ by XTUPLE_0:def 12;
[y,x] in R by A3,RELAT_1:def 7;
hence x in rng R by XTUPLE_0:def 13;
end;
hence x in dom (R~) iff x in rng R by A1;
end;
hence dom (R~) = rng R by TARSKI:1;
now
let x;
A4: now
assume x in dom R;
then consider y such that
A5: [x,y] in R by XTUPLE_0:def 12;
[y,x] in R~ by A5,RELAT_1:def 7;
hence x in rng (R~) by XTUPLE_0:def 13;
end;
now
assume x in rng (R~);
then consider y such that
A6: [y,x] in R~ by XTUPLE_0:def 13;
[x,y] in R by A6,RELAT_1:def 7;
hence x in dom R by XTUPLE_0:def 12;
end;
hence x in rng (R~) iff x in dom R by A4;
end;
hence thesis by TARSKI:1;
end;
theorem
{} is Relation of X,Y by XBOOLE_1:2;
registration
let A be empty set, B be set;
cluster -> empty for Relation of A,B;
coherence;
cluster -> empty for Relation of B,A;
coherence;
end;
theorem Th13:
id X c= [:X,X:]
proof
[:X,X:] c= [:X,X:];
then reconsider R = [:X,X:] as Relation of X,X;
[x,y] in id X implies [x,y] in R
proof
assume [x,y] in id X;
then x in X & x = y by RELAT_1:def 10;
hence thesis by ZFMISC_1:87;
end;
hence thesis by RELAT_1:def 3;
end;
theorem
id X is Relation of X,X by Th13;
theorem Th15:
id A c= R implies A c= dom R & A c= rng R
proof
assume
A1: id A c= R;
thus A c= dom R
proof
let x;
assume x in A;
then [x,x] in id A by RELAT_1:def 10;
hence thesis by A1,XTUPLE_0:def 12;
end;
thus A c= rng R
proof
let x;
assume x in A;
then [x,x] in id A by RELAT_1:def 10;
hence thesis by A1,XTUPLE_0:def 13;
end;
end;
theorem
id X c= R implies X = dom R & X c= rng R
proof
assume
A1: id X c= R;
then X c= dom R by Th15;
hence X = dom R by XBOOLE_0:def 10;
thus thesis by A1,Th15;
end;
theorem
id Y c= R implies Y c= dom R & Y = rng R
proof
assume
A1: id Y c= R;
hence Y c= dom R by Th15;
Y c= rng R by A1,Th15;
hence Y = rng R by XBOOLE_0:def 10;
end;
definition
let X,Y,R,A;
redefine func R|A -> Relation of X,Y;
coherence
proof
now
let x,y;
assume [x,y] in R|A;
then [x,y] in R by RELAT_1:def 11;
hence [x,y] in [:X,Y:];
end;
hence thesis by RELAT_1:def 3;
end;
end;
definition
let X,Y,B,R;
redefine func B|`R -> Relation of X,Y;
coherence
proof
now
let x,y;
assume [x,y] in B|`R;
then [x,y] in R by RELAT_1:def 12;
hence [x,y] in [:X,Y:];
end;
hence thesis by RELAT_1:def 3;
end;
end;
theorem
R|X1 is Relation of X1,Y
proof
now
let x,y;
assume [x,y] in R|X1;
then x in X1 & y in Y by RELAT_1:def 11,ZFMISC_1:87;
hence [x,y] in [:X1,Y:] by ZFMISC_1:87;
end;
hence thesis by RELAT_1:def 3;
end;
theorem
X c= X1 implies R|X1 = R
proof
assume
A1: X c= X1;
now
let x,y;
now
assume
A2: [x,y] in R;
then x in X by ZFMISC_1:87;
hence [x,y] in R|X1 by A1,A2,RELAT_1:def 11;
end;
hence [x,y] in R|X1 iff [x,y] in R by RELAT_1:def 11;
end;
hence thesis by RELAT_1:def 2;
end;
theorem
Y1|`R is Relation of X,Y1
proof
now
let x,y;
assume [x,y] in Y1|`R;
then y in Y1 & x in X by RELAT_1:def 12,ZFMISC_1:87;
hence [x,y] in [:X,Y1:] by ZFMISC_1:87;
end;
hence thesis by RELAT_1:def 3;
end;
theorem
Y c= Y1 implies Y1|`R = R
proof
assume
A1: Y c= Y1;
now
let x,y;
now
assume
A2: [x,y] in R;
then y in Y by ZFMISC_1:87;
hence [x,y] in Y1|`R by A1,A2,RELAT_1:def 12;
end;
hence [x,y] in Y1|`R iff [x,y] in R by RELAT_1:def 12;
end;
hence thesis by RELAT_1:def 2;
end;
definition
let X,Y,R,A;
redefine func R.:A -> Subset of Y;
coherence
proof
R.:A c= rng R by RELAT_1:111;
hence thesis by XBOOLE_1:1;
end;
redefine func R"A -> Subset of X;
coherence
proof
R"A c= dom R by RELAT_1:132;
hence thesis by XBOOLE_1:1;
end;
end;
theorem Th22:
R.:X = rng R & R"Y = dom R
proof
now
let y;
A1: now
assume y in rng R;
then consider x such that
A2: [x,y] in R by XTUPLE_0:def 13;
x in X by A2,ZFMISC_1:87;
hence y in R.:X by A2,RELAT_1:def 13;
end;
now
assume y in R.:X;
then ex x st [x,y] in R & x in X by RELAT_1:def 13;
hence y in rng R by XTUPLE_0:def 13;
end;
hence y in R.:X iff y in rng R by A1;
end;
hence R.:X = rng R by TARSKI:1;
now
let x;
A3: now
assume x in dom R;
then consider y such that
A4: [x,y] in R by XTUPLE_0:def 12;
y in Y by A4,ZFMISC_1:87;
hence x in R"Y by A4,RELAT_1:def 14;
end;
now
assume x in R"Y;
then ex y st [x,y] in R & y in Y by RELAT_1:def 14;
hence x in dom R by XTUPLE_0:def 12;
end;
hence x in R"Y iff x in dom R by A3;
end;
hence thesis by TARSKI:1;
end;
theorem
R.:(R"Y) = rng R & R"(R.:X) = dom R
proof
R"Y = dom R & R.:X = rng R by Th22;
hence thesis by RELAT_1:113,134;
end;
scheme
RelOnSetEx{A() -> set,B() -> set,P[set,set]}: ex R being Relation of A(),B()
st for x,y holds [x,y] in R iff x in A() & y in B() & P[x,y] proof
consider R being Relation such that
A1: for x,y holds [x,y] in R iff x in A() & y in B() & P[x,y] from
RELAT_1:sch 1;
R c= [:A(),B():]
proof
let x1,x2 be set;
assume [x1,x2] in R;
then x1 in A() & x2 in B() by A1;
hence thesis by ZFMISC_1:87;
end;
then reconsider R as Relation of A(),B();
take R;
thus thesis by A1;
end;
definition
let X;
mode Relation of X is Relation of X,X;
end;
reserve D,D1,D2,E,F for non empty set;
reserve R for Relation of D,E;
reserve x for Element of D;
reserve y for Element of E;
registration
let D be non empty set;
cluster id D -> non empty;
coherence
proof
now
set y = the Element of D;
A1: [y,y] in id D by RELAT_1:def 10;
assume id D = {};
hence contradiction by A1;
end;
hence thesis;
end;
end;
theorem
for x being Element of D holds x in dom R iff ex y being Element of E
st [x,y] in R
proof
let x be Element of D;
thus x in dom R implies ex y being Element of E st [x,y] in R
proof
assume x in dom R;
then consider y being set such that
A1: [x,y] in R by XTUPLE_0:def 12;
reconsider b = y as Element of E by A1,ZFMISC_1:87;
take b;
thus thesis by A1;
end;
given y being Element of E such that
A2: [x,y] in R;
thus thesis by A2,XTUPLE_0:def 12;
end;
theorem
for y being set holds y in rng R iff ex x being Element of D st [x,y] in R
proof
let y be set;
thus y in rng R implies ex x being Element of D st [x,y] in R
proof
assume y in rng R;
then consider x being set such that
A1: [x,y] in R by XTUPLE_0:def 13;
reconsider a = x as Element of D by A1,ZFMISC_1:87;
take a;
thus thesis by A1;
end;
given x being Element of D such that
A2: [x,y] in R;
thus thesis by A2,XTUPLE_0:def 13;
end;
theorem
dom R <> {} implies ex y being Element of E st y in rng R
proof
assume dom R <> {};
then rng R <> {} by RELAT_1:42;
then ex y being set st y in rng R by XBOOLE_0:def 1;
hence thesis;
end;
theorem
rng R <> {} implies ex x being Element of D st x in dom R
proof
assume rng R <> {};
then dom R <> {} by RELAT_1:42;
then ex x being set st x in dom R by XBOOLE_0:def 1;
hence thesis;
end;
theorem
for P being (Relation of D,E), R being Relation of E,F for x, z being
set holds [x,z] in P*R iff ex y being Element of E st [x,y] in P & [y,z] in R
proof
let P be (Relation of D,E), R be Relation of E,F;
let x, z be set;
thus [x,z] in P*R implies ex y being Element of E st [x,y] in P & [y,z] in R
proof
assume [x,z] in P*R;
then consider y being set such that
A1: [x,y] in P and
A2: [y,z] in R by RELAT_1:def 8;
reconsider a = y as Element of E by A1,ZFMISC_1:87;
take a;
thus thesis by A1,A2;
end;
given y such that
A3: [x,y] in P & [y,z] in R;
thus thesis by A3,RELAT_1:def 8;
end;
theorem
y in R.:D1 iff ex x being Element of D st [x,y] in R & x in D1
proof
thus y in R.:D1 implies ex x being Element of D st [x,y] in R & x in D1
proof
assume y in R.:D1;
then consider x being set such that
A1: [x,y] in R and
A2: x in D1 by RELAT_1:def 13;
reconsider a = x as Element of D by A1,ZFMISC_1:87;
take a;
thus thesis by A1,A2;
end;
given x such that
A3: [x,y] in R & x in D1;
thus thesis by A3,RELAT_1:def 13;
end;
theorem
x in R"D2 iff ex y being Element of E st [x,y] in R & y in D2
proof
thus x in R"D2 implies ex y being Element of E st [x,y] in R & y in D2
proof
assume x in R"D2;
then consider y being set such that
A1: [x,y] in R and
A2: y in D2 by RELAT_1:def 14;
reconsider b = y as Element of E by A1,ZFMISC_1:87;
take b;
thus thesis by A1,A2;
end;
given y being Element of E such that
A3: [x,y] in R & y in D2;
thus thesis by A3,RELAT_1:def 14;
end;
scheme
RelOnDomEx{A,B() -> non empty set, P[set,set]}: ex R being Relation of A(),B
() st for x being Element of A(), y being Element of B() holds [x,y] in R iff P
[x,y] proof
consider R being Relation of A(),B() qua set such that
A1: for x,y being set holds [x,y] in R iff x in A() & y in B() & P[x,y]
from RelOnSetEx;
take R;
thus thesis by A1;
end;
begin
scheme
{ N()-> set, M() -> Subset of N(), F(set)->set }: ex R being Relation of M()
st for i being Element of N() st i in M() holds Im(R,i) = F(i)
provided
A1: for i being Element of N() st i in M() holds F(i) c= M()
proof
defpred P[set,set] means $2 in F($1);
consider R being Relation of M() such that
A2: for x,y being set holds [x,y] in R iff x in M() & y in M() & P[x,y]
from RelOnSetEx;
take R;
let i be Element of N();
assume
A3: i in M();
thus Im(R,i) c= F(i)
proof
let e be set;
assume e in Im(R,i);
then consider u being set such that
A4: [u,e] in R and
A5: u in {i} by RELAT_1:def 13;
u = i by A5,TARSKI:def 1;
hence thesis by A2,A4;
end;
let e be set;
assume
A6: e in F(i);
F(i) c= M() by A1,A3;
then i in {i} & [i,e] in R by A2,A3,A6,TARSKI:def 1;
hence thesis by RELAT_1:def 13;
end;
theorem
for N being set, R,S being Relation of N st for i being set st i in N
holds Im(R,i) = Im(S,i) holds R = S
proof
let N be set, R,S be Relation of N such that
A1: for i being set st i in N holds Im(R,i) = Im(S,i);
let a,b be Element of N;
thus [a,b] in R implies [a,b] in S
proof
assume
A2: [a,b] in R;
then
A3: a in dom R by XTUPLE_0:def 12;
a in {a} by TARSKI:def 1;
then b in Im(R,a) by A2,RELAT_1:def 13;
then b in Im(S,a) by A1,A3;
then ex e being set st [e,b] in S & e in {a} by RELAT_1:def 13;
hence thesis by TARSKI:def 1;
end;
assume
A4: [a,b] in S;
then
A5: a in dom S by XTUPLE_0:def 12;
a in {a} by TARSKI:def 1;
then b in Im(S,a) by A4,RELAT_1:def 13;
then b in Im(R,a) by A1,A5;
then ex e being set st [e,b] in R & e in {a} by RELAT_1:def 13;
hence thesis by TARSKI:def 1;
end;
scheme
{A,B() -> set, P[set,set], P,R()->Relation of A(), B()}: P() = R()
provided
A1: for p being Element of A(), q being Element of B() holds [p,q] in P(
) iff P[p,q] and
A2: for p being Element of A(), q being Element of B() holds [p,q] in R(
) iff P[p,q]
proof
let y be Element of A(), z be Element of B();
[y,z] in P() iff P[y,z] by A1;
hence thesis by A2;
end;
registration
let X,Y,Z;
let f be Relation of [:X,Y:], Z;
cluster dom f -> Relation-like;
coherence;
end;
registration
let X,Y,Z;
let f be Relation of X, [:Y, Z:];
cluster rng f -> Relation-like;
coherence;
end;
theorem
A misses X implies P|A = {}
proof
assume A misses X;
then A misses dom P by XBOOLE_1:63;
hence thesis by RELAT_1:152;
end;
registration
let R be non empty Relation, Y be non empty Subset of dom R;
cluster R|Y -> non empty;
coherence
proof
dom(R|Y) = Y by RELAT_1:62;
hence thesis;
end;
end;
registration
let R be non empty Relation;
let Y be non empty Subset of dom R;
cluster R.:Y -> non empty;
coherence
proof
R.:Y = rng(R|Y) by RELAT_1:115;
hence thesis;
end;
end;
registration
let X,Y be set;
cluster empty for Relation of X,Y;
existence
proof
{} is Relation of X,Y by XBOOLE_1:2;
hence thesis;
end;
end;
begin
reserve x,x1,x2,y,y9,y1,y2,z,z1,z2,P,X,X1,X2,Y,Y1,Y2,V,Z for set;
theorem Th1:
for f,g being Function st for x st x in dom f /\ dom g holds f.x
= g.x ex h being Function st f \/ g = h
proof
let f,g be Function such that
A1: for x st x in dom f /\ dom g holds f.x = g.x;
defpred P[set,set] means [$1,$2] in f \/ g;
A2: for x,y1,y2 st P[x,y1] & P[x,y2] holds y1 = y2
proof
let x,y1,y2 such that
A3: [x,y1] in f \/ g and
A4: [x,y2] in f \/ g;
now
[x,y1] in f or [x,y1] in g by A3,XBOOLE_0:def 3;
then
A5: x in dom f & f.x = y1 or x in dom g & g.x = y1 by FUNCT_1:1;
A6: [x,y2] in f or [x,y2] in g by A4,XBOOLE_0:def 3;
then
A7: x in dom f & f.x = y2 or x in dom g & g.x = y2 by FUNCT_1:1;
per cases by A6,XTUPLE_0:def 12;
suppose
x in dom f & x in dom g;
then x in dom f /\ dom g by XBOOLE_0:def 4;
hence thesis by A1,A5,A7;
end;
suppose
x in dom f & not x in dom g;
hence thesis by A6,A5,FUNCT_1:1;
end;
suppose
not x in dom f & x in dom g;
hence thesis by A6,A5,FUNCT_1:1;
end;
end;
hence thesis;
end;
consider h being Function such that
A8: for x,y holds [x,y] in h iff x in dom f \/ dom g & P[x,y] from
FUNCT_1:sch 1(A2);
take h;
let x,y;
thus [x,y] in f \/ g implies [x,y] in h
proof
assume
A9: [x,y] in f \/ g;
then [x,y] in f or [x,y] in g by XBOOLE_0:def 3;
then x in dom f or x in dom g by XTUPLE_0:def 12;
then x in dom f \/ dom g by XBOOLE_0:def 3;
hence thesis by A8,A9;
end;
thus thesis by A8;
end;
theorem Th2:
for f,g,h being Function st f \/ g = h for x st x in dom f /\ dom
g holds f.x = g.x
proof
let f,g,h be Function such that
A1: f \/ g = h;
let x;
assume
A2: x in dom f /\ dom g;
then x in dom f by XBOOLE_0:def 4;
then
A3: h.x = f.x by A1,GRFUNC_1:15;
x in dom g by A2,XBOOLE_0:def 4;
hence thesis by A1,A3,GRFUNC_1:15;
end;
scheme
LambdaC{A()->set,C[set],F(set)->set,G(set)->set}:
ex f being Function st dom f = A() &
for x st x in A() holds (C[x] implies f.x = F(x)) &
(not C[x] implies f.x = G(x));
defpred P[set,set] means (C[$1] implies $2 = F($1)) & (not C[$1] implies $2
= G($1));
A1: for x st x in A() ex y st P[x,y]
proof
let x;
not C[x] implies (C[x] implies G(x) = F(x)) & (not C[x] implies G(x) =
G(x));
hence thesis;
end;
A2: for x,y1,y2 st x in A() & P[x,y1] & P[x,y2] holds y1 = y2;
thus ex f being Function st dom f = A() & for x st x in A() holds P[x,f.x]
from FUNCT_1:sch 2(A2,A1);
end;
Lm1: now
let X,Y;
take E = {};
thus dom E c= X & rng E c= Y by XBOOLE_1:2;
end;
registration
let X,Y;
cluster Function-like for Relation of X,Y;
existence
proof
consider E being Function such that
A1: dom E c= X & rng E c= Y by Lm1;
reconsider E as Relation of X,Y by A1,RELSET_1:4;
take E;
thus thesis;
end;
end;
definition
let X,Y;
mode PartFunc of X,Y is Function-like Relation of X,Y;
end;
theorem
for f being PartFunc of X,Y st y in rng f ex x being Element of X st x
in dom f & y = f.x
proof
let f be PartFunc of X,Y;
assume y in rng f;
then ex x st x in dom f & y = f.x by FUNCT_1:def 3;
hence thesis;
end;
theorem Th4:
for f being Y-valued Function st x in dom f holds f.x in Y
proof
let f be Y-valued Function;
assume x in dom f;
then
A1: f.x in rng f by FUNCT_1:def 3;
rng f c= Y by RELAT_1:def 19;
hence thesis by A1;
end;
theorem
for f1,f2 being PartFunc of X,Y st dom f1 = dom f2 & for x being
Element of X st x in dom f1 holds f1.x = f2.x holds f1 = f2
proof
let f1,f2 be PartFunc of X,Y such that
A1: dom f1 = dom f2 and
A2: for x being Element of X st x in dom f1 holds f1.x = f2.x;
for x st x in dom f1 holds f1.x = f2.x by A2;
hence thesis by A1,FUNCT_1:2;
end;
scheme
PartFuncEx{X,Y()->set,P[set,set]}: ex f being PartFunc of X(),Y() st (for x
holds x in dom f iff x in X() & ex y st P[x,y]) & for x st x in dom f holds P[x
,f.x]
provided
A1: for x,y st x in X() & P[x,y] holds y in Y() and
A2: for x,y1,y2 st x in X() & P[x,y1] & P[x,y2] holds y1 = y2
proof
A3: now
defpred R[set] means ex y st P[$1,y];
set y1 = the set;
assume Y() <> {};
defpred Q[set,set] means ((ex y st P[$1,y]) implies P[$1,$2]) & ((for y
holds not P[$1,y]) implies $2=y1);
A4: for x st x in X() ex z st Q[x,z]
proof
let x such that
x in X();
(for y holds not P[x,y]) implies ((ex y st P[x,y]) implies P[x,y1])
& ((for y holds not P[x,y]) implies y1=y1);
hence thesis;
end;
A5: for x,z1,z2 st x in X() & Q[x,z1] & Q[x,z2] holds z1 = z2 by A2;
consider g being Function such that
A6: dom g = X() and
A7: for x st x in X() holds Q[x,g.x] from FUNCT_1:sch 2(A5,A4);
consider X being set such that
A8: for x holds x in X iff x in X() & R[x] from XBOOLE_0:sch 1;
set f=g|X;
A9: dom f c= X() by A6,RELAT_1:60;
rng f c= Y()
proof
let y;
assume y in rng f;
then consider x such that
A10: x in dom f and
A11: y = f.x by FUNCT_1:def 3;
A12: dom f c= X by RELAT_1:58;
then x in X() & ex y st P[x,y] by A8,A10;
then P[x,g.x] by A7;
then
A13: P[x,y] by A10,A11,FUNCT_1:47;
x in X() by A8,A10,A12;
hence thesis by A1,A13;
end;
then reconsider f as PartFunc of X(),Y() by A9,RELSET_1:4;
take f;
thus for x holds x in dom f iff x in X() & ex y st P[x,y]
proof
let x;
dom f c= X by RELAT_1:58;
hence x in dom f implies x in X() & ex y st P[x,y] by A8;
assume that
A14: x in X() and
A15: ex y st P[x,y];
x in X by A8,A14,A15;
then x in dom g /\ X by A6,A14,XBOOLE_0:def 4;
hence thesis by RELAT_1:61;
end;
let x;
assume
A16: x in dom f;
dom f c= X by RELAT_1:58;
then ex y st P[x,y] by A8,A16;
then P[x,g.x] by A7,A16;
hence P[x,f.x] by A16,FUNCT_1:47;
end;
now
consider f being Function such that
A17: dom f c= X() & rng f c= Y() by Lm1;
reconsider f as PartFunc of X(),Y() by A17,RELSET_1:4;
assume
A18: Y() = {};
take f;
thus for x holds x in dom f iff x in X() & ex y st P[x,y] by A1,A18;
thus for x st x in dom f holds P[x,f.x] by A18;
end;
hence thesis by A3;
end;
scheme
LambdaR{X,Y()->set,F(set)->set,P[set]}: ex f being PartFunc of X(),Y() st (
for x holds x in dom f iff x in X() & P[x]) & for x st x in dom f holds f.x = F
(x)
provided
A1: for x st P[x] holds F(x) in Y()
proof
defpred Q[set,set] means P[$1] & $2 = F($1);
A2: for x,y1,y2 st x in X() & Q[x,y1] & Q[x,y2] holds y1 = y2;
A3: for x,y st x in X() & Q[x,y] holds y in Y() by A1;
consider f being PartFunc of X(),Y() such that
A4: for x holds x in dom f iff x in X() & ex y st Q[x,y] and
A5: for x st x in dom f holds Q[x,f.x] from PartFuncEx(A3,A2);
take f;
thus for x holds x in dom f iff x in X() & P[x]
proof
let x;
thus x in dom f implies x in X() & P[x]
proof
assume
A6: x in dom f;
then ex y st P[x] & y = F(x) by A4;
hence thesis by A6;
end;
assume that
A7: x in X() and
A8: P[x];
ex y st P[x] & y = F(x) by A8;
hence thesis by A4,A7;
end;
thus thesis by A5;
end;
definition
let X,Y,V,Z;
let f be PartFunc of X,Y;
let g be PartFunc of V,Z;
redefine func g*f -> PartFunc of X,Z;
coherence
proof
A1: dom(g*f) c= X;
rng(g*f) c= Z by RELAT_1:def 19;
hence thesis by A1,RELSET_1:4;
end;
end;
theorem
for f being Relation of X,Y holds (id X)*f = f
proof
let f be Relation of X,Y;
dom f c= X;
hence thesis by RELAT_1:51;
end;
theorem
for f being Relation of X,Y holds f*(id Y) = f
proof
let f be Relation of X,Y;
rng f c= Y;
hence thesis by RELAT_1:53;
end;
theorem
for f being PartFunc of X,Y st (for x1,x2 being Element of X st x1 in
dom f & x2 in dom f & f.x1 = f.x2 holds x1 = x2) holds f is one-to-one
proof
let f be PartFunc of X,Y;
assume for x1,x2 being Element of X st x1 in dom f & x2 in dom f & f.x1 = f
.x2 holds x1 = x2;
then for x1,x2 st x1 in dom f & x2 in dom f & f.x1 = f.x2 holds x1 = x2;
hence thesis by FUNCT_1:def 4;
end;
theorem
for f being PartFunc of X,Y st f is one-to-one holds f" is PartFunc of Y,X
proof
let f be PartFunc of X,Y such that
A1: f is one-to-one;
rng f c= Y by RELAT_1:def 19;
then
A2: dom(f") c= Y by A1,FUNCT_1:33;
dom f c= X;
then rng(f") c= X by A1,FUNCT_1:33;
hence thesis by A2,RELSET_1:4;
end;
theorem
for f being PartFunc of X,Y holds f|Z is PartFunc of Z,Y
proof
let f be PartFunc of X,Y;
dom(f|Z) c= Z & rng(f|Z) c= Y by RELAT_1:58,def 19;
hence thesis by RELSET_1:4;
end;
theorem Th11:
for f being PartFunc of X,Y holds f|Z is PartFunc of X,Y;
definition
let X,Y;
let f be PartFunc of X,Y;
let Z be set;
redefine func f|Z -> PartFunc of X,Y;
coherence by Th11;
end;
theorem
for f being PartFunc of X,Y holds Z|`f is PartFunc of X,Z
proof
let f be PartFunc of X,Y;
dom(Z|`f) c= X & rng(Z|`f) c= Z by RELAT_1:85;
hence thesis by RELSET_1:4;
end;
theorem
for f being PartFunc of X,Y holds Z|`f is PartFunc of X,Y;
theorem Th14:
for f being Function holds Y|`f|X is PartFunc of X,Y
proof
let f be Function;
Y|`f|X = Y|`(f|X) by RELAT_1:109;
then dom(Y|`f|X) c= X & rng(Y|`f|X) c= Y by RELAT_1:58,85;
hence thesis by RELSET_1:4;
end;
theorem
for f being PartFunc of X,Y st y in f.:X ex x being Element of X st x
in dom f & y = f.x
proof
let f be PartFunc of X,Y;
assume y in f.:X;
then ex x st x in dom f & x in X & y = f.x by FUNCT_1:def 6;
hence thesis;
end;
theorem Th16:
for f being PartFunc of {x},Y holds rng f c= {f.x}
proof
let f be PartFunc of {x},Y;
dom f = {} or dom f = {x} by ZFMISC_1:33;
then rng f = {} or rng f = {f.x} by FUNCT_1:4,RELAT_1:42;
hence thesis by ZFMISC_1:33;
end;
theorem
for f being PartFunc of {x},Y holds f is one-to-one
proof
let f be PartFunc of {x},Y;
let x1,x2;
assume that
A1: x1 in dom f and
A2: x2 in dom f;
dom f<>{} implies x1 = x & x2 = x by A1,A2,TARSKI:def 1;
hence thesis by A1;
end;
theorem
for f being PartFunc of {x},Y holds f.:P c= {f.x}
proof
let f be PartFunc of {x},Y;
f.:P c= rng f & rng f c= {f.x} by Th16,RELAT_1:111;
hence thesis by XBOOLE_1:1;
end;
theorem
for f being Function st dom f = {x} & x in X & f.x in Y holds f is
PartFunc of X,Y
proof
let f be Function;
assume that
A1: dom f = {x} and
A2: x in X and
A3: f.x in Y;
rng f = {f.x} by A1,FUNCT_1:4;
then
A4: rng f c= Y by A3,ZFMISC_1:31;
dom f c= X by A1,A2,ZFMISC_1:31;
hence thesis by A4,RELSET_1:4;
end;
theorem Th20:
for f being PartFunc of X,{y} st x in dom f holds f.x = y
proof
let f be PartFunc of X,{y};
x in dom f implies f.x in {y} by Th4;
hence thesis by TARSKI:def 1;
end;
theorem
for f1,f2 being PartFunc of X,{y} st dom f1 = dom f2 holds f1 = f2
proof
let f1,f2 be PartFunc of X,{y} such that
A1: dom f1 = dom f2;
x in dom f1 implies f1.x = f2.x
proof
assume
A2: x in dom f1;
then f1.x = y by Th20;
hence thesis by A1,A2,Th20;
end;
hence thesis by A1,FUNCT_1:2;
end;
definition
let f be Function;
let X,Y be set;
func <:f,X,Y:> -> PartFunc of X,Y equals
Y|`f|X;
coherence by Th14;
end;
theorem Th22:
for f being Function holds <:f,X,Y:> c= f
proof
let f be Function;
(Y|`f|X) c= (Y|`f) & (Y|`f) c= f by RELAT_1:59,86;
hence thesis by XBOOLE_1:1;
end;
theorem Th23:
for f being Function holds dom <:f,X,Y:> c= dom f & rng <:f,X,Y :> c= rng f
proof
let f be Function;
<:f,X,Y:> c= f by Th22;
hence thesis by RELAT_1:11;
end;
theorem Th24:
for f being Function holds x in dom <:f,X,Y:> iff x in dom f & x
in X & f.x in Y
proof
let f be Function;
thus x in dom <:f,X,Y:> implies x in dom f & x in X & f.x in Y
proof
assume
A1: x in dom <:f,X,Y:>;
then x in dom(Y|`f) /\ X by RELAT_1:61;
then x in dom(Y|`f) by XBOOLE_0:def 4;
hence thesis by A1,FUNCT_1:54;
end;
assume that
A2: x in dom f and
A3: x in X and
A4: f.x in Y;
x in dom(Y|`f) by A2,A4,FUNCT_1:54;
then x in dom(Y|`f) /\ X by A3,XBOOLE_0:def 4;
hence thesis by RELAT_1:61;
end;
theorem Th25:
for f being Function st x in dom f & x in X & f.x in Y holds <:f
,X,Y:>.x = f.x
proof
let f be Function such that
A1: x in dom f and
A2: x in X and
A3: f.x in Y;
x in dom(Y|`f) by A1,A3,FUNCT_1:54;
then f.x = (Y|`f).x by FUNCT_1:55
.= (Y|`f|X).x by A2,FUNCT_1:49;
hence thesis;
end;
theorem Th26:
for f being Function st x in dom <:f,X,Y:> holds <:f,X,Y:>.x = f .x
proof
let f be Function;
assume
A1: x in dom <:f,X,Y:>;
then x in dom f & f.x in Y by Th24;
hence thesis by A1,Th25;
end;
theorem
for f,g being Function st f c= g holds <:f,X,Y:> c= <:g,X,Y:>
proof
let f,g be Function such that
A1: f c= g;
A2: dom <:f,X,Y:> c= dom f by Th23;
now
thus
A3: dom <:f,X,Y:> c= dom <:g,X,Y:>
proof
let x;
A4: dom f c= dom g by A1,RELAT_1:11;
assume
A5: x in dom <:f,X,Y:>;
then
A6: f.x = g.x by A1,A2,GRFUNC_1:2;
x in dom f & f.x in Y by A5,Th24;
hence thesis by A5,A4,A6,Th24;
end;
let x;
assume
A7: x in dom <:f,X,Y:>;
then
A8: <:f,X,Y:>.x = f.x by Th26;
<:g,X,Y:>.x = g.x by A3,A7,Th26;
hence <:f,X,Y:>.x = <:g,X,Y:>.x by A1,A2,A7,A8,GRFUNC_1:2;
end;
hence thesis by GRFUNC_1:2;
end;
theorem Th28:
for f being Function st Z c= X holds <:f,Z,Y:> c= <:f,X,Y:>
proof
let f be Function such that
A1: Z c= X;
A2: dom <:f,Z,Y:> c= dom <:f,X,Y:>
proof
let x;
assume
A3: x in dom <:f,Z,Y:>;
then
A4: f.x in Y by Th24;
x in Z & x in dom f by A3,Th24;
hence thesis by A1,A4,Th24;
end;
now
let x;
assume
A5: x in dom <:f,Z,Y:>;
then <:f,Z,Y:>.x = f.x by Th26;
hence <:f,Z,Y:>.x = <:f,X,Y:>.x by A2,A5,Th26;
end;
hence thesis by A2,GRFUNC_1:2;
end;
theorem Th29:
for f being Function st Z c= Y holds <:f,X,Z:> c= <:f,X,Y:>
proof
let f be Function such that
A1: Z c= Y;
A2: dom <:f,X,Z:> c= dom <:f,X,Y:>
proof
let x;
assume
A3: x in dom <:f,X,Z:>;
then f.x in Z & x in dom f by Th24;
hence thesis by A1,A3,Th24;
end;
now
let x;
assume
A4: x in dom <:f,X,Z:>;
then <:f,X,Z:>.x = f.x by Th26;
hence <:f,X,Z:>.x = <:f,X,Y:>.x by A2,A4,Th26;
end;
hence thesis by A2,GRFUNC_1:2;
end;
theorem
for f being Function st X1 c= X2 & Y1 c= Y2 holds <:f,X1,Y1:> c= <:f, X2,Y2:>
proof
let f be Function;
assume X1 c= X2 & Y1 c= Y2;
then <:f,X1,Y1:> c= <:f,X2,Y1:> & <:f,X2,Y1:> c= <:f,X2,Y2:> by Th28,Th29;
hence thesis by XBOOLE_1:1;
end;
theorem Th31:
for f being Function st dom f c= X & rng f c= Y holds f = <:f,X, Y:>
proof
let f be Function such that
A1: dom f c= X & rng f c= Y;
A2: dom f c= dom <:f,X,Y:>
proof
let x;
assume
A3: x in dom f;
then f.x in rng f by FUNCT_1:def 3;
hence thesis by A1,A3,Th24;
end;
dom <:f,X,Y:> c= dom f by Th23;
then
A4: dom f = dom <:f,X,Y:> by A2,XBOOLE_0:def 10;
for x st x in dom f holds f.x = <:f,X,Y:>.x by A2,Th26;
hence thesis by A4,FUNCT_1:2;
end;
theorem
for f being Function holds f = <:f,dom f,rng f:>;
theorem
for f being PartFunc of X,Y holds <:f,X,Y:> = f
proof
let f be PartFunc of X,Y;
thus thesis;
end;
theorem Th34:
<:{},X,Y:> = {}
proof
dom {} c= X & rng {} c= Y by XBOOLE_1:2;
hence thesis by Th31;
end;
theorem Th35:
for f,g being Function holds (<:g,Y,Z:>*<:f,X,Y:>) c= <:g*f,X,Z :>
proof
let f,g be Function;
A1: for x st x in dom (<:g,Y,Z:>*<:f,X,Y:>) holds (<:g,Y,Z:>*<:f,X,Y:>).x =
<:g*f,X,Z:>.x
proof
let x;
assume
A2: x in dom (<:g,Y,Z:>*<:f,X,Y:>);
then
A3: x in dom<:f,X,Y:> by FUNCT_1:11;
then
A4: x in dom f by Th24;
<:f,X,Y:>.x in dom<:g,Y,Z:> by A2,FUNCT_1:11;
then
A5: f.x in dom<:g,Y,Z:> by A3,Th26;
then g.(f.x) in Z by Th24;
then
A6: (g*f).x in Z by A4,FUNCT_1:13;
f.x in dom g by A5,Th24;
then x in dom (g*f) by A4,FUNCT_1:11;
then
A7: x in dom <:g*f,X,Z:> by A2,A6,Th24;
thus (<:g,Y,Z:>*<:f,X,Y:>).x = <:g,Y,Z:>.(<:f,X,Y:>.x) by A2,FUNCT_1:12
.= <:g,Y,Z:>.(f.x) by A3,Th26
.= g.(f.x) by A5,Th26
.= (g*f).x by A4,FUNCT_1:13
.= <:g*f,X,Z:>.x by A7,Th26;
end;
dom (<:g,Y,Z:>*<:f,X,Y:>) c= dom <:g*f,X,Z:>
proof
let x;
assume
A8: x in dom (<:g,Y,Z:>*<:f,X,Y:>);
then
A9: x in dom<:f,X,Y:> by FUNCT_1:11;
then
A10: x in dom f by Th24;
<:f,X,Y:>.x in dom<:g,Y,Z:> by A8,FUNCT_1:11;
then
A11: f.x in dom<:g,Y,Z:> by A9,Th26;
then g.(f.x) in Z by Th24;
then
A12: (g*f).x in Z by A10,FUNCT_1:13;
f.x in dom g by A11,Th24;
then x in dom (g*f) by A10,FUNCT_1:11;
hence thesis by A8,A12,Th24;
end;
hence thesis by A1,GRFUNC_1:2;
end;
theorem
for f,g being Function st rng f /\ dom g c= Y holds <:g,Y,Z:>*<:f,X,Y
:> = <:g*f,X,Z:>
proof
let f,g be Function such that
A1: rng f /\ dom g c= Y;
A2: dom <:g*f,X,Z:> c= dom (<:g,Y,Z:>*<:f,X,Y:>)
proof
let x;
assume
A3: x in dom <:g*f,X,Z:>;
then
A4: x in dom (g*f) by Th24;
then
A5: f.x in dom g by FUNCT_1:11;
A6: x in dom f by A4,FUNCT_1:11;
then f.x in rng f by FUNCT_1:def 3;
then
A7: f.x in rng f /\ dom g by A5,XBOOLE_0:def 4;
(g*f).x in Z by A3,Th24;
then g.(f.x) in Z by A4,FUNCT_1:12;
then
A8: f.x in dom <:g,Y,Z:> by A1,A5,A7,Th24;
x in dom <:f,X,Y:> & <:f,X,Y:>.x = f.x by A1,A3,A6,A7,Th24,Th25;
hence thesis by A8,FUNCT_1:11;
end;
for x st x in dom <:g*f,X,Z:> holds <:g*f,X,Z:>.x = (<:g,Y,Z:>*<:f,X,Y :>).x
proof
let x;
assume
A9: x in dom <:g*f,X,Z:>;
then
A10: x in dom (g*f) by Th24;
then
A11: f.x in dom g by FUNCT_1:11;
x in dom f by A10,FUNCT_1:11;
then f.x in rng f by FUNCT_1:def 3;
then
A12: f.x in rng f /\ dom g by A11,XBOOLE_0:def 4;
(g*f).x in Z by A9,Th24;
then g.(f.x) in Z by A10,FUNCT_1:12;
then
A13: f.x in dom <:g,Y,Z:> by A1,A11,A12,Th24;
x in dom f by A10,FUNCT_1:11;
then
A14: x in dom <:f,X,Y:> by A1,A9,A12,Th24;
thus <:g*f,X,Z:>.x = (g*f).x by A9,Th26
.= g.(f.x) by A10,FUNCT_1:12
.= <:g,Y,Z:>.(f.x) by A13,Th26
.= <:g,Y,Z:>.(<:f,X,Y:>.x) by A14,Th26
.= (<:g,Y,Z:>*<:f,X,Y:>).x by A2,A9,FUNCT_1:12;
end;
then
A15: <:g*f,X,Z:> c= (<:g,Y,Z:>*<:f,X,Y:>) by A2,GRFUNC_1:2;
(<:g,Y,Z:>*<:f,X,Y:>) c= <:g*f,X,Z:> by Th35;
hence thesis by A15,XBOOLE_0:def 10;
end;
theorem Th37:
for f being Function st f is one-to-one holds <:f,X,Y:> is one-to-one
proof
let f be Function;
assume f is one-to-one;
then Y|`f is one-to-one by FUNCT_1:58;
hence thesis by FUNCT_1:52;
end;
theorem
for f being Function st f is one-to-one holds <:f,X,Y:>" = <:f",Y,X:>
proof
let f be Function;
assume
A1: f is one-to-one;
then
A2: <:f,X,Y:> is one-to-one by Th37;
y in dom (<:f,X,Y:>") iff y in dom <:f",Y,X:>
proof
thus y in dom (<:f,X,Y:>") implies y in dom <:f",Y,X:>
proof
assume y in dom (<:f,X,Y:>");
then
A3: y in rng <:f,X,Y:> by A2,FUNCT_1:33;
then consider x such that
A4: x in dom <:f,X,Y:> and
A5: y = <:f,X,Y:>.x by FUNCT_1:def 3;
A6: f.x = y by A4,A5,Th26;
then
A7: y in Y by A4,Th24;
rng <:f,X,Y:> c= rng f by Th23;
then y in rng f by A3;
then
A8: y in dom(f") by A1,FUNCT_1:32;
dom <:f,X,Y:> c= dom f by Th23;
then (f").y = x by A1,A4,A6,FUNCT_1:32;
hence thesis by A4,A8,A7,Th24;
end;
assume
A9: y in dom <:f",Y,X:>;
dom <:f",Y,X:> c= dom (f") by Th23;
then y in dom(f") by A9;
then y in rng f by A1,FUNCT_1:33;
then consider x such that
A10: x in dom f and
A11: y = f.x by FUNCT_1:def 3;
x =(f").(f.x) by A1,A10,FUNCT_1:34;
then x in X by A9,A11,Th24;
then x in dom <:f,X,Y:> by A9,A10,A11,Th24;
then <:f,X,Y:>.x in rng <:f,X,Y:> & <:f,X,Y:>.x = f.x by Th26,FUNCT_1:def 3
;
hence thesis by A2,A11,FUNCT_1:33;
end;
then
A12: dom (<:f,X,Y:>") = dom <:f",Y,X:> by TARSKI:1;
for y st y in dom <:f",Y,X:> holds <:f",Y,X:>.y = (<:f,X,Y:>").y
proof
let y;
A13: rng <:f,X,Y:> c= rng f by Th23;
assume
A14: y in dom <:f",Y,X:>;
then y in rng <:f,X,Y:> by A2,A12,FUNCT_1:33;
then consider x such that
A15: x in dom f and
A16: y = f.x by A13,FUNCT_1:def 3;
A17: x =(f").(f.x) by A1,A15,FUNCT_1:34;
then x in X by A14,A16,Th24;
then x in dom<:f,X,Y:> by A14,A15,A16,Th24;
then (<:f,X,Y:>").(<:f,X,Y:>.x) = x & <:f,X,Y:>.x = f.x by A2,Th26,
FUNCT_1:34;
hence thesis by A14,A16,A17,Th26;
end;
hence thesis by A12,FUNCT_1:2;
end;
theorem
for f being Function holds Z|`<:f,X,Y:> = <:f,X,Z /\ Y:>
proof
let f be Function;
thus Z|`<:f,X,Y:> = Z|`(Y|`(f|X)) by RELAT_1:109
.= (Z /\ Y)|`(f|X) by RELAT_1:96
.= <:f,X,Z /\ Y:> by RELAT_1:109;
end;
definition
let X;
let f be X-defined Relation;
attr f is total means
:Def2:
dom f = X;
end;
registration
let X be empty set, Y be set;
cluster -> total for Relation of X,Y;
coherence
proof
let R be Relation of X,Y;
thus dom R = X;
end;
end;
registration
let X be non empty set, Y be empty set;
cluster -> non total for Relation of X,Y;
coherence
proof
let f be Relation of X,Y;
assume f is total;
then dom f = X by Def2;
hence thesis;
end;
end;
theorem Th40:
for f being Function st <:f,X,Y:> is total holds X c= dom f
proof
let f be Function such that
A1: dom <:f,X,Y:> = X;
A2: dom <:f,X,Y:> c= dom f by Th23;
let x;
assume x in X;
hence thesis by A1,A2;
end;
theorem
<:{},X,Y:> is total implies X = {}
proof
dom {} = {};
hence thesis by Th40,XBOOLE_1:3;
end;
theorem
for f being Function st X c= dom f & rng f c= Y holds <:f,X,Y:> is total
proof
let f be Function such that
A1: X c= dom f and
A2: rng f c= Y;
X c= dom <:f,X,Y:>
proof
let x;
assume
A3: x in X;
then f.x in rng f by A1,FUNCT_1:def 3;
hence thesis by A1,A2,A3,Th24;
end;
hence dom <:f,X,Y:> = X by XBOOLE_0:def 10;
end;
theorem
for f being Function st <:f,X,Y:> is total holds f.:X c= Y
proof
let f be Function such that
A1: dom <:f,X,Y:> = X;
let y;
A2: rng <:f,X,Y:> c= Y by RELAT_1:def 19;
assume y in f.:X;
then consider x such that
x in dom f and
A3: x in X & y = f.x by FUNCT_1:def 6;
<:f,X,Y:>.x = y & <:f,X,Y:>.x in rng <:f,X,Y:> by A1,A3,Th26,FUNCT_1:def 3;
hence thesis by A2;
end;
theorem
for f being Function st X c= dom f & f.:X c= Y holds <:f,X,Y:> is total
proof
let f be Function such that
A1: X c= dom f and
A2: f.:X c= Y;
X c= dom <:f,X,Y:>
proof
let x;
assume
A3: x in X;
then f.x in f.:X by A1,FUNCT_1:def 6;
hence thesis by A1,A2,A3,Th24;
end;
hence dom <:f,X,Y:> = X by XBOOLE_0:def 10;
end;
definition
let X,Y;
func PFuncs(X,Y) -> set means
:Def3:
x in it iff ex f being Function st x = f & dom f c= X & rng f c= Y;
existence
proof
defpred P[set] means ex f be Function st $1 = f & dom f c= X & rng f c= Y;
consider F being set such that
A1: z in F iff z in bool [:X,Y:] & P[z] from XBOOLE_0:sch 1;
take F;
let z;
thus z in F implies ex f being Function st z = f & dom f c= X & rng f c= Y
by A1;
given f being Function such that
A2: z = f and
A3: dom f c= X & rng f c= Y;
f c= [:X,Y:]
proof
let x,y;
assume
A4: [x,y] in f;
then
A5: x in dom f by XTUPLE_0:def 12;
then y = f.x by A4,FUNCT_1:def 2;
then y in rng f by A5,FUNCT_1:def 3;
hence thesis by A3,A5,ZFMISC_1:def 2;
end;
hence thesis by A1,A2,A3;
end;
uniqueness
proof
let F1,F2 be set such that
A6: x in F1 iff ex f being Function st x = f & dom f c= X & rng f c= Y and
A7: x in F2 iff ex f being Function st x = f & dom f c= X & rng f c= Y;
x in F1 iff x in F2
proof
x in F1 iff ex f being Function st x = f & dom f c= X & rng f c= Y by A6;
hence thesis by A7;
end;
hence thesis by TARSKI:1;
end;
end;
registration
let X,Y;
cluster PFuncs(X,Y) -> non empty;
coherence
proof
ex f being Function st dom f c= X & rng f c= Y by Lm1;
hence thesis by Def3;
end;
end;
theorem Th45:
for f being PartFunc of X,Y holds f in PFuncs(X,Y)
proof
let f be PartFunc of X,Y;
dom f c= X & rng f c= Y by RELAT_1:def 19;
hence thesis by Def3;
end;
theorem Th46:
for f being set st f in PFuncs(X,Y) holds f is PartFunc of X,Y
proof
let f be set;
assume f in PFuncs(X,Y);
then ex F being Function st f = F & dom F c= X & rng F c= Y by Def3;
hence thesis by RELSET_1:4;
end;
theorem
for f being Element of PFuncs(X,Y) holds f is PartFunc of X,Y by Th46;
theorem
PFuncs({},Y) = { {} }
proof
x in PFuncs({},Y) iff x = {}
proof
thus x in PFuncs({},Y) implies x = {}
proof
assume x in PFuncs({},Y);
then x is PartFunc of {},Y by Th46;
hence thesis;
end;
{} is PartFunc of {},Y by RELSET_1:12;
hence thesis by Th45;
end;
hence thesis by TARSKI:def 1;
end;
theorem
PFuncs(X,{}) = { {} }
proof
x in PFuncs(X,{}) iff x = {}
proof
thus x in PFuncs(X,{}) implies x = {}
proof
assume x in PFuncs(X,{});
then x is PartFunc of X,{} by Th46;
hence thesis;
end;
{} is PartFunc of X,{} by RELSET_1:12;
hence thesis by Th45;
end;
hence thesis by TARSKI:def 1;
end;
theorem
X1 c= X2 & Y1 c= Y2 implies PFuncs(X1,Y1) c= PFuncs(X2,Y2)
proof
assume
A1: X1 c= X2 & Y1 c= Y2;
let f be set;
assume f in PFuncs(X1,Y1);
then f is PartFunc of X1,Y1 by Th46;
then f is PartFunc of X2,Y2 by A1,RELSET_1:7;
hence thesis by Th45;
end;
definition
let f,g be Function;
pred f tolerates g means
:Def4:
for x st x in dom f /\ dom g holds f.x = g.x;
reflexivity;
symmetry;
end;
theorem Th51:
for f,g being Function holds f tolerates g iff ex h being
Function st f \/ g = h
proof
let f,g be Function;
(for x st x in dom f /\ dom g holds f.x = g.x) iff ex h being Function
st f \/ g = h by Th1,Th2;
hence thesis by Def4;
end;
theorem Th52:
for f,g being Function holds f tolerates g iff ex h being
Function st f c= h & g c= h
proof
let f,g be Function;
now
thus (ex h being Function st f c= h & g c= h) implies ex h being Function
st f \/ g = h
proof
given h being Function such that
A1: f c= h & g c= h;
f \/ g is Function by A1,GRFUNC_1:1,XBOOLE_1:8;
hence thesis;
end;
given h being Function such that
A2: f \/ g = h;
f c= h & g c= h by A2,XBOOLE_1:7;
hence ex h being Function st f c= h & g c= h;
end;
hence thesis by Th51;
end;
theorem Th53:
for f,g being Function st dom f c= dom g holds f tolerates g
iff for x st x in dom f holds f.x = g.x
proof
let f,g be Function;
assume dom f c= dom g;
then dom f /\ dom g = dom f by XBOOLE_1:28;
hence thesis by Def4;
end;
theorem
for f,g being Function st f c= g holds f tolerates g by Th52;
theorem Th55:
for f,g being Function st dom f = dom g & f tolerates g holds f = g
proof
let f,g be Function;
assume that
A1: dom f = dom g and
A2: f tolerates g;
for x st x in dom f holds f.x = g.x by A1,A2,Th53;
hence thesis by A1,FUNCT_1:2;
end;
theorem
for f,g being Function st dom f misses dom g holds f tolerates g
proof
let f,g be Function;
assume dom f misses dom g;
then f \/ g is Function by GRFUNC_1:13;
hence thesis by Th51;
end;
theorem
for f,g,h being Function st f c= h & g c= h holds f tolerates g by Th52;
theorem
for f,g being PartFunc of X,Y for h being Function st f tolerates h &
g c= f holds g tolerates h
proof
let f,g be (PartFunc of X,Y),h be Function such that
A1: f tolerates h and
A2: g c= f;
A3: dom g c= dom f by A2,RELAT_1:11;
let x;
assume
A4: x in dom g /\ dom h;
then
A5: x in dom g by XBOOLE_0:def 4;
then
A6: f.x = g.x by A2,GRFUNC_1:2;
x in dom h by A4,XBOOLE_0:def 4;
then x in dom f /\ dom h by A5,A3,XBOOLE_0:def 4;
hence thesis by A1,A6,Def4;
end;
theorem Th59:
for f being Function holds {} tolerates f
proof
let f be Function;
{} \/ f = f;
hence thesis by Th51;
end;
theorem
for f being Function holds <:{},X,Y:> tolerates f
proof
let f be Function;
<:{},X,Y:> = {} by Th34;
hence thesis by Th59;
end;
theorem
for f,g being PartFunc of X,{y} holds f tolerates g
proof
let f,g be PartFunc of X,{y};
let x;
assume
A1: x in dom f /\ dom g;
then x in dom f by XBOOLE_0:def 4;
then
A2: f.x = y by Th20;
x in dom g by A1,XBOOLE_0:def 4;
hence thesis by A2,Th20;
end;
theorem
for f being Function holds f|X tolerates f
proof
let f be Function;
(f|X) c= f by RELAT_1:59;
hence thesis by Th52;
end;
theorem
for f being Function holds Y|`f tolerates f
proof
let f be Function;
(Y|`f) c= f by RELAT_1:86;
hence thesis by Th52;
end;
theorem Th64:
for f being Function holds Y|`f|X tolerates f
proof
let f be Function;
(Y|`f|X) c= (Y|`f) & (Y|`f) c= f by RELAT_1:59,86;
then (Y|`f|X) c= f by XBOOLE_1:1;
hence thesis by Th52;
end;
theorem
for f being Function holds <:f,X,Y:> tolerates f by Th64;
theorem Th66:
for f,g being PartFunc of X,Y st f is total & g is total & f
tolerates g holds f = g
proof
let f,g be PartFunc of X,Y;
assume dom f = X & dom g = X;
hence thesis by Th55;
end;
theorem Th67:
for f,g,h being PartFunc of X,Y st f tolerates h & g tolerates
h & h is total holds f tolerates g
proof
let f,g,h be PartFunc of X,Y such that
A1: f tolerates h and
A2: g tolerates h and
A3: dom h = X;
let x;
assume
A4: x in dom f /\ dom g;
then x in dom f by XBOOLE_0:def 4;
then x in dom f /\ dom h by A3,XBOOLE_0:def 4;
then
A5: f.x = h.x by A1,Def4;
x in dom g by A4,XBOOLE_0:def 4;
then x in dom g /\ dom h by A3,XBOOLE_0:def 4;
hence thesis by A2,A5,Def4;
end;
theorem Th68:
for f,g being PartFunc of X,Y st (Y = {} implies X = {}) & f
tolerates g ex h being PartFunc of X,Y st h is total & f tolerates h & g
tolerates h
proof
let f,g be PartFunc of X,Y such that
A1: Y = {} implies X = {} and
A2: f tolerates g;
now
per cases;
suppose
A3: Y = {};
then f tolerates <:{},X,Y:> & g tolerates <:{},X,Y:>;
hence thesis by A1,A3;
end;
suppose
A4: Y <> {};
set y = the Element of Y;
defpred P[set,set] means ($1 in dom f implies $2 = f.$1) & ($1 in dom g
implies $2 = g.$1) & (not $1 in dom f & not $1 in dom g implies $2 = y);
A5: for x st x in X ex y9 st P[x,y9]
proof
let x such that
x in X;
now
per cases;
suppose
A6: x in dom f & x in dom g;
take y9 = f.x;
thus x in dom f implies y9 = f.x;
x in dom f /\ dom g by A6,XBOOLE_0:def 4;
hence x in dom g implies y9 = g.x by A2,Def4;
thus not x in dom f & not x in dom g implies y9 = y by A6;
end;
suppose
A7: x in dom f & not x in dom g;
take y9 = f.x;
thus (x in dom f implies y9 = f.x) & (x in dom g implies y9 = g.x)
& (not x in dom f & not x in dom g implies y9 = y) by A7;
end;
suppose
A8: not x in dom f & x in dom g;
take y9 = g.x;
thus (x in dom f implies y9 = f.x) & (x in dom g implies y9 = g.x)
& (not x in dom f & not x in dom g implies y9 = y) by A8;
end;
suppose
not x in dom f & not x in dom g;
hence thesis;
end;
end;
hence thesis;
end;
A9: for x,y1,y2 st x in X & P[x,y1] & P[x,y2] holds y1 = y2;
consider h being Function such that
A10: dom h = X and
A11: for x st x in X holds P[x,h.x] from FUNCT_1:sch 2(A9,A5);
rng h c= Y
proof
let z;
assume z in rng h;
then consider x such that
A12: x in dom h and
A13: z = h.x by FUNCT_1:def 3;
per cases;
suppose
A14: x in dom f & x in dom g;
then z = f.x by A11,A13;
hence thesis by A14,Th4;
end;
suppose
A15: x in dom f & not x in dom g;
then z = f.x by A11,A13;
hence thesis by A15,Th4;
end;
suppose
A16: not x in dom f & x in dom g;
then z = g.x by A11,A13;
hence thesis by A16,Th4;
end;
suppose
not x in dom f & not x in dom g;
then z = y by A10,A11,A12,A13;
hence thesis by A4;
end;
end;
then reconsider h9 = h as PartFunc of X,Y by A10,RELSET_1:4;
A17: f tolerates h
proof
let x;
assume x in dom f /\ dom h;
then x in dom f by XBOOLE_0:def 4;
hence thesis by A11;
end;
A18: g tolerates h
proof
let x;
assume x in dom g /\ dom h;
then x in dom g by XBOOLE_0:def 4;
hence thesis by A11;
end;
h9 is total by A10,Def2;
hence thesis by A17,A18;
end;
end;
hence thesis;
end;
definition
let X,Y;
let f be PartFunc of X,Y;
func TotFuncs f -> set means
:Def5:
x in it iff ex g being PartFunc of X,Y st g = x & g is total & f tolerates g;
existence
proof
defpred P[set] means ex g being PartFunc of X,Y st g = $1 & g is total & f
tolerates g;
now
consider F being set such that
A1: for x holds x in F iff x in PFuncs(X,Y) & P[x] from XBOOLE_0:sch
1;
take F;
let x;
thus x in F implies ex g being PartFunc of X,Y st g = x & g is total & f
tolerates g by A1;
given g being PartFunc of X,Y such that
A2: g = x & g is total & f tolerates g;
g in PFuncs(X,Y) by Th45;
hence x in F by A1,A2;
end;
hence thesis;
end;
uniqueness
proof
defpred P[set] means ex g being PartFunc of X,Y st g = $1 & g is total & f
tolerates g;
let F1,F2 be set such that
A3: for x holds x in F1 iff P[x] and
A4: for x holds x in F2 iff P[x];
thus thesis from XBOOLE_0:sch 2(A3,A4);
end;
end;
theorem Th69:
for f being PartFunc of X,Y for g being set st g in TotFuncs(f)
holds g is PartFunc of X,Y
proof
let f be PartFunc of X,Y;
let g be set;
assume g in TotFuncs(f);
then
ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by Def5;
hence thesis;
end;
theorem Th70:
for f,g being PartFunc of X,Y st g in TotFuncs(f) holds g is total
proof
let f,g be PartFunc of X,Y;
assume g in TotFuncs(f);
then
ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by Def5;
hence thesis;
end;
theorem Th71:
for f being PartFunc of X,Y for g being Function st g in
TotFuncs(f) holds f tolerates g
proof
let f be PartFunc of X,Y;
let g be Function;
assume g in TotFuncs(f);
then
ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by Def5;
hence thesis;
end;
registration
let X be non empty set, Y be empty set;
let f be PartFunc of X,Y;
cluster TotFuncs f -> empty;
coherence
proof
set g = the Element of TotFuncs(f);
assume TotFuncs(f) is not empty;
then
ex g9 being PartFunc of X,{} st g9 = g & g9 is total & f tolerates g9
by Def5;
hence contradiction;
end;
end;
theorem Th72:
for f being PartFunc of X,Y holds f is total iff TotFuncs f = { f}
proof
let f be PartFunc of X,Y;
thus f is total implies TotFuncs f = {f}
proof
assume
A1: f is total;
for g being set holds g in TotFuncs f iff f = g
proof
let g be set;
thus g in TotFuncs f implies f = g
proof
assume g in TotFuncs f;
then
ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates
g9 by Def5;
hence thesis by A1,Th66;
end;
thus thesis by A1,Def5;
end;
hence thesis by TARSKI:def 1;
end;
assume TotFuncs f = {f};
then f in TotFuncs f by TARSKI:def 1;
hence thesis by Th70;
end;
theorem
for f being PartFunc of {},Y holds TotFuncs f = {f} by Th72;
theorem
for f being PartFunc of {},Y holds TotFuncs f = {{}} by Th72;
theorem
for f,g being PartFunc of X,Y st TotFuncs f meets TotFuncs g holds f
tolerates g
proof
let f,g be PartFunc of X,Y;
set h = the Element of TotFuncs f /\ TotFuncs g;
assume
A1: TotFuncs f /\ TotFuncs g <> {};
then
A2: h in TotFuncs f by XBOOLE_0:def 4;
A3: h in TotFuncs g by A1,XBOOLE_0:def 4;
reconsider h as PartFunc of X,Y by A2,Th69;
A4: g tolerates h by A3,Th71;
f tolerates h by A2,Th71;
hence thesis by A2,A4,Th67,Th70;
end;
theorem
for f,g being PartFunc of X,Y st (Y = {} implies X = {}) & f tolerates
g holds TotFuncs f meets TotFuncs g
proof
let f,g be PartFunc of X,Y;
assume ( Y = {} implies X = {})& f tolerates g;
then consider h being PartFunc of X,Y such that
A1: h is total & f tolerates h & g tolerates h by Th68;
h in TotFuncs f & h in TotFuncs g by A1,Def5;
hence TotFuncs f /\ TotFuncs g <> {} by XBOOLE_0:def 4;
end;
begin
Lm2: for R being Relation of X st R = id X holds R is total
proof
let R be Relation of X;
assume R = id X;
hence dom R = X by RELAT_1:45;
end;
Lm3: for R being Relation st R = id X holds R is reflexive symmetric
antisymmetric transitive
proof
let R be Relation;
assume
A1: R = id X;
then
A2: dom R = X & rng R = X by RELAT_1:45;
thus R is_reflexive_in field R
proof
let x;
thus thesis by A1,A2,RELAT_1:def 10;
end;
thus R is_symmetric_in field R
proof
let x,y;
assume that
x in field R and
y in field R;
assume [x,y] in R;
hence thesis by A1,RELAT_1:def 10;
end;
thus R is_antisymmetric_in field R
proof
let x;
thus thesis by A1,RELAT_1:def 10;
end;
thus R is_transitive_in field R
proof
let x;
thus thesis by A1,RELAT_1:def 10;
end;
end;
Lm4: id X is Relation of X
proof
dom id X c= X & rng id X c= X;
hence thesis by RELSET_1:4;
end;
registration
let X;
cluster total reflexive symmetric antisymmetric transitive for Relation of X;
existence
proof
reconsider R = id X as Relation of X by Lm4;
take R;
thus thesis by Lm2,Lm3;
end;
end;
registration
cluster symmetric transitive -> reflexive for Relation;
coherence
proof
let R be Relation;
assume that
A1: R is_symmetric_in field R and
A2: R is_transitive_in field R;
let x;
assume
A3: x in field R;
then x in dom R or x in rng R by XBOOLE_0:def 3;
then consider y such that
A4: [x,y] in R or [y,x] in R by XTUPLE_0:def 12,def 13;
y in rng R or y in dom R by A4,XTUPLE_0:def 12,def 13;
then
A5: y in field R by XBOOLE_0:def 3;
then [x,y] in R & [y,x] in R by A1,A3,A4,RELAT_2:def 3;
hence thesis by A2,A3,A5,RELAT_2:def 8;
end;
end;
registration
let X;
cluster id X -> symmetric antisymmetric transitive;
coherence by Lm3;
end;
definition
let X;
redefine func id X -> total Relation of X;
coherence by Lm2,Lm4;
end;
scheme
LambdaC9{ A() -> non empty set, C[set], F,G(set) -> set } :
ex f being Function st dom f = A() &
for x be Element of A() holds
(C[x] implies f.x = F(x)) & (not C[x] implies f.x = G(x));
consider f being Function such that
A1: dom f = A() & for x be set st x in A() holds (C[x] implies f.x = F(x
)) & (not C[x] implies f.x = G(x)) from LambdaC;
take f;
thus thesis by A1;
end;
begin
reserve A for set,
f,g,h for Function;
theorem Th77:
f tolerates g & [x,y] in f & [x,z] in g implies y = z
proof
assume f tolerates g;
then consider h such that
A1: h = f \/ g by Th51;
assume [x,y] in f & [x,z] in g;
then [x,y] in h & [x,z] in h by A1,XBOOLE_0:def 3;
hence thesis by FUNCT_1:def 1;
end;
theorem
A is functional & (for f,g being Function st f in A & g in A holds f
tolerates g) implies union A is Function
proof
assume that
A1: for x st x in A holds x is Function and
A2: for f,g being Function st f in A & g in A holds f tolerates g;
A3: now
let x,y,z;
assume that
A4: [x,y] in union A and
A5: [x,z] in union A;
consider p being set such that
A6: [x,y] in p and
A7: p in A by A4,TARSKI:def 4;
consider q being set such that
A8: [x,z] in q and
A9: q in A by A5,TARSKI:def 4;
reconsider p,q as Function by A1,A7,A9;
p tolerates q by A2,A7,A9;
hence y = z by A6,A8,Th77;
end;
now
let z;
assume z in union A;
then consider p being set such that
A10: z in p and
A11: p in A by TARSKI:def 4;
reconsider p as Function by A1,A11;
p = p;
hence ex x,y st [x,y] = z by A10,RELAT_1:def 1;
end;
hence thesis by A3,FUNCT_1:def 1,RELAT_1:def 1;
end;
definition
let D be set, p be D-valued Function, i be set;
assume
A1: i in dom p;
func p/.i -> Element of D equals
:Def6: p.i;
coherence by A1,Th4;
end;
registration
let X,Y be non empty set;
cluster non empty for PartFunc of X,Y;
existence
proof
reconsider p = {[choose X,choose Y]} as PartFunc of X,Y by RELSET_1:3;
take p;
thus thesis;
end;
end;
registration
let A, B be set;
cluster PFuncs(A,B) -> functional;
coherence
proof
let x be set;
assume x in PFuncs(A,B);
then ex f being Function st x = f & dom f c= A & rng f c= B by Def3;
hence thesis;
end;
end;
theorem
for f1,f2, g being Function st rng g c= dom f1 & rng g c= dom f2
& f1 tolerates f2 holds f1*g = f2*g
proof
let f1,f2, g be Function;
assume that
A1: rng g c= dom f1 and
A2: rng g c= dom f2 and
A3: f1 tolerates f2;
A4: dom (f2*g) = dom g by A2,RELAT_1:27;
A5: dom (f1*g) = dom g by A1,RELAT_1:27;
now
let x be set;
assume
A6: x in dom g;
then
A7: (f2*g).x = f2.(g.x) by A4,FUNCT_1:12;
g.x in rng g by A6,FUNCT_1:def 3;
then
A8: g.x in (dom f1) /\ (dom f2) by A1,A2,XBOOLE_0:def 4;
(f1*g).x = f1.(g.x) by A5,A6,FUNCT_1:12;
hence (f1*g).x = (f2*g).x by A3,A7,A8,Def4;
end;
hence thesis by A5,A4,FUNCT_1:2;
end;
theorem
for f being Y-valued Function st x in dom(f|X)
holds (f|X)/.x = f/.x
proof let f be Y-valued Function;
assume
A1: x in dom(f|X);
then
A2: x in dom f by RELAT_1:57;
thus (f|X)/.x = (f|X).x by A1,Def6
.= f.x by A1,FUNCT_1:47
.= f/.x by A2,Def6;
end;
begin
reserve v,x,x1,x2,x3,x4,y,y1,y2,y3,y4,z,z1,z2, X,X1,X2,X3,X4,Y,Y1,Y2,Y3,Y4,Y5,
Z,Z1,Z2,Z3,Z4,Z5 for set;
reserve p for pair set;
canceled 6;
theorem Th7:
[x,y]`1=x & [x,y]`2=y;
theorem Th8:
[p`1,p`2] = p;
theorem
X <> {} implies ex v st v in X & not ex x,y st (x in X or y in X) & v
= [x,y]
proof
assume X <> {};
then consider Y such that
A1: Y in X and
A2: not ex Y1 st Y1 in Y & not Y1 misses X by XREGULAR:2;
take v = Y;
thus v in X by A1;
given x,y such that
A3: x in X or y in X and
A4: v = [x,y];
A5: { x,y } in Y by A4,TARSKI:def 2;
x in { x,y } & y in { x,y } by TARSKI:def 2;
hence contradiction by A2,A5,A3,XBOOLE_0:3;
end;
theorem Th10:
z in [:X,Y:] implies z`1 in X & z`2 in Y
proof
assume z in [:X,Y:];
then consider x,y such that
W: x in X & y in Y & z=[x,y] by ZFMISC_1:def 2;
[x,y]`1 = x & [x,y]`2 = y;
hence thesis by W;
end;
theorem
(ex x,y st z=[x,y]) & z`1 in X & z`2 in Y implies z in [:X,Y:]
proof
assume ex x,y st z=[x,y];
then [z`1,z`2]=z by Th8;
hence thesis by ZFMISC_1:def 2;
end;
theorem
z in [:{x},Y:] implies z`1=x & z`2 in Y
proof
assume
A1: z in [:{x},Y:];
then z`1 in {x} by Th10;
hence thesis by A1,Th10,TARSKI:def 1;
end;
theorem
z in [:X,{y}:] implies z`1 in X & z`2 = y
proof
assume
A1: z in [:X,{y}:];
then z`2 in {y} by Th10;
hence thesis by A1,Th10,TARSKI:def 1;
end;
theorem
z in [:{x},{y}:] implies z`1 = x & z`2 = y
proof
assume z in [:{x},{y}:];
then z`1 in {x} & z`2 in {y} by Th10;
hence thesis by TARSKI:def 1;
end;
theorem
z in [:{x1,x2},Y:] implies (z`1=x1 or z`1=x2) & z`2 in Y
proof
assume
A1: z in [:{x1,x2},Y:];
then z`1 in {x1,x2} by Th10;
hence thesis by A1,Th10,TARSKI:def 2;
end;
theorem
z in [:X,{y1,y2}:] implies z`1 in X & (z`2 = y1 or z`2 = y2)
proof
assume
A1: z in [:X,{y1,y2}:];
then z`2 in {y1,y2} by Th10;
hence thesis by A1,Th10,TARSKI:def 2;
end;
theorem
z in [:{x1,x2},{y}:] implies (z`1=x1 or z`1=x2) & z`2 = y
proof
assume z in [:{x1,x2},{y}:];
then z`1 in {x1,x2} & z`2 in {y} by Th10;
hence thesis by TARSKI:def 1,def 2;
end;
theorem
z in [:{x},{y1,y2}:] implies z`1 = x & (z`2 = y1 or z`2 = y2)
proof
assume z in [:{x},{y1,y2}:];
then z`1 in {x} & z`2 in {y1,y2} by Th10;
hence thesis by TARSKI:def 1,def 2;
end;
theorem
z in [:{x1,x2},{y1,y2}:] implies (z`1 = x1 or z`1 = x2) & (z`2 = y1 or
z`2 = y2)
proof
assume z in [:{x1,x2},{y1,y2}:];
then z`1 in {x1,x2} & z`2 in {y1,y2} by Th10;
hence thesis by TARSKI:def 2;
end;
theorem Th20:
(ex y,z st x = [y,z]) implies x <> x`1 & x <> x`2
proof
given y,z such that
A1: x = [y,z];
X: [y,z]`1 = y & [y,z]`2 = z;
now
assume y = x;
then {{y,z},{y}} in {y} by A1,TARSKI:def 1;
hence contradiction by TARSKI:def 2;
end;
hence x <> x`1 by A1,X;
now
assume z = x;
then {{y,z},{y}} in {y,z} by A1,TARSKI:def 2;
hence contradiction by TARSKI:def 2;
end;
hence thesis by A1,X;
end;
reserve R for Relation;
theorem Th21:
x in R implies x = [x`1,x`2]
proof
assume x in R;
then ex x1,x2 st x=[x1,x2] by RELAT_1:def 1;
hence thesis by Th8;
end;
theorem
X <> {} & Y <> {} implies for x being Element of [:X,Y:] holds x
= [x`1,x`2] by Th21;
Lm1: X1 <> {} & X2 <> {} implies for x being Element of [:X1,X2:] ex xx1 being
(Element of X1), xx2 being Element of X2 st x = [xx1,xx2]
proof
assume
A1: X1 <> {} & X2 <> {};
let x be Element of [:X1,X2:];
reconsider xx2 = x`2 as Element of X2 by A1,Th10;
reconsider xx1 = x`1 as Element of X1 by A1,Th10;
take xx1,xx2;
thus thesis by A1,Th21;
end;
theorem Th23:
[:{x1,x2},{y1,y2}:] = {[x1,y1],[x1,y2],[x2,y1],[x2,y2]}
proof
thus [:{x1,x2},{y1,y2}:] = [:{x1},{y1,y2}:] \/ [:{x2},{y1,y2}:] by
ZFMISC_1:109
.= {[x1,y1],[x1,y2]} \/ [:{x2},{y1,y2}:] by ZFMISC_1:30
.= {[x1,y1],[x1,y2]} \/ {[x2,y1],[x2,y2]} by ZFMISC_1:30
.= {[x1,y1],[x1,y2],[x2,y1],[x2,y2]} by ENUMSET1:5;
end;
theorem Th24:
X <> {} & Y <> {} implies for x being Element of [:X,Y:] holds x
<> x`1 & x <> x`2
proof
assume
A1: X <> {} & Y <> {};
let x be Element of [:X,Y:];
x = [x`1,x`2] by A1,Th21;
hence thesis by Th20;
end;
canceled;
theorem Th26:
X <> {} implies ex v st v in X & not ex x,y,z st (x in X or y in
X) & v = [x,y,z]
proof
assume X <> {};
then consider Y such that
A1: Y in X and
A2: not ex Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in Y & not Y1 misses X
by XREGULAR:4;
take v = Y;
thus v in X by A1;
given x,y,z such that
A3: x in X or y in X and
A4: v = [x,y,z];
set Y1 = { x,y }, Y2 = { Y1,{x} }, Y3 = { Y2,z };
B5: x in Y1 & y in Y1 by TARSKI:def 2;
A6: Y3 in Y by A4,TARSKI:def 2;
Y1 in Y2 & Y2 in Y3 by TARSKI:def 2;
hence contradiction by A2,B5,A6,A3,XBOOLE_0:3;
end;
canceled 3;
theorem Th30:
X <> {} implies ex v st v in X & not ex x1,x2,x3,x4 st (x1 in X
or x2 in X) & v = [x1,x2,x3,x4]
proof
assume X <> {};
then consider Y such that
A1: Y in X and
A2: for Y1,Y2,Y3,Y4,Y5 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y5 & Y5
in Y holds Y1 misses X by XREGULAR:6;
take v = Y;
thus v in X by A1;
given x1,x2,x3,x4 such that
A3: x1 in X or x2 in X and
A4: v = [x1,x2,x3,x4];
set Y1 = { x1,x2 }, Y2 = { Y1,{x1} }, Y3 = { Y2,x3 }, Y4 = { Y3, {Y2}}, Y5 =
{ Y4,x4 };
A5: Y3 in Y4 & Y4 in Y5 by TARSKI:def 2;
A6: Y5 in Y by A4,TARSKI:def 2;
B7: x1 in Y1 & x2 in Y1 by TARSKI:def 2;
Y1 in Y2 & Y2 in Y3 by TARSKI:def 2;
hence contradiction by A2,B7,A5,A6,A3,XBOOLE_0:3;
end;
theorem Th31:
X1 <> {} & X2 <> {} & X3 <> {} iff [:X1,X2,X3:] <> {}
proof
A1: X1 <> {} & X2 <> {} iff [:X1,X2:] <> {} by ZFMISC_1:90;
[:[:X1,X2:],X3:] = [:X1,X2,X3:] by ZFMISC_1:def 3;
hence thesis by A1,ZFMISC_1:90;
end;
reserve xx1 for Element of X1,
xx2 for Element of X2,
xx3 for Element of X3;
theorem Th32:
X1<>{} & X2<>{} & X3<>{} implies ( [:X1,X2,X3:] = [:Y1,Y2,Y3:]
implies X1=Y1 & X2=Y2 & X3=Y3)
proof
A1: [:X1,X2,X3:] = [:[:X1,X2:],X3:] by ZFMISC_1:def 3;
assume
A2: X1<>{} & X2<>{};
assume
A4: X3<>{};
assume [:X1,X2,X3:] = [:Y1,Y2,Y3:];
then
A5: [:[:X1,X2:],X3:] = [:[:Y1,Y2:],Y3:] by A1,ZFMISC_1:def 3;
then [:X1,X2:] = [:Y1,Y2:] by A2,A4,ZFMISC_1:110;
hence thesis by A2,A4,A5,ZFMISC_1:110;
end;
theorem
[:X1,X2,X3:]<>{} & [:X1,X2,X3:] = [:Y1,Y2,Y3:] implies X1=Y1 & X2=Y2 &
X3=Y3
proof
assume
A1: [:X1,X2,X3:]<>{};
then
A2: X3<>{} by Th31;
X1<>{} & X2<>{} by A1,Th31;
hence thesis by A2,Th32;
end;
theorem
[:X,X,X:] = [:Y,Y,Y:] implies X = Y
proof
assume [:X,X,X:] = [:Y,Y,Y:];
then X<>{} or Y<>{} implies thesis by Th32;
hence thesis;
end;
Lm2: X1 <> {} & X2 <> {} & X3 <> {} implies
for x being Element of [:X1,X2,X3:]
ex xx1,xx2,xx3 st x = [xx1,xx2,xx3]
proof
assume that
A1: X1 <> {} & X2 <> {} and
A2: X3 <> {};
let x be Element of [:X1,X2,X3:];
reconsider x9=x as Element of [:[:X1,X2:],X3:] by ZFMISC_1:def 3;
consider x12 being (Element of [:X1,X2:]), xx3 such that
A3: x9 = [x12,xx3] by A1,A2,Lm1;
consider xx1,xx2 such that
A4: x12 = [xx1,xx2] by A1,Lm1;
take xx1,xx2,xx3;
thus thesis by A3,A4;
end;
theorem Th35:
[:{x1},{x2},{x3}:] = { [x1,x2,x3] }
proof
thus [:{x1},{x2},{x3}:] = [:[:{x1},{x2}:],{x3}:] by ZFMISC_1:def 3
.= [:{[x1,x2]},{x3}:] by ZFMISC_1:29
.= { [x1,x2,x3] } by ZFMISC_1:29;
end;
theorem
[:{x1,y1},{x2},{x3}:] = { [x1,x2,x3],[y1,x2,x3] }
proof
thus [:{x1,y1},{x2},{x3}:] = [:[:{x1,y1},{x2}:],{x3}:] by ZFMISC_1:def 3
.= [:{[x1,x2],[y1,x2]},{x3}:] by ZFMISC_1:30
.= { [x1,x2,x3],[y1,x2,x3] } by ZFMISC_1:30;
end;
theorem
[:{x1},{x2,y2},{x3}:] = { [x1,x2,x3],[x1,y2,x3] }
proof
thus [:{x1},{x2,y2},{x3}:] = [:[:{x1},{x2,y2}:],{x3}:] by ZFMISC_1:def 3
.= [:{[x1,x2],[x1,y2]},{x3}:] by ZFMISC_1:30
.= { [x1,x2,x3],[x1,y2,x3] } by ZFMISC_1:30;
end;
theorem
[:{x1},{x2},{x3,y3}:] = { [x1,x2,x3],[x1,x2,y3] }
proof
thus [:{x1},{x2},{x3,y3}:] = [:[:{x1},{x2}:],{x3,y3}:] by ZFMISC_1:def 3
.= [:{[x1,x2]},{x3,y3}:] by ZFMISC_1:29
.= { [x1,x2,x3],[x1,x2,y3] } by ZFMISC_1:30;
end;
theorem
[:{x1,y1},{x2,y2},{x3}:] = { [x1,x2,x3],[y1,x2,x3],[x1,y2,x3],[y1,y2,
x3] }
proof
thus [:{x1,y1},{x2,y2},{x3}:] = [:[:{x1,y1},{x2,y2}:],{x3}:] by
ZFMISC_1:def 3
.= [:{[x1,x2],[x1,y2],[y1,x2],[y1,y2]},{x3}:] by Th23
.= [:{[x1,x2],[x1,y2]} \/ {[y1,x2],[y1,y2]},{x3}:] by ENUMSET1:5
.= [:{[x1,x2],[x1,y2]},{x3}:] \/ [:{[y1,x2],[y1,y2]},{x3}:] by ZFMISC_1:97
.= { [[x1,x2],x3],[[x1,y2],x3]} \/ [:{[y1,x2],[y1,y2]},{x3}:] by
ZFMISC_1:30
.= { [[x1,x2],x3],[[x1,y2],x3]} \/ {[[y1,x2],x3],[[y1,y2],x3] } by
ZFMISC_1:30
.= { [x1,x2,x3],[x1,y2,x3],[y1,x2,x3],[[y1,y2],x3] } by ENUMSET1:5
.= { [x1,x2,x3],[y1,x2,x3],[x1,y2,x3],[y1,y2,x3] } by ENUMSET1:62;
end;
theorem
[:{x1,y1},{x2},{x3,y3}:] = { [x1,x2,x3],[y1,x2,x3],[x1,x2,y3],[y1,x2,
y3] }
proof
thus [:{x1,y1},{x2},{x3,y3}:] = [:[:{x1,y1},{x2}:],{x3,y3}:] by
ZFMISC_1:def 3
.= [:{[x1,x2],[y1,x2]},{x3,y3}:] by ZFMISC_1:30
.= { [[x1,x2],x3],[[x1,x2],y3],[[y1,x2],x3],[[y1,x2],y3] } by Th23
.= { [x1,x2,x3],[y1,x2,x3],[x1,x2,y3],[y1,x2,y3] } by ENUMSET1:62;
end;
theorem
[:{x1},{x2,y2},{x3,y3}:] = { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,
y3] }
proof
thus [:{x1},{x2,y2},{x3,y3}:] = [:[:{x1},{x2,y2}:],{x3,y3}:] by
ZFMISC_1:def 3
.= [:{[x1,x2],[x1,y2]},{x3,y3}:] by ZFMISC_1:30
.= { [[x1,x2],x3],[[x1,x2],y3],[[x1,y2],x3],[[x1,y2],y3] } by Th23
.= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3] } by ENUMSET1:62;
end;
theorem
[:{x1,y1},{x2,y2},{x3,y3}:] = { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,
y2,y3], [y1,x2,x3],[y1,y2,x3],[y1,x2,y3],[y1,y2,y3] }
proof
A1: [:{[x1,x2],[x1,y2]},{x3,y3}:] = { [[x1,x2],x3],[[x1,x2],y3],[[x1,y2],x3]
,[[x1,y2],y3]} by Th23
.= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3]} by ENUMSET1:62;
A2: [:{[y1,x2],[y1,y2]},{x3,y3}:] = { [[y1,x2],x3],[[y1,x2],y3],[[y1,y2],x3]
,[[y1,y2],y3]} by Th23
.= { [y1,x2,x3],[y1,y2,x3],[y1,x2,y3],[y1,y2,y3]} by ENUMSET1:62;
thus [:{x1,y1},{x2,y2},{x3,y3}:] = [:[:{x1,y1},{x2,y2}:],{x3,y3}:] by
ZFMISC_1:def 3
.= [:{[x1,x2],[x1,y2],[y1,x2],[y1,y2]},{x3,y3}:] by Th23
.= [:{[x1,x2],[x1,y2]} \/ {[y1,x2],[y1,y2]},{x3,y3}:] by ENUMSET1:5
.= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3]} \/ {[y1,x2,x3],[y1,y2,
x3],[y1,x2,y3],[y1,y2,y3] } by A1,A2,ZFMISC_1:97
.= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3], [y1,x2,x3],[y1,y2,x3],
[y1,x2,y3],[y1,y2,y3] } by ENUMSET1:25;
end;
registration
let X1,X2,X3 be non empty set;
cluster -> triple for Element of [:X1,X2,X3:];
coherence
proof let x be Element of [:X1,X2,X3:];
ex xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3 st x = [xx1,xx2,xx3] by Lm2;
hence thesis;
end;
end;
definition
canceled 4;
let X1,X2,X3 be non empty set;
let x be Element of [:X1,X2,X3:];
redefine func x`1_3 -> Element of X1 means
:Def5:
x = [x1,x2,x3] implies it = x1;
coherence
proof
consider xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 such that
A6: x = [xx1,xx2,xx3] by Lm2;
[xx1,xx2,xx3]`1_3 = xx1;
hence x`1_3 is Element of X1 by A6;
end;
compatibility
proof let y be Element of X1;
thus y = x`1_3 implies for x1,x2,x3 holds x = [x1,x2,x3] implies y = x1
proof assume
Z: y = x`1_3;
let x1,x2,x3 such that
W: x = [x1,x2,x3];
[x1,x2,x3]`1_3 = x1;
hence y = x1 by W,Z;
end;
assume
Z: for x1,x2,x3 holds x = [x1,x2,x3] implies y = x1;
consider xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 such that
A6: x = [xx1,xx2,xx3] by Lm2;
[xx1,xx2,xx3]`1_3 = xx1;
hence y = x`1_3 by Z,A6;
end;
redefine func x`2_3 -> Element of X2 means
:Def6:
x = [x1,x2,x3] implies it = x2;
coherence
proof
consider xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 such that
A6: x = [xx1,xx2,xx3] by Lm2;
[xx1,xx2,xx3]`2_3 = xx2;
hence x`2_3 is Element of X2 by A6;
end;
compatibility
proof let y be Element of X2;
thus y = x`2_3 implies for x1,x2,x3 holds x = [x1,x2,x3] implies y = x2
proof assume
Z: y = x`2_3;
let x1,x2,x3 such that
W: x = [x1,x2,x3];
[x1,x2,x3]`2_3 = x2;
hence y = x2 by W,Z;
end;
assume
Z: for x1,x2,x3 holds x = [x1,x2,x3] implies y = x2;
consider xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 such that
A6: x = [xx1,xx2,xx3] by Lm2;
[xx1,xx2,xx3]`2_3 = xx2;
hence y = x`2_3 by Z,A6;
end;
redefine func x`3_3 -> Element of X3 means
:Def7:
x = [x1,x2,x3] implies it = x3;
coherence
proof
consider xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 such that
A6: x = [xx1,xx2,xx3] by Lm2;
[xx1,xx2,xx3]`3_3 = xx3;
hence x`3_3 is Element of X3 by A6;
end;
compatibility
proof let y be Element of X3;
thus y = x`3_3 implies for x1,x2,x3 holds x = [x1,x2,x3] implies y = x3
proof assume
Z: y = x`3_3;
let x1,x2,x3 such that
W: x = [x1,x2,x3];
[x1,x2,x3]`3_3 = x3;
hence y = x3 by W,Z;
end;
assume
Z: for x1,x2,x3 holds x = [x1,x2,x3] implies y = x3;
consider xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 such that
A6: x = [xx1,xx2,xx3] by Lm2;
[xx1,xx2,xx3]`3_3 = xx3;
hence y = x`3_3 by Z,A6;
end;
end;
canceled;
theorem
for X1,X2,X3 being non empty set
for x being Element of [:X1,X2,
X3:] holds x = [x`1_3,x`2_3,x`3_3];
theorem Th45:
X c= [:X,Y,Z:] or X c= [:Y,Z,X:] or X c= [:Z,X,Y:] implies X =
{}
proof
assume that
A1: X c= [:X,Y,Z:] or X c= [:Y,Z,X:] or X c= [:Z,X,Y:] and
A2: X <> {};
[:X,Y,Z:]<>{} or [:Y,Z,X:]<>{} or [:Z,X,Y:]<>{} by A1,A2;
then reconsider X,Y,Z as non empty set by Th31;
per cases by A1;
suppose
A4: X c= [:X,Y,Z:];
consider v such that
A5: v in X and
A6: for x,y,z st x in X or y in X holds v <> [x,y,z] by Th26;
reconsider v as Element of [:X,Y,Z:] by A4,A5;
v = [v`1_3,v`2_3,v`3_3];
hence contradiction by A6;
end;
suppose
X c= [:Y,Z,X:];
then X c= [:[:Y,Z:],X:] by ZFMISC_1:def 3;
hence thesis by ZFMISC_1:111;
end;
suppose
A7: X c= [:Z,X,Y:];
consider v such that
A8: v in X and
A9: for z,x,y st z in X or x in X holds v <> [z,x,y] by Th26;
reconsider v as Element of [:Z,X,Y:] by A7,A8;
v = [v`1_3,v`2_3,v`3_3];
hence thesis by A9;
end;
end;
canceled;
theorem Th47:
for X1,X2,X3 being non empty set
for x being Element of [:X1,X2,X3:]
holds x <> x`1_3 & x <> x`2_3 & x <> x`3_3
proof let X1,X2,X3 be non empty set;
let x be Element of [:X1,X2,X3:];
set Y9 = { x`1_3,x`2_3 }, Y = { Y9,{x`1_3}},
X9 = { Y,x`3_3 }, X = { X9,{Y} };
A2: x = [x`1_3,x`2_3,x`3_3]
.= [[x`1_3,x`2_3],x`3_3];
then x = x`1_3 or x = x`2_3 implies X in Y9 & Y9 in Y & Y in X9 & X9 in X
by TARSKI:def 2;
hence x <> x`1_3 & x <> x`2_3 by XREGULAR:8;
thus thesis by A2,Th20;
end;
theorem
[:X1,X2,X3:] meets [:Y1,Y2,Y3:] implies X1 meets Y1 & X2 meets Y2 & X3
meets Y3
proof
assume
A1: [:X1,X2,X3:] meets [:Y1,Y2,Y3:];
A2: [:[:X1,X2:],X3:] = [:X1,X2,X3:] & [:[:Y1,Y2:],Y3:] = [:Y1,Y2,Y3:] by
ZFMISC_1:def 3;
then [:X1,X2:] meets [:Y1,Y2:] by A1,ZFMISC_1:104;
hence thesis by A2,A1,ZFMISC_1:104;
end;
theorem Th49:
[:X1,X2,X3,X4:] = [:[:[:X1,X2:],X3:],X4:]
proof
thus [:X1,X2,X3,X4:] = [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4
.= [:[:[:X1,X2:],X3:],X4:] by ZFMISC_1:def 3;
end;
theorem Th50:
[:[:X1,X2:],X3,X4:] = [:X1,X2,X3,X4:]
proof
thus [:[:X1,X2:],X3,X4:] = [:[:[:X1,X2:],X3:],X4:] by ZFMISC_1:def 3
.= [:X1,X2,X3,X4:] by Th49;
end;
theorem Th51:
X1 <> {} & X2 <> {} & X3 <> {} & X4 <> {} iff [:X1,X2,X3,X4:] <>
{}
proof
A1: [:[:X1,X2,X3:],X4:] = [:X1,X2,X3,X4:] by ZFMISC_1:def 4;
X1 <> {} & X2 <> {} & X3 <> {} iff [:X1,X2,X3:] <> {} by Th31;
hence thesis by A1,ZFMISC_1:90;
end;
theorem Th52:
X1<>{} & X2<>{} & X3<>{} & X4<>{} & [:X1,X2,X3,X4:] = [:Y1,Y2,Y3
,Y4:] implies X1=Y1 & X2=Y2 & X3=Y3 & X4=Y4
proof
A1: [:X1,X2,X3,X4:] = [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4;
assume
A2: X1<>{} & X2<>{} & X3<>{};
assume
A3: X4<>{};
assume [:X1,X2,X3,X4:] = [:Y1,Y2,Y3,Y4:];
then
A4: [:[:X1,X2,X3:],X4:] = [:[:Y1,Y2,Y3:],Y4:] by A1,ZFMISC_1:def 4;
[:X1,X2,X3:] = [:Y1,Y2,Y3:] by A3,A4,A2,ZFMISC_1:110;
hence thesis by A2,A3,A4,Th32,ZFMISC_1:110;
end;
theorem
[:X1,X2,X3,X4:]<>{} & [:X1,X2,X3,X4:] = [:Y1,Y2,Y3,Y4:] implies X1=Y1
& X2=Y2 & X3=Y3 & X4=Y4
proof
assume
A1: [:X1,X2,X3,X4:]<>{};
then
A2: X3<>{} & X4<>{} by Th51;
X1<>{} & X2<>{} by A1,Th51;
hence thesis by A2,Th52;
end;
theorem
[:X,X,X,X:] = [:Y,Y,Y,Y:] implies X = Y
proof
assume [:X,X,X,X:] = [:Y,Y,Y,Y:];
then X<>{} or Y<>{} implies thesis by Th52;
hence thesis;
end;
reserve xx4 for Element of X4;
Lm3: X1 <> {} & X2 <> {} & X3 <> {} & X4 <> {} implies for x being Element of
[:X1,X2,X3,X4:] ex xx1,xx2,xx3,xx4 st x = [xx1,xx2,xx3,xx4]
proof
assume that
A1: X1 <> {} & X2 <> {} & X3 <> {} and
A2: X4 <> {};
let x be Element of [:X1,X2,X3,X4:];
reconsider x9=x as Element of [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4;
consider x123 being (Element of [:X1,X2,X3:]), xx4 such that
A3: x9 = [x123,xx4] by A2,Lm1,A1;
consider xx1,xx2,xx3 such that
A4: x123 = [xx1,xx2,xx3] by A1,Lm2;
take xx1,xx2,xx3,xx4;
thus thesis by A3,A4;
end;
registration
let X1,X2,X3,X4 be non empty set;
cluster -> quadruple for Element of [:X1,X2,X3,X4:];
coherence
proof let x be Element of [:X1,X2,X3,X4:];
ex xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4
st x = [xx1,xx2,xx3,xx4] by Lm3;
hence thesis;
end;
end;
definition
let X1,X2,X3,X4 be non empty set;
let x be Element of [:X1,X2,X3,X4:];
redefine func x`1_4 -> Element of X1 means
:Def8:
x = [x1,x2,x3,x4] implies it = x1;
coherence
proof
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`1_4 = xx1;
hence x`1_4 is Element of X1 by A6;
end;
compatibility
proof let y be Element of X1;
thus y = x`1_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4]
implies y = x1
proof assume
Z: y = x`1_4;
let x1,x2,x3,x4 such that
W: x = [x1,x2,x3,x4];
[x1,x2,x3,x4]`1_4 = x1;
hence y = x1 by W,Z;
end;
assume
Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x1;
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`1_4 = xx1;
hence y = x`1_4 by Z,A6;
end;
redefine func x`2_4 -> Element of X2 means
:Def9:
x = [x1,x2,x3,x4] implies it = x2;
coherence
proof
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`2_4 = xx2;
hence x`2_4 is Element of X2 by A6;
end;
compatibility
proof let y be Element of X2;
thus y = x`2_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4]
implies y = x2
proof assume
Z: y = x`2_4;
let x1,x2,x3,x4 such that
W: x = [x1,x2,x3,x4];
[x1,x2,x3,x4]`2_4 = x2;
hence y = x2 by W,Z;
end;
assume
Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x2;
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`2_4 = xx2;
hence y = x`2_4 by Z,A6;
end;
redefine func x`3_4 -> Element of X3 means
:Def10:
x = [x1,x2,x3,x4] implies it = x3;
coherence
proof
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`3_4 = xx3;
hence x`3_4 is Element of X3 by A6;
end;
compatibility
proof let y be Element of X3;
thus y = x`3_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4]
implies y = x3
proof assume
Z: y = x`3_4;
let x1,x2,x3,x4 such that
W: x = [x1,x2,x3,x4];
[x1,x2,x3,x4]`3_4 = x3;
hence y = x3 by W,Z;
end;
assume
Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x3;
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`3_4 = xx3;
hence y = x`3_4 by Z,A6;
end;
redefine func x`4_4 -> Element of X4 means
:Def11:
x = [x1,x2,x3,x4] implies it = x4;
coherence
proof
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`4_4 = xx4;
hence x`4_4 is Element of X4 by A6;
end;
compatibility
proof let y be Element of X4;
thus y = x`4_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4]
implies y = x4
proof assume
Z: y = x`4_4;
let x1,x2,x3,x4 such that
W: x = [x1,x2,x3,x4];
[x1,x2,x3,x4]`4_4 = x4;
hence y = x4 by W,Z;
end;
assume
Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x4;
consider xx1 being Element of X1, xx2 being Element of X2,
xx3 being Element of X3, xx4 being Element of X4 such that
A6: x = [xx1,xx2,xx3,xx4] by Lm3;
[xx1,xx2,xx3,xx4]`4_4 = xx4;
hence y = x`4_4 by Z,A6;
end;
end;
canceled;
theorem
for X1,X2,X3,X4 being non empty set
for x being Element of
[:X1,X2,X3,X4:] holds x = [x`1_4,x`2_4,x`3_4,x`4_4];
canceled;
theorem
for X1,X2,X3,X4 being non empty set
for x being Element of [:X1,X2,X3,X4:]
holds x <> x`1_4 & x <> x`2_4 & x <> x`3_4 & x <> x`4_4
proof let X1,X2,X3,X4 be non empty set;
let x be Element of [:X1,X2,X3,X4:];
reconsider Y = [:X1,X2:], X3, X4 as non empty set;
reconsider x9=x as Element of [:Y,X3,X4:] by Th50;
set Z9 = { x`1_4,x`2_4 }, Z = { Z9,{x`1_4}},
Y9 = { Z,x`3_4 }, Y = { Y9,{Z} }, X9 =
{ Y,x`4_4 }, X = { X9,{Y} };
x = [x`1_4,x`2_4,x`3_4,x`4_4]
.= X;
then
x = x`1_4 or x = x`2_4
implies X in Z9 & Z9 in Z & Z in Y9 & Y9 in Y & Y in X9 & X9 in X
by TARSKI:def 2;
hence x <> x`1_4 & x <> x`2_4 by XREGULAR:10;
x`3_4 = (x qua set)`1`2
.= x9`2_3;
hence thesis by Th47;
end;
theorem
X1 c= [:X1,X2,X3,X4:] or X1 c= [:X2,X3,X4,X1:] or X1 c= [:X3,X4,X1,X2
:] or X1 c= [:X4,X1,X2,X3:] implies X1 = {}
proof
assume that
A1: X1 c= [:X1,X2,X3,X4:] or X1 c= [:X2,X3,X4,X1:] or X1 c= [:X3,X4,X1,
X2:] or X1 c= [:X4,X1,X2,X3:] and
A2: X1 <> {};
A3: [:X1,X2,X3,X4:]<>{} or [:X2,X3,X4,X1:]<>{} or [:X3,X4,X1,X2:]<>{} or [:
X4,X1,X2,X3:]<>{} by A1,A2;
reconsider X1,X2,X3,X4 as non empty set by A3,Th51;
per cases by A1;
suppose
A6: X1 c= [:X1,X2,X3,X4:];
consider v such that
A7: v in X1 and
A8: for x1,x2,x3,x4 st x1 in X1 or x2 in X1 holds v <> [x1,x2,x3,x4]
by Th30;
reconsider v as Element of [:X1,X2,X3,X4:] by A6,A7;
v = [v`1_4,v`2_4,v`3_4,v`4_4];
hence contradiction by A8;
end;
suppose
X1 c= [:X2,X3,X4,X1:];
then X1 c= [:[:X2,X3:],X4,X1:] by Th50;
hence thesis by Th45;
end;
suppose
X1 c= [:X3,X4,X1,X2:];
then X1 c= [:[:X3,X4:],X1,X2:] by Th50;
hence thesis by Th45;
end;
suppose
A9: X1 c= [:X4,X1,X2,X3:];
consider v such that
A10: v in X1 and
A11: for x1,x2,x3,x4 st x1 in X1 or x2 in X1 holds v <> [x1,x2,x3,x4]
by Th30;
reconsider v as Element of [:X4,X1,X2,X3:] by A9,A10;
v = [v`1_4,v`2_4,v`3_4,v`4_4];
hence thesis by A11;
end;
end;
theorem
[:X1,X2,X3,X4:] meets [:Y1,Y2,Y3,Y4:] implies X1 meets Y1 & X2 meets
Y2 & X3 meets Y3 & X4 meets Y4
proof
assume
A1: [:X1,X2,X3,X4:] meets [:Y1,Y2,Y3,Y4:];
A2: [:[:[:X1,X2:],X3:],X4:] = [:X1,X2,X3,X4:] & [:[:[:Y1,Y2:],Y3:],Y4:] = [:
Y1, Y2,Y3,Y4:] by Th49;
then
A3: [:[:X1,X2:],X3:] meets [:[:Y1,Y2:],Y3:] by A1,ZFMISC_1:104;
then [:X1,X2:] meets [:Y1,Y2:] by ZFMISC_1:104;
hence thesis by A2,A1,A3,ZFMISC_1:104;
end;
theorem
[:{x1},{x2},{x3},{x4}:] = { [x1,x2,x3,x4] }
proof
thus [:{x1},{x2},{x3},{x4}:] = [:[:{x1},{x2}:],{x3},{x4}:] by Th50
.= [:{[x1,x2]},{x3},{x4}:] by ZFMISC_1:29
.= {[[x1,x2],x3,x4]} by Th35
.= { [x1,x2,x3,x4] };
end;
theorem Th62:
[:X,Y:] <> {} implies for x being Element of [:X,Y:] holds x <>
x`1 & x <> x`2
proof
assume [:X,Y:] <> {};
then X <> {} & Y <> {} by ZFMISC_1:90;
hence thesis by Th24;
end;
theorem
x in [:X,Y:] implies x <> x`1 & x <> x`2 by Th62;
reserve A1 for Subset of X1,
A2 for Subset of X2,
A3 for Subset of X3,
A4 for Subset of X4;
reserve x for Element of [:X1,X2,X3:];
theorem
for X1,X2,X3 being non empty set
for x being Element of [:X1,X2,X3:]
for x1,x2,x3 st x = [x1,x2,x3] holds
x`1_3 = x1 & x`2_3 = x2 & x`3_3 = x3 by Def5,Def6,Def7;
theorem
for X1,X2,X3 being non empty set
for x being Element of [:X1,X2,X3:]
st for xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y1 = xx1
holds y1 =x`1_3
proof let X1,X2,X3 be non empty set;
let x be Element of [:X1,X2,X3:];
assume that
A2: for xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y1 = xx1;
x = [x`1_3,x`2_3,x`3_3];
hence thesis by A2;
end;
theorem
for X1,X2,X3 being non empty set
for x being Element of [:X1,X2,X3:]
st for xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y2 = xx2
holds y2 =x`2_3
proof let X1,X2,X3 be non empty set;
let x be Element of [:X1,X2,X3:];
assume that
A2: for xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y2 = xx2;
x = [x`1_3,x`2_3,x`3_3];
hence thesis by A2;
end;
theorem
for X1,X2,X3 being non empty set
for x being Element of [:X1,X2,X3:]
st for xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y3 = xx3
holds y3 =x`3_3
proof
let X1,X2,X3 be non empty set;
let x be Element of [:X1,X2,X3:];
assume that
A2: for xx1 being Element of X1,xx2 being Element of X2,
xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y3 = xx3;
x = [x`1_3,x`2_3,x`3_3];
hence thesis by A2;
end;
theorem Th68:
z in [: X1,X2,X3 :] implies ex x1,x2,x3 st x1 in X1 & x2 in X2 &
x3 in X3 & z = [x1,x2,x3]
proof
assume z in [: X1,X2,X3 :];
then z in [:[:X1,X2:],X3:] by ZFMISC_1:def 3;
then consider x12, x3 being set such that
A1: x12 in [:X1,X2:] and
A2: x3 in X3 and
A3: z = [x12,x3] by ZFMISC_1:def 2;
consider x1,x2 being set such that
A4: x1 in X1 & x2 in X2 and
A5: x12 = [x1,x2] by A1,ZFMISC_1:def 2;
z = [x1,x2,x3] by A3,A5;
hence thesis by A2,A4;
end;
theorem Th69:
[x1,x2,x3] in [: X1,X2,X3 :] iff x1 in X1 & x2 in X2 & x3 in X3
proof
A1: [x1,x2] in [:X1,X2:] iff x1 in X1 & x2 in X2 by ZFMISC_1:87;
[:X1,X2,X3:] = [:[:X1,X2:],X3:] by ZFMISC_1:def 3;
hence thesis by A1,ZFMISC_1:87;
end;
theorem
(for z holds z in Z iff ex x1,x2,x3 st x1 in X1 & x2 in X2 & x3 in X3
& z = [x1,x2,x3]) implies Z = [: X1,X2,X3 :]
proof
assume
A1: for z holds z in Z iff ex x1,x2,x3 st x1 in X1 & x2 in X2 & x3 in X3
& z = [x1,x2,x3];
now
let z;
thus z in Z implies z in [:[:X1,X2:],X3:]
proof
assume z in Z;
then consider x1,x2,x3 such that
A2: x1 in X1 & x2 in X2 and
A3: x3 in X3 & z = [x1,x2,x3] by A1;
[x1,x2] in [:X1,X2:] by A2,ZFMISC_1:def 2;
hence thesis by A3,ZFMISC_1:def 2;
end;
assume z in [:[:X1,X2:],X3:];
then consider x12,x3 being set such that
A4: x12 in [:X1,X2:] and
A5: x3 in X3 and
A6: z = [x12,x3] by ZFMISC_1:def 2;
consider x1,x2 being set such that
A7: x1 in X1 & x2 in X2 and
A8: x12 = [x1,x2] by A4,ZFMISC_1:def 2;
z = [x1,x2,x3] by A6,A8;
hence z in Z by A1,A5,A7;
end;
then Z = [:[:X1,X2:],X3:] by TARSKI:1;
hence thesis by ZFMISC_1:def 3;
end;
canceled;
theorem
for X1,X2,X3 being non empty set
for A1 being non empty Subset of X1, A2 being non empty Subset of X2,
A3 being non empty Subset of X3
for x being Element of [:X1,X2,X3:] st x in [:A1,A2,A3:]
holds x`1_3 in A1 & x`2_3 in A2 & x`3_3 in A3
proof
let X1,X2,X3 be non empty set;
let A1 be non empty Subset of X1, A2 be non empty Subset of X2,
A3 be non empty Subset of X3;
let x be Element of [:X1,X2,X3:];
assume
x in [:A1,A2,A3:];
then reconsider y = x as Element of [:A1,A2,A3:];
A2: y`2_3 in A2;
A3: y`3_3 in A3;
y`1_3 in A1;
hence thesis by A2,A3;
end;
theorem Th73:
X1 c= Y1 & X2 c= Y2 & X3 c= Y3 implies [:X1,X2,X3:] c= [:Y1,Y2,
Y3:]
proof
A1: [:X1,X2,X3:] = [:[:X1,X2:],X3:] & [:Y1,Y2,Y3:] = [:[:Y1,Y2:],Y3:] by
ZFMISC_1:def 3;
assume X1 c= Y1 & X2 c= Y2;
then
A2: [:X1,X2:] c= [:Y1,Y2:] by ZFMISC_1:96;
assume X3 c= Y3;
hence thesis by A2,A1,ZFMISC_1:96;
end;
reserve x for Element of [:X1,X2,X3,X4:];
theorem
for X1,X2,X3,X4 being non empty set
for x being Element of [:X1,X2,X3,X4:]
for x1,x2,x3,x4 being set st x = [x1,
x2,x3,x4] holds x`1_4 = x1 & x`2_4 = x2 & x`3_4 = x3 & x`4_4 = x4
by Def8,Def9,Def10,Def11;
theorem
for X1,X2,X3,X4 being non empty set
for x being Element of [:X1,X2,X3,X4:]
st for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y1 = xx1
holds y1 =x`1_4
proof
let X1,X2,X3,X4 be non empty set;
let x be Element of [:X1,X2,X3,X4:];
assume that
A2: for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y1 = xx1;
x = [x`1_4,x`2_4,x`3_4,x`4_4];
hence thesis by A2;
end;
theorem
for X1,X2,X3,X4 being non empty set
for x being Element of [:X1,X2,X3,X4:]
st for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,
xx2,xx3,xx4] holds y2 = xx2
holds y2 =x`2_4
proof
let X1,X2,X3,X4 be non empty set;
let x be Element of [:X1,X2,X3,X4:];
assume that
A2: for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y2 = xx2;
x = [x`1_4,x`2_4,x`3_4,x`4_4];
hence thesis by A2;
end;
theorem
for X1,X2,X3,X4 being non empty set
for x being Element of [:X1,X2,X3,X4:]
st for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,
xx2,xx3,xx4] holds y3 = xx3
holds y3 =x`3_4
proof
let X1,X2,X3,X4 be non empty set;
let x be Element of [:X1,X2,X3,X4:];
assume that
A2: for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y3 = xx3;
x = [x`1_4,x`2_4,x`3_4,x`4_4];
hence thesis by A2;
end;
theorem
for X1,X2,X3,X4 being non empty set
for x being Element of [:X1,X2,X3,X4:]
st for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,
xx2,xx3,xx4] holds y4 = xx4
holds y4 =x`4_4
proof
let X1,X2,X3,X4 be non empty set;
let x be Element of [:X1,X2,X3,X4:];
assume that
A2: for xx1 being Element of X1,
xx2 being Element of X2,
xx3 being Element of X3,
xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y4 = xx4;
x = [x`1_4,x`2_4,x`3_4,x`4_4];
hence thesis by A2;
end;
theorem
z in [: X1,X2,X3,X4 :] implies ex x1,x2,x3,x4 st x1 in X1 & x2 in X2 &
x3 in X3 & x4 in X4 & z = [x1,x2,x3,x4]
proof
assume z in [: X1,X2,X3,X4 :];
then z in [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4;
then consider x123, x4 being set such that
A1: x123 in [:X1,X2,X3:] and
A2: x4 in X4 and
A3: z = [x123,x4] by ZFMISC_1:def 2;
consider x1, x2, x3 such that
A4: x1 in X1 & x2 in X2 & x3 in X3 and
A5: x123 = [x1,x2,x3] by A1,Th68;
z = [x1,x2,x3,x4] by A3,A5;
hence thesis by A2,A4;
end;
theorem
[x1,x2,x3,x4] in [: X1,X2,X3,X4 :] iff x1 in X1 & x2 in X2 & x3 in X3
& x4 in X4
proof
A1: [x1,x2] in [:X1,X2:] iff x1 in X1 & x2 in X2 by ZFMISC_1:87;
[:X1,X2,X3,X4:] = [:[:X1,X2:],X3,X4:] & [x1,x2,x3,x4] = [[x1,x2],x3,x4]
by Th50;
hence thesis by A1,Th69;
end;
theorem
(for z holds z in Z iff ex x1,x2,x3,x4 st x1 in X1 & x2 in X2 & x3 in
X3 & x4 in X4 & z = [x1,x2,x3,x4]) implies Z = [: X1,X2,X3,X4 :]
proof
assume
A1: for z holds z in Z iff ex x1,x2,x3,x4 st x1 in X1 & x2 in X2 & x3 in
X3 & x4 in X4 & z = [x1,x2,x3,x4];
now
let z;
thus z in Z implies z in [:[:X1,X2,X3:],X4:]
proof
assume z in Z;
then consider x1,x2,x3,x4 such that
A2: x1 in X1 & x2 in X2 & x3 in X3 and
A3: x4 in X4 & z = [x1,x2,x3,x4] by A1;
[x1,x2,x3] in [:X1,X2,X3:] by A2,Th69;
hence thesis by A3,ZFMISC_1:def 2;
end;
assume z in [:[:X1,X2,X3:],X4:];
then consider x123,x4 being set such that
A4: x123 in [:X1,X2,X3:] and
A5: x4 in X4 and
A6: z = [x123,x4] by ZFMISC_1:def 2;
consider x1,x2,x3 such that
A7: x1 in X1 & x2 in X2 & x3 in X3 and
A8: x123 = [x1,x2,x3] by A4,Th68;
z = [x1,x2,x3,x4] by A6,A8;
hence z in Z by A1,A5,A7;
end;
then Z = [:[:X1,X2,X3:],X4:] by TARSKI:1;
hence thesis by ZFMISC_1:def 4;
end;
canceled;
theorem
for X1,X2,X3,X4 being non empty set,
A1 being non empty Subset of X1, A2 being non empty Subset of X2,
A3 being non empty Subset of X3, A4 being non empty Subset of X4
for x being Element of [:X1,X2,X3,X4:] st x in [:A1,A2,A3,A4:]
holds x`1_4 in A1 & x`2_4 in A2 & x`3_4 in A3 & x`4_4 in A4
proof
let X1,X2,X3,X4 be non empty set,
A1 be non empty Subset of X1, A2 be non empty Subset of X2,
A3 be non empty Subset of X3, A4 be non empty Subset of X4;
let x be Element of [:X1,X2,X3,X4:];
assume
x in [:A1,A2,A3,A4:];
then reconsider y = x as Element of [:A1,A2,A3,A4:];
A2: y`2_4 in A2;
A3: y`4_4 in A4;
A4: y`3_4 in A3;
y`1_4 in A1;
hence thesis by A2,A4,A3;
end;
theorem Th84:
X1 c= Y1 & X2 c= Y2 & X3 c= Y3 & X4 c= Y4
implies [:X1,X2,X3,X4:] c= [:Y1,Y2,Y3,Y4:]
proof
A1: [:X1,X2,X3,X4:] = [:[:X1,X2,X3:],X4:] & [:Y1,Y2,Y3,Y4:] = [:[:Y1,Y2,Y3:]
,Y4 :] by ZFMISC_1:def 4;
assume X1 c= Y1 & X2 c= Y2 & X3 c= Y3;
then
A2: [:X1,X2,X3:] c= [:Y1,Y2,Y3:] by Th73;
assume X4 c= Y4;
hence thesis by A2,A1,ZFMISC_1:96;
end;
definition
let X1,X2,A1,A2;
redefine func [:A1,A2:] -> Subset of [:X1,X2:];
coherence by ZFMISC_1:96;
end;
definition
let X1,X2,X3,A1,A2,A3;
redefine func [:A1,A2,A3:] -> Subset of [:X1,X2,X3:];
coherence by Th73;
end;
definition
let X1,X2,X3,X4,A1,A2,A3,A4;
redefine func [:A1,A2,A3,A4:] -> Subset of [:X1,X2,X3,X4:];
coherence by Th84;
end;
begin
definition
let f be Function;
func pr1 f -> Function means
dom it = dom f & for x being set st x in dom f
holds it.x = (f.x)`1;
existence
proof
deffunc F(set) = (f.$1)`1;
ex g being Function st dom g = dom f & for x being set st x in dom f
holds g.x = F(x) from FUNCT_1:sch 3;
hence thesis;
end;
uniqueness
proof
let p1, p2 be Function such that
A1: dom p1 = dom f and
A2: for x being set st x in dom f holds p1.x = (f.x)`1 and
A3: dom p2 = dom f and
A4: for x being set st x in dom f holds p2.x = (f.x)`1;
now
let x be set;
assume
A5: x in dom f;
then p1.x = (f.x)`1 by A2;
hence p1.x = p2.x by A4,A5;
end;
hence thesis by A1,A3,FUNCT_1:2;
end;
func pr2 f -> Function means
dom it = dom f & for x being set st x in dom f
holds it.x = (f.x)`2;
existence
proof
deffunc F(set) = (f.$1)`2;
ex g being Function st dom g = dom f & for x being set st x in dom f
holds g.x = F(x) from FUNCT_1:sch 3;
hence thesis;
end;
uniqueness
proof
let p1, p2 be Function such that
A6: dom p1 = dom f and
A7: for x being set st x in dom f holds p1.x = (f.x)`2 and
A8: dom p2 = dom f and
A9: for x being set st x in dom f holds p2.x = (f.x)`2;
now
let x be set;
assume
A10: x in dom f;
then p1.x = (f.x)`2 by A7;
hence p1.x = p2.x by A9,A10;
end;
hence thesis by A6,A8,FUNCT_1:2;
end;
end;
definition
let x be set;
func x`11 equals
x`1`1;
coherence;
func x`12 equals
x`1`2;
coherence;
func x`21 equals
x`2`1;
coherence;
func x`22 equals
x`2`2;
coherence;
end;
reserve x for set;
theorem
[[x1,x2],y]`11 = x1 & [[x1,x2],y]`12 = x2 & [x,[y1,y2]]`21 = y1 & [x,[
y1,y2]]`22 = y2;
theorem
x in R implies x`1 in dom R & x`2 in rng R
proof
assume
A1: x in R;
then x = [x`1,x`2] by Th21;
hence thesis by A1,XTUPLE_0:def 12,def 13;
end;
theorem Th87:
for R being non empty Relation, x being set
holds Im(R,x) = { I`2 where I is Element of R: I`1 = x }
proof let R be non empty Relation, x being set;
set X = { I`2 where I is Element of R: I`1 = x };
thus Im(R,x) c= X
proof let z;
assume z in Im(R,x);
then consider y such that
A1: [y,z] in R and
A2: y in {x} by RELAT_1:def 13;
A3: y = x by A2,TARSKI:def 1;
y = [y,z]`1 & z = [y,z]`2;
hence z in X by A1,A3;
end;
let z;
assume z in X;
then consider I being Element of R such that
A4: z= I`2 and
A5: I`1 = x;
A6: I = [I`1,I`2] by Th21;
x in {x} by TARSKI:def 1;
hence z in Im(R,x) by A4,A5,A6,RELAT_1:def 13;
end;
theorem
x in R implies x`2 in Im(R,x`1)
proof
assume
A1: x in R;
then x`2 in { I`2 where I is Element of R: I`1 = x`1 };
hence thesis by A1,Th87;
end;
theorem Th89:
x in R & y in R & x`1 = y`1 & x`2 = y`2 implies x = y
proof assume x in R & y in R;
then x = [x`1,x`2] & y = [y`1,y`2] by Th21;
hence thesis;
end;
theorem
for R being non empty Relation, x,y being Element of R
st x`1 = y`1 & x`2 = y`2
holds x = y by Th89;
theorem
proj1 proj1 {[x1,x2,x3],[y1,y2,y3]} = {x1,y1}
proof
thus proj1 proj1 {[x1,x2,x3],[y1,y2,y3]}
= proj1 {[x1,x2],[y1,y2]} by RELAT_1:10
.= {x1,y1} by RELAT_1:10;
end;
theorem
proj1 proj1 {[x1,x2,x3]} = {x1}
proof
thus proj1 proj1 {[x1,x2,x3]}
= proj1 {[x1,x2]} by RELAT_1:9
.= {x1} by RELAT_1:9;
end;
scheme
BiFuncEx{A()->set,B()->set,C()->set,P[set,set,set]}: ex f,g being Function
st dom f = A() & dom g = A() & for x st x in A() holds P[x,f.x,g.x]
provided
A1: x in A() implies ex y,z st y in B() & z in C() & P[x,y,z]
proof
defpred H[set,set] means for y,z st $2`1 = y & $2`2 = z holds P[$1,y,z];
A2: x in A() implies ex p being set st p in [:B(),C():] & H[x,p]
proof
assume x in A();
then consider y,z such that
A3: y in B() & z in C() and
A4: P[x,y,z] by A1;
take p=[y,z];
thus p in [:B(),C():] by A3,ZFMISC_1:87;
thus for y,z st p`1 = y & p`2 = z holds P[x,y,z]
proof
let x1,x2 be set;
assume that
A5: p`1 = x1 and
A6: p`2 = x2;
x1=y by A5,Th7;
hence thesis by A4,A6,Th7;
end;
end;
consider h being Function such that
dom h = A() & rng h c= [:B(),C():] and
A7: for x st x in A() holds H[x,h.x] from FUNCT_1:sch 5(A2);
deffunc g(set) = (h.$1)`2;
deffunc f(set) = (h.$1)`1;
consider f being Function such that
A8: dom f = A() and
A9: for x st x in A() holds f.x = f(x) from FUNCT_1:sch 3;
consider g being Function such that
A10: dom g = A() and
A11: for x st x in A() holds g.x = g(x) from FUNCT_1:sch 3;
take f,g;
thus dom f = A() & dom g = A() by A8,A10;
thus for x st x in A() holds P[x,f.x,g.x]
proof
let x;
assume
A12: x in A();
then f.x = (h.x)`1 & g.x = (h.x)`2 by A9,A11;
hence thesis by A7,A12;
end;
end;
begin
reserve X,Y,Z for set,
a,b,c,d,x,y,z,u for set,
R for Relation,
A,B,C for Ordinal;
definition
let X;
func RelIncl X -> Relation means
:Def1:
field it = X & for Y,Z st Y in X & Z in X holds [Y,Z] in it iff Y c= Z;
existence
proof
defpred P[set,set] means $1 c= $2;
consider R such that
A1: [x,y] in R iff x in X & y in X & P[x,y] from RELAT_1:sch 1;
take R;
thus field R = X
proof
thus x in field R implies x in X
proof
A2: now
assume x in dom R;
then ex y st [x,y] in R by XTUPLE_0:def 12;
hence thesis by A1;
end;
A3: now
assume x in rng R;
then ex y st [y,x] in R by XTUPLE_0:def 13;
hence thesis by A1;
end;
assume x in field R;
hence thesis by A2,A3,XBOOLE_0:def 3;
end;
let x;
assume x in X;
then [x,x] in R by A1;
hence thesis by RELAT_1:15;
end;
let Y,Z such that
A4: Y in X & Z in X;
thus [Y,Z] in R implies Y c= Z by A1;
thus thesis by A1,A4;
end;
uniqueness
proof
let R1,R2 be Relation such that
A5: field R1 = X and
A6: for Y,Z st Y in X & Z in X holds [Y,Z] in R1 iff Y c= Z and
A7: field R2 = X and
A8: for Y,Z st Y in X & Z in X holds [Y,Z] in R2 iff Y c= Z;
let x,y;
thus [x,y] in R1 implies [x,y] in R2
proof
assume
A9: [x,y] in R1;
then
A10: x in field R1 & y in field R1 by RELAT_1:15;
then x c= y by A5,A6,A9;
hence thesis by A5,A8,A10;
end;
assume
A11: [x,y] in R2;
then
A12: x in field R2 & y in field R2 by RELAT_1:15;
then x c= y by A7,A8,A11;
hence thesis by A6,A7,A12;
end;
end;
canceled 6;
registration
let X;
cluster RelIncl X -> reflexive;
coherence
proof
A1: field RelIncl X = X by Def1;
let a;
assume a in field RelIncl X;
hence thesis by A1,Def1;
end;
cluster RelIncl X -> transitive;
coherence
proof
let a,b,c such that
A2: a in field RelIncl X and
A3: b in field RelIncl X and
A4: c in field RelIncl X and
A5: [a,b] in RelIncl X & [b,c] in RelIncl X;
field RelIncl X = X by Def1;
then a c= b & b c= c by A2,A3,A4,A5,Def1;
then
A6: a c= c by XBOOLE_1:1;
a in X & c in X by A2,A4,Def1;
hence thesis by A6,Def1;
end;
cluster RelIncl X -> antisymmetric;
coherence
proof
A7: field RelIncl X = X by Def1;
let a,b;
assume a in field RelIncl X & b in field RelIncl X & [a,b] in RelIncl X & [
b,a ] in RelIncl X;
then a c= b & b c= a by A7,Def1;
hence thesis by XBOOLE_0:def 10;
end;
end;
registration
let A;
cluster RelIncl A -> connected;
coherence
proof
let a,b such that
A1: a in field RelIncl A & b in field RelIncl A and
a <> b;
A2: field RelIncl A = A by Def1;
then reconsider Y = a, Z = b as Ordinal by A1;
Y c= Z or Z c= Y;
hence thesis by A1,A2,Def1;
end;
cluster RelIncl A -> well_founded;
coherence
proof
let Y;
assume that
A3: Y c= field RelIncl A and
A4: Y <> {};
defpred P[set] means $1 in Y;
set x = the Element of Y;
A5: field RelIncl A = A by Def1;
then x in A by A3,A4,TARSKI:def 3;
then reconsider x as Ordinal;
x in Y by A4;
then
A6: ex B st P[B];
consider B such that
A7: P[B] & for C st P[C] holds B c= C from ORDINAL1:sch 1(A6);
reconsider x = B as set;
take x;
thus x in Y by A7;
set y = the Element of (RelIncl A)-Seg(x) /\ Y;
assume
A8: (RelIncl A)-Seg(x) /\ Y <> {};
then
A9: y in Y by XBOOLE_0:def 4;
then reconsider C = y as Ordinal by A3,A5;
A10: y in (RelIncl A)-Seg(x) by A8,XBOOLE_0:def 4;
then [y,x] in RelIncl A by WELLORD1:1;
then
A11: C c= B by A3,A5,A7,A9,Def1;
A12: y <> x by A10,WELLORD1:1;
B c= C by A7,A9;
hence contradiction by A12,A11,XBOOLE_0:def 10;
end;
end;
theorem Th7:
Y c= X implies (RelIncl X) |_2 Y = RelIncl Y
proof
assume
A1: Y c= X;
let a,b;
thus [a,b] in (RelIncl X) |_2 Y implies [a,b] in RelIncl Y
proof
assume
A2: [a,b] in (RelIncl X) |_2 Y;
then [a,b] in [:Y,Y:] by XBOOLE_0:def 4;
then
A3: a in Y & b in Y by ZFMISC_1:87;
[a,b] in RelIncl X by A2,XBOOLE_0:def 4;
then a c= b by A1,A3,Def1;
hence thesis by A3,Def1;
end;
assume
A4: [a,b] in RelIncl Y;
then
A5: a in field RelIncl Y & b in field RelIncl Y by RELAT_1:15;
A6: field RelIncl Y = Y by Def1;
then a c= b by A4,A5,Def1;
then
A7: [a,b] in RelIncl X by A1,A5,A6,Def1;
[a,b] in [:Y,Y:] by A5,A6,ZFMISC_1:87;
hence thesis by A7,XBOOLE_0:def 4;
end;
theorem Th8:
for A,X st X c= A holds RelIncl X is well-ordering
proof
let A,X;
(RelIncl A) |_2 X is well-ordering by WELLORD1:25;
hence thesis by Th7;
end;
reserve H for Function;
theorem Th9:
A in B implies A = (RelIncl B)-Seg(A)
proof
assume
A1: A in B;
thus a in A implies a in (RelIncl B)-Seg(A)
proof
assume
A2: a in A;
then reconsider C = a as Ordinal;
A3: a <> A by A2;
A4: A c= B by A1,ORDINAL1:def 2;
C c= A by A2,ORDINAL1:def 2;
then [C,A] in RelIncl B by A1,A2,A4,Def1;
hence thesis by A3,WELLORD1:1;
end;
let a;
assume
A5: a in (RelIncl B)-Seg(A);
then
A6: a <> A by WELLORD1:1;
A7: [a,A] in RelIncl B by A5,WELLORD1:1;
then
A8: a in field RelIncl B by RELAT_1:15;
A9: field RelIncl B = B by Def1;
then reconsider C = a as Ordinal by A8;
C c= A by A1,A7,A8,A9,Def1;
then C c< A by A6,XBOOLE_0:def 8;
hence thesis by ORDINAL1:11;
end;
theorem Th10:
RelIncl A,RelIncl B are_isomorphic implies A = B
proof
A1: field RelIncl A = A by Def1;
assume
A2: RelIncl A,RelIncl B are_isomorphic;
A3: now
A4: field RelIncl B = B by Def1;
assume
A5: A in B;
then A = (RelIncl B)-Seg(A) by Th9;
then RelIncl A = (RelIncl B) |_2 ((RelIncl B)-Seg(A)) by A4,Th7,WELLORD1:9;
hence contradiction by A2,A5,A4,WELLORD1:40,46;
end;
assume A <> B;
then
A6: A in B or B in A by ORDINAL1:14;
then B = (RelIncl A)-Seg(B) by A3,Th9;
then RelIncl B = (RelIncl A) |_2 ((RelIncl A)-Seg(B)) by A1,Th7,WELLORD1:9;
hence contradiction by A2,A6,A3,A1,WELLORD1:46;
end;
theorem Th11:
R,RelIncl A are_isomorphic & R,RelIncl B are_isomorphic implies A = B
proof
assume that
A1: R,RelIncl A are_isomorphic and
A2: R,RelIncl B are_isomorphic;
RelIncl A,R are_isomorphic by A1,WELLORD1:40;
hence thesis by A2,Th10,WELLORD1:42;
end;
theorem Th12:
for R st R is well-ordering & for a st a in field R ex A st R
|_2 (R-Seg(a)),RelIncl A are_isomorphic ex A st R,RelIncl A are_isomorphic
proof
let R such that
A1: R is well-ordering;
defpred P[set,set] means for A holds A = $2 iff R |_2 (R-Seg $1),RelIncl A
are_isomorphic;
assume
A2: for a st a in field R ex A st R |_2 (R-Seg(a)),RelIncl A are_isomorphic;
A3: for a st a in field R ex b st P[a,b]
proof
let a;
assume a in field R;
then consider A such that
A4: R |_2 (R-Seg(a)),RelIncl A are_isomorphic by A2;
reconsider b = A as set;
take b;
let B;
thus B = b implies R |_2 (R-Seg(a)),RelIncl B are_isomorphic by A4;
assume R |_2 (R-Seg(a)),RelIncl B are_isomorphic;
hence thesis by A4,Th11;
end;
A5: for b,c,d st b in field R & P[b,c] & P[b,d] holds c = d
proof
let b,c,d such that
A6: b in field R and
A7: A = c iff R |_2 (R-Seg(b)),RelIncl A are_isomorphic and
A8: B = d iff R |_2 (R-Seg(b)),RelIncl B are_isomorphic;
consider A such that
A9: R |_2 (R-Seg(b)),RelIncl A are_isomorphic by A2,A6;
A = c by A7,A9;
hence thesis by A8,A9;
end;
consider H such that
A10: dom H = field R & for b st b in field R holds P[b, H.b] from
FUNCT_1:sch 2(A5,A3);
for a st a in rng H holds a is Ordinal
proof
let b;
assume b in rng H;
then consider c such that
A11: c in dom H and
A12: b = H.c by FUNCT_1:def 3;
ex A st R |_2 (R-Seg(c)),RelIncl A are_isomorphic by A2,A10,A11;
hence thesis by A10,A11,A12;
end;
then consider C such that
A13: rng H c= C by ORDINAL1:24;
A14: now
let b;
assume
A15: b in rng H;
then consider b9 being set such that
A16: b9 in dom H and
A17: b = H.b9 by FUNCT_1:def 3;
set V = R-Seg(b9);
set P = R |_2 V;
consider A such that
A18: P,RelIncl A are_isomorphic by A2,A10,A16;
let c such that
A19: [c,b] in RelIncl C;
A20: A = b by A10,A16,A17,A18;
now
A21: C = field RelIncl C by Def1;
then
A22: c in C by A19,RELAT_1:15;
then reconsider B = c as Ordinal;
b in C by A19,A21,RELAT_1:15;
then
A23: B c= A by A20,A19,A22,Def1;
then
A24: (RelIncl A) |_2 B = RelIncl B by Th7;
assume c <> b;
then
A25: B c< A by A20,A23,XBOOLE_0:def 8;
then
A26: B = (RelIncl A)-Seg(B) by Th9,ORDINAL1:11;
A27: A = field RelIncl A by Def1;
RelIncl A,P are_isomorphic by A18,WELLORD1:40;
then
canonical_isomorphism_of(RelIncl A,P) is_isomorphism_of RelIncl A,P
by WELLORD1:def 9;
then consider d such that
A28: d in field P and
A29: (RelIncl A) |_2 ((RelIncl A)-Seg(B)),P |_2 (P-Seg(d))
are_isomorphic by A25,A27,ORDINAL1:11,WELLORD1:50;
A30: d in field R by A28,WELLORD1:12;
A31: P-Seg(d) = R-Seg(d) by A1,A28,WELLORD1:12,27;
d in V by A28,WELLORD1:12;
then [d,b9] in R by WELLORD1:1;
then R-Seg(d) c= R-Seg(b9) by A1,A10,A16,A30,WELLORD1:29;
then RelIncl B,R |_2 (R-Seg(d)) are_isomorphic by A29,A26,A24,A31,
WELLORD1:22;
then R |_2 (R-Seg(d)),RelIncl B are_isomorphic by WELLORD1:40;
then B = H.d by A10,A30;
hence c in rng H by A10,A30,FUNCT_1:def 3;
end;
hence c in rng H by A15;
end;
A32: (ex a st a in C & rng H = (RelIncl C)-Seg(a)) implies rng H is Ordinal
by Th9;
C = field RelIncl C & RelIncl C is well-ordering by Def1;
then reconsider A = rng H as Ordinal by A13,A14,A32,WELLORD1:28;
take A;
take H;
thus dom H = field R by A10;
thus rng H = field RelIncl A by Def1;
A33: a in dom H implies H.a is Ordinal
proof
assume a in dom H;
then H.a in A by FUNCT_1:def 3;
hence thesis;
end;
thus
A34: H is one-to-one
proof
let a,b;
assume that
A35: a in dom H and
A36: b in dom H and
A37: H.a = H.b;
reconsider B = H.a as Ordinal by A33,A35;
R |_2 (R-Seg(b)),RelIncl B are_isomorphic by A10,A36,A37;
then
A38: RelIncl B,R |_2 (R-Seg(b)) are_isomorphic by WELLORD1:40;
R |_2 (R-Seg(a)),RelIncl B are_isomorphic by A10,A35;
then R |_2 (R-Seg(a)),R |_2 (R-Seg(b)) are_isomorphic by A38,WELLORD1:42;
hence thesis by A1,A10,A35,A36,WELLORD1:47;
end;
let a,b;
thus [a,b] in R implies a in field R & b in field R & [H.a,H.b] in RelIncl A
proof
set Z = R-Seg(b);
set P = R |_2 Z;
A39: A = field RelIncl A & P is well-ordering by A1,Def1,WELLORD1:25;
assume
A40: [a,b] in R;
hence
A41: a in field R & b in field R by RELAT_1:15;
then reconsider A9 = H.a, B9 = H.b as Ordinal by A10,A33;
A42: R |_2 (R-Seg(b)),RelIncl B9 are_isomorphic by A10,A41;
A43: A9 in A by A10,A41,FUNCT_1:def 3;
A44: B9 in A by A10,A41,FUNCT_1:def 3;
A45: R |_2 (R-Seg(a)),RelIncl A9 are_isomorphic by A10,A41;
now
assume a <> b;
then
A46: a in Z by A40,WELLORD1:1;
then
A47: P-Seg(a) = R-Seg(a) by A1,WELLORD1:27;
Z c= field R by WELLORD1:9;
then
A48: a in field P by A1,A46,WELLORD1:31;
A9 c= A by A43,ORDINAL1:def 2;
then
A49: (RelIncl A) |_2 A9 = RelIncl A9 by Th7;
A9 = (RelIncl A)-Seg(A9) & R-Seg(a) c= R-Seg(b) by A1,A40,A41,A43,Th9,
WELLORD1:29;
then
A50: P |_2 (P-Seg(a)),(RelIncl A) |_2 ((RelIncl A)-Seg(A9))
are_isomorphic by A45,A49,A47,WELLORD1:22;
B9 = (RelIncl A)-Seg(B9) & B9 c= A by A44,Th9,ORDINAL1:def 2;
then P,(RelIncl A) |_2 ((RelIncl A)-Seg(B9)) are_isomorphic by A42,Th7;
hence [A9,B9] in RelIncl A by A43,A44,A39,A48,A50,WELLORD1:51;
end;
hence thesis by A43,Def1;
end;
assume that
A51: a in field R and
A52: b in field R and
A53: [H.a,H.b] in RelIncl A;
assume
A54: not [a,b] in R;
R is_reflexive_in field R by A1,RELAT_2:def 9;
then
A55: a <> b by A51,A54,RELAT_2:def 1;
R is_connected_in field R by A1,RELAT_2:def 14;
then
A56: [b,a] in R by A51,A52,A54,A55,RELAT_2:def 6;
then
A57: R-Seg(b) c= R-Seg(a) by A1,A51,A52,WELLORD1:29;
A58: RelIncl A is_antisymmetric_in field RelIncl A by RELAT_2:def 12;
A59: A = field RelIncl A by Def1;
reconsider A9 = H.a, B9 = H.b as Ordinal by A10,A33,A51,A52;
A60: R |_2 (R-Seg(a)),RelIncl A9 are_isomorphic by A10,A51;
A61: R |_2 (R-Seg(b)),RelIncl B9 are_isomorphic by A10,A52;
A62: B9 in A by A10,A52,FUNCT_1:def 3;
then B9 c= A by ORDINAL1:def 2;
then
A63: (RelIncl A) |_2 B9 = RelIncl B9 by Th7;
set Z = R-Seg(a);
set P = R |_2 Z;
A64: A9 in A by A10,A51,FUNCT_1:def 3;
then A9 = (RelIncl A)-Seg(A9) & A9 c= A by Th9,ORDINAL1:def 2;
then
A65: P,(RelIncl A) |_2 ((RelIncl A)-Seg(A9)) are_isomorphic by A60,Th7;
A66: b in Z by A54,A56,WELLORD1:1;
then
A67: P-Seg(b) = R-Seg(b) by A1,WELLORD1:27;
B9 = (RelIncl A)-Seg(B9) by A62,Th9;
then
A68: P |_2 (P-Seg(b)),(RelIncl A) |_2 ((RelIncl A)-Seg(B9)) are_isomorphic
by A61,A63,A67,A57,WELLORD1:22;
Z c= field R by WELLORD1:9;
then
A69: b in field P by A1,A66,WELLORD1:31;
P is well-ordering by A1,WELLORD1:25;
then [B9,A9] in RelIncl A by A69,A64,A62,A59,A65,A68,WELLORD1:51;
then H.a = H.b by A53,A58,A64,A62,A59,RELAT_2:def 4;
hence contradiction by A10,A34,A51,A52,A55,FUNCT_1:def 4;
end;
theorem Th13:
for R st R is well-ordering ex A st R,RelIncl A are_isomorphic
proof
let R such that
A1: R is well-ordering;
defpred P[set] means ex A st R |_2 (R-Seg($1)),RelIncl A are_isomorphic;
consider Z such that
A2: a in Z iff a in field R & P[a] from XBOOLE_0:sch 1;
now
let a such that
A3: a in field R and
A4: R-Seg(a) c= Z;
set P = R |_2 (R-Seg(a));
now
let b;
assume
A5: b in field P;
then
A6: b in R-Seg(a) by WELLORD1:12;
then
A7: [b,a] in R by WELLORD1:1;
b in field R by A5,WELLORD1:12;
then
A8: R-Seg(b) c= R-Seg(a) by A1,A3,A7,WELLORD1:29;
consider A such that
A9: R |_2 (R-Seg(b)),RelIncl A are_isomorphic by A2,A4,A6;
take A;
P-Seg(b) = R-Seg(b) by A1,A5,WELLORD1:12,27;
hence P |_2 (P-Seg(b)),RelIncl A are_isomorphic by A9,A8,WELLORD1:22;
end;
then ex A st P,RelIncl A are_isomorphic by A1,Th12,WELLORD1:25;
hence a in Z by A2,A3;
end;
then field R c= Z by A1,WELLORD1:33;
then
for a st a in field R ex A st R |_2 (R-Seg(a)),RelIncl A are_isomorphic
by A2;
hence thesis by A1,Th12;
end;
definition
let R;
assume
A1: R is well-ordering;
func order_type_of R -> Ordinal means
:Def2:
R,RelIncl it are_isomorphic;
existence by A1,Th13;
uniqueness by Th11;
end;
definition
let A,R;
pred A is_order_type_of R means
A = order_type_of R;
end;
theorem
X c= A implies order_type_of RelIncl X c= A
proof
assume
A1: X c= A;
then
A2: (RelIncl A) |_2 X = RelIncl X by Th7;
A3: RelIncl X is well-ordering by A1,Th8;
A4: now
assume RelIncl A,(RelIncl A) |_2 X are_isomorphic;
then RelIncl X,RelIncl A are_isomorphic by A2,WELLORD1:40;
hence thesis by A3,Def2;
end;
A5: now
given a such that
A6: a in A and
A7: (RelIncl A) |_2 ((RelIncl A)-Seg(a)),(RelIncl A) |_2 X are_isomorphic;
reconsider a as Ordinal by A6;
A8: (RelIncl A)-Seg(a) = a by A6,Th9;
A9: a c= A by A6,ORDINAL1:def 2;
then (RelIncl A) |_2 a = RelIncl a by Th7;
then RelIncl X,RelIncl a are_isomorphic by A2,A7,A8,WELLORD1:40;
hence thesis by A3,A9,Def2;
end;
field RelIncl A = A by Def1;
hence thesis by A1,A4,A5,WELLORD1:53;
end;
reserve f,g for Function;
definition
let X,Y;
redefine pred X,Y are_equipotent means
ex f st f is one-to-one & dom f = X & rng f = Y;
compatibility
proof
thus X,Y are_equipotent implies ex f st f is one-to-one & dom f = X & rng
f = Y
proof
assume X,Y are_equipotent;
then consider Z such that
A1: for x st x in X ex y st y in Y & [x,y] in Z and
A2: for y st y in Y ex x st x in X & [x,y] in Z and
A3: for x,y,z,u st [x,y] in Z & [z,u] in Z holds x = z iff y = u by
TARSKI:def 6;
set F = Z /\ [:X,Y:];
for x,y,z st [x,y] in F & [x,z] in F holds y = z
proof
let x,y,z;
assume [x,y] in F & [x,z] in F;
then [x,y] in Z & [x,z] in Z by XBOOLE_0:def 4;
hence thesis by A3;
end;
then reconsider F as Function by FUNCT_1:def 1;
take f = F;
thus f is one-to-one
proof
let x,y;
assume that
A4: x in dom f and
A5: y in dom f and
A6: f.x = f.y;
[y,f.y] in f by A5,FUNCT_1:1;
then
A7: [y,f.y] in Z by XBOOLE_0:def 4;
[x,f.x] in f by A4,FUNCT_1:1;
then [x,f.x] in Z by XBOOLE_0:def 4;
hence thesis by A3,A6,A7;
end;
thus dom f c= X
proof
let x;
assume x in dom f;
then [x,f.x] in f by FUNCT_1:1;
then [x,f.x] in [:X,Y:] by XBOOLE_0:def 4;
hence thesis by ZFMISC_1:87;
end;
thus X c= dom f
proof
let x;
assume
A8: x in X;
then consider y such that
A9: y in Y and
A10: [x,y] in Z by A1;
[x,y] in [:X,Y:] by A8,A9,ZFMISC_1:87;
then [x,y] in f by A10,XBOOLE_0:def 4;
hence thesis by FUNCT_1:1;
end;
thus rng f c= Y
proof
let y;
assume y in rng f;
then consider x such that
A11: x in dom f & y = f.x by FUNCT_1:def 3;
[x,y] in f by A11,FUNCT_1:1;
then [x,y] in [:X,Y:] by XBOOLE_0:def 4;
hence thesis by ZFMISC_1:87;
end;
thus Y c= rng f
proof
let y;
assume
A12: y in Y;
then consider x such that
A13: x in X and
A14: [x,y] in Z by A2;
[x,y] in [:X,Y:] by A12,A13,ZFMISC_1:87;
then [x,y] in f by A14,XBOOLE_0:def 4;
then x in dom f & y = f.x by FUNCT_1:1;
hence thesis by FUNCT_1:def 3;
end;
end;
(ex f st f is one-to-one & dom f = X & rng f = Y) implies ex Z st (
for x st x in X ex y st y in Y & [x,y] in Z) & (for y st y in Y ex x st x in X
& [x,y] in Z) & for x,y,z,u st [x,y] in Z & [z,u] in Z holds x = z iff y = u
proof
given f such that
A15: f is one-to-one and
A16: dom f = X and
A17: rng f = Y;
take Z = f;
thus x in X implies ex y st y in Y & [x,y] in Z
proof
assume
A18: x in X;
take f.x;
thus f.x in Y by A16,A17,A18,FUNCT_1:def 3;
thus thesis by A16,A18,FUNCT_1:1;
end;
thus for y st y in Y ex x st x in X & [x,y] in Z
proof
let y such that
A19: y in Y;
take f".y;
A20: dom(f") = rng f by A15,FUNCT_1:33;
then
A21: f".y in rng(f") by A17,A19,FUNCT_1:def 3;
A22: rng(f") = dom f by A15,FUNCT_1:33;
hence f".y in X by A16,A17,A19,A20,FUNCT_1:def 3;
y = f.(f".y) by A15,A17,A19,FUNCT_1:35;
hence thesis by A22,A21,FUNCT_1:1;
end;
let x,y,z,u;
assume
A23: [x,y] in Z & [z,u] in Z;
then
A24: x in dom f & z in dom f by FUNCT_1:1;
y = f.x & u = f.z by A23,FUNCT_1:1;
hence thesis by A15,A24,FUNCT_1:def 4;
end;
hence thesis by TARSKI:def 6;
end;
reflexivity
proof
let X;
take id X;
thus thesis;
end;
symmetry
proof
let X,Y;
given f such that
A25: f is one-to-one & dom f = X & rng f = Y;
take f";
thus thesis by A25,FUNCT_1:33;
end;
end;
theorem
X,Y are_equipotent & Y,Z are_equipotent implies X,Z are_equipotent
proof
given f such that
A1: f is one-to-one & dom f = X & rng f = Y;
given g such that
A2: g is one-to-one & dom g = Y & rng g = Z;
take g*f;
thus thesis by A1,A2,RELAT_1:27,28;
end;
theorem Th16:
R well_orders X implies field(R|_2 X) = X & R|_2 X is well-ordering
proof
assume that
A1: R is_reflexive_in X and
A2: R is_transitive_in X and
A3: R is_antisymmetric_in X and
A4: R is_connected_in X and
A5: R is_well_founded_in X;
A6: R|_2 X is_antisymmetric_in X
proof
let x,y;
assume that
A7: x in X & y in X and
A8: [x,y] in R|_2 X & [y,x] in R|_2 X;
[x,y] in R & [y,x] in R by A8,XBOOLE_0:def 4;
hence thesis by A3,A7,RELAT_2:def 4;
end;
A9: R|_2 X is_well_founded_in X
proof
let Y;
assume Y c= X & Y <> {};
then consider a such that
A10: a in Y and
A11: R-Seg(a) misses Y by A5,WELLORD1:def 3;
take a;
thus a in Y by A10;
assume not thesis;
then consider x being set such that
A12: x in (R|_2 X)-Seg(a) and
A13: x in Y by XBOOLE_0:3;
[x,a] in R|_2 X by A12,WELLORD1:1;
then
A14: [x,a] in R by XBOOLE_0:def 4;
x <> a by A12,WELLORD1:1;
then x in R-Seg(a) by A14,WELLORD1:1;
hence contradiction by A11,A13,XBOOLE_0:3;
end;
A15: R|_2 X is_transitive_in X
proof
let x,y,z;
assume that
A16: x in X and
A17: y in X and
A18: z in X and
A19: [x,y] in R|_2 X & [y,z] in R|_2 X;
[x,y] in R & [y,z] in R by A19,XBOOLE_0:def 4;
then
A20: [x,z] in R by A2,A16,A17,A18,RELAT_2:def 8;
[x,z] in [:X,X:] by A16,A18,ZFMISC_1:87;
hence thesis by A20,XBOOLE_0:def 4;
end;
A21: R|_2 X is_connected_in X
proof
let x,y;
assume that
A22: x in X & y in X and
A23: x <> y;
A24: [x,y] in [:X,X:] & [y,x] in [:X,X :] by A22,ZFMISC_1:87;
[x,y] in R or [y,x] in R by A4,A22,A23,RELAT_2:def 6;
hence thesis by A24,XBOOLE_0:def 4;
end;
thus
A25: field(R|_2 X) = X
proof
thus field(R|_2 X) c= X by WELLORD1:13;
let x;
assume x in X;
then [x,x] in R & [x,x] in [:X,X:] by A1,RELAT_2:def 1,ZFMISC_1:87;
then [x,x] in R|_2 X by XBOOLE_0:def 4;
hence thesis by RELAT_1:15;
end;
R|_2 X is_reflexive_in X
proof
let x;
assume x in X;
then [x,x] in R & [x,x] in [:X,X:] by A1,RELAT_2:def 1,ZFMISC_1:87;
hence thesis by XBOOLE_0:def 4;
end;
then R|_2 X well_orders X by A15,A6,A21,A9,WELLORD1:def 5;
hence thesis by A25,WELLORD1:4;
end;
Lm1: R is well-ordering & X,field R are_equipotent implies ex R st R
well_orders X
proof
assume
A1: R is well-ordering;
given f such that
A2: f is one-to-one and
A3: dom f = X and
A4: rng f = field R;
defpred P[set,set] means [f.$1,f.$2] in R;
consider Q being Relation such that
A5: [x,y] in Q iff x in X & y in X & P[x,y] from RELAT_1:sch 1;
take Q;
A6: R is_reflexive_in field R by A1,RELAT_2:def 9;
A7: field Q = X
proof
thus field Q c= X
proof
let x;
assume that
A8: x in field Q and
A9: not x in X;
for y holds not [y,x] in Q by A5,A9;
then
A10: not x in rng Q by XTUPLE_0:def 13;
for y holds not [x,y] in Q by A5,A9;
then not x in dom Q by XTUPLE_0:def 12;
hence contradiction by A8,A10,XBOOLE_0:def 3;
end;
let x;
assume
A11: x in X;
then f.x in rng f by A3,FUNCT_1:def 3;
then [f.x,f.x] in R by A6,A4,RELAT_2:def 1;
then [x,x] in Q by A5,A11;
hence thesis by RELAT_1:15;
end;
f is_isomorphism_of Q,R
proof
thus dom f = field Q & rng f = field R & f is one-to-one by A2,A3,A4,A7;
let x,y;
thus [x,y] in Q implies x in field Q & y in field Q & [f.x,f.y] in R by A5
,A7;
assume x in field Q & y in field Q & [f.x,f.y] in R;
hence thesis by A5,A7;
end;
then f" is_isomorphism_of R,Q by WELLORD1:39;
then Q is well-ordering by A1,WELLORD1:44;
hence thesis by A7,WELLORD1:4;
end;
theorem Th17:
for X ex R st R well_orders X
proof
deffunc F(set) = {$1};
defpred P[set] means $1 is Ordinal;
let X;
consider Class being set such that
A1: X in Class and
A2: Y in Class & Z c= Y implies Z in Class and
Y in Class implies bool Y in Class and
A3: Y c= Class implies Y,Class are_equipotent or Y in Class by ZFMISC_1:112;
consider ON being set such that
A4: x in ON iff x in Class & P[x] from XBOOLE_0:sch 1;
for Y st Y in ON holds Y is Ordinal & Y c= ON
proof
let Y;
assume
A5: Y in ON;
hence Y is Ordinal by A4;
reconsider A = Y as Ordinal by A4,A5;
let x;
assume
A6: x in Y;
then x in A;
then reconsider B = x as Ordinal;
A7: B c= A by A6,ORDINAL1:def 2;
A in Class by A4,A5;
then B in Class by A2,A7;
hence thesis by A4;
end;
then reconsider ON as Ordinal by ORDINAL1:19;
A8: ON c= Class
proof
let x;
thus thesis by A4;
end;
A9: ON,Class are_equipotent
proof
assume not thesis;
then ON in Class by A3,A8;
then ON in ON by A4;
hence contradiction;
end;
field RelIncl ON = ON by Def1;
then consider R such that
A10: R well_orders Class by A9,Lm1;
consider f such that
A11: dom f = X & for x st x in X holds f.x = F(x) from FUNCT_1:sch 3;
A12: rng f c= Class
proof
let x;
assume x in rng f;
then consider y such that
A13: y in dom f and
A14: x = f.y by FUNCT_1:def 3;
A15: { y } c= X
proof
let z;
assume z in { y };
hence thesis by A11,A13,TARSKI:def 1;
end;
f.y = { y } by A11,A13;
hence thesis by A1,A2,A14,A15;
end;
A16: X,rng f are_equipotent
proof
take f;
thus f is one-to-one
proof
let x,y;
assume that
A17: x in dom f & y in dom f and
A18: f.x = f.y;
f.x = { x } & f.y = { y } by A11,A17;
hence thesis by A18,ZFMISC_1:3;
end;
thus thesis by A11;
end;
set Q = R|_2 Class;
field Q = Class by A10,Th16;
then
A19: field(Q|_2 rng f) = rng f by A10,A12,Th16,WELLORD1:31;
Q is well-ordering by A10,Th16;
hence thesis by A16,A19,Lm1,WELLORD1:25;
end;
reserve M for non empty set;
theorem
(for X st X in M holds X <> {}) & (for X,Y st X in M & Y in M & X <> Y
holds X misses Y) implies ex Choice being set st for X st X in M ex x st Choice
/\ X = { x }
proof
assume that
A1: for X st X in M holds X <> {} and
A2: for X,Y st X in M & Y in M & X <> Y holds X misses Y;
consider R such that
A3: R well_orders union M by Th17;
A4: R is_reflexive_in union M by A3,WELLORD1:def 5;
A5: R is_connected_in union M by A3,WELLORD1:def 5;
defpred Ch[set,set] means $2 in $1 & for z st z in $1 holds [$2,z] in R;
A6: R is_antisymmetric_in union M by A3,WELLORD1:def 5;
A7: for x,y,z st x in M & Ch[x,y] & Ch[x,z] holds y = z
proof
let x,y,z such that
A8: x in M;
assume that
A9: y in x and
A10: for u st u in x holds [y,u] in R;
A11: y in union M by A8,A9,TARSKI:def 4;
assume that
A12: z in x and
A13: for u st u in x holds [z,u] in R;
A14: z in union M by A8,A12,TARSKI:def 4;
[y,z] in R & [z,y] in R by A9,A10,A12,A13;
hence thesis by A6,A11,A14,RELAT_2:def 4;
end;
A15: R is_well_founded_in union M by A3,WELLORD1:def 5;
A16: for x st x in M ex y st Ch[x,y]
proof
let x;
assume
A17: x in M;
then
A18: x c= union M by ZFMISC_1:74;
x <> {} by A1,A17;
then consider y such that
A19: y in x and
A20: R-Seg(y) misses x by A15,A18,WELLORD1:def 3;
take y;
thus y in x by A19;
let z;
assume
A21: z in x;
then
A22: not z in R-Seg(y) by A20,XBOOLE_0:3;
y <> z implies [y,z] in R or [z,y] in R by A5,A18,A19,A21,RELAT_2:def 6;
hence thesis by A4,A18,A21,A22,RELAT_2:def 1,WELLORD1:1;
end;
consider f such that
A23: dom f = M & for x st x in M holds Ch[x,f.x] from FUNCT_1:sch 2(A7,
A16 );
take Choice = rng f;
let X such that
A24: X in M;
take x = f.X;
thus Choice /\ X c= { x }
proof
let y;
assume
A25: y in Choice /\ X;
then
A26: y in X by XBOOLE_0:def 4;
y in Choice by A25,XBOOLE_0:def 4;
then consider z such that
A27: z in dom f and
A28: y = f.z by FUNCT_1:def 3;
assume not y in { x };
then X <> z by A28,TARSKI:def 1;
then X misses z by A2,A23,A24,A27;
then
A29: X /\ z = {} by XBOOLE_0:def 7;
f.z in z by A23,A27;
hence contradiction by A26,A28,A29,XBOOLE_0:def 4;
end;
let y;
assume y in { x };
then
A30: y = x by TARSKI:def 1;
then
A31: y in X by A24,A23;
y in Choice by A23,A24,A30,FUNCT_1:def 3;
hence thesis by A31,XBOOLE_0:def 4;
end;
begin
theorem
for X being set holds RelIncl X is_reflexive_in X
proof
let X be set;
RelIncl X is reflexive & field RelIncl X = X by Def1;
hence thesis by RELAT_2:def 9;
end;
theorem
for X being set holds RelIncl X is_transitive_in X
proof
let X be set;
RelIncl X is transitive & field RelIncl X = X by Def1;
hence thesis by RELAT_2:def 16;
end;
theorem
for X being set holds RelIncl X is_antisymmetric_in X
proof
let X be set;
RelIncl X is antisymmetric & field RelIncl X = X by Def1;
hence thesis by RELAT_2:def 12;
end;
registration
cluster RelIncl {} -> empty;
coherence
proof
for Y,Z being set st Y in {} & Z in {} holds [Y,Z] in {} iff Y c= Z;
hence thesis by Def1,RELAT_1:40;
end;
end;
registration
let X be non empty set;
cluster RelIncl X -> non empty;
coherence
proof
set a = the Element of X;
[a,a] in RelIncl X by Def1;
hence thesis;
end;
end;
theorem
RelIncl {x} = {[x,x]}
proof
A1: for Y,Z being set st Y in {x} & Z in {x} holds [Y,Z] in {[x,x]} iff Y c= Z
proof
let Y,Z be set;
assume that
A2: Y in {x} and
A3: Z in {x};
A4: Y = x by A2,TARSKI:def 1;
hence [Y,Z] in {[x,x]} implies Y c= Z by A3,TARSKI:def 1;
Z = x by A3,TARSKI:def 1;
hence thesis by A4,TARSKI:def 1;
end;
field {[x,x]} = {x} by RELAT_1:173;
hence thesis by A1,Def1;
end;
theorem
RelIncl X c= [:X,X:]
proof
set R = RelIncl X;
let a,b be set;
assume
A1: [a,b] in R;
then b in field R by RELAT_1:15;
then
A2: b in X by Def1;
a in field R by A1,RELAT_1:15;
then a in X by Def1;
hence thesis by A2,ZFMISC_1:87;
end;
begin
reserve P,Q,X,Y,Z,p,x,x9,x1,x2,y,z for set;
definition
let X,Y;
let R be Relation of X,Y;
attr R is quasi_total means
:Def1:
X = dom R if Y <> {} otherwise R = {};
consistency;
end;
registration
let X,Y;
cluster quasi_total for PartFunc of X,Y;
existence
proof
per cases;
suppose
A1: Y = {};
reconsider R = {} as PartFunc of X,Y by RELSET_1:12;
take R;
thus thesis by A1,Def1;
end;
suppose
A2: Y <> {};
then consider f being Function such that
A3: X = dom f and
A4: rng f c= Y by FUNCT_1:8;
reconsider R = f as PartFunc of X,Y by A3,A4,RELSET_1:4;
take R;
thus thesis by A2,A3,Def1;
end;
end;
end;
registration
let X,Y;
cluster total -> quasi_total for Relation of X,Y;
coherence
proof
let f be Relation of X,Y;
assume
A1: dom f = X;
per cases;
case Y <> {};
thus thesis by A1;
end;
case Y = {};
hence thesis;
end;
end;
end;
definition
let X,Y;
mode Function of X,Y is quasi_total PartFunc of X,Y;
end;
registration let X be empty set, Y be set;
cluster quasi_total -> total for Relation of X,Y;
coherence;
end;
registration let X be set, Y be non empty set;
cluster quasi_total -> total for Relation of X,Y;
coherence
proof let F be Relation of X,Y;
assume F is quasi_total;
hence X = dom F by Def1;
end;
end;
registration let X be set;
cluster quasi_total -> total for Relation of X,X;
coherence
proof
per cases;
suppose X = {};
hence thesis;
end;
suppose X <> {};
hence thesis;
end;
end;
end;
theorem
for f being Function holds f is Function of dom f, rng f
proof
let f be Function;
reconsider R = f as Relation of dom f, rng f by RELSET_1:4;
rng R <> {} or rng R = {};
hence thesis by Def1;
end;
theorem Th2:
for f being Function st rng f c= Y holds f is Function of dom f, Y
proof
let f be Function;
assume rng f c= Y;
then reconsider R = f as Relation of dom f,Y by RELSET_1:4;
Y = {} or Y <> {};
then R is quasi_total by Def1;
hence thesis;
end;
theorem
for f being Function st dom f = X & for x st x in X holds f.x in Y
holds f is Function of X,Y
proof
let f be Function such that
A1: dom f = X and
A2: for x st x in X holds f.x in Y;
rng f c= Y
proof
let y;
assume y in rng f;
then ex x st x in X & y = f.x by A1,FUNCT_1:def 3;
hence thesis by A2;
end;
then reconsider R = f as Relation of dom f,Y by RELSET_1:4;
Y = {} or Y <> {};
then R is quasi_total by Def1;
hence thesis by A1;
end;
theorem Th4:
for f being Function of X,Y st Y <> {} & x in X holds f.x in rng f
proof
let f be Function of X,Y;
assume Y <> {};
then dom f = X by Def1;
hence thesis by FUNCT_1:def 3;
end;
theorem Th5:
for f being Function of X,Y st Y <> {} & x in X holds f.x in Y
proof
let f be Function of X,Y;
assume Y <> {} & x in X;
then f.x in rng f by Th4;
hence thesis;
end;
theorem
for f being Function of X,Y st (Y = {} implies X = {}) & rng f c= Z
holds f is Function of X,Z
proof
let f be Function of X,Y;
assume Y <> {} or X = {};
then
A1: dom f = X by Def1;
assume
A2: rng f c= Z;
now
assume Z = {};
then rng f = {} by A2;
hence X = {} by A1,RELAT_1:42;
end;
hence thesis by A1,A2,Def1,RELSET_1:4;
end;
theorem
for f being Function of X,Y st (Y = {} implies X = {}) & Y c= Z holds
f is Function of X,Z by RELSET_1:7;
scheme
FuncEx1{X, Y() -> set, P[set,set]}: ex f being Function of X(),Y() st for x
st x in X() holds P[x,f.x]
provided
A1: for x st x in X() ex y st y in Y() & P[x,y]
proof
consider f being Function such that
A2: dom f = X() & rng f c= Y() and
A3: for x st x in X() holds P[x,f.x] from FUNCT_1:sch 5(A1);
reconsider f as Function of X(),Y() by A2,Th2;
take f;
thus thesis by A3;
end;
scheme
Lambda1{X, Y() -> set, F(set)->set}: ex f being Function of X(),Y() st for x
st x in X() holds f.x = F(x)
provided
A1: for x st x in X() holds F(x) in Y()
proof
defpred P[set,set] means $2 = F($1);
A2: for x st x in X() ex y st y in Y() & P[x,y] by A1;
thus ex f being Function of X(),Y() st for x st x in X() holds P[x,f.x] from
FuncEx1(A2);
end;
definition
let X,Y;
func Funcs(X,Y) -> set means
:Def2:
x in it iff ex f being Function st x = f & dom f = X & rng f c= Y;
existence
proof
defpred P[set] means ex f being Function st $1 = f & dom f = X & rng f c=
Y;
consider F being set such that
A1: z in F iff z in bool [:X,Y:] & P[z] from XBOOLE_0:sch 1;
take F;
let z;
thus z in F implies ex f being Function st z = f & dom f = X & rng f c= Y
by A1;
given f being Function such that
A2: z = f and
A3: dom f = X & rng f c= Y;
f c= [:X,Y:]
proof
let p;
assume
A4: p in f;
then consider x,y such that
A5: p = [x,y] by RELAT_1:def 1;
A6: x in dom f by A4,A5,XTUPLE_0:def 12;
then y = f.x by A4,A5,FUNCT_1:def 2;
then y in rng f by A6,FUNCT_1:def 3;
hence thesis by A3,A5,A6,ZFMISC_1:def 2;
end;
hence thesis by A1,A2,A3;
end;
uniqueness
proof
let F1,F2 be set such that
A7: x in F1 iff ex f being Function st x = f & dom f = X & rng f c= Y and
A8: x in F2 iff ex f being Function st x = f & dom f = X & rng f c= Y;
x in F1 iff x in F2
proof
x in F1 iff ex f being Function st x = f & dom f = X & rng f c= Y by A7;
hence thesis by A8;
end;
hence thesis by TARSKI:1;
end;
end;
theorem Th8:
for f being Function of X,Y st Y = {} implies X = {} holds f in Funcs(X,Y)
proof
let f be Function of X,Y;
assume Y = {} implies X = {};
then
A1: dom f = X by Def1;
rng f c= Y;
hence thesis by A1,Def2;
end;
theorem
for f being Function of X,X holds f in Funcs(X,X) by Th8;
registration
let X be set, Y be non empty set;
cluster Funcs(X,Y) -> non empty;
coherence by Th8;
end;
registration
let X be set;
cluster Funcs(X,X) -> non empty;
coherence by Th8;
end;
registration
let X be non empty set, Y be empty set;
cluster Funcs(X,Y) -> empty;
coherence
proof
assume Funcs(X,Y) is non empty;
then consider f being Function such that
the Element of Funcs(X,Y) = f and
A1: dom f = X and
A2: rng f c= {} by Def2;
rng f = {} by A2;
hence contradiction by A1,RELAT_1:42;
end;
end;
theorem
for f being Function of X,Y st for y st y in Y ex x st x in X & y = f.x
holds rng f = Y
proof
let f be Function of X,Y such that
A1: for y st y in Y ex x st x in X & y = f.x;
per cases;
suppose Y = {};
hence thesis;
end;
suppose A2: Y <> {};
y in rng f iff y in Y
proof
dom f = X by A2,Def1;
then y in rng f iff ex x st x in X & y = f.x by FUNCT_1:def 3;
hence thesis by A1;
end;
hence thesis by TARSKI:1;
end;
end;
theorem Th11:
for f being Function of X,Y st y in rng f ex x st x in X & f.x = y
proof
let f be Function of X,Y;
assume
A1: y in rng f;
then dom f = X by Def1;
hence thesis by A1,FUNCT_1:def 3;
end;
theorem Th12:
for f1,f2 being Function of X,Y st for x st x in X holds f1.x = f2.x
holds f1 = f2
proof
let f1,f2 be Function of X,Y;
per cases;
suppose Y = {};
hence thesis;
end;
suppose Y <> {};
then dom f1 = X & dom f2 = X by Def1;
hence thesis by FUNCT_1:2;
end;
end;
theorem Th13:
for f being quasi_total Relation of X,Y for g being quasi_total
Relation of Y,Z st Y = {} implies Z = {} or X = {} holds f*g is quasi_total
proof
let f be quasi_total Relation of X,Y;
let g be quasi_total Relation of Y,Z such that
A1: Y = {} implies Z = {} or X = {};
per cases;
case
A2: Z <> {};
then
A3: dom g = Y by Def1;
dom f = X & rng f c= Y by A1,A2,Def1;
hence thesis by A3,RELAT_1:27;
end;
case Z = {};
hence thesis;
end;
end;
theorem
for f being Function of X,Y for g being Function of Y,Z st Z <> {} &
rng f = Y & rng g = Z holds rng(g*f) = Z
proof
let f be Function of X,Y;
let g be Function of Y,Z;
assume Z <> {};
then dom g = Y by Def1;
hence thesis by RELAT_1:28;
end;
theorem Th15:
for f being Function of X,Y, g being Function st Y <> {} & x in
X holds (g*f).x = g.(f.x)
proof
let f be Function of X,Y, g be Function;
assume Y <> {};
then X = dom f by Def1;
hence thesis by FUNCT_1:13;
end;
theorem
for f being Function of X,Y st Y <> {} holds rng f = Y iff for Z st Z
<> {} for g,h being Function of Y,Z st g*f = h*f holds g = h
proof
let f be Function of X,Y;
assume
A1: Y <> {};
thus rng f = Y implies for Z st Z <> {} for g,h being Function of Y,Z st g*f
= h*f holds g = h
proof
assume
A2: rng f = Y;
let Z such that
A3: Z <> {};
let g,h be Function of Y,Z;
dom g = Y & dom h = Y by A3,Def1;
hence thesis by A2,FUNCT_1:86;
end;
assume
A4: for Z st Z <> {} for g,h being Function of Y,Z st g*f = h*f holds g = h;
for g,h being Function st dom g = Y & dom h = Y & g*f = h*f holds g = h
proof
let g,h be Function;
assume that
A5: dom g = Y and
A6: dom h = Y;
A7: rng g <> {} by A1,A5,RELAT_1:42;
A8: g is Function of Y,rng g \/ rng h by A5,Th2,XBOOLE_1:7;
h is Function of Y,rng g \/ rng h by A6,Th2,XBOOLE_1:7;
hence thesis by A4,A7,A8;
end;
hence thesis by FUNCT_1:16;
end;
theorem
for f being Relation of X,Y holds (id X)*f = f & f*(id Y) = f
proof
let f be Relation of X,Y;
dom f c= X;
hence (id X)*f = f by RELAT_1:51;
rng f c= Y;
hence thesis by RELAT_1:53;
end;
theorem
for f being Function of X,Y for g being Function of Y,X st f*g = id Y
holds rng f = Y
proof
let f be (Function of X,Y),g be Function of Y,X;
assume f*g = id Y;
then rng(f*g) = Y by RELAT_1:45;
then Y c= rng f by RELAT_1:26;
hence thesis by XBOOLE_0:def 10;
end;
theorem
for f being Function of X,Y st Y = {} implies X = {} holds f is
one-to-one iff for x1,x2 st x1 in X & x2 in X & f.x1 = f.x2 holds x1 = x2
proof
let f be Function of X,Y;
assume Y = {} implies X = {};
then dom f = X by Def1;
hence thesis by FUNCT_1:def 4;
end;
theorem
for f being Function of X,Y for g being Function of Y,Z st (Z = {}
implies Y = {}) & g*f is one-to-one holds f is one-to-one
proof
let f be Function of X,Y;
let g be Function of Y,Z;
assume Z <> {} or Y = {};
then
A1: Y = dom g by Def1;
rng f c= Y;
hence thesis by A1,FUNCT_1:25;
end;
theorem
for f being Function of X,Y st X <> {} & Y <> {} holds f is one-to-one
iff for Z for g,h being Function of Z,X st f*g = f*h holds g = h
proof
let f be Function of X,Y;
assume that
A1: X <> {} and
A2: Y <> {};
A3: dom f = X by A2,Def1;
thus f is one-to-one implies for Z for g,h being Function of Z,X st f*g = f*
h holds g = h
proof
assume
A4: f is one-to-one;
let Z;
let g,h be Function of Z,X;
A5: rng g c= X & rng h c= X;
dom g = Z & dom h = Z by A1,Def1;
hence thesis by A3,A4,A5,FUNCT_1:27;
end;
assume
A6: for Z for g,h being Function of Z,X st f*g = f*h holds g = h;
now
let g,h be Function;
assume rng g c= dom f & rng h c= dom f & dom g = dom h;
then g is Function of dom g,X & h is Function of dom g,X by A3,Th2;
hence f*g = f*h implies g = h by A6;
end;
hence thesis by FUNCT_1:27;
end;
theorem
for f being Function of X,Y for g being Function of Y,Z st Z <> {} &
rng(g*f) = Z & g is one-to-one holds rng f = Y
proof
let f be Function of X,Y;
let g be Function of Y,Z;
assume that
A1: Z <> {} and
A2: rng(g*f) = Z and
A3: g is one-to-one;
A4: dom g = Y by A1,Def1;
rng(g*f) c= rng g by RELAT_1:26;
then rng g = rng(g*f) by A2,XBOOLE_0:def 10;
then Y c= rng f by A3,A4,FUNCT_1:29;
hence thesis by XBOOLE_0:def 10;
end;
definition
let Y be set;
let f be Y-valued Relation;
attr f is onto means
:Def3:
rng f = Y;
end;
theorem
for f being Function of X,Y for g being Function of Y,X st g*f = id X
holds f is one-to-one & g is onto
proof
let f be Function of X,Y;
let g be Function of Y,X;
assume that
A1: g*f = id X;
thus f is one-to-one
proof
per cases;
suppose Y = {};
hence thesis;
end;
suppose Y <> {};
then dom f = X by Def1;
hence thesis by A1,FUNCT_1:31;
end;
end;
rng(g*f) = X by A1,RELAT_1:45;
then X c= rng g by RELAT_1:26;
hence rng g = X by XBOOLE_0:def 10;
end;
theorem
for f being Function of X,Y for g being Function of Y,Z st (Z = {}
implies Y = {}) & g*f is one-to-one & rng f = Y holds f is one-to-one & g is
one-to-one
proof
let f be Function of X,Y;
let g be Function of Y,Z;
assume Z <> {} or Y = {};
then Y = dom g by Def1;
hence thesis by FUNCT_1:26;
end;
theorem Th25:
for f being Function of X,Y st f is one-to-one & rng f = Y holds
f" is Function of Y,X
proof
let f be Function of X,Y;
assume that
A1: f is one-to-one and
A2: rng f = Y;
A3: rng(f") c= X
proof
let x;
assume x in rng(f");
then x in dom f by A1,FUNCT_1:33;
hence thesis;
end;
dom(f") = Y by A1,A2,FUNCT_1:33;
then reconsider R = f" as Relation of Y,X by A3,RELSET_1:4;
R is quasi_total
proof
per cases;
case X <> {};
thus thesis by A1,A2,FUNCT_1:33;
end;
case X = {};
then rng f = {};
then dom(f") = {} by A1,FUNCT_1:32;
hence thesis;
end;
end;
hence thesis;
end;
theorem
for f being Function of X,Y st Y <> {} & f is one-to-one & x in X
holds (f").(f.x) = x
proof
let f be Function of X,Y;
assume Y <> {};
then dom f = X by Def1;
hence thesis by FUNCT_1:34;
end;
theorem
for X be set, Y,Z be non empty set for f be Function of X,Y
for g be Function of Y,Z holds f is onto & g is onto implies g*f is onto
proof
let X be set, Y,Z be non empty set;
let f be Function of X,Y;
let g be Function of Y,Z;
assume that
A1: f is onto and
A2: g is onto;
rng f = Y by A1,Def3
.= dom g by Def1;
then rng(g*f) = rng g by RELAT_1:28
.= Z by A2,Def3;
hence thesis by Def3;
end;
theorem
for f being Function of X,Y for g being Function of Y,X st X <> {} & Y
<> {} & rng f = Y & f is one-to-one & for y,x holds y in Y & g.y = x iff x in X
& f.x = y holds g = f"
proof
let f be Function of X,Y;
let g be Function of Y,X;
assume X <> {} & Y <> {};
then dom f = X & dom g = Y by Def1;
hence thesis by FUNCT_1:32;
end;
theorem
for f being Function of X,Y st Y <> {} & rng f = Y & f is one-to-one
holds f"*f = id X & f*f" = id Y
proof
let f be Function of X,Y;
assume Y <> {};
then dom f = X by Def1;
hence thesis by FUNCT_1:39;
end;
theorem
for f being Function of X,Y for g being Function of Y,X st X <> {} & Y
<> {} & rng f = Y & g*f = id X & f is one-to-one holds g = f"
proof
let f be Function of X,Y;
let g be Function of Y,X;
assume X <> {} & Y <> {};
then dom f = X & dom g = Y by Def1;
hence thesis by FUNCT_1:41;
end;
theorem
for f being Function of X,Y st Y <> {} & ex g being Function of Y,X st
g*f = id X holds f is one-to-one
proof
let f be Function of X,Y;
assume Y <> {};
then
A1: dom f = X by Def1;
given g being Function of Y,X such that
A2: g*f = id X;
thus thesis by A2,A1,FUNCT_1:31;
end;
theorem Th32:
for f being Function of X,Y st (Y = {} implies X = {}) & Z c= X
holds f|Z is Function of Z,Y
proof
let f be Function of X,Y such that
A1: Y = {} implies X = {} and
A2: Z c= X;
dom f = X by A1,Def1;
then
A3: Z = dom(f|Z) by A2,RELAT_1:62;
rng(f|Z) c= Y;
then reconsider R = f|Z as Relation of Z,Y by A3,RELSET_1:4;
R is quasi_total
proof
per cases;
case Y <> {};
dom f = X by A1,Def1;
hence thesis by A2,RELAT_1:62;
end;
case Y = {};
hence thesis;
end;
end;
hence thesis;
end;
theorem
for f being Function of X,Y st X c= Z holds f|Z = f by RELSET_1:19;
theorem
for f being Function of X,Y st Y <> {} & x in X & f.x in Z holds (Z|`f)
.x = f.x
proof
let f be Function of X,Y;
assume that
A1: Y <> {} & x in X and
A2: f.x in Z;
x in dom f by A1,Def1;
then x in dom(Z|`f) by A2,FUNCT_1:54;
hence thesis by FUNCT_1:55;
end;
theorem
for f being Function of X,Y st Y <> {} for y holds (ex x st x in X & x
in P & y = f.x) implies y in f.:P
proof
let f be Function of X,Y;
assume Y <> {};
then
A1: dom f = X by Def1;
let y;
given x such that
A2: x in X & x in P & y = f.x;
thus thesis by A1,A2,FUNCT_1:def 6;
end;
theorem
for f being Function of X,Y holds f.:P c= Y;
canceled;
theorem
for f being Function of X,Y st Y <> {} for x holds x in f"Q iff x in X
& f.x in Q
proof
let f be Function of X,Y;
assume Y <> {};
then dom f = X by Def1;
hence thesis by FUNCT_1:def 7;
end;
theorem
for f being PartFunc of X,Y holds f"Q c= X;
theorem Th40:
for f being Function of X,Y st Y = {} implies X = {} holds f"Y = X
proof
let f be Function of X,Y;
rng f /\ Y = rng f by XBOOLE_1:28;
then
A1: f"Y = f"(rng f) by RELAT_1:133;
assume Y <> {} or X = {};
then dom f = X by Def1;
hence thesis by A1,RELAT_1:134;
end;
theorem
for f being Function of X,Y holds (for y st y in Y holds f"{y} <> {})
iff rng f = Y
proof
let f be Function of X,Y;
thus (for y st y in Y holds f"{y} <> {}) implies rng f = Y
proof
assume for y st y in Y holds f"{y} <> {};
then Y c= rng f by FUNCT_1:73;
hence thesis by XBOOLE_0:def 10;
end;
thus thesis by FUNCT_1:72;
end;
theorem Th42:
for f being Function of X,Y st (Y = {} implies X = {}) & P c= X
holds P c= f"(f.:P)
proof
let f be Function of X,Y;
assume Y <> {} or X = {};
then dom f = X by Def1;
hence thesis by FUNCT_1:76;
end;
theorem
for f being Function of X,Y st Y = {} implies X = {} holds f"(f.:X) = X
proof
let f be Function of X,Y;
assume Y <> {} or X = {};
then
A1: dom f = X by Def1;
then f"(rng f) = X by RELAT_1:134;
hence thesis by A1,RELAT_1:113;
end;
theorem
for f being Function of X,Y for g being Function of Y,Z st (Z = {}
implies Y = {}) holds f"Q c= (g*f)"(g.:Q)
proof
let f be Function of X,Y;
let g be Function of Y,Z;
assume Z <> {} or Y = {};
then
A1: dom g = Y by Def1;
rng f c= Y;
hence thesis by A1,FUNCT_1:90;
end;
theorem
for f being Function of {},Y holds f.:P = {};
theorem
for f being Function of {},Y holds f"Q = {};
theorem
for f being Function of {x},Y st Y <> {} holds f.x in Y
proof
let f be Function of {x},Y;
assume Y <> {};
then
A1: dom f = {x} by Def1;
rng f c= Y;
then {f.x} c= Y by A1,FUNCT_1:4;
hence thesis by ZFMISC_1:31;
end;
theorem Th48:
for f being Function of {x},Y st Y <> {} holds rng f = {f.x}
proof
let f be Function of {x},Y;
assume Y <> {};
then dom f = {x} by Def1;
hence thesis by FUNCT_1:4;
end;
theorem
for f being Function of {x},Y st Y <> {} holds f.:P c= {f.x}
proof
let f be Function of {x},Y;
f.:P c= rng f by RELAT_1:111;
hence thesis by Th48;
end;
theorem Th50:
for f being Function of X,{y} st x in X holds f.x = y
proof
let f be Function of X,{y};
x in X implies f.x in {y} by Th5;
hence thesis by TARSKI:def 1;
end;
theorem Th51:
for f1,f2 being Function of X,{y} holds f1 = f2
proof
let f1,f2 be Function of X,{y};
x in X implies f1.x = f2.x
proof
assume
A1: x in X;
then f1.x = y by Th50;
hence thesis by A1,Th50;
end;
hence thesis by Th12;
end;
theorem Th52:
for f being Function of X,X holds dom f = X
proof
X = {} implies X = {};
hence thesis by Def1;
end;
registration
let X,Y be set;
let f be quasi_total PartFunc of X,Y;
let g be quasi_total PartFunc of X,X;
cluster f*g -> quasi_total for PartFunc of X,Y;
coherence
proof
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A1: Y <> {};
then dom f = X by Def1;
then dom(f*g) = g"X by RELAT_1:147
.= dom g by RELSET_1:22
.= X by Th52;
hence thesis by A1,Def1;
end;
end;
end;
registration
let X,Y be set;
let f be quasi_total PartFunc of Y,Y;
let g be quasi_total PartFunc of X,Y;
cluster f*g -> quasi_total for PartFunc of X,Y;
coherence
proof
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A1: Y <> {};
dom f = Y by Th52;
then dom(f*g) = g"Y by RELAT_1:147
.= dom g by RELSET_1:22
.= X by A1,Def1;
hence thesis by A1,Def1;
end;
end;
end;
theorem Th53:
for f,g being Relation of X,X st rng f = X & rng g = X holds rng (g*f) = X
proof
let f,g be Relation of X,X;
assume that
A1: rng f = X and
A2: rng g = X;
thus rng(g*f) = f.:X by A2,RELAT_1:127
.= X by A1,RELSET_1:22;
end;
theorem
for f,g being Function of X,X st g*f = f & rng f = X holds g = id X
proof
let f,g be Function of X,X;
dom g = X by Th52;
hence thesis by FUNCT_1:23;
end;
theorem
for f,g being Function of X,X st f*g = f & f is one-to-one holds g = id X
proof
let f,g be Function of X,X;
A1: rng g c= X;
dom f = X & dom g = X by Th52;
hence thesis by A1,FUNCT_1:28;
end;
theorem Th56:
for f being Function of X,X holds f is one-to-one iff for x1,x2
st x1 in X & x2 in X & f.x1 = f.x2 holds x1 = x2
proof
let f be Function of X,X;
dom f = X by Th52;
hence thesis by FUNCT_1:def 4;
end;
definition
let X, Y;
let f be X-defined Y-valued Function;
attr f is bijective means
:Def4:
f is one-to-one onto;
end;
registration
let X, Y be set;
cluster bijective -> one-to-one onto for PartFunc of X,Y;
coherence by Def4;
cluster one-to-one onto -> bijective for PartFunc of X,Y;
coherence by Def4;
end;
registration
let X;
cluster bijective for Function of X,X;
existence
proof
take id X;
thus id X is one-to-one & rng id X = X;
end;
end;
definition
let X;
mode Permutation of X is bijective Function of X,X;
end;
theorem Th57:
for f being Function of X, X st f is one-to-one & rng f = X
holds f is Permutation of X
proof
let f be Function of X, X;
assume that
A1: f is one-to-one and
A2: rng f = X;
f is onto by A2,Def3;
hence thesis by A1;
end;
theorem
for f being Function of X,X st f is one-to-one holds for x1,x2 st x1
in X & x2 in X & f.x1 = f.x2 holds x1 = x2 by Th56;
registration
let X;
let f,g be onto PartFunc of X,X;
cluster f*g -> onto for PartFunc of X,X;
coherence
proof
rng f = X & rng g = X by Def3;
then rng(f*g) = X by Th53;
hence thesis by Def3;
end;
end;
registration
let X;
let f,g be bijective Function of X,X;
cluster g*f -> bijective for Function of X,X;
coherence;
end;
registration
let X;
cluster reflexive total -> bijective for Function of X,X;
coherence
proof
let f be Function of X,X;
assume
A1: f is reflexive total;
A3: field f = dom f \/ rng f by RELAT_1:def 6;
thus f is one-to-one
proof
let x1,x2 such that
A4: x1 in dom f and
A5: x2 in dom f and
A6: f.x1 = f.x2;
x1 in field f by A3,A4,XBOOLE_0:def 3;
then [x1,x1] in f by A1,RELAT_2:def 1,def 9;
then
A7: x1 = f.x1 by A4,FUNCT_1:def 2;
x2 in field f by A3,A5,XBOOLE_0:def 3;
then [x2,x2] in f by A1,RELAT_2:def 1,def 9;
hence thesis by A5,A6,A7,FUNCT_1:def 2;
end;
thus rng f c= X;
let x;
assume x in X;
then x in dom f by PARTFUN1:def 2;
then x in field f by A3,XBOOLE_0:def 3;
then [x,x] in f by A1,RELAT_2:def 1,def 9;
hence thesis by XTUPLE_0:def 13;
end;
end;
definition
let X;
let f be Permutation of X;
redefine func f" -> Permutation of X;
coherence
proof
dom f = X by Th52;
then
A1: rng(f") = X by FUNCT_1:33;
rng f = X by Def3;
then f" is Function of X,X by Th25;
hence thesis by A1,Th57;
end;
end;
theorem
for f,g being Permutation of X st g*f = g holds f = id X
proof
let f,g be Permutation of X;
A1: rng f c= X;
dom f = X & dom g = X by Th52;
hence thesis by A1,FUNCT_1:28;
end;
theorem
for f,g being Permutation of X st g*f = id X holds g = f"
proof
let f,g be Permutation of X;
A1: dom f = X by Th52;
rng f= X & dom g = X by Def3,Th52;
hence thesis by A1,FUNCT_1:41;
end;
theorem
for f being Permutation of X holds (f")*f =id X & f*(f") = id X
proof
let f be Permutation of X;
dom f = X & rng f = X by Def3,Th52;
hence thesis by FUNCT_1:39;
end;
theorem Th62:
for f being Permutation of X st P c= X holds f.:(f"P) = P & f"(f .:P) = P
proof
let f be Permutation of X such that
A1: P c= X;
dom f = X by Th52;
then
A2: P c= f"(f.:P) by A1,FUNCT_1:76;
f"(f.:P) c= P & rng f = X by Def3,FUNCT_1:82;
hence thesis by A1,A2,FUNCT_1:77,XBOOLE_0:def 10;
end;
reserve D for non empty set;
registration
let X,D,Z;
let f be Function of X,D;
let g be Function of D,Z;
cluster g*f -> quasi_total for PartFunc of X,Z;
coherence by Th13;
end;
definition
let C be non empty set, D be set;
let f be Function of C,D;
let c be Element of C;
redefine func f.c -> Element of D;
coherence
proof
D is non empty or D is empty;
hence thesis by Th5,SUBSET_1:def 1;
end;
end;
scheme
FuncExD{C, D() -> non empty set, P[set,set]}: ex f being Function of C(),D()
st for x being Element of C() holds P[x,f.x]
provided
A1: for x being Element of C() ex y being Element of D() st P[x,y]
proof
defpred R[set,set] means $1 in C() & $2 in D() & P[ $1,$2];
A2: for x being set st x in C() ex y being set st y in D() & R[x,y]
proof
let x be set;
assume
A3: x in C();
then ex y being Element of D() st P[x,y] by A1;
hence thesis by A3;
end;
consider f being Function of C(),D() such that
A4: for x being set st x in C() holds R[x,f.x] from FuncEx1(A2);
take f;
let x be Element of C();
thus thesis by A4;
end;
scheme
LambdaD{C, D() -> non empty set, F(Element of C()) -> Element of D()}: ex f
being Function of C(),D() st for x being Element of C() holds f.x = F(x) proof
defpred P[Element of C(),set] means $2 = F($1);
A1: for x being Element of C() ex y being Element of D() st P[x,y];
thus ex f being Function of C(),D() st for x being Element of C() holds P[x,
f.x] from FuncExD(A1);
end;
theorem Th63:
for f1,f2 being Function of X,Y st for x being Element of X
holds f1.x = f2.x holds f1 = f2
proof
let f1,f2 be Function of X,Y;
assume for x being Element of X holds f1.x = f2.x;
then for x st x in X holds f1.x = f2.x;
hence thesis by Th12;
end;
theorem Th64:
for P being set for f being Function of X,Y for y holds y in f
.:P implies ex x st x in X & x in P & y = f.x
proof
let P be set;
let f be Function of X,Y;
let y;
assume y in f.:P;
then consider x such that
A1: x in dom f and
A2: x in P & y = f.x by FUNCT_1:def 6;
take x;
thus x in X by A1;
thus thesis by A2;
end;
theorem
for f being Function of X,Y for y st y in f.:P ex c being Element of X
st c in P & y = f.c
proof
let f be Function of X,Y;
let y;
assume y in f.:P;
then consider x such that
A1: x in X and
A2: x in P & y = f.x by Th64;
reconsider c = x as Element of X by A1;
take c;
thus thesis by A2;
end;
begin
theorem Th66:
for f being set st f in Funcs(X,Y) holds f is Function of X,Y
proof
let f be set;
assume f in Funcs(X,Y);
then
( not(Y = {} & X <> {}))& ex f9 being Function st f9 = f & dom f9 = X &
rng f9 c= Y by Def2;
hence thesis by Def1,RELSET_1:4;
end;
scheme
Lambda1C{A, B() -> set, C[set], F(set)->set, G(set)->set}: ex f being
Function of A(),B() st for x st x in A() holds (C[ x] implies f.x = F(x)) & (
not C[ x] implies f.x = G(x))
provided
A1: for x st x in A() holds (C[ x] implies F(x) in B()) & (not C[ x]
implies G(x) in B())
proof
A2: now
set x = the Element of A();
assume
A3: B() = {};
assume
A4: A() <> {};
then C[ x] implies F(x) in B() by A1;
hence contradiction by A1,A3,A4;
end;
consider f being Function such that
A5: dom f = A() and
A6: for x st x in A() holds (C[ x] implies f.x = F(x)) & (not C[ x]
implies f.x = G(x)) from PARTFUN1:sch 1;
rng f c= B()
proof
let y;
assume y in rng f;
then consider x such that
A7: x in dom f and
A8: y = f.x by FUNCT_1:def 3;
A9: not C[ x] implies f.x = G(x) by A5,A6,A7;
C[ x] implies f.x = F(x) by A5,A6,A7;
hence thesis by A1,A5,A7,A8,A9;
end;
then f is Function of A(),B() by A5,A2,Def1,RELSET_1:4;
hence thesis by A6;
end;
theorem
for f being PartFunc of X,Y st dom f = X holds f is Function of X,Y
proof
let f be PartFunc of X,Y;
rng f c= Y;
hence thesis by Th2;
end;
theorem
for f being PartFunc of X,Y st f is total holds f is Function of X,Y;
theorem
for f being PartFunc of X,Y st (Y = {} implies X = {}) & f is Function
of X,Y holds f is total;
theorem
for f being Function of X,Y st (Y = {} implies X = {}) holds
<:f,X,Y:> is total;
registration
let X; let f be Function of X,X;
cluster <:f,X,X:> -> total;
coherence;
end;
theorem Th71:
for f being PartFunc of X,Y st Y = {} implies X = {} ex g being
Function of X,Y st for x st x in dom f holds g.x = f.x
proof
let f be PartFunc of X,Y such that
A1: Y = {} implies X = {};
per cases;
suppose Y = {};
then reconsider g = f as Function of X,Y by A1;
take g;
thus thesis;
end;
suppose
A2: Y <> {};
deffunc F(set) = f.$1;
defpred P[set] means $1 in dom f;
set y = the Element of Y;
deffunc G(set) = y;
A3: for x st x in X holds (P[ x] implies F(x) in Y) & (not P[ x] implies G
(x) in Y) by A2,PARTFUN1:4;
consider g being Function of X,Y such that
A4: for x st x in X holds (P[ x] implies g.x = F(x)) & (not P[ x]
implies g.x = G(x)) from Lambda1C(A3);
take g;
thus thesis by A4;
end;
end;
theorem
Funcs(X,Y) c= PFuncs(X,Y)
proof
let x;
assume x in Funcs(X,Y);
then ex f being Function st x = f & dom f = X & rng f c= Y by Def2;
hence thesis by PARTFUN1:def 3;
end;
theorem
for f,g being Function of X,Y st (Y = {} implies X = {}) & f
tolerates g holds f = g by PARTFUN1:66;
theorem
for f,g being Function of X,X st f tolerates g holds f = g by PARTFUN1:66;
theorem Th75:
for f being PartFunc of X,Y for g being Function of X,Y st Y =
{} implies X = {} holds f tolerates g iff for x st x in dom f holds f.x = g.x
proof
let f be PartFunc of X,Y;
let g be Function of X,Y;
assume Y = {} implies X = {};
then dom g = X by Def1;
hence thesis by PARTFUN1:53;
end;
theorem
for f being PartFunc of X,X for g being Function of X,X holds f
tolerates g iff for x st x in dom f holds f.x = g.x
proof
let f be PartFunc of X,X;
let g be Function of X,X;
X = {} implies X = {};
hence thesis by Th75;
end;
theorem Th77:
for f being PartFunc of X,Y st Y = {} implies X = {} ex g being
Function of X,Y st f tolerates g
proof
let f be PartFunc of X,Y;
assume
A1: Y = {} implies X = {};
then consider g being Function of X,Y such that
A2: for x st x in dom f holds g.x = f.x by Th71;
take g;
thus thesis by A1,A2,Th75;
end;
theorem
for f,g being PartFunc of X,X for h being Function of X,X st f
tolerates h & g tolerates h holds f tolerates g by PARTFUN1:67;
theorem
for f,g being PartFunc of X,Y st (Y = {} implies X = {}) & f tolerates
g ex h being Function of X,Y st f tolerates h & g tolerates h
proof
let f,g be PartFunc of X,Y;
assume ( Y = {} implies X = {})& f tolerates g;
then
ex h being PartFunc of X,Y st h is total & f tolerates h & g tolerates h
by PARTFUN1:68;
hence thesis;
end;
theorem
for f being PartFunc of X,Y for g being Function of X,Y st (Y =
{} implies X = {}) & f tolerates g holds g in TotFuncs f by PARTFUN1:def 5;
theorem
for f being PartFunc of X,X for g being Function of X,X st f tolerates
g holds g in TotFuncs f by PARTFUN1:def 5;
theorem Th82:
for f being PartFunc of X,Y for g being set st g in TotFuncs(f)
holds g is Function of X,Y
proof
let f be PartFunc of X,Y;
let g be set;
assume g in TotFuncs(f);
then
ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by
PARTFUN1:def 5;
hence thesis;
end;
theorem
for f being PartFunc of X,Y holds TotFuncs f c= Funcs(X,Y)
proof
let f be PartFunc of X,Y;
per cases;
suppose Y = {} & X <> {};
hence thesis;
end;
suppose
A1: Y <> {} or X = {};
let g be set;
assume g in TotFuncs f;
then g is Function of X,Y by Th82;
hence thesis by A1,Th8;
end;
end;
theorem
TotFuncs <:{},X,Y:> = Funcs(X,Y)
proof
per cases;
suppose
A1: Y = {} & X <> {};
then TotFuncs <:{},X,Y:> = {};
hence thesis by A1;
end;
suppose
A2: Y = {} implies X = {};
for g being set holds g in TotFuncs <:{},X,Y:> iff g in Funcs(X,Y)
proof
let g be set;
thus g in TotFuncs <:{},X,Y:> implies g in Funcs(X,Y)
proof
assume g in TotFuncs <:{},X,Y:>;
then g is Function of X,Y by Th82;
hence thesis by A2,Th8;
end;
assume
A3: g in Funcs(X,Y);
then reconsider g9 = g as PartFunc of X,Y by Th66;
A4: <:{},X,Y:> tolerates g9 by PARTFUN1:60;
g is Function of X,Y by A3,Th66;
hence thesis by A2,A4,PARTFUN1:def 5;
end;
hence thesis by TARSKI:1;
end;
end;
theorem
for f being Function of X,Y st Y = {} implies X = {} holds
TotFuncs <:f,X,Y:> = {f} by PARTFUN1:72;
theorem
for f being Function of X,X holds TotFuncs <:f,X,X:> = {f} by PARTFUN1:72;
theorem
for f being PartFunc of X,{y} for g being Function of X,{y} holds
TotFuncs f = {g}
proof
let f be PartFunc of X,{y};
let g be Function of X,{y};
for h being set holds h in TotFuncs f iff h = g
proof
let h be set;
thus h in TotFuncs f implies h = g
proof
assume h in TotFuncs f;
then h is Function of X,{y} by Th82;
hence thesis by Th51;
end;
f tolerates g by PARTFUN1:61;
hence thesis by PARTFUN1:def 5;
end;
hence thesis by TARSKI:def 1;
end;
theorem
for f,g being PartFunc of X,Y st g c= f holds TotFuncs f c= TotFuncs g
proof
let f,g be PartFunc of X,Y such that
A1: g c= f;
let h be set;
assume
A2: h in TotFuncs f;
then reconsider h9=h as PartFunc of X,Y by PARTFUN1:69;
A3: h9 is total by A2,PARTFUN1:70;
g tolerates h9 by A1,A2,PARTFUN1:58,71;
hence thesis by A3,PARTFUN1:def 5;
end;
theorem Th89:
for f,g being PartFunc of X,Y st dom g c= dom f & TotFuncs f c=
TotFuncs g holds g c= f
proof
let f,g be PartFunc of X,Y such that
A1: dom g c= dom f;
now
per cases;
suppose Y = {} & X <> {};
hence thesis;
end;
suppose
A2: Y = {} implies X = {};
thus TotFuncs f c= TotFuncs g implies g c= f
proof
assume
A3: TotFuncs f c= TotFuncs g;
for x st x in dom g holds g.x = f.x
proof
let x;
consider h being Function of X,Y such that
A4: f tolerates h by A2,Th77;
h in TotFuncs f by A2,A4,PARTFUN1:def 5;
then
B5: g tolerates h by A3,PARTFUN1:71;
assume x in dom g;
then x in dom f /\ dom g by A1,XBOOLE_0:def 4;
hence thesis by B5,PARTFUN1:def 4,A2,A4,PARTFUN1:67;
end;
hence thesis by A1,GRFUNC_1:2;
end;
end;
end;
hence thesis;
end;
theorem Th90:
for f,g being PartFunc of X,Y st TotFuncs f c= TotFuncs g & (
for y holds Y <> {y}) holds g c= f
proof
let f,g be PartFunc of X,Y such that
A1: TotFuncs f c= TotFuncs g and
A2: for y holds Y <> {y};
now
per cases;
suppose Y = {};
hence dom g c= dom f;
end;
suppose
A3: Y <> {};
thus dom g c= dom f
proof
deffunc F(set) = f.$1;
defpred P[set] means $1 in dom f;
let x such that
A4: x in dom g and
A5: not x in dom f;
A6: Y <> {g.x} by A2;
g.x in Y by A4,PARTFUN1:4;
then consider y such that
A7: y in Y and
A8: y <> g.x by A6,ZFMISC_1:35;
deffunc G(set) = y;
A9: for x9 st x9 in X holds (P[ x9] implies F(x9) in Y) & (not P[ x9]
implies G(x9) in Y) by A7,PARTFUN1:4;
consider h being Function of X,Y such that
A10: for x9 st x9 in X holds (P[ x9] implies h.x9 = F(x9)) & (not
P[ x9] implies h.x9 = G(x9)) from Lambda1C(A9);
f tolerates h
proof
let x9;
assume x9 in dom f /\ dom h;
then x9 in dom f by XBOOLE_0:def 4;
hence thesis by A10;
end;
then
B11: h in TotFuncs f by A3,PARTFUN1:def 5;
x in X by A4;
then x in dom h by A3,Def1;
then
A12: x in dom g /\ dom h by A4,XBOOLE_0:def 4;
h.x = y by A4,A5,A10;
hence contradiction by A8,B11,A12,PARTFUN1:def 4,A1,PARTFUN1:71;
end;
end;
end;
hence thesis by A1,Th89;
end;
theorem
for f,g being PartFunc of X,Y st (for y holds Y <> {y}) & TotFuncs f =
TotFuncs g holds f = g
proof
let f,g be PartFunc of X,Y;
assume
A1: for y holds Y <> {y};
assume TotFuncs f = TotFuncs g;
then g c= f & f c= g by A1,Th90;
hence thesis by XBOOLE_0:def 10;
end;
registration
let A,B be non empty set;
cluster -> non empty for Function of A,B;
coherence by Def1,RELAT_1:38;
end;
begin
scheme
LambdaSep1{D, R() -> non empty set, A() -> Element of D(), B() -> Element of
R(), F(set) -> Element of R()}: ex f being Function of D(),R() st f.A() = B() &
for x being Element of D() st x <> A() holds f.x = F(x) proof
defpred P[set,set] means ($1 = A() implies $2 = B()) & ($1 <> A() implies $2
= F($1));
A1: for x being Element of D() ex y being Element of R() st P[x,y]
proof
let x be Element of D();
x = A() implies thesis;
hence thesis;
end;
consider f being Function of D(),R() such that
A2: for x being Element of D() holds P[x,f.x] from FuncExD(A1);
take f;
thus thesis by A2;
end;
scheme
LambdaSep2{D, R() -> non empty set, A1, A2() -> Element of D(), B1, B2() ->
Element of R(), F(set) -> Element of R()}: ex f being Function of D(),R() st f.
A1() = B1() & f.A2() = B2() & for x being Element of D() st x <> A1() & x <> A2
() holds f.x = F(x)
provided
A1: A1() <> A2()
proof
defpred P[set,set] means ($1 = A1() implies $2 = B1()) & ($1 = A2() implies
$2 = B2()) & ($1 <> A1() & $1 <> A2() implies $2 = F($1));
A2: for x being Element of D() ex y being Element of R() st P[x,y]
proof
let x be Element of D();
A3: x = A2() implies thesis by A1;
x = A1() implies thesis by A1;
hence thesis by A3;
end;
consider f being Function of D(),R() such that
A4: for x being Element of D() holds P[x,f.x] from FuncExD(A2);
take f;
thus thesis by A4;
end;
theorem
for A,B being set for f being Function st f in Funcs(A,B) holds dom f
= A & rng f c= B
proof
let A,B be set;
let f be Function;
assume f in Funcs(A,B);
then ex g being Function st f = g & dom g = A & rng g c= B by Def2;
hence thesis;
end;
scheme
FunctRealEx{X()->non empty set,Y()->set,F(set)->set}: ex f being Function of
X(),Y() st for x being Element of X() holds f.x = F(x)
provided
A1: for x being Element of X() holds F(x) in Y()
proof
defpred P[set,set] means $2 = F($1);
A2: for x being set st x in X() ex y being set st y in Y() & P[x,y] by A1;
ex f being Function of X(),Y() st for x being set st x in X() holds P[x,
f.x] from FuncEx1(A2);
then consider f being Function of X(),Y() such that
A3: for x being set st x in X() holds f.x = F(x);
for x being Element of X() holds f.x = F (x) by A3;
hence thesis;
end;
scheme
KappaMD{X, Y() -> non empty set, F(set) -> set}: ex f being Function of X(),
Y() st for x being Element of X() holds f.x = F(x)
provided
A1: for x being Element of X() holds F(x) is Element of Y()
proof
A2: now
let x be Element of X();
F(x) is Element of Y() by A1;
hence F(x) in Y();
end;
consider f being Function of X(), Y() such that
A3: for x being Element of X() holds f.x = F(x) from FunctRealEx(A2);
take f;
thus thesis by A3;
end;
definition
let A,B,C be non empty set;
let f be Function of A, [:B,C:];
redefine func pr1 f -> Function of A,B means
:Def5:
for x being Element of A holds it.x = (f.x)`1;
coherence
proof
A1: dom pr1 f = dom f by MCART_1:def 12;
A2: rng pr1 f c= B
proof
let x be set;
assume x in rng pr1 f;
then consider y being set such that
A3: y in dom pr1 f & x = (pr1 f).y by FUNCT_1:def 3;
x = (f.y)`1 & f.y in [:B,C:] by A1,A3,Th5,MCART_1:def 12;
hence thesis by MCART_1:10;
end;
dom pr1 f = A by A1,Def1;
hence thesis by A2,Th2;
end;
compatibility
proof
let IT be Function of A,B;
A4: dom pr1 f = dom f by MCART_1:def 12;
then
A5: dom pr1 f = A by Def1;
hence IT = pr1 f implies for x being Element of A holds IT.x = (f.x)`1 by
A4,MCART_1:def 12;
assume for x being Element of A holds IT.x = (f.x)`1;
then
A6: for x being set st x in dom f holds IT.x = (f.x)`1;
dom IT = dom f by A4,A5,Def1;
hence thesis by A6,MCART_1:def 12;
end;
redefine func pr2 f -> Function of A,C means
:Def6:
for x being Element of A holds it .x = (f.x)`2;
coherence
proof
A7: dom pr2 f = dom f by MCART_1:def 13;
A8: rng pr2 f c= C
proof
let x be set;
assume x in rng pr2 f;
then consider y being set such that
A9: y in dom pr2 f & x = (pr2 f).y by FUNCT_1:def 3;
x = (f.y)`2 & f.y in [:B,C:] by A7,A9,Th5,MCART_1:def 13;
hence thesis by MCART_1:10;
end;
dom pr2 f = A by A7,Def1;
hence thesis by A8,Th2;
end;
compatibility
proof
let IT be Function of A,C;
A10: dom pr2 f = dom f by MCART_1:def 13;
then
A11: dom pr2 f = A by Def1;
hence IT = pr2 f implies for x being Element of A holds IT.x = (f.x)`2 by
A10,MCART_1:def 13;
assume for x being Element of A holds IT.x = (f.x)`2;
then
A12: for x being set st x in dom f holds IT.x = (f.x)`2;
dom IT = dom f by A10,A11,Def1;
hence thesis by A12,MCART_1:def 13;
end;
end;
definition
let A1 be set, B1 be non empty set, A2 be set, B2 be non empty set, f1 be
Function of A1,B1, f2 be Function of A2,B2;
redefine pred f1 = f2 means
A1 = A2 & for a being Element of A1 holds f1.a = f2.a;
compatibility
proof
A1: dom f1 = A1 by Def1;
hence
f1 = f2 implies A1 = A2 & for a being Element of A1 holds f1.a = f2.a
by Def1;
assume that
A2: A1 = A2 and
A3: for a being Element of A1 holds f1.a = f2.a;
A4: dom f2 = A2 by Def1;
for a being set st a in A1 holds f1.a = f2.a by A3;
hence thesis by A1,A4,A2,FUNCT_1:2;
end;
end;
definition
let A,B be set, f1,f2 be Function of A,B;
redefine pred f1 = f2 means
for a being Element of A holds f1.a = f2.a;
compatibility by Th63;
end;
theorem
for N being set, f being Function of N, bool N ex R being Relation of
N st for i being set st i in N holds Im(R,i) = f.i
proof
let N be set, f be Function of N, bool N;
deffunc F(set) = f.$1;
A1: for i being Element of N st i in [#]N holds F(i) c= [#]N
proof
let i be Element of N;
assume i in [#]N;
then f.i in bool N by Th5;
hence thesis;
end;
consider R being Relation of [#]N such that
A2: for i being Element of N st i in [#]N holds Im(R,i) = F(i) from
RELSET_1:sch 3(A1);
reconsider R as Relation of N;
take R;
thus thesis by A2;
end;
theorem Th94:
for A being Subset of X holds (id X)"A = A
proof
let A be Subset of X;
thus A = (id X)"((id X).:A) by Th62
.= (id X)"A by FUNCT_1:92;
end;
reserve A,B for non empty set;
theorem
for f being Function of A,B, A0 being Subset of A, B0 being Subset of
B holds f.:A0 c= B0 iff A0 c= f"B0
proof
let f be Function of A,B, A0 be Subset of A, B0 be Subset of B;
thus f.:A0 c= B0 implies A0 c= f"B0
proof
assume f.:A0 c= B0;
then
A1: f"(f.:A0) c= f"B0 by RELAT_1:143;
A0 c= f"(f.:A0) by Th42;
hence thesis by A1,XBOOLE_1:1;
end;
thus A0 c= f"B0 implies f.:A0 c= B0
proof
assume A0 c= f"B0;
then
A2: f.:A0 c= f.:f"B0 by RELAT_1:123;
f.:f"B0 c= B0 by FUNCT_1:75;
hence thesis by A2,XBOOLE_1:1;
end;
end;
theorem
for f being Function of A,B, A0 being non empty Subset of A, f0 being
Function of A0,B st for c being Element of A st c in A0 holds f.c = f0.c holds
f|A0 = f0
proof
let f be Function of A,B, A0 be non empty Subset of A, f0 be Function of A0,
B such that
A1: for c being Element of A st c in A0 holds f.c = f0.c;
reconsider g = f|A0 as Function of A0,B by Th32;
for c being Element of A0 holds g.c = f0.c
proof
let c be Element of A0;
thus g.c = f.c by FUNCT_1:49
.= f0.c by A1;
end;
hence thesis by Th63;
end;
theorem
for f being Function, A0, C being set st C c= A0 holds f.:C = (f|A0).: C
proof
let f be Function, A0, C be set;
assume
A1: C c= A0;
thus (f|A0).:C = (f*(id A0)).:C by RELAT_1:65
.= f.:((id A0).:C) by RELAT_1:126
.= f.:C by A1,FUNCT_1:92;
end;
theorem
for f being Function, A0, D being set st f"D c= A0 holds f"D = (f|A0)" D
proof
let f be Function, A0, D be set;
assume
A1: f"D c= A0;
thus (f|A0)"D = (f*(id A0))"D by RELAT_1:65
.= (id A0)"(f"D) by RELAT_1:146
.= f"D by A1,Th94;
end;
scheme
MChoice{A()-> non empty set, B()-> non empty set, F(set) -> set}: ex t being
Function of A(),B() st for a being Element of A() holds t.a in F(a)
provided
A1: for a being Element of A() holds B() meets F(a)
proof
defpred P[set,set] means $2 in F($1);
A2: for e being set st e in A() ex u being set st u in B() & P[e,u]
by A1,XBOOLE_0:3;
consider t being Function such that
A3: dom t = A() & rng t c= B() and
A4: for e being set st e in A() holds P[e,t.e] from FUNCT_1:sch 5(A2);
reconsider t as Function of A(),B() by A3,Def1,RELSET_1:4;
take t;
let a be Element of A();
thus thesis by A4;
end;
theorem Th99:
for X, D be non empty set, p be Function of X,D, i be Element
of X holds p/.i = p.i
proof
let X, D be non empty set, p be Function of X,D, i be Element of X;
i in X;
then i in dom p by Def1;
hence thesis by PARTFUN1:def 6;
end;
registration
let X, D be non empty set, p be Function of X,D, i be Element of X;
identify p/.i with p.i;
correctness by Th99;
end;
theorem
for S,X being set, f being Function of S,X, A being Subset of X st X =
{} implies S = {} holds (f"A)` = f"(A`)
proof
let S,X be set, f be Function of S,X, A be Subset of X such that
A1: X = {} implies S = {};
A /\ A` = {} by XBOOLE_0:def 7,XBOOLE_1:79;
then f"A /\ f"(A`) = f"({}X) by FUNCT_1:68
.= {};
then
A2: f"A misses f"(A`) by XBOOLE_0:def 7;
f"A \/ f"(A`) = f"(A \/ A`) by RELAT_1:140
.= f"[#]X by SUBSET_1:10
.= [#]S by A1,Th40;
then (f"A)` /\ (f"(A`))` = ([#]S)` by XBOOLE_1:53
.= {}S by XBOOLE_1:37;
then (f"A)` misses (f"(A`))` by XBOOLE_0:def 7;
hence thesis by A2,SUBSET_1:25;
end;
theorem
for X,Y,Z being set, D being non empty set, f being Function of X,D st
Y c= X & f.:Y c= Z holds f|Y is Function of Y,Z
proof
let X,Y,Z be set, D be non empty set, f be Function of X,D;
assume that
A1: Y c= X and
A2: f.:Y c= Z;
dom f = X by Def1;
then
A3: dom(f|Y) = Y by A1,RELAT_1:62;
A4: now
assume Z = {};
then rng(f|Y) = {} by A2,RELAT_1:115;
hence Y = {} by A3,RELAT_1:42;
end;
rng(f|Y) c= Z by A2,RELAT_1:115;
hence thesis by A3,A4,Def1,RELSET_1:4;
end;
definition
let T,S be non empty set;
let f be Function of T,S;
let G be Subset-Family of S;
func f"G -> Subset-Family of T means
:Def9:
for A being Subset of T holds A
in it iff ex B being Subset of S st B in G & A = f"B;
existence
proof
defpred P[Subset of T] means ex B being Subset of S st B in G & $1 = f"B;
ex R being Subset-Family of T st for A being Subset of T holds A in R
iff P[A] from SUBSET_1:sch 3;
hence thesis;
end;
uniqueness
proof
let R1,R2 be Subset-Family of T such that
A1: for A being Subset of T holds A in R1 iff ex B being Subset of S
st B in G & A = f"B and
A2: for A being Subset of T holds A in R2 iff ex B being Subset of S
st B in G & A = f"B;
for x being set holds (x in R1 iff x in R2)
proof
let x be set;
thus x in R1 implies x in R2
proof
assume
A3: x in R1;
then reconsider x as Subset of T;
ex B being Subset of S st B in G & x = f"B by A1,A3;
hence thesis by A2;
end;
assume
A4: x in R2;
then reconsider x as Subset of T;
ex B being Subset of S st B in G & x = f"B by A2,A4;
hence thesis by A1;
end;
hence thesis by TARSKI:1;
end;
end;
theorem
for T,S being non empty set, f being Function of T,S, A,B being
Subset-Family of S st A c= B holds f"A c= f"B
proof
let T,S be non empty set;
let f be Function of T,S;
let A,B be Subset-Family of S;
assume
A1: A c= B;
let x be set;
assume
A2: x in f"A;
then reconsider x as Subset of T;
ex C being Subset of S st C in B & x = f"C
proof
consider C being Subset of S such that
A3: C in A & x = f"C by A2,Def9;
take C;
thus thesis by A1,A3;
end;
hence thesis by Def9;
end;
definition
let T,S be non empty set;
let f be Function of T,S;
let G be Subset-Family of T;
func f.:G -> Subset-Family of S means
:Def10:
for A being Subset of S holds
A in it iff ex B being Subset of T st B in G & A = f.:B;
existence
proof
thus ex R being Subset-Family of S st for A being Subset of S holds A in R
iff ex B being Subset of T st B in G & A = f.:B
proof
defpred P[Subset of S] means ex B being Subset of T st B in G & $1 = f.:
B;
ex R being Subset-Family of S st for A being Subset of S holds A in
R iff P[A] from SUBSET_1:sch 3;
hence thesis;
end;
end;
uniqueness
proof
let R1,R2 be Subset-Family of S such that
A1: for A being Subset of S holds A in R1 iff ex B being Subset of T
st B in G & A = f.:B and
A2: for A being Subset of S holds A in R2 iff ex B being Subset of T
st B in G & A = f.:B;
for x being set holds (x in R1 iff x in R2)
proof
let x be set;
thus x in R1 implies x in R2
proof
assume
A3: x in R1;
then reconsider x as Subset of S;
ex B being Subset of T st B in G & x = f.:B by A1,A3;
hence thesis by A2;
end;
assume
A4: x in R2;
then reconsider x as Subset of S;
ex B being Subset of T st B in G & x = f.:B by A2,A4;
hence thesis by A1;
end;
hence thesis by TARSKI:1;
end;
end;
theorem
for T,S being non empty set, f being Function of T,S, A,B being
Subset-Family of T holds A c= B implies f.:A c= f.:B
proof
let T,S be non empty set;
let f be Function of T,S;
let A,B be Subset-Family of T;
assume
A1: A c= B;
let x be set;
assume
A2: x in f.:A;
then reconsider x as Subset of S;
ex C being Subset of T st C in B & x = f.:C
proof
consider C being Subset of T such that
A3: C in A & x = f.:C by A2,Def10;
take C;
thus thesis by A1,A3;
end;
hence thesis by Def10;
end;
theorem
for T,S being non empty set, f being Function of T,S, B being
Subset-Family of S, P being Subset of S st f.:(f"B) is Cover of P holds B is
Cover of P
proof
let T,S be non empty set;
let f be Function of T,S;
let B be Subset-Family of S;
let P be Subset of S;
assume f.:(f"B) is Cover of P;
then
A1: P c= union (f.:(f"B)) by SETFAM_1:def 11;
P c= union B
proof
let x be set;
assume x in P;
then consider Y being set such that
A2: x in Y and
A3: Y in f.:(f"(B)) by A1,TARSKI:def 4;
ex Z being set st x in Z & Z in B
proof
reconsider Y as Subset of S by A3;
consider Y1 being Subset of T such that
A4: Y1 in f"(B) and
A5: Y = f.:Y1 by A3,Def10;
consider Y2 being Subset of S such that
A6: Y2 in B & Y1 = f"(Y2) by A4,Def9;
A7: f.:(f"Y2) c= Y2 by FUNCT_1:75;
reconsider Y2 as set;
take Y2;
thus thesis by A2,A5,A6,A7;
end;
hence thesis by TARSKI:def 4;
end;
hence thesis by SETFAM_1:def 11;
end;
theorem
for T,S being non empty set, f being Function of T,S, B being
Subset-Family of T, P being Subset of T st B is Cover of P holds f"(f.:B) is
Cover of P
proof
let T,S be non empty set;
let f be Function of T,S;
let B be Subset-Family of T;
let P be Subset of T;
assume B is Cover of P;
then
A1: P c= union B by SETFAM_1:def 11;
P c= union(f"(f.:B))
proof
let x be set;
assume x in P;
then consider Y being set such that
A2: x in Y and
A3: Y in B by A1,TARSKI:def 4;
ex Z being set st x in Z & Z in f"(f.:B)
proof
reconsider Y as Subset of T by A3;
set Z = f"(f.:Y);
take Z;
dom f = T by Def1;
then
A4: Y c= f"(f.:Y) by FUNCT_1:76;
f.:Y in f.:B by A3,Def10;
hence thesis by A2,A4,Def9;
end;
hence thesis by TARSKI:def 4;
end;
hence thesis by SETFAM_1:def 11;
end;
theorem
for T,S being non empty set, f being Function of T,S, Q being
Subset-Family of S holds union(f.:(f"(Q))) c= union Q
proof
let T,S be non empty set;
let f be Function of T,S;
let Q be Subset-Family of S;
let x be set;
thus x in union(f.:(f"(Q))) implies x in union Q
proof
assume x in union(f.:(f"Q));
then consider A being set such that
A1: x in A and
A2: A in f.:(f"Q) by TARSKI:def 4;
reconsider A as Subset of S by A2;
consider A1 being Subset of T such that
A3: A1 in f"Q and
A4: A = f.:A1 by A2,Def10;
consider A2 being Subset of S such that
A5: A2 in Q & A1 = f"A2 by A3,Def9;
f.:(f"A2) c= A2 by FUNCT_1:75;
hence thesis by A1,A4,A5,TARSKI:def 4;
end;
end;
theorem
for T,S being non empty set, f being Function of T,S, P being
Subset-Family of T holds union P c= union(f"(f.:P))
proof
let T,S be non empty set;
let f be Function of T,S;
let P be Subset-Family of T;
let x be set;
assume x in union P;
then consider A being set such that
A1: x in A and
A2: A in P by TARSKI:def 4;
A3: A c= T by A2;
reconsider A as Subset of T by A2;
reconsider A1 = f.:A as Subset of S;
reconsider A2 = f"A1 as Subset of T;
A c= dom f by A3,Def1;
then
A4: A c= A2 by FUNCT_1:76;
A1 in f.:P by A2,Def10;
then A2 in f"(f.:P) by Def9;
hence thesis by A1,A4,TARSKI:def 4;
end;
definition
let X,Z be set, Y be non empty set;
let f be Function of X,Y;
let p be Z-valued Function;
assume
A1: rng f c= dom p;
func p/*f -> Function of X,Z equals
:Def11:
p*f;
coherence
proof
dom f = X by Def1;
then
A2: dom(p*f) = X by A1,RELAT_1:27;
then
A3: p*f is total by PARTFUN1:def 2;
rng(p*f) c= Z;
hence thesis by A3,A2,RELSET_1:4;
end;
end;
reserve Y for non empty set,
f for Function of X,Y,
p for PartFunc of Y,Z,
x for Element of X;
theorem Th108:
X <> {} & rng f c= dom p implies (p/*f).x = p.(f.x)
proof
assume that
A1: X <> {} and
A2: rng f c= dom p;
p/*f = p*f by A2,Def11;
hence thesis by A1,Th15;
end;
theorem Th109:
X <> {} & rng f c= dom p implies (p/*f).x = p/.(f.x)
proof
assume that
A1: X <> {} and
A2: rng f c= dom p;
A3: f.x in rng f by A1,Th4;
thus (p/*f).x = p.(f.x) by A1,A2,Th108
.= p/.(f.x) by A2,A3,PARTFUN1:def 6;
end;
reserve g for Function of X,X;
theorem
rng f c= dom p implies (p/*f)*g = p/*(f*g)
proof
A1: rng(f*g) c= rng f by RELAT_1:26;
assume
A2: rng f c= dom p;
hence (p/*f)*g = p*f*g by Def11
.= p*(f*g) by RELAT_1:36
.= p /* (f*g) by A2,A1,Def11,XBOOLE_1:1;
end;
theorem
for X,Y being non empty set, f being Function of X,Y holds f is
constant iff ex y being Element of Y st rng f = {y}
proof
let X,Y be non empty set;
let f be Function of X,Y;
hereby
consider x be set such that
A1: x in dom f by XBOOLE_0:def 1;
set y = f.x;
reconsider y as Element of Y by A1,Th5;
assume
A2: f is constant;
take y;
for y9 being set holds y9 in rng f iff y9 = y
proof
let y9 be set;
hereby
assume y9 in rng f;
then ex x9 be set st x9 in dom f & y9 = f.x9 by FUNCT_1:def 3;
hence y9 = y by A2,A1,FUNCT_1:def 10;
end;
assume y9 = y;
hence thesis by A1,Th4;
end;
hence rng f = {y} by TARSKI:def 1;
end;
given y be Element of Y such that
A3: rng f = {y};
let x,x9 be set;
assume x in dom f;
then
A4: f.x in rng f by Th4;
assume x9 in dom f;
then
A5: f.x9 in rng f by Th4;
thus f.x = y by A3,A4,TARSKI:def 1
.= f.x9 by A3,A5,TARSKI:def 1;
end;
theorem
for A,B being non empty set, x being Element of A, f being Function of
A,B holds f.x in rng f
proof
let A,B be non empty set, x be Element of A, f be Function of A,B;
dom f = A by Def1;
hence thesis by FUNCT_1:def 3;
end;
theorem Th113:
for A,B being set, f being Function of A,B st y in rng f ex x
being Element of A st y = f.x
proof
let A,B be set, f be Function of A,B;
assume y in rng f;
then consider x being set such that
A1: x in A and
A2: f.x = y by Th11;
reconsider x as Element of A by A1;
take x;
thus thesis by A2;
end;
theorem
for A,B being non empty set, f being Function of A,B st for x being
Element of A holds f.x in Z holds rng f c= Z
proof
let A,B be non empty set, f be Function of A,B such that
A1: for x being Element of A holds f.x in Z;
let y;
assume y in rng f;
then ex x being Element of A st f.x=y by Th113;
hence thesis by A1;
end;
reserve X,Y for non empty set,
Z,S,T for set,
f for Function of X,Y,
g for PartFunc of Y,Z,
x for Element of X;
theorem
g is total implies (g/*f).x = g.(f.x)
proof
assume g is total;
then dom g = Y by PARTFUN1:def 2;
then rng f c= dom g;
hence thesis by Th108;
end;
theorem
g is total implies (g/*f).x = g/.(f.x)
proof
assume g is total;
then dom g = Y by PARTFUN1:def 2;
then rng f c= dom g;
hence thesis by Th109;
end;
theorem Th117:
rng f c= dom (g|S) implies (g|S)/*f = g/*f
proof
assume
A1: rng f c= dom (g|S);
let x be Element of X;
A2: dom (g|S) c= dom g by RELAT_1:60;
A3: f.x in rng f by Th4;
thus ((g|S)/*f).x = (g|S).(f.x) by A1,Th108
.= g.(f.x) by A1,A3,FUNCT_1:47
.= (g/*f).x by A1,A2,Th108,XBOOLE_1:1;
end;
theorem
rng f c= dom (g|S) & S c= T implies (g|S)/*f = (g|T)/*f
proof
assume
A1: rng f c= dom (g|S);
assume S c= T;
then g|S c= g|T by RELAT_1:75;
then
A2: dom (g|S) c= dom (g|T) by RELAT_1:11;
thus (g|S)/*f = g/*f by A1,Th117
.= (g|T)/*f by A1,A2,Th117,XBOOLE_1:1;
end;
theorem
for H being Function of D, [:A,B:], d being Element of D holds H.d = [
pr1 H.d,pr2 H.d]
proof
let H be Function of D, [:A,B:], d be Element of D;
thus H.d = [(H.d)`1,(H.d)`2] by MCART_1:21
.= [(H.d)`1,pr2 H.d] by Def6
.= [pr1 H.d,pr2 H.d] by Def5;
end;
theorem
for A1,A2, B1,B2 being set for f being Function of A1,A2, g being
Function of B1,B2 st f tolerates g holds f /\ g is Function of A1 /\ B1, A2 /\
B2
proof
let A1,A2, B1,B2 be set;
let f be Function of A1,A2, g be Function of B1,B2 such that
A1: f tolerates g;
A2: dom (f/\g) c= dom f /\ dom g & dom f /\ dom g c= A1/\B1 by RELAT_1:2
,XBOOLE_1:27;
A3: now
set a = the Element of A1 /\ B1;
assume that
A4: dom f = A1 and
A1 <> {} and
A5: dom g = B1 and
B1 <> {};
hereby
assume
A6: A1 /\ B1 <> {};
then a in A1 by XBOOLE_0:def 4;
then
A7: f.a in rng f by A4,FUNCT_1:def 3;
f.a = g.a & a in B1 by A1,A4,A5,A6,PARTFUN1:def 4,XBOOLE_0:def 4;
then f.a in rng g by A5,FUNCT_1:def 3;
hence A2 /\ B2 <> {} by A7,XBOOLE_0:def 4;
end;
thus dom (f /\ g) = A1 /\ B1
proof
thus dom (f /\ g) c= A1 /\ B1 by A2,XBOOLE_1:1;
let a be set;
assume
A8: a in A1 /\ B1;
then a in A1 by XBOOLE_0:def 4;
then
A9: [a,f.a] in f by A4,FUNCT_1:def 2;
f.a = g.a & a in B1 by A1,A4,A5,A8,PARTFUN1:def 4,XBOOLE_0:def 4;
then [a,f.a] in g by A5,FUNCT_1:def 2;
then [a,f.a] in f /\ g by A9,XBOOLE_0:def 4;
hence thesis by XTUPLE_0:def 12;
end;
end;
rng (f/\g) c= rng f /\ rng g & rng f /\ rng g c= A2/\B2 by RELAT_1:13
,XBOOLE_1:27;
then
A10: rng (f/\g) c= A2/\B2 by XBOOLE_1:1;
A11: A2 = {} or A2 <> {};
A12: B2 = {} or B2 <> {};
A13: now
per cases;
case A2 /\ B2 <> {};
hence dom (f /\ g) = A1 /\ B1 by A12,A3,Def1,A11;
end;
case A1 /\ B1 = {};
hence dom (f /\ g) = A1 /\ B1 by A2;
end;
case A2 /\ B2 = {} & A1 /\ B1 <> {};
hence f /\ g = {} by A12,A3,Def1,A11;
end;
end;
dom (f/\g) c= A1/\B1 by A2,XBOOLE_1:1;
hence thesis by A10,A13,Def1,RELSET_1:4;
end;
registration
let A, B be set;
cluster Funcs(A,B) -> functional;
coherence
proof
let x be set;
assume x in Funcs(A,B);
then ex f being Function st x = f & dom f = A & rng f c= B by Def2;
hence thesis;
end;
end;
definition
let A, B be set;
mode FUNCTION_DOMAIN of A,B -> non empty set means
:Def12:
for x being Element of it holds x is Function of A,B;
existence
proof
take IT = {the Function of A,B};
let g be Element of IT;
thus thesis by TARSKI:def 1;
end;
end;
registration
let A, B be set;
cluster -> functional for FUNCTION_DOMAIN of A,B;
coherence
proof
let F be FUNCTION_DOMAIN of A,B;
thus for x being set st x in F holds x is Function by Def12;
end;
end;
theorem
for f being Function of P,Q holds { f } is FUNCTION_DOMAIN of P,Q
proof
let f be Function of P,Q;
for g be Element of { f } holds g is Function of P,Q by TARSKI:def 1;
hence thesis by Def12;
end;
theorem Th122:
Funcs(P,B) is FUNCTION_DOMAIN of P,B
proof
for f be Element of Funcs(P,B) holds f is Function of P,B by Th66;
hence thesis by Def12;
end;
definition
let A be set, B be non empty set;
redefine func Funcs(A,B) -> FUNCTION_DOMAIN of A,B;
coherence by Th122;
let F be FUNCTION_DOMAIN of A,B;
redefine mode Element of F -> Function of A,B;
coherence by Def12;
end;
registration
let I be set;
cluster id I -> total for I-defined Function;
coherence;
end;
definition
let X,A;
let F be Function of X,A;
let x be set;
assume
A1: x in X;
redefine func F/.x equals
F.x;
compatibility
proof
let a be Element of A;
x in dom F by A1,Def1;
hence thesis by PARTFUN1:def 6;
end;
end;
theorem
for f being Function of X, X, g being X-valued Function
holds dom(f*g) = dom g
proof
let f be Function of X, X;
let g be X-valued Function;
dom f = X by Def1;
then rng g c= dom f;
hence thesis by RELAT_1:27;
end;
theorem
for X being non empty set, f being Function of X,X st for x being
Element of X holds f.x = x holds f = id X
proof
let X be non empty set, f be Function of X,X;
assume
A1: for x being Element of X holds f.x = x;
let x be Element of X;
x = (id X).x by FUNCT_1:18;
hence thesis by A1;
end;
definition
let O,E be set;
mode Action of O,E is Function of O, Funcs(E,E);
end;
theorem
for x being set, A being set
for f,g being Function of {x}, A st f.x = g.x
holds f = g
proof
let x be set, A be set;
let f,g be Function of {x}, A such that
A1: f.x = g.x;
now
let y be set;
assume y in {x};
then y = x by TARSKI:def 1;
hence f.y = g.y by A1;
end;
hence thesis by Th12;
end;
begin
definition
let f be Function;
let a,b be set;
func f.(a,b) -> set equals
f.[a,b];
correctness;
end;
reserve A for set;
definition
let A,B be non empty set, C be set, f be Function of [:A,B:],C;
let a be Element of A;
let b be Element of B;
redefine func f.(a,b) -> Element of C;
coherence
proof
reconsider ab = [a,b] as Element of [:A,B:] by ZFMISC_1:def 2;
f.ab is Element of C;
hence thesis;
end;
end;
reserve X,Y,Z,x,x1,x2,y,y1,y2,z,z1,z2 for set;
theorem Th1:
for X,Y,Z being set for f1,f2 being Function of [:X,Y:],Z st for
x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y) holds f1 = f2
proof
let X,Y,Z be set;
let f1,f2 be Function of [:X,Y:],Z such that
A1: for x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y);
for z being set st z in [:X,Y:] holds f1.z = f2.z
proof
let z be set;
assume z in [:X,Y:];
then consider x,y being set such that
A2: x in X & y in Y and
A3: z = [x,y] by ZFMISC_1:def 2;
f1.(x,y) = f1.z & f2.(x,y) = f2.z by A3;
hence thesis by A1,A2;
end;
hence thesis by FUNCT_2:12;
end;
theorem
for f1,f2 being Function of [:X,Y:],Z st for a being Element of X for
b being Element of Y holds f1.(a,b) = f2.(a,b) holds f1 = f2
proof
let f1,f2 be Function of [:X,Y:],Z;
assume
for a being Element of X for b being Element of Y holds f1.(a,b) = f2.(a,b);
then for x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y);
hence thesis by Th1;
end;
definition
let A be set;
mode UnOp of A is Function of A,A;
mode BinOp of A is Function of [:A,A:],A;
end;
definition
let A be set, f be BinOp of A;
let a,b be Element of A;
redefine func f.(a,b) -> Element of A;
coherence
proof
per cases;
suppose A <> {};
then reconsider A as non empty set;
reconsider f as BinOp of A;
reconsider ab = [a,b] as Element of [:A,A:] by ZFMISC_1:def 2;
f.ab is Element of A;
hence thesis;
end;
suppose
A1: A = {};
then not [a,b] in dom f;
then f.(a,b) = {} by FUNCT_1:def 2;
hence thesis by A1,SUBSET_1:def 1;
end;
end;
end;
reserve u for UnOp of A,
o,o9 for BinOp of A,
a,b,c,e,e1,e2 for Element of A;
scheme
FuncEx2{X, Y, Z() -> set, P[set,set,set]}: ex f being Function of [:X(),Y()
:],Z() st for x,y st x in X() & y in Y() holds P[x,y,f.(x,y)]
provided
A1: for x,y st x in X() & y in Y() ex z st z in Z() & P[x,y,z]
proof
defpred R[set,set] means for x1,y1 st $1 = [x1,y1] holds P[x1,y1,$2];
A2: for x st x in [:X(),Y():] ex z st z in Z() & R[x,z]
proof
let x;
assume x in [:X(),Y():];
then consider x1,y1 such that
A3: x1 in X() & y1 in Y() and
A4: x = [x1,y1] by ZFMISC_1:def 2;
consider z such that
A5: z in Z() and
A6: P[x1,y1,z] by A1,A3;
take z;
thus z in Z() by A5;
let x2,y2;
assume
A7: x = [x2,y2];
then x1 = x2 by A4,XTUPLE_0:1;
hence thesis by A4,A6,A7,XTUPLE_0:1;
end;
consider f being Function of [:X(),Y():],Z() such that
A8: for x st x in [:X(),Y():] holds R[x,f.x] from FUNCT_2:sch 1(A2);
take f;
let x,y;
assume x in X() & y in Y();
then [x,y] in [:X(),Y():] by ZFMISC_1:def 2;
hence thesis by A8;
end;
scheme
Lambda2{X, Y, Z() -> set, F(set,set)->set}: ex f being Function of [:X(),Y()
:],Z() st for x,y st x in X() & y in Y() holds f.(x,y) = F(x,y)
provided
A1: for x,y st x in X() & y in Y() holds F(x,y) in Z()
proof
defpred P[set,set,set] means $3 = F($1,$2);
A2: for x,y st x in X() & y in Y() ex z st z in Z() & P[x,y,z] by A1;
thus ex f being Function of [:X(),Y():],Z() st for x,y st x in X() & y in Y(
) holds P[x,y,f.(x,y)] from FuncEx2(A2);
end;
scheme
FuncEx2D{X, Y, Z() -> non empty set, P[set,set,set]}: ex f being Function of
[:X(),Y():],Z() st for x being Element of X() for y being Element of Y() holds
P[x,y,f.(x,y)]
provided
A1: for x being Element of X() for y being Element of Y() ex z being
Element of Z() st P[x,y,z]
proof
defpred R[set,set] means for x being (Element of X()),y being Element of Y()
st $1 = [x,y] holds P[x,y,$2];
A2: for p being Element of [:X(),Y():] ex z being Element of Z() st R[p,z]
proof
let p be Element of [:X(),Y():];
consider x1,y1 such that
A3: x1 in X() and
A4: y1 in Y() and
A5: p = [x1,y1] by ZFMISC_1:def 2;
reconsider y1 as Element of Y() by A4;
reconsider x1 as Element of X() by A3;
consider z being Element of Z() such that
A6: P[x1,y1,z] by A1;
take z;
let x be Element of X(),y be Element of Y();
assume
A7: p = [x,y];
then x1 = x by A5,XTUPLE_0:1;
hence thesis by A5,A6,A7,XTUPLE_0:1;
end;
consider f being Function of [:X(),Y():],Z() such that
A8: for p being Element of [:X(),Y():] holds R[p,f.p] from FUNCT_2:sch 3
(A2);
take f;
let x be Element of X();
let y be Element of Y();
reconsider xy = [x,y] as Element of [:X(),Y():] by ZFMISC_1:def 2;
P[x,y,f.xy] by A8;
hence thesis;
end;
scheme
Lambda2D{X, Y, Z() -> non empty set, F(Element of X(),Element of Y()) ->
Element of Z()}: ex f being Function of [:X(),Y():],Z() st for x being Element
of X() for y being Element of Y() holds f.(x,y)=F(x,y) proof
defpred P[Element of X(),Element of Y(),set] means $3 = F($1,$2);
A1: for x being Element of X() for y being Element of Y() ex z being Element
of Z() st P[x,y,z];
thus ex f being Function of [:X(),Y():],Z() st for x being Element of X()
for y being Element of Y() holds P[x,y,f.(x,y)] from FuncEx2D(A1);
end;
definition
let A,o;
attr o is commutative means
:Def2:
for a,b holds o.(a,b) = o.(b,a);
attr o is associative means
for a,b,c holds o.(a,o.(b,c)) = o.(o.(a,b ),c);
attr o is idempotent means
for a holds o.(a,a) = a;
end;
registration
cluster -> empty associative commutative for BinOp of {};
coherence
proof
let f be BinOp of {};
thus f is empty;
A1: f c= [:dom f, rng f:];
hereby
let a,b,c be Element of {};
thus f.(a,f.(b,c)) = {} by A1,FUNCT_1:def 2
.= f.(f.(a,b),c) by A1,FUNCT_1:def 2;
end;
let a,b be Element of {};
thus f.(a,b) = {} by A1,FUNCT_1:def 2
.= f.(b,a) by A1,FUNCT_1:def 2;
end;
end;
definition
let A,e,o;
pred e is_a_left_unity_wrt o means
:Def5:
for a holds o.(e,a) = a;
pred e is_a_right_unity_wrt o means
:Def6:
for a holds o.(a,e) = a;
end;
definition
let A,e,o;
pred e is_a_unity_wrt o means
e is_a_left_unity_wrt o & e is_a_right_unity_wrt o;
end;
theorem Th3:
e is_a_unity_wrt o iff for a holds o.(e,a) = a & o.(a,e) = a
proof
thus e is_a_unity_wrt o implies for a holds o.(e,a) = a & o.(a,e) = a
proof
assume e is_a_left_unity_wrt o & e is_a_right_unity_wrt o;
hence thesis by Def5,Def6;
end;
assume for a holds o.(e,a) = a & o.(a,e) = a;
hence (for a holds o.(e,a) = a) & for a holds o.(a,e) = a;
end;
theorem Th4:
o is commutative implies (e is_a_unity_wrt o iff for a holds o.( e,a) = a)
proof
assume
A1: o is commutative;
now
thus (for a holds o.(e,a) = a & o.(a,e) = a) implies for a holds o.(e,a) =
a;
assume
A2: for a holds o.(e,a) = a;
let a;
thus o.(e,a) = a by A2;
thus o.(a,e) = o.(e,a) by A1,Def2
.= a by A2;
end;
hence thesis by Th3;
end;
theorem Th5:
o is commutative implies (e is_a_unity_wrt o iff for a holds o.( a,e) = a)
proof
assume
A1: o is commutative;
now
thus (for a holds o.(e,a) = a & o.(a,e) = a) implies for a holds o.(a,e) =
a;
assume
A2: for a holds o.(a,e) = a;
let a;
thus o.(e,a) = o.(a,e) by A1,Def2
.= a by A2;
thus o.(a,e) = a by A2;
end;
hence thesis by Th3;
end;
theorem Th6:
o is commutative implies (e is_a_unity_wrt o iff e is_a_left_unity_wrt o)
proof
e is_a_left_unity_wrt o iff for a holds o.(e,a) = a by Def5;
hence thesis by Th4;
end;
theorem Th7:
o is commutative implies (e is_a_unity_wrt o iff e is_a_right_unity_wrt o)
proof
e is_a_right_unity_wrt o iff for a holds o.(a,e) = a by Def6;
hence thesis by Th5;
end;
theorem
o is commutative implies (e is_a_left_unity_wrt o iff e
is_a_right_unity_wrt o)
proof
assume
A1: o is commutative;
then e is_a_unity_wrt o iff e is_a_left_unity_wrt o by Th6;
hence thesis by A1,Th7;
end;
theorem Th9:
e1 is_a_left_unity_wrt o & e2 is_a_right_unity_wrt o implies e1 = e2
proof
assume that
A1: e1 is_a_left_unity_wrt o and
A2: e2 is_a_right_unity_wrt o;
thus e1 = o.(e1,e2) by A2,Def6
.= e2 by A1,Def5;
end;
theorem Th10:
e1 is_a_unity_wrt o & e2 is_a_unity_wrt o implies e1 = e2
proof
assume that
e1 is_a_left_unity_wrt o and
A1: e1 is_a_right_unity_wrt o & e2 is_a_left_unity_wrt o and
e2 is_a_right_unity_wrt o;
thus thesis by A1,Th9;
end;
definition
let A,o;
assume
A1: ex e st e is_a_unity_wrt o;
func the_unity_wrt o -> Element of A means
it is_a_unity_wrt o;
existence by A1;
uniqueness by Th10;
end;
definition
let A,o9,o;
pred o9 is_left_distributive_wrt o means
:Def9:
for a,b,c holds o9.(a,o.(b,c )) = o.(o9.(a,b),o9.(a,c));
pred o9 is_right_distributive_wrt o means
:Def10:
for a,b,c holds o9.(o.(a,b ),c) = o.(o9.(a,c),o9.(b,c));
end;
definition
let A,o9,o;
pred o9 is_distributive_wrt o means
o9 is_left_distributive_wrt o & o9 is_right_distributive_wrt o;
end;
theorem Th11:
o9 is_distributive_wrt o iff for a,b,c holds o9.(a,o.(b,c)) = o.
(o9.(a,b),o9.(a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))
proof
thus o9 is_distributive_wrt o implies for a,b,c holds o9.(a,o.(b,c)) = o.(o9
.(a,b),o9.(a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))
proof
assume o9 is_left_distributive_wrt o & o9 is_right_distributive_wrt o;
hence thesis by Def9,Def10;
end;
assume for a,b,c holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)) & o9.(o.(a,b)
,c) = o.(o9.(a,c),o9.(b,c));
hence (for a,b,c holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c))) & for a,b,c
holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c));
end;
theorem Th12:
for A being non empty set, o,o9 being BinOp of A holds o9 is
commutative implies (o9 is_distributive_wrt o iff for a,b,c being Element of A
holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)))
proof
let A be non empty set, o,o9 be BinOp of A;
assume
A1: o9 is commutative;
(for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c
)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) iff for a,b,c being Element of A
holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c))
proof
thus (for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(
a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) implies for a,b,c being Element
of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c));
assume
A2: for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9 .(a,c));
let a,b,c be Element of A;
thus o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)) by A2;
thus o9.(o.(a,b),c) = o9.(c,o.(a,b)) by A1,Def2
.= o.(o9.(c,a),o9.(c,b)) by A2
.= o.(o9.(a,c),o9.(c,b)) by A1,Def2
.= o.(o9.(a,c),o9.(b,c)) by A1,Def2;
end;
hence thesis by Th11;
end;
theorem Th13:
for A being non empty set, o,o9 being BinOp of A holds o9 is
commutative implies (o9 is_distributive_wrt o iff for a,b,c being Element of A
holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)))
proof
let A be non empty set, o,o9 be BinOp of A;
assume
A1: o9 is commutative;
(for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c
)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) iff for a,b,c being Element of A
holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))
proof
thus (for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(
a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) implies for a,b,c being Element
of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c));
assume
A2: for a,b,c being Element of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9 .(b,c));
let a,b,c be Element of A;
thus o9.(a,o.(b,c)) = o9.(o.(b,c),a) by A1,Def2
.= o.(o9.(b,a),o9.(c,a)) by A2
.= o.(o9.(a,b),o9.(c,a)) by A1,Def2
.= o.(o9.(a,b),o9.(a,c)) by A1,Def2;
thus thesis by A2;
end;
hence thesis by Th11;
end;
theorem Th14:
for A being non empty set, o,o9 being BinOp of A holds o9 is
commutative implies (o9 is_distributive_wrt o iff o9 is_left_distributive_wrt o
)
proof
let A be non empty set, o,o9 be BinOp of A;
o9 is_left_distributive_wrt o iff for a,b,c being Element of A holds o9.
(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)) by Def9;
hence thesis by Th12;
end;
theorem Th15:
for A being non empty set, o,o9 being BinOp of A holds o9 is
commutative implies (o9 is_distributive_wrt o iff o9 is_right_distributive_wrt
o)
proof
let A be non empty set, o,o9 be BinOp of A;
o9 is_right_distributive_wrt o iff for a,b,c being Element of A holds o9
.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)) by Def10;
hence thesis by Th13;
end;
theorem
for A being non empty set, o,o9 being BinOp of A holds o9 is
commutative implies (o9 is_right_distributive_wrt o iff o9
is_left_distributive_wrt o)
proof
let A be non empty set, o,o9 be BinOp of A;
assume
A1: o9 is commutative;
then o9 is_distributive_wrt o iff o9 is_left_distributive_wrt o by Th14;
hence thesis by A1,Th15;
end;
definition
let A,u,o;
pred u is_distributive_wrt o means
:Def12:
for a,b holds u.(o.(a,b)) = o.((u .a),(u.b));
end;
definition
canceled 3;
let A be non empty set, e be Element of A, o be BinOp of A;
redefine pred e is_a_left_unity_wrt o means
for a being Element of A holds o .(e,a) = a;
correctness by Def5;
redefine pred e is_a_right_unity_wrt o means
for a being Element of A holds o.(a,e) = a;
correctness by Def6;
end;
definition
let A be non empty set, o9,o be BinOp of A;
redefine pred o9 is_left_distributive_wrt o means
for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c));
correctness by Def9;
redefine pred o9 is_right_distributive_wrt o means
for a,b,c being Element of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c));
correctness by Def10;
end;
definition
let A be non empty set, u be UnOp of A, o be BinOp of A;
redefine pred u is_distributive_wrt o means
for a,b being Element of A holds u.(o.(a,b)) = o.((u.a),(u.b));
correctness by Def12;
end;
theorem
for f being Function of [:X,Y:],Z st x in X & y in Y & Z <> {} holds f
.(x,y) in Z
proof
let f be Function of [:X,Y:],Z;
assume x in X & y in Y;
then [x,y] in [:X,Y:] by ZFMISC_1:87;
hence thesis by FUNCT_2:5;
end;
theorem
for x, y, X, Y, Z being set, f being Function of [:X,Y:],Z, g being
Function st Z <> {} & x in X & y in Y holds (g*f).(x,y) = g.(f.(x,y))
proof
let x, y, X, Y, Z be set, f be Function of [:X,Y:],Z, g be Function such
that
A1: Z <> {};
assume x in X & y in Y;
then [x,y] in [:X,Y:] by ZFMISC_1:87;
hence thesis by A1,FUNCT_2:15;
end;
theorem
for f being Function st dom f = [:X,Y:] holds f is constant iff for x1
,x2,y1,y2 st x1 in X & x2 in X & y1 in Y & y2 in Y holds f.(x1,y1)=f.(x2,y2)
proof
let f be Function such that
A1: dom f = [:X,Y:];
hereby
assume
A2: f is constant;
let x1,x2,y1,y2;
assume x1 in X & x2 in X & y1 in Y & y2 in Y;
then [x1,y1] in [:X,Y:] & [x2,y2] in [:X,Y:] by ZFMISC_1:87;
hence f.(x1,y1)=f.(x2,y2) by A1,A2,FUNCT_1:def 10;
end;
assume
A3: for x1,x2,y1,y2 st x1 in X & x2 in X & y1 in Y & y2 in Y holds f.(x1
,y1)=f.(x2,y2);
let x,y;
assume x in dom f;
then consider x1,y1 such that
A4: x1 in X & y1 in Y and
A5: x = [x1,y1] by A1,ZFMISC_1:84;
assume y in dom f;
then consider x2,y2 such that
A6: x2 in X & y2 in Y and
A7: y = [x2,y2] by A1,ZFMISC_1:84;
thus f.x = f.(x1,y1) by A5
.= f.(x2,y2) by A3,A4,A6
.= f.y by A7;
end;
theorem
for f1,f2 being PartFunc of [:X,Y:],Z st dom f1 = dom f2 & for x,y st
[x,y] in dom f1 holds f1.(x,y)=f2.(x,y) holds f1 = f2
proof
let f1,f2 be PartFunc of [:X,Y:],Z such that
A1: dom f1 = dom f2 and
A2: for x,y st [x,y] in dom f1 holds f1.(x,y) = f2.(x,y);
z in dom f1 implies f1.z = f2.z
proof
assume
A3: z in dom f1;
then consider x,y such that
A4: z = [x,y] by RELAT_1:def 1;
f1.(x,y) = f2.(x,y) by A2,A3,A4;
hence thesis by A4;
end;
hence thesis by A1,FUNCT_1:2;
end;
scheme
PartFuncEx2{X,Y,Z()->set,P[set,set,set]}: ex f being PartFunc of [:X(),Y():]
,Z() st (for x,y holds [x,y] in dom f iff x in X() & y in Y() & ex z st P[x,y,z
]) & for x,y st [x,y] in dom f holds P[x,y,f.(x,y)]
provided
A1: for x,y,z st x in X() & y in Y() & P[x,y,z] holds z in Z() and
A2: for x,y,z1,z2 st x in X() & y in Y() & P[x,y,z1] & P[x,y,z2] holds z1 = z2
proof
defpred Q[set,set] means for x1,y1 st $1 = [x1,y1] holds P[x1,y1,$2];
A3: for x,z st x in [:X(),Y():] & Q[x,z] holds z in Z()
proof
let x,z;
assume x in [:X(),Y():];
then
A4: ex x1,y1 st x1 in X() & y1 in Y() & x = [x1,y1] by ZFMISC_1:def 2;
assume for x1,y1 st x = [x1,y1] holds P[x1,y1,z];
hence thesis by A1,A4;
end;
A5: for x,z1,z2 st x in [:X(),Y():] & Q[x,z1] & Q[x,z2] holds z1 = z2
proof
let x,z1,z2 such that
A6: x in [:X(),Y():] and
A7: ( for x1,y1 st x = [x1,y1] holds P[x1,y1,z1])& for x1,y1 st x = [
x1,y1] holds P[x1,y1,z2];
consider x1,y1 such that
A8: x1 in X() & y1 in Y() and
A9: x = [x1,y1] by A6,ZFMISC_1:def 2;
( P[x1,y1,z1])& P[x1,y1,z2] by A7,A9;
hence thesis by A2,A8;
end;
consider f being PartFunc of [:X(),Y():],Z() such that
A10: for x holds x in dom f iff x in [:X(),Y():] & ex z st Q[x,z] and
A11: for x st x in dom f holds Q[x,f.x] from PARTFUN1:sch 2(A3,A5);
take f;
thus for x,y holds [x,y] in dom f iff x in X() & y in Y() & ex z st P[x,y,z ]
proof
let x,y;
thus [x,y] in dom f implies x in X() & y in Y() & ex z st P[x,y,z]
proof
assume
A12: [x,y] in dom f;
hence x in X() & y in Y() by ZFMISC_1:87;
consider z such that
A13: for x1,y1 st [x,y] = [x1,y1] holds P[x1,y1,z] by A10,A12;
take z;
thus thesis by A13;
end;
assume x in X() & y in Y();
then
A14: [x,y] in [:X(),Y():] by ZFMISC_1:def 2;
given z such that
A15: P[x,y,z];
now
take z;
let x1,y1;
assume
A16: [x,y] = [x1,y1];
then x=x1 by XTUPLE_0:1;
hence P[x1,y1,z] by A15,A16,XTUPLE_0:1;
end;
hence thesis by A10,A14;
end;
thus thesis by A11;
end;
scheme
LambdaR2{X,Y,Z()->set,F(set,set)->set,P[set,set]}: ex f being PartFunc of [:
X(),Y():],Z() st (for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x,y]
) & for x,y st [x,y] in dom f holds f.(x,y) = F(x,y)
provided
A1: for x,y st P[x,y] holds F(x,y) in Z()
proof
defpred Q[set,set,set] means P[$1,$2] & $3 = F($1,$2);
A2: for x,y,z1,z2 st x in X() & y in Y() & Q[x,y,z1] & Q[x,y,z2] holds z1 = z2;
A3: for x,y,z st x in X() & y in Y() & Q[x,y,z] holds z in Z() by A1;
consider f being PartFunc of [:X(),Y():],Z() such that
A4: for x,y holds [x,y] in dom f iff x in X() & y in Y() & ex z st Q[x,y
,z] and
A5: for x,y st [x,y] in dom f holds Q[x,y,f.(x,y)] from PartFuncEx2(A3,
A2 );
take f;
thus for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x,y]
proof
let x,y;
thus [x,y] in dom f implies x in X() & y in Y() & P[x,y]
proof
assume
A6: [x,y] in dom f;
then ex z st P[x,y] & z = F(x,y) by A4;
hence thesis by A4,A6;
end;
assume that
A7: x in X() & y in Y() and
A8: P[x,y];
ex z st P[x,y] & z = F(x,y) by A8;
hence thesis by A4,A7;
end;
thus thesis by A5;
end;
scheme
PartLambda2{X,Y,Z()->set,F(set,set)->set,P[set,set]}: ex f being PartFunc of
[:X(),Y():],Z() st (for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x,
y]) & for x,y st [x,y] in dom f holds f.(x,y) = F(x,y)
provided
A1: for x,y st x in X() & y in Y() & P[x,y] holds F(x,y) in Z()
proof
defpred R[set,set] means $1 in X() & $2 in Y() & P[$1,$2];
A2: for x,y st R[x,y] holds F(x,y) in Z() by A1;
consider f being PartFunc of [:X(),Y():],Z() such that
A3: ( for x,y holds [x,y] in dom f iff x in X() & y in Y() & R[x,y])&
for x,y st [ x,y] in dom f holds f.(x,y) = F(x,y) from LambdaR2(A2);
take f;
thus thesis by A3;
end;
scheme
{X,Y()->non empty set,Z()->set,F(set,set)->set, P[set,set]}: ex f being
PartFunc of [:X(),Y():],Z() st (for x being Element of X(), y being Element of
Y() holds [x,y] in dom f iff P[x,y]) & for x being Element of X(), y being
Element of Y() st [x,y] in dom f holds f.(x,y) = F(x,y)
provided
A1: for x being Element of X(), y being Element of Y() st P[x,y] holds F
(x,y) in Z()
proof
A2: for x,y st x in X() & y in Y() & P[x,y] holds F(x,y) in Z() by A1;
consider f being PartFunc of [:X(),Y():],Z() such that
A3: ( for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x,y])&
for x,y st [ x,y] in dom f holds f.(x,y) = F(x,y) from PartLambda2(A2);
take f;
thus thesis by A3;
end;
definition
let A be set, f be BinOp of A, x,y be Element of A;
redefine func f.(x,y) -> Element of A;
coherence
proof
per cases;
suppose
A = {};
then dom f = {};
then f.(x,y) = {} by FUNCT_1:def 2;
hence thesis;
end;
suppose
A <> {};
then reconsider A as non empty set;
reconsider f as BinOp of A;
reconsider x,y as Element of A;
f.(x,y) is Element of A;
hence thesis;
end;
end;
end;
definition
let X,Y,Z be set; let f1,f2 being Function of [:X,Y:],Z;
redefine pred f1 = f2 means
for x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y);
compatibility by Th1;
end;
begin
reserve a,b,c,d for set,
D,X1,X2,X3,X4 for non empty set,
x1,y1,z1 for Element of X1,
x2 for Element of X2,
x3 for Element of X3,
x4 for Element of X4,
A1,B1 for Subset of X1;
theorem
a in [:X1,X2:] implies ex x1,x2 st a=[x1,x2]
proof
assume a in [:X1,X2:];
then consider x1,x2 being set such that
A1: x1 in X1 and
A2: x2 in X2 and
A3: a=[x1,x2] by ZFMISC_1:def 2;
reconsider x2 as Element of X2 by A2;
reconsider x1 as Element of X1 by A1;
take x1,x2;
thus thesis by A3;
end;
theorem
for x,y being Element of [:X1,X2:] st x`1=y`1 & x`2=y`2 holds x=y
proof
let x,y be Element of [:X1,X2:];
[x`1,x`2]=x by MCART_1:21;
hence thesis by MCART_1:21;
end;
definition
let X1,X2,x1,x2;
redefine func [x1,x2] -> Element of [:X1,X2:];
coherence by ZFMISC_1:87;
end;
definition
let X1,X2;
let x be Element of [:X1,X2:];
redefine func x`1 -> Element of X1;
coherence by MCART_1:10;
redefine func x`2 -> Element of X2;
coherence by MCART_1:10;
end;
theorem Th3:
a in [: X1,X2,X3 :] iff ex x1,x2,x3 st a = [x1,x2,x3]
proof
thus a in [: X1,X2,X3 :] implies ex x1,x2,x3 st a = [x1,x2,x3]
proof
assume a in [: X1,X2,X3 :];
then a in [:[:X1,X2:],X3:] by ZFMISC_1:def 3;
then consider x12, x3 being set such that
A1: x12 in [:X1,X2:] and
A2: x3 in X3 and
A3: a = [x12,x3] by ZFMISC_1:def 2;
reconsider x3 as Element of X3 by A2;
consider x1,x2 being set such that
A4: x1 in X1 and
A5: x2 in X2 and
A6: x12 = [x1,x2] by A1,ZFMISC_1:def 2;
reconsider x2 as Element of X2 by A5;
reconsider x1 as Element of X1 by A4;
a = [x1,x2,x3] by A3,A6;
hence thesis;
end;
given x1,x2,x3 such that
A7: a = [x1,x2,x3];
a = [[x1,x2],x3] by A7;
then a in [:[:X1,X2:],X3:];
hence thesis by ZFMISC_1:def 3;
end;
theorem Th4:
(for a holds a in D iff ex x1,x2,x3 st a = [x1,x2,x3]) implies D
= [: X1,X2,X3 :]
proof
assume
A1: for a holds a in D iff ex x1,x2,x3 st a = [x1,x2,x3];
now
let a;
thus a in D implies a in [:[:X1,X2:],X3:]
proof
assume a in D;
then consider x1,x2,x3 such that
A2: a = [x1,x2,x3] by A1;
a = [[x1,x2],x3] by A2;
hence thesis;
end;
assume a in [:[:X1,X2:],X3:];
then consider x12,x3 being set such that
A3: x12 in [:X1,X2:] and
A4: x3 in X3 and
A5: a = [x12,x3] by ZFMISC_1:def 2;
reconsider x3 as Element of X3 by A4;
consider x1,x2 being set such that
A6: x1 in X1 and
A7: x2 in X2 and
A8: x12 = [x1,x2] by A3,ZFMISC_1:def 2;
reconsider x2 as Element of X2 by A7;
reconsider x1 as Element of X1 by A6;
a = [x1,x2,x3] by A5,A8;
hence a in D by A1;
end;
then D = [:[:X1,X2:],X3:] by TARSKI:1;
hence thesis by ZFMISC_1:def 3;
end;
theorem
D = [: X1,X2,X3 :] iff for a holds a in D iff ex x1,x2,x3 st a = [x1,
x2,x3] by Th3,Th4;
reserve x,y for Element of [:X1,X2,X3:];
definition
let X1,X2,X3,x1,x2,x3;
redefine func [x1,x2,x3] -> Element of [:X1,X2,X3:];
coherence by MCART_1:69;
end;
theorem
a =x`1_3 iff for x1,x2,x3 st x = [x1,x2,x3] holds a = x1
proof
thus a =x`1_3 implies for x1,x2,x3 st x = [x1,x2,x3] holds a = x1
proof
A1: x = [x`1_3,x`2_3,x`3_3];
assume
A2: a = x`1_3;
let x1,x2,x3;
assume x = [x1,x2,x3];
hence thesis by A2,A1,XTUPLE_0:3;
end;
thus thesis by MCART_1:65;
end;
theorem
b =x`2_3 iff for x1,x2,x3 st x = [x1,x2,x3] holds b = x2
proof
thus b =x`2_3 implies for x1,x2,x3 st x = [x1,x2,x3] holds b = x2
proof
A1: x = [x`1_3,x`2_3,x`3_3];
assume
A2: b = x`2_3;
let x1,x2,x3;
assume x = [x1,x2,x3];
hence thesis by A2,A1,XTUPLE_0:3;
end;
thus thesis by MCART_1:66;
end;
theorem
c =x`3_3 iff for x1,x2,x3 st x = [x1,x2,x3] holds c = x3
proof
thus c =x`3_3 implies for x1,x2,x3 st x = [x1,x2,x3] holds c = x3
proof
A1: x = [x`1_3,x`2_3,x`3_3];
assume
A2: c = x`3_3;
let x1,x2,x3;
assume x = [x1,x2,x3];
hence thesis by A2,A1,XTUPLE_0:3;
end;
thus thesis by MCART_1:67;
end;
theorem
x`1_3=y`1_3 & x`2_3=y`2_3 & x`3_3=y`3_3 implies x=y
proof
[x`1_3,x`2_3,x`3_3]=x;
hence thesis by MCART_1:44;
end;
theorem Th10:
a in [: X1,X2,X3,X4 :] iff ex x1,x2,x3,x4 st a = [x1,x2,x3,x4]
proof
thus a in [: X1,X2,X3,X4 :] implies ex x1,x2,x3,x4 st a = [x1,x2,x3,x4]
proof
assume a in [: X1,X2,X3,X4 :];
then a in [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4;
then consider x123, x4 being set such that
A1: x123 in [:X1,X2,X3:] and
A2: x4 in X4 and
A3: a = [x123,x4] by ZFMISC_1:def 2;
reconsider x4 as Element of X4 by A2;
consider x1 being (Element of X1), x2 being (Element of X2), x3 being
Element of X3 such that
A4: x123 = [x1,x2,x3] by A1,Th3;
a = [x1,x2,x3,x4] by A3,A4;
hence thesis;
end;
given x1,x2,x3,x4 such that
A5: a = [x1,x2,x3,x4];
a = [[x1,x2,x3],x4] by A5;
then a in [:[:X1,X2,X3:],X4:];
hence thesis by ZFMISC_1:def 4;
end;
theorem Th11:
(for a holds a in D iff ex x1,x2,x3,x4 st a = [x1,x2,x3,x4])
implies D = [: X1,X2,X3,X4 :]
proof
assume
A1: for a holds a in D iff ex x1,x2,x3,x4 st a = [x1,x2,x3,x4];
now
let a;
thus a in D implies a in [:[:X1,X2,X3:],X4:]
proof
assume a in D;
then consider x1,x2,x3,x4 such that
A2: a = [x1,x2,x3,x4] by A1;
a = [[x1,x2,x3],x4] by A2;
hence thesis;
end;
assume a in [:[:X1,X2,X3:],X4:];
then consider x123,x4 being set such that
A3: x123 in [:X1,X2,X3:] and
A4: x4 in X4 and
A5: a = [x123,x4] by ZFMISC_1:def 2;
reconsider x4 as Element of X4 by A4;
consider x1,x2,x3 such that
A6: x123 = [x1,x2,x3] by A3,Th3;
a = [x1,x2,x3,x4] by A5,A6;
hence a in D by A1;
end;
then D = [:[:X1,X2,X3:],X4:] by TARSKI:1;
hence thesis by ZFMISC_1:def 4;
end;
theorem
D = [: X1,X2,X3,X4 :] iff for a holds a in D iff ex x1,x2,x3,x4 st a =
[x1,x2,x3,x4] by Th10,Th11;
reserve x for Element of [:X1,X2,X3,X4:];
definition
let X1,X2,X3,X4,x1,x2,x3,x4;
redefine func [x1,x2,x3,x4] -> Element of [:X1,X2,X3,X4:];
coherence by MCART_1:80;
end;
theorem
a=x`1_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds a = x1
proof
thus a =x`1_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds a = x1
proof
A1: x = [x`1_4,x`2_4,x`3_4,x`4_4];
assume
A2: a = x`1_4;
let x1,x2,x3,x4;
assume x = [x1,x2,x3,x4];
hence thesis by A2,A1,XTUPLE_0:5;
end;
thus thesis by MCART_1:75;
end;
theorem
b=x`2_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds b = x2
proof
thus b =x`2_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds b = x2
proof
A1: x = [x`1_4,x`2_4,x`3_4,x`4_4];
assume
A2: b = x`2_4;
let x1,x2,x3,x4;
assume x = [x1,x2,x3,x4];
hence thesis by A2,A1,XTUPLE_0:5;
end;
thus thesis by MCART_1:76;
end;
theorem
c = x`3_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds c = x3
proof
thus c =x`3_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds c = x3
proof
A1: x = [x`1_4,x`2_4,x`3_4,x`4_4];
assume
A2: c = x`3_4;
let x1,x2,x3,x4;
assume x = [x1,x2,x3,x4];
hence thesis by A2,A1,XTUPLE_0:5;
end;
thus thesis by MCART_1:77;
end;
theorem
d=x`4_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds d = x4
proof
thus d =x`4_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds d = x4
proof
A1: x = [x`1_4,x`2_4,x`3_4,x`4_4];
assume
A2: d = x`4_4;
let x1,x2,x3,x4;
assume x = [x1,x2,x3,x4];
hence thesis by A2,A1,XTUPLE_0:5;
end;
thus thesis by MCART_1:78;
end;
theorem
for x,y being Element of [:X1,X2,X3,X4:]
st x`1_4=y`1_4 & x`2_4=y`2_4 & x`3_4=y
`3_4 & x`4_4=y`4_4 holds x=y
proof
let x,y be Element of [:X1,X2,X3,X4:];
[x`1_4,x`2_4,x`3_4,x`4_4]=x;
hence thesis by MCART_1:56;
end;
reserve A2 for Subset of X2,
A3 for Subset of X3,
A4 for Subset of X4;
scheme
Fraenkel1 {P[set]}: for X1 holds { x1 : P[x1] } is Subset of X1 proof
let X1;
{ x1 : P[x1] } c= X1
proof
let a;
assume a in { x1 : P[x1] };
then ex x1 st a = x1 & P[x1];
hence thesis;
end;
hence thesis;
end;
scheme
Fraenkel2 {P[set,set]}: for X1,X2 holds { [x1,x2] : P[x1,x2] } is Subset of
[:X1,X2:] proof
let X1,X2;
{ [x1,x2] : P[x1,x2] } c= [:X1,X2:]
proof
let a;
assume a in { [x1,x2] : P[x1,x2] };
then ex x1,x2 st a = [x1,x2] & P[x1,x2];
hence thesis;
end;
hence thesis;
end;
scheme
Fraenkel3 {P[set,set,set]}: for X1,X2,X3 holds { [x1,x2,x3] : P[x1,x2,x3] }
is Subset of [:X1,X2,X3:] proof
let X1,X2,X3;
{ [x1,x2,x3] : P[x1,x2,x3] } c= [:X1,X2,X3:]
proof
let a;
assume a in { [x1,x2,x3] : P[x1,x2,x3] };
then ex x1,x2,x3 st a = [x1,x2,x3] & P[x1,x2,x3];
hence thesis;
end;
hence thesis;
end;
scheme
Fraenkel4 {P[set,set,set,set]}: for X1,X2,X3,X4 holds { [x1,x2,x3,x4] : P[x1
,x2,x3,x4] } is Subset of [:X1,X2,X3,X4:] proof
let X1,X2,X3,X4;
{ [x1,x2,x3,x4] : P[x1,x2,x3,x4] } c= [:X1,X2,X3,X4:]
proof
let a;
assume a in { [x1,x2,x3,x4] : P[x1,x2,x3,x4] };
then ex x1,x2,x3,x4 st a = [x1,x2,x3,x4] & P[x1,x2,x3,x4];
hence thesis;
end;
hence thesis;
end;
scheme
Fraenkel5 {P[set],Q[set]}: for X1 st for x1 holds P[x1] implies Q[x1] holds
{ y1 : P[y1] } c= { z1 : Q[z1] } proof
let X1 such that
A1: P[x1] implies Q[x1];
let a;
assume a in { x1 : P[x1] };
then consider x1 such that
A2: a = x1 and
A3: P[x1];
Q[x1] by A1,A3;
hence thesis by A2;
end;
scheme
Fraenkel6 {P[set],Q[set]}: for X1 st for x1 holds P[x1] iff Q[x1] holds { y1
: P[y1] } = { z1 : Q[z1] } proof
let X1;
assume
A1: P[x1] iff Q[x1];
for X1 st for x1 holds P[x1] implies Q[x1] holds { y1 : P[y1] } c= { z1
: Q[z1] } from Fraenkel5;
hence { y1 : P[y1] } c= { z1 : Q[z1] } by A1;
for X1 st for x1 holds Q[x1] implies P[x1] holds { y1 : Q[y1] } c= { z1
: P[z1] } from Fraenkel5;
hence thesis by A1;
end;
scheme
SubsetD{D() -> non empty set,P[set]}: {d where d is Element of D() : P[d]}
is Subset of D() proof
for D being non empty set holds {d where d is Element of D : P[d]} is
Subset of D from Fraenkel1;
hence thesis;
end;
theorem
X1 = { x1 : not contradiction }
proof
defpred P[set] means not contradiction;
A1: y1 in { x1 : not contradiction };
{ x1 : P[x1] } is Subset of X1 from SubsetD;
hence thesis by A1,SUBSET_1:28;
end;
theorem
[:X1,X2:] = { [x1,x2] : not contradiction }
proof
defpred P[set,set] means not contradiction;
A1: for x being Element of [:X1,X2:] holds x in { [x1,x2] : not contradiction }
proof
let x be Element of [:X1,X2:];
x = [x`1,x`2] by MCART_1:21;
hence thesis;
end;
for X1,X2 holds { [x1,x2] : P[x1,x2] } is Subset of [:X1,X2:] from
Fraenkel2;
then { [x1,x2] : not contradiction } is Subset of [:X1,X2:];
hence thesis by A1,SUBSET_1:28;
end;
theorem
[:X1,X2,X3:] = { [x1,x2,x3] : not contradiction }
proof
defpred P[set,set,set] means not contradiction;
A1: for x being Element of [:X1,X2,X3:] holds x in { [x1,x2,x3] : not
contradiction }
proof
let x be Element of [:X1,X2,X3:];
x = [x`1_3,x`2_3,x`3_3];
hence thesis;
end;
for X1,X2,X3 holds { [x1,x2,x3] : P[x1,x2,x3] } is Subset of [:X1,X2,X3
:] from Fraenkel3;
then { [x1,x2,x3] : not contradiction } is Subset of [:X1,X2,X3:];
hence thesis by A1,SUBSET_1:28;
end;
theorem
[:X1,X2,X3,X4:] = { [x1,x2,x3,x4] : not contradiction }
proof
defpred P[set,set,set,set] means not contradiction;
A1: for x being Element of [:X1,X2,X3,X4:] holds x in { [x1,x2,x3,x4] : not
contradiction }
proof
let x be Element of [:X1,X2,X3,X4:];
x = [x`1_4,x`2_4,x`3_4,x`4_4];
hence thesis;
end;
for X1,X2,X3,X4 holds { [x1,x2,x3,x4] : P[x1,x2,x3,x4] } is Subset of [:
X1,X2,X3,X4:] from Fraenkel4;
then { [x1,x2,x3,x4] : not contradiction } is Subset of [:X1,X2,X3,X4:];
hence thesis by A1,SUBSET_1:28;
end;
theorem
A1 = { x1 : x1 in A1 }
proof
thus A1 c= { x1 : x1 in A1 }
proof
let a;
assume a in A1;
hence thesis;
end;
let a;
assume a in { x1 : x1 in A1 };
then ex x1 st a = x1 & x1 in A1;
hence thesis;
end;
theorem
[:A1,A2:] = { [x1,x2] : x1 in A1 & x2 in A2 }
proof
thus [:A1,A2:] c= { [x1,x2] : x1 in A1 & x2 in A2 }
proof
let a;
assume
A1: a in [:A1,A2:];
then reconsider x = a as Element of [:X1,X2:];
A2: x = [x`1,x`2] by MCART_1:21;
x`1 in A1 & x`2 in A2 by A1,MCART_1:10;
hence thesis by A2;
end;
let a;
assume a in { [x1,x2] : x1 in A1 & x2 in A2 };
then ex x1,x2 st a = [x1,x2] & x1 in A1 & x2 in A2;
hence thesis by ZFMISC_1:87;
end;
theorem
[:A1,A2,A3:] = { [x1,x2,x3] : x1 in A1 & x2 in A2 & x3 in A3 }
proof
thus [:A1,A2,A3:] c= { [x1,x2,x3] : x1 in A1 & x2 in A2 & x3 in A3 }
proof
let a;
assume
B1: a in [:A1,A2,A3:];
reconsider A1 as non empty Subset of X1 by B1,MCART_1:31;
reconsider A2 as non empty Subset of X2 by B1,MCART_1:31;
reconsider A3 as non empty Subset of X3 by B1,MCART_1:31;
A1: a in [:A1,A2,A3:] by B1;
reconsider x = a as Element of [:X1,X2,X3:] by A1;
B2: x = [x`1_3,x`2_3,x`3_3];
A2: x`3_3 in A3 by A1,MCART_1:72;
x`1_3 in A1 & x`2_3 in A2 by A1,MCART_1:72;
hence thesis by A2,B2;
end;
let a;
assume a in { [x1,x2,x3] : x1 in A1 & x2 in A2 & x3 in A3 };
then ex x1,x2,x3 st a= [x1,x2,x3] & x1 in A1 & x2 in A2 & x3 in A3;
hence thesis by MCART_1:69;
end;
theorem
[:A1,A2,A3,A4:] = { [x1,x2,x3,x4] : x1 in A1 & x2 in A2 & x3 in A3 &
x4 in A4 }
proof
thus [:A1,A2,A3,A4:] c= { [x1,x2,x3,x4] : x1 in A1 & x2 in A2 & x3 in A3 &
x4 in A4 }
proof
let a;
assume
B1: a in [:A1,A2,A3,A4:];
reconsider A1 as non empty Subset of X1 by B1,MCART_1:51;
reconsider A2 as non empty Subset of X2 by B1,MCART_1:51;
reconsider A3 as non empty Subset of X3 by B1,MCART_1:51;
reconsider A4 as non empty Subset of X4 by B1,MCART_1:51;
A1: a in [:A1,A2,A3,A4:] by B1;
then reconsider x = a as Element of [:X1,X2,X3,X4:];
A2: x`3_4 in A3 & x`4_4 in A4 by A1,MCART_1:83;
A3: x = [x`1_4,x`2_4,x`3_4,x`4_4];
x`1_4 in A1 & x`2_4 in A2 by A1,MCART_1:83;
hence thesis by A3,A2;
end;
let a;
assume a in { [x1,x2,x3,x4] : x1 in A1 & x2 in A2 & x3 in A3 & x4 in A4 };
then ex x1,x2,x3,x4 st a = [x1,x2,x3,x4] & x1 in A1 & x2 in A2 & x3 in A3 &
x4 in A4;
hence thesis by MCART_1:80;
end;
theorem
{} X1 = { x1 : contradiction }
proof
thus {} X1 c= { x1 : contradiction }
proof
let a;
thus thesis;
end;
let a;
assume a in { x1 : contradiction };
then ex x1 st a = x1 & contradiction;
hence thesis;
end;
theorem
A1` = { x1 : not x1 in A1 }
proof
thus A1` c= { x1 : not x1 in A1 }
proof
let a;
assume
A1: a in A1`;
then not a in A1 by XBOOLE_0:def 5;
hence thesis by A1;
end;
let a;
assume a in { x1 : not x1 in A1 };
then ex x1 st a = x1 & not x1 in A1;
hence thesis by SUBSET_1:29;
end;
theorem
A1 /\ B1 = { x1 : x1 in A1 & x1 in B1 }
proof
thus A1 /\ B1 c= { x1 : x1 in A1 & x1 in B1 }
proof
let a;
assume
A1: a in A1 /\ B1;
then reconsider x = a as Element of X1;
x in A1 & x in B1 by A1,XBOOLE_0:def 4;
hence thesis;
end;
let a;
assume a in { x1 : x1 in A1 & x1 in B1 };
then ex x1 st a = x1 & x1 in A1 & x1 in B1;
hence thesis by XBOOLE_0:def 4;
end;
theorem
A1 \/ B1 = { x1 : x1 in A1 or x1 in B1 }
proof
thus A1 \/ B1 c= { x1 : x1 in A1 or x1 in B1 }
proof
let a;
assume
A1: a in A1 \/ B1;
then reconsider x = a as Element of X1;
x in A1 or x in B1 by A1,XBOOLE_0:def 3;
hence thesis;
end;
let a;
assume a in { x1 : x1 in A1 or x1 in B1 };
then ex x1 st a = x1 & (x1 in A1 or x1 in B1);
hence thesis by XBOOLE_0:def 3;
end;
theorem
A1 \ B1 = { x1 : x1 in A1 & not x1 in B1 }
proof
thus A1 \ B1 c= { x1 : x1 in A1 & not x1 in B1 }
proof
let a;
assume
A1: a in A1 \ B1;
then reconsider x = a as Element of X1;
x in A1 & not x in B1 by A1,XBOOLE_0:def 5;
hence thesis;
end;
let a;
assume a in { x1 : x1 in A1 & not x1 in B1 };
then ex x1 st a = x1 & x1 in A1 & not x1 in B1;
hence thesis by XBOOLE_0:def 5;
end;
theorem Th31:
A1 \+\ B1 = { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1 }
proof
thus A1 \+\ B1 c= { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1}
proof
let a;
assume
A1: a in A1 \+\ B1;
then reconsider x = a as Element of X1;
x in A1 & not x in B1 or not x in A1 & x in B1 by A1,XBOOLE_0:1;
hence thesis;
end;
let a;
assume a in { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1 };
then ex x1 st a = x1 & (x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1);
hence thesis by XBOOLE_0:1;
end;
theorem Th32:
A1 \+\ B1 = { x1 : not x1 in A1 iff x1 in B1 }
proof
A1: for x1 holds (x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1) iff (
not x1 in A1 iff x1 in B1);
defpred Q[set] means not $1 in A1 iff $1 in B1;
defpred P[set] means $1 in A1 & not $1 in B1 or not $1 in A1 & $1 in B1;
A2: A1 \+\ B1 = { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1 }
by Th31;
for X1 st for x1 holds P[x1] iff Q[x1] holds { y1 : P[y1] } = { z1 : Q[
z1] } from Fraenkel6;
hence thesis by A1,A2;
end;
theorem
A1 \+\ B1 = { x1 : x1 in A1 iff not x1 in B1 }
proof
A1: for x1 holds (not x1 in A1 iff x1 in B1) iff (x1 in A1 iff not x1 in B1);
defpred Q[set] means $1 in A1 iff not $1 in B1;
defpred P[set] means not $1 in A1 iff $1 in B1;
A2: A1 \+\ B1 = { x1 : not x1 in A1 iff x1 in B1 } by Th32;
for X1 st for x1 holds P[x1] iff Q[x1] holds { y1 : P[y1] } = { z1 : Q[
z1] } from Fraenkel6;
hence thesis by A1,A2;
end;
theorem
A1 \+\ B1 = { x1 : not(x1 in A1 iff x1 in B1) }
proof
A1: for x1 holds (not x1 in A1 iff x1 in B1) iff not(x1 in A1 iff x1 in B1);
defpred Q[set] means not($1 in A1 iff $1 in B1);
defpred P[set] means not $1 in A1 iff $1 in B1;
A2: A1 \+\ B1 = { x1 : not x1 in A1 iff x1 in B1 } by Th32;
for X1 st for x1 holds P[x1] iff Q[x1] holds { y1 : P[y1] } = { z1 : Q[
z1] } from Fraenkel6;
hence thesis by A1,A2;
end;
definition
let D be non empty set;
let x1 be Element of D;
redefine func {x1} -> Subset of D;
coherence by SUBSET_1:33;
let x2 be Element of D;
redefine func {x1,x2} -> Subset of D;
coherence by SUBSET_1:34;
let x3 be Element of D;
redefine func {x1,x2,x3} -> Subset of D;
coherence by SUBSET_1:35;
let x4 be Element of D;
redefine func {x1,x2,x3,x4} -> Subset of D;
coherence by SUBSET_1:36;
let x5 be Element of D;
redefine func {x1,x2,x3,x4,x5} -> Subset of D;
coherence by SUBSET_1:37;
let x6 be Element of D;
redefine func {x1,x2,x3,x4,x5,x6} -> Subset of D;
coherence by SUBSET_1:38;
let x7 be Element of D;
redefine func {x1,x2,x3,x4,x5,x6,x7} -> Subset of D;
coherence by SUBSET_1:39;
let x8 be Element of D;
redefine func {x1,x2,x3,x4,x5,x6,x7,x8} -> Subset of D;
coherence by SUBSET_1:40;
end;
begin
scheme
SubsetFD { A, D() -> non empty set, F(set) -> Element of D(), P[set] }: { F(
x) where x is Element of A(): P[x]} is Subset of D() proof
set X = { F(x) where x is Element of A(): P[x]};
X c= D()
proof
let y be set;
assume y in X;
then ex z being Element of A() st y = F(z) & P[z];
hence thesis;
end;
hence thesis;
end;
scheme
SubsetFD2 { A, B, D() -> non empty set, F(set,set) -> Element of D(), P[set,
set] }: { F(x,y) where x is Element of A(), y is Element of B(): P[x,y]} is
Subset of D() proof
set X = { F(x,y) where x is Element of A(), y is Element of B(): P[x,y]};
X c= D()
proof
let w be set;
assume w in X;
then
ex x being Element of A(), y being Element of B() st w = F(x,y) & P[ x ,y];
hence thesis;
end;
hence thesis;
end;
definition
let D1,D2,D3 be non empty set, x be Element of [:[:D1,D2:],D3:];
redefine func x`11 -> Element of D1;
coherence
proof
x`11 = x`1`1 by MCART_1:def 14;
hence thesis;
end;
redefine func x`12 -> Element of D2;
coherence
proof
x`12 = x`1`2 by MCART_1:def 15;
hence thesis;
end;
end;
definition
let D1,D2,D3 be non empty set, x be Element of [:D1,[:D2,D3:]:];
redefine func x`21 -> Element of D2;
coherence
proof
x`21 = x`2`1 by MCART_1:def 16;
hence thesis;
end;
redefine func x`22 -> Element of D3;
coherence
proof
x`22 = x`2`2 by MCART_1:def 17;
hence thesis;
end;
end;
scheme
AndScheme{A()-> non empty set, P,Q[set]}: { a where a is Element of A(): P[a
] & Q[a] } = { a1 where a1 is Element of A(): P[a1] } /\ { a2 where a2 is
Element of A(): Q[a2] } proof
set A = { a where a is Element of A(): P[a] & Q[a] }, A1 = { a1 where a1 is
Element of A(): P[a1] }, A2 = { a2 where a2 is Element of A(): Q[a2] };
thus A c= A1 /\ A2
proof
let x be set;
assume x in A;
then consider a being Element of A() such that
A1: x = a and
A2: ( P[a])& Q[a];
a in A1 & a in A2 by A2;
hence thesis by A1,XBOOLE_0:def 4;
end;
let x be set;
assume
A3: x in A1 /\ A2;
then x in A2 by XBOOLE_0:def 4;
then
A4: ex a being Element of A() st x = a & Q[a];
x in A1 by A3,XBOOLE_0:def 4;
then ex a being Element of A() st x = a & P[a];
hence thesis by A4;
end;
registration
let A be non empty set;
cluster c=-linear non empty for Subset of A;
existence
proof
set a = the Element of A;
reconsider B = { a } as non empty Subset of A;
take B;
B is c=-linear
proof
let x,y be set;
assume that
A1: x in B and
A2: y in B;
x = a by A1,TARSKI:def 1;
hence thesis by A2,TARSKI:def 1;
end;
hence thesis;
end;
end;
begin
reserve p,q,x,x1,x2,y,y1,y2,z,z1,z2 for set;
reserve A,B,V,X,X1,X2,Y,Y1,Y2,Z for set;
reserve C,C1,C2,D,D1,D2 for non empty set;
theorem Th1:
A c= Y implies id A = (id Y)|A
proof
assume A c= Y;
hence id A = id(Y /\ A) by XBOOLE_1:28
.= (id Y)*(id A) by FUNCT_1:22
.= (id Y)|A by RELAT_1:65;
end;
theorem Th2:
for f,g being Function st X c= dom(g*f) holds f.:X c= dom g
proof
let f,g be Function such that
A1: X c= dom(g*f);
let y;
assume y in f.:X;
then ex x st x in dom f & x in X & y = f.x by FUNCT_1:def 6;
hence thesis by A1,FUNCT_1:11;
end;
theorem Th3:
for f,g being Function st X c= dom f & f.:X c= dom g holds X c= dom(g*f)
proof
let f,g be Function such that
A1: X c= dom f and
A2: f.:X c= dom g;
let x;
assume
A3: x in X;
then f.x in f.:X by A1,FUNCT_1:def 6;
hence thesis by A1,A2,A3,FUNCT_1:11;
end;
theorem Th4:
for f,g being Function st Y c= rng(g*f) & g is one-to-one holds g "Y c= rng f
proof
let f,g be Function such that
A1: Y c= rng(g*f) and
A2: g is one-to-one;
let y;
assume
A3: y in g"Y;
then
A4: y in dom g by FUNCT_1:def 7;
g.y in Y by A3,FUNCT_1:def 7;
then consider x such that
A5: x in dom(g*f) and
A6: g.y = (g*f).x by A1,FUNCT_1:def 3;
A7: x in dom f by A5,FUNCT_1:11;
g.y = g.(f.x) & f.x in dom g by A5,A6,FUNCT_1:11,12;
then y = f.x by A2,A4,FUNCT_1:def 4;
hence thesis by A7,FUNCT_1:def 3;
end;
theorem Th5:
for f,g being Function st Y c= rng g & g"Y c= rng f holds Y c= rng(g*f)
proof
let f,g be Function such that
A1: Y c= rng g and
A2: g"Y c= rng f;
let y;
assume
A3: y in Y;
then consider z such that
A4: z in dom g & y = g.z by A1,FUNCT_1:def 3;
z in g"Y by A3,A4,FUNCT_1:def 7;
then consider x such that
A5: x in dom f & z = f.x by A2,FUNCT_1:def 3;
x in dom(g*f) & (g*f).x = y by A4,A5,FUNCT_1:11,13;
hence thesis by FUNCT_1:def 3;
end;
scheme
FuncEx3{A()->set,B()-> set,P[set,set,set]}: ex f being Function st dom f =
[:A(),B():] & for x,y st x in A() & y in B() holds P[x,y,f.(x,y)]
provided
A1: for x,y,z1,z2 st x in A() & y in B() & P[x,y,z1] & P[x,y,z2] holds
z1 = z2 and
A2: for x,y st x in A() & y in B() ex z st P[x,y,z]
proof
defpred R[set,set] means for x,y st $1=[x,y] holds P[x,y,$2];
set D = [:A(), B():];
A3: for p st p in D ex z st R[p,z]
proof
let p;
assume p in D;
then consider x1,y1 such that
A4: x1 in A() & y1 in B() and
A5: p = [x1,y1] by ZFMISC_1:def 2;
consider z such that
A6: P[x1,y1,z] by A2,A4;
take z;
let x,y;
assume
A7: p=[x,y];
then x=x1 by A5,XTUPLE_0:1;
hence thesis by A5,A6,A7,XTUPLE_0:1;
end;
A8: for p,y1,y2 st p in D & R[p,y1] & R[p,y2] holds y1 = y2
proof
let p,y1,y2;
assume p in D;
then consider x1,x2 such that
A9: x1 in A() & x2 in B() and
A10: p = [x1,x2] by ZFMISC_1:def 2;
assume
( for x,y st p=[x,y] holds P[x,y,y1])& for x,y st p=[x,y] holds P[ x,y,y2];
then ( P[x1,x2,y1])& P[x1,x2,y2] by A10;
hence thesis by A1,A9;
end;
consider f being Function such that
A11: dom f = D and
A12: for p st p in D holds R[p,f.p] from FUNCT_1:sch 2(A8,A3);
take f;
thus dom f = [:A(),B():] by A11;
let x,y;
assume x in A() & y in B();
then [x,y] in [:A(),B():] by ZFMISC_1:def 2;
hence thesis by A12;
end;
scheme
Lambda3{A()->set,B()->set,F(set,set)->set}: ex f being Function st dom f =
[:A(),B():] & for x,y st x in A() & y in B() holds f.(x,y) = F(x,y) proof
defpred P[set,set,set] means $3 = F($1,$2);
A1: for x,y st x in A() & y in B() ex z st P[x,y,z];
A2: for x,y,z1,z2 st x in A() & y in B() & P[x,y,z1] & P[x,y,z2] holds z1=z2;
ex f being Function st dom f = [:A(),B():] & for x,y st x in A() & y in
B() holds P[x,y,f.(x,y)] from FuncEx3(A2,A1);
hence thesis;
end;
theorem Th6:
for f,g being Function st dom f = [:X,Y:] & dom g = [:X,Y:] & for
x,y st x in X & y in Y holds f.(x,y) = g.(x,y) holds f = g
proof
let f,g be Function such that
A1: dom f = [:X,Y:] & dom g = [:X,Y:] and
A2: for x,y st x in X & y in Y holds f.(x,y) = g.(x,y);
p in [:X,Y:] implies f.p = g.p
proof
assume p in [:X,Y:];
then consider x,y such that
A3: x in X & y in Y and
A4: p = [x,y] by ZFMISC_1:def 2;
f.(x,y) = g.(x,y) by A2,A3;
hence thesis by A4;
end;
hence thesis by A1,FUNCT_1:2;
end;
definition
let f be Function;
func .:f -> Function means
:Def1:
dom it = bool dom f & for X st X c= dom f holds it.X = f.:X;
existence
proof
defpred P[set,set] means for X st $1=X holds $2 = f.:X;
A1: for x st x in bool dom f ex y st P[x,y]
proof
let x such that
x in bool dom f;
take f.:x;
thus thesis;
end;
A2: for x,y1,y2 st x in bool dom f & P[x,y1] & P[x,y2] holds y1=y2
proof
let x,y1,y2 such that
x in bool dom f and
A3: for X st x=X holds y1 = f.:X and
A4: for X st x=X holds y2 = f.:X;
thus y1 = f.:x by A3
.= y2 by A4;
end;
consider g being Function such that
A5: dom g = bool dom f & for x st x in bool dom f holds P[x,g.x] from
FUNCT_1:sch 2(A2,A1);
take g;
thus thesis by A5;
end;
uniqueness
proof
let f1,f2 be Function such that
A6: dom f1 = bool dom f and
A7: for X st X c= dom f holds f1.X = f.:X and
A8: dom f2 = bool dom f and
A9: for X st X c= dom f holds f2.X = f.:X;
for x st x in bool dom f holds f1.x = f2.x
proof
let x;
assume
A10: x in bool dom f;
then f1.x = f.:x by A7;
hence thesis by A9,A10;
end;
hence thesis by A6,A8,FUNCT_1:2;
end;
end;
theorem Th7:
for f being Function st X in dom(.:f) holds (.:f).X = f.:X
proof
let f be Function;
assume X in dom(.:f);
then X in bool dom f by Def1;
hence thesis by Def1;
end;
theorem
for f being Function holds (.:f).{} = {}
proof
let f be Function;
{} c= dom f by XBOOLE_1:2;
then (.:f).{} = f.:{} by Def1;
hence thesis;
end;
theorem Th9:
for f being Function holds rng(.:f) c= bool rng f
proof
let f be Function;
let y;
assume y in rng(.:f);
then consider x such that
A1: x in dom(.:f) & y = (.:f).x by FUNCT_1:def 3;
y = f.:x by A1,Th7;
then y c= rng f by RELAT_1:111;
hence thesis;
end;
theorem
for f being Function holds (.:f).:A c= bool rng f
proof
let f be Function;
(.:f).:A c= rng(.:f) & rng(.:f) c= bool rng f by Th9,RELAT_1:111;
hence thesis by XBOOLE_1:1;
end;
theorem Th11:
for f being Function holds (.:f)"B c= bool dom f
proof
let f be Function;
dom(.:f) = bool dom f by Def1;
hence thesis by RELAT_1:132;
end;
theorem
for f being Function of X,D holds (.:f)"B c= bool X
proof
let f be Function of X,D;
dom f = X by FUNCT_2:def 1;
hence thesis by Th11;
end;
theorem Th13:
for f being Function holds union((.:f).:A) c= f.:(union A)
proof
let f be Function;
let y;
assume y in union((.:f).:A);
then consider Z such that
A1: y in Z and
A2: Z in (.:f).:A by TARSKI:def 4;
consider X such that
A3: X in dom(.:f) and
A4: X in A and
A5: Z = (.:f).X by A2,FUNCT_1:def 6;
y in f.:X by A1,A3,A5,Th7;
then consider x such that
A6: x in dom f and
A7: x in X and
A8: y = f.x by FUNCT_1:def 6;
x in union A by A4,A7,TARSKI:def 4;
hence thesis by A6,A8,FUNCT_1:def 6;
end;
theorem Th14:
for f being Function st A c= bool dom f holds f.:(union A) = union((.:f).:A)
proof
let f be Function such that
A1: A c= bool dom f;
A2: f.:(union A) c= union((.:f).:A)
proof
let y;
assume y in f.:(union A);
then consider x such that
x in dom f and
A3: x in union A and
A4: y = f.x by FUNCT_1:def 6;
consider X such that
A5: x in X and
A6: X in A by A3,TARSKI:def 4;
X in bool dom f by A1,A6;
then X in dom(.:f) by Def1;
then
A7: (.:f).X in (.:f).:A by A6,FUNCT_1:def 6;
y in f.:X by A1,A4,A5,A6,FUNCT_1:def 6;
then y in (.:f).X by A1,A6,Def1;
hence thesis by A7,TARSKI:def 4;
end;
union((.:f).:A) c= f.:(union A) by Th13;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
for f being Function of X,D st A c= bool X holds f.:(union A) = union(
(.:f).:A)
proof
let f be Function of X,D;
dom f = X by FUNCT_2:def 1;
hence thesis by Th14;
end;
theorem Th16:
for f being Function holds union((.:f)"B) c= f"(union B)
proof
let f be Function;
let x;
assume x in union((.:f)"B);
then consider X such that
A1: x in X and
A2: X in (.:f)"B by TARSKI:def 4;
dom(.:f) = bool dom f by Def1;
then
A3: X in bool dom f by A2,FUNCT_1:def 7;
then
A4: f.x in f.:X by A1,FUNCT_1:def 6;
(.:f).X in B by A2,FUNCT_1:def 7;
then f.:X in B by A3,Def1;
then f.x in union B by A4,TARSKI:def 4;
hence thesis by A1,A3,FUNCT_1:def 7;
end;
theorem
for f being Function st B c= bool rng f holds f"(union B) = union((.:f
) " B )
proof
let f be Function such that
A1: B c= bool rng f;
A2: f"(union B) c= union((.:f)"B)
proof
let x;
assume
A3: x in f"(union B);
then f.x in union B by FUNCT_1:def 7;
then consider Y such that
A4: f.x in Y and
A5: Y in B by TARSKI:def 4;
A6: f"Y c= dom f by RELAT_1:132;
then f"Y in bool dom f;
then
A7: f"Y in dom(.:f) by Def1;
f.:(f"Y) = Y by A1,A5,FUNCT_1:77;
then (.:f).(f"Y) in B by A5,A6,Def1;
then
A8: f"Y in (.:f)"B by A7,FUNCT_1:def 7;
x in dom f by A3,FUNCT_1:def 7;
then x in f"Y by A4,FUNCT_1:def 7;
hence thesis by A8,TARSKI:def 4;
end;
union((.:f)"B) c= f"(union B) by Th16;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem
for f,g being Function holds .:(g*f) = .:g*.:f
proof
let f,g be Function;
for x holds x in dom .:(g*f) iff x in dom(.:g*.:f)
proof
let x;
thus x in dom .:(g*f) implies x in dom(.:g*.:f)
proof
assume x in dom .:(g*f);
then
A1: x in bool dom(g*f) by Def1;
dom(g*f) c= dom f by RELAT_1:25;
then
A2: x c= dom f by A1,XBOOLE_1:1;
then x in bool dom f;
then
A3: x in dom .:f by Def1;
f.:x c= dom g by A1,Th2;
then f.:x in bool dom g;
then f.:x in dom .:g by Def1;
then .:f.x in dom .:g by A2,Def1;
hence thesis by A3,FUNCT_1:11;
end;
assume
A4: x in dom(.:g*.:f);
then
A5: x in dom .:f by FUNCT_1:11;
.:f.x in dom .:g by A4,FUNCT_1:11;
then f.:x in dom .:g by A5,Th7;
then
A6: f.:x in bool dom g by Def1;
x in bool dom f by A5,Def1;
then x c= dom(g*f) by A6,Th3;
then x in bool dom(g*f);
hence thesis by Def1;
end;
then
A7: dom .:(g*f) = dom(.:g*.:f) by TARSKI:1;
for x st x in dom .:(g*f) holds (.:(g*f)).x = (.:g*.:f).x
proof
let x;
assume
A8: x in dom .:(g*f);
then
A9: x in bool dom(g*f) by Def1;
then
A10: f.:x c= dom g by Th2;
dom(g*f) c= dom f by RELAT_1:25;
then
A11: x c= dom f by A9,XBOOLE_1:1;
then x in bool dom f;
then
A12: x in dom .:f by Def1;
thus (.:(g*f)).x = (g*f).:x by A8,Th7
.= g.:(f.:x) by RELAT_1:126
.= .:g.(f.:x) by A10,Def1
.= .:g.(.:f.x) by A11,Def1
.= (.:g*.:f).x by A12,FUNCT_1:13;
end;
hence thesis by A7,FUNCT_1:2;
end;
theorem Th19:
for f being Function holds .:f is Function of bool dom f, bool rng f
proof
let f be Function;
dom .:f = bool dom f & rng.:f c= bool rng f by Def1,Th9;
hence thesis by FUNCT_2:def 1,RELSET_1:4;
end;
theorem Th20:
for f being Function of X,Y st Y = {} implies X = {} holds .:f
is Function of bool X, bool Y
proof
let f be Function of X,Y;
assume Y = {} implies X = {};
then
A1: dom f = X by FUNCT_2:def 1;
rng f c= Y by RELAT_1:def 19;
then
A2: bool rng f c= bool Y by ZFMISC_1:67;
A3: .:f is Function of bool dom f, bool rng f by Th19;
then rng.:f c= bool rng f by RELAT_1:def 19;
then
A4: rng.:f c= bool Y by A2,XBOOLE_1:1;
dom.:f = bool dom f by A3,FUNCT_2:def 1;
hence thesis by A1,A4,FUNCT_2:def 1,RELSET_1:4;
end;
definition
let X,D;
let f be Function of X,D;
redefine func .:f -> Function of bool X, bool D;
coherence by Th20;
end;
definition
let f be Function;
func "f -> Function means
:Def2:
dom it = bool rng f & for Y st Y c= rng f holds it.Y = f"Y;
existence
proof
defpred P[set,set] means for Y st $1=Y holds $2 = f"Y;
A1: for y st y in bool rng f ex x st P[y,x]
proof
let y such that
y in bool rng f;
take f"y;
thus thesis;
end;
A2: for y,x1,x2 st y in bool rng f & P[y,x1] & P[y,x2] holds x1=x2
proof
let y,x1,x2 such that
y in bool rng f and
A3: for Y st y=Y holds x1 = f"Y and
A4: for Y st y=Y holds x2 = f"Y;
thus x1 = f"y by A3
.= x2 by A4;
end;
consider g being Function such that
A5: dom g = bool rng f & for y st y in bool rng f holds P[y,g.y] from
FUNCT_1:sch 2(A2,A1);
take g;
thus thesis by A5;
end;
uniqueness
proof
let f1,f2 be Function such that
A6: dom f1 = bool rng f and
A7: for Y st Y c= rng f holds f1.Y = f"Y and
A8: dom f2 = bool rng f and
A9: for Y st Y c= rng f holds f2.Y = f"Y;
for y st y in bool rng f holds f1.y = f2.y
proof
let y;
assume
A10: y in bool rng f;
then f1.y = f"y by A7;
hence thesis by A9,A10;
end;
hence thesis by A6,A8,FUNCT_1:2;
end;
end;
theorem Th21:
for f being Function st Y in dom("f) holds ("f).Y = f"Y
proof
let f be Function;
dom("f) = bool rng f by Def2;
hence thesis by Def2;
end;
theorem Th22:
for f being Function holds rng("f) c= bool dom f
proof
let f be Function;
let x;
assume x in rng("f);
then consider y such that
A1: y in dom("f) & x = "f.y by FUNCT_1:def 3;
x = f"y by A1,Th21;
then x c= dom f by RELAT_1:132;
hence thesis;
end;
theorem
for f being Function holds ("f).:B c= bool dom f
proof
let f be Function;
rng("f) c= bool dom f & ("f).:B c= rng("f) by Th22,RELAT_1:111;
hence thesis by XBOOLE_1:1;
end;
theorem
for f being Function holds ("f)"A c= bool rng f
proof
let f be Function;
dom("f) = bool rng f by Def2;
hence thesis by RELAT_1:132;
end;
theorem Th25:
for f being Function holds union(("f).:B) c= f"(union B)
proof
let f be Function;
let x;
assume x in union(("f).:B);
then consider X such that
A1: x in X and
A2: X in ("f).:B by TARSKI:def 4;
consider Y such that
A3: Y in dom("f) and
A4: Y in B and
A5: X = "f.Y by A2,FUNCT_1:def 6;
A6: ("f).Y = f"Y by A3,Th21;
Y in bool rng f by A3,Def2;
then
A7: f.:X in B by A4,A5,A6,FUNCT_1:77;
A8: f"Y c= dom f by RELAT_1:132;
then f.x in f.:X by A1,A5,A6,FUNCT_1:def 6;
then f.x in union B by A7,TARSKI:def 4;
hence thesis by A1,A5,A6,A8,FUNCT_1:def 7;
end;
theorem
for f being Function st B c= bool rng f holds union(("f).:B) = f"( union B )
proof
let f be Function such that
A1: B c= bool rng f;
A2: f"(union B) c= union(("f).:B)
proof
let x;
assume
A3: x in f"(union B);
then f.x in union B by FUNCT_1:def 7;
then consider Y such that
A4: f.x in Y and
A5: Y in B by TARSKI:def 4;
x in dom f by A3,FUNCT_1:def 7;
then
A6: x in f"Y by A4,FUNCT_1:def 7;
Y in bool rng f by A1,A5;
then
A7: Y in dom("f) by Def2;
("f).Y = f"Y by A1,A5,Def2;
then f"Y in ("f).:B by A5,A7,FUNCT_1:def 6;
hence thesis by A6,TARSKI:def 4;
end;
union(("f).:B) c= f"(union B) by Th25;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem Th27:
for f being Function holds union(("f)"A) c= f.:(union A)
proof
let f be Function;
let y;
assume y in union(("f)"A);
then consider Y such that
A1: y in Y and
A2: Y in ("f)"A by TARSKI:def 4;
dom("f) = bool rng f by Def2;
then
A3: Y in bool rng f by A2,FUNCT_1:def 7;
then consider x such that
A4: x in dom f & y = f.x by A1,FUNCT_1:def 3;
"f.Y in A by A2,FUNCT_1:def 7;
then
A5: f"Y in A by A3,Def2;
x in f"Y by A1,A4,FUNCT_1:def 7;
then x in union A by A5,TARSKI:def 4;
hence thesis by A4,FUNCT_1:def 6;
end;
theorem
for f being Function st A c= bool dom f & f is one-to-one holds union(
("f)"A) = f.:(union A)
proof
let f be Function such that
A1: A c= bool dom f and
A2: f is one-to-one;
A3: f.:(union A) c= union(("f)"A)
proof
let y;
assume y in f.:(union A);
then consider x such that
A4: x in dom f and
A5: x in union A and
A6: y = f.x by FUNCT_1:def 6;
consider X such that
A7: x in X and
A8: X in A by A5,TARSKI:def 4;
A9: f"(f.:X) c= X by A2,FUNCT_1:82;
A10: f.:X c= rng f by RELAT_1:111;
then f.:X in bool rng f;
then
A11: (f.:X) in dom("f) by Def2;
X c= f"(f.:X) by A1,A8,FUNCT_1:76;
then f"(f.:X) = X by A9,XBOOLE_0:def 10;
then ("f).(f.:X) in A by A8,A10,Def2;
then
A12: (f.:X) in ("f)"A by A11,FUNCT_1:def 7;
y in (f.:X) by A4,A6,A7,FUNCT_1:def 6;
hence thesis by A12,TARSKI:def 4;
end;
union(("f)"A) c= f.:(union A) by Th27;
hence thesis by A3,XBOOLE_0:def 10;
end;
theorem Th29:
for f being Function holds ("f).:B c= (.:f)"B
proof
let f be Function;
let x;
assume x in ("f).:B;
then consider Y such that
A1: Y in dom ("f) and
A2: Y in B and
A3: x = "f.Y by FUNCT_1:def 6;
A4: "f.Y = f"Y by A1,Th21;
then
A5: x c= dom f by A3,RELAT_1:132;
then x in bool dom f;
then
A6: x in dom(.:f) by Def1;
Y in bool rng f by A1,Def2;
then f.:x in B by A2,A3,A4,FUNCT_1:77;
then (.:f).x in B by A5,Def1;
hence thesis by A6,FUNCT_1:def 7;
end;
theorem
for f being Function st f is one-to-one holds ("f).:B = (.:f)"B
proof
let f be Function such that
A1: f is one-to-one;
A2: (.:f)"B c= ("f).:B
proof
let x;
A3: f.:x c= rng f by RELAT_1:111;
then f.:x in bool rng f;
then
A4: f.:x in dom("f) by Def2;
assume
A5: x in (.:f)"B;
then
A6: x in dom(.:f) by FUNCT_1:def 7;
then x in bool dom f by Def1;
then
A7: x c= f"(f.:x) by FUNCT_1:76;
f"(f.:x) c= x by A1,FUNCT_1:82;
then x = f"(f.:x) by A7,XBOOLE_0:def 10;
then
A8: x =("f).(f.:x) by A3,Def2;
(.:f).x in B by A5,FUNCT_1:def 7;
then f.:x in B by A6,Th7;
hence thesis by A8,A4,FUNCT_1:def 6;
end;
("f).:B c= (.:f)"B by Th29;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem Th31:
for f being Function,A be set st A c= bool dom f holds ("f)"A c= (.:f).:A
proof
let f be Function,A be set such that
A1: A c= bool dom f;
let y;
assume
A2: y in ("f)"A;
then
A3: "f.y in A by FUNCT_1:def 7;
y in dom("f) by A2,FUNCT_1:def 7;
then
A4: y in bool rng f by Def2;
then
A5: f"y in A by A3,Def2;
then f"y in bool dom f by A1;
then
A6: f"y in dom .:f by Def1;
f.:(f"y) = y by A4,FUNCT_1:77;
then
A7: .:f.(f"y) = y by A1,A5,Def1;
f"y in A by A3,A4,Def2;
hence thesis by A7,A6,FUNCT_1:def 6;
end;
theorem Th32:
for f being Function,A be set st f is one-to-one holds (.:f).:A c= ("f)"A
proof
let f be Function,A be set such that
A1: f is one-to-one;
let y;
assume y in (.:f).:A;
then consider x such that
A2: x in dom(.:f) and
A3: x in A and
A4: y = .:f.x by FUNCT_1:def 6;
A5: x in bool dom f by A2,Def1;
then
A6: y = f.:x by A4,Def1;
then
A7: x c= f"y by A5,FUNCT_1:76;
A8: y c= rng f by A6,RELAT_1:111;
then y in bool rng f;
then
A9: y in dom("f) by Def2;
f"y c= x by A1,A6,FUNCT_1:82;
then f"y in A by A3,A7,XBOOLE_0:def 10;
then "f.y in A by A8,Def2;
hence thesis by A9,FUNCT_1:def 7;
end;
theorem
for f being Function,A be set st f is one-to-one & A c= bool dom f
holds ("f)"A = (.:f).:A
proof
let f be Function,A be set;
assume f is one-to-one & A c= bool dom f;
then ("f)"A c= (.:f).:A & (.:f).:A c= ("f)"A by Th31,Th32;
hence thesis by XBOOLE_0:def 10;
end;
theorem
for f,g being Function st g is one-to-one holds "(g*f) = "f*"g
proof
let f,g be Function such that
A1: g is one-to-one;
for y holds y in dom "(g*f) iff y in dom("f*"g)
proof
let y;
thus y in dom "(g*f) implies y in dom("f*"g)
proof
assume y in dom "(g*f);
then
A2: y in bool rng(g*f) by Def2;
rng(g*f) c= rng g by RELAT_1:26;
then
A3: y c= rng g by A2,XBOOLE_1:1;
then y in bool rng g;
then
A4: y in dom "g by Def2;
g"y c= rng f by A1,A2,Th4;
then g"y in bool rng f;
then g"y in dom "f by Def2;
then "g.y in dom "f by A3,Def2;
hence thesis by A4,FUNCT_1:11;
end;
assume
A5: y in dom("f*"g);
then
A6: y in dom "g by FUNCT_1:11;
"g.y in dom "f by A5,FUNCT_1:11;
then g"y in dom "f by A6,Th21;
then
A7: g"y in bool rng f by Def2;
y in bool rng g by A6,Def2;
then y c= rng(g*f) by A7,Th5;
then y in bool rng(g*f);
hence thesis by Def2;
end;
then
A8: dom "(g*f) = dom("f*"g) by TARSKI:1;
for y st y in dom "(g*f) holds "(g*f).y = ("f*"g).y
proof
let y;
assume
A9: y in dom "(g*f);
then
A10: y in bool rng(g*f) by Def2;
then
A11: g"y c= rng f by A1,Th4;
rng(g*f) c= rng g by RELAT_1:26;
then
A12: y c= rng g by A10,XBOOLE_1:1;
then y in bool rng g;
then
A13: y in dom "g by Def2;
thus "(g*f).y = (g*f)"y by A9,Th21
.= f"(g"y) by RELAT_1:146
.= "f.(g"y) by A11,Def2
.= "f.("g.y) by A12,Def2
.= ("f*"g).y by A13,FUNCT_1:13;
end;
hence thesis by A8,FUNCT_1:2;
end;
theorem
for f being Function holds "f is Function of bool rng f, bool dom f
proof
let f be Function;
dom"f = bool rng f & rng"f c= bool dom f by Def2,Th22;
hence thesis by FUNCT_2:def 1,RELSET_1:4;
end;
definition
let A,X;
func chi(A,X) -> Function means
:Def3:
dom it = X & for x st x in X holds (x
in A implies it.x = 1) & (not x in A implies it.x = {});
existence
proof
defpred P[set,set] means ($1 in A implies $2 = 1) & (not $1 in A implies
$2 = {});
A1: for x st x in X ex y st P[x,y]
proof
let x;
assume x in X;
not x in A implies ex y st y = {} & (x in A implies y = 1) & (not x
in A implies y = {});
hence thesis;
end;
A2: for x,y1,y2 st x in X & P[x,y1] & P[x,y2] holds y1 = y2;
ex f being Function st dom f = X & for x st x in X holds P[x,f.x] from
FUNCT_1:sch 2(A2,A1);
hence thesis;
end;
uniqueness
proof
let f1,f2 be Function such that
A3: dom f1 = X and
A4: for x st x in X holds (x in A implies f1.x = 1) & (not x in A
implies f1.x = {}) and
A5: dom f2 = X and
A6: for x st x in X holds (x in A implies f2.x = 1) & (not x in A
implies f2.x = {});
for x st x in X holds f1.x=f2.x
proof
let x;
assume
A7: x in X;
then
A8: not x in A implies f1.x = {} & f2.x = {} by A4,A6;
x in A implies f1.x = 1 & f2.x = 1 by A4,A6,A7;
hence thesis by A8;
end;
hence thesis by A3,A5,FUNCT_1:2;
end;
end;
theorem Th36:
chi(A,X).x = 1 implies x in A
proof
assume
A1: chi(A,X).x = 1;
per cases;
suppose
x in X;
hence thesis by A1,Def3;
end;
suppose
not x in X;
then not x in dom chi(A,X) by Def3;
hence thesis by A1,FUNCT_1:def 2;
end;
end;
theorem
x in X \ A implies chi(A,X).x = {}
proof
assume
A1: x in X\A;
then not x in A by XBOOLE_0:def 5;
hence thesis by A1,Def3;
end;
theorem
A c= X & B c= X & chi(A,X) = chi(B,X) implies A = B
proof
assume that
A1: A c= X and
A2: B c= X and
A3: chi(A,X) = chi(B,X);
x in A iff x in B
proof
thus x in A implies x in B
proof
assume x in A;
then chi(A,X).x = 1 by A1,Def3;
hence thesis by A3,Th36;
end;
assume x in B;
then chi(B,X).x = 1 by A2,Def3;
hence thesis by A3,Th36;
end;
hence thesis by TARSKI:1;
end;
theorem Th39:
rng chi(A,X) c= {{},1}
proof
let y;
assume y in rng chi(A,X);
then consider x such that
A1: x in dom chi(A,X) and
A2: y = chi(A,X).x by FUNCT_1:def 3;
A3: x in A or not x in A;
x in X by A1,Def3;
then y = {} or y = 1 by A2,A3,Def3;
hence thesis by TARSKI:def 2;
end;
theorem
for f being Function of X,{{},1} holds f = chi(f"{1},X)
proof
let f be Function of X,{{},1};
now
thus
A1: dom f = X by FUNCT_2:def 1;
let x such that
A2: x in X;
thus x in f"{1} implies f.x = 1
proof
assume x in f"{1};
then f.x in {1} by FUNCT_1:def 7;
hence thesis by TARSKI:def 1;
end;
assume not x in f"{1};
then not f.x in {1} by A1,A2,FUNCT_1:def 7;
then
A3: rng f c= {{},1} & f.x <> 1 by RELAT_1:def 19,TARSKI:def 1;
f.x in rng f by A1,A2,FUNCT_1:def 3;
hence f.x = {} by A3,TARSKI:def 2;
end;
hence thesis by Def3;
end;
definition
let A,X;
redefine func chi(A,X) -> Function of X,{{},1};
coherence
proof
dom chi(A,X) = X & rng chi(A,X) c= {{},1} by Def3,Th39;
hence thesis by FUNCT_2:def 1,RELSET_1:4;
end;
end;
notation
let Y;
let A be Subset of Y;
synonym incl A for id A;
end;
definition
let Y;
let A be Subset of Y;
redefine func incl A -> Function of A,Y;
coherence
proof
A1: rng id A = A & dom id A = A;
thus thesis by A1,FUNCT_2:2;
end;
end;
theorem
for A being Subset of Y holds incl A = (id Y)|A by Th1;
theorem
for A being Subset of Y st x in A holds incl(A).x in Y
proof
let A be Subset of Y such that
A1: x in A;
dom incl A = A & rng incl A = A;
then incl(A).x in A by A1,FUNCT_1:def 3;
hence thesis;
end;
definition
let X,Y;
func pr1(X,Y) -> Function means
:Def4:
dom it = [:X,Y:] & for x,y st x in X & y in Y holds it.(x,y) = x;
existence
proof
deffunc F(set,set) = $1;
ex f being Function st dom f = [:X,Y:] & for x,y st x in X & y in Y
holds f.(x,y) = F(x,y) from Lambda3;
hence thesis;
end;
uniqueness
proof
let f1,f2 be Function such that
A1: dom f1 = [:X,Y:] and
A2: for x,y st x in X & y in Y holds f1.(x,y) = x and
A3: dom f2 = [:X,Y:] and
A4: for x,y st x in X & y in Y holds f2.(x,y) = x;
for x,y st x in X & y in Y holds f1.(x,y) = f2.(x,y)
proof
let x,y;
assume
A5: x in X & y in Y;
then f1.(x,y) = x by A2;
hence thesis by A4,A5;
end;
hence thesis by A1,A3,Th6;
end;
func pr2(X,Y) -> Function means
:Def5:
dom it = [:X,Y:] & for x,y st x in X & y in Y holds it.(x,y) = y;
existence
proof
deffunc F(set,set) = $2;
ex f being Function st dom f = [:X,Y:] & for x,y st x in X & y in Y
holds f.(x,y) = F(x,y) from Lambda3;
hence thesis;
end;
uniqueness
proof
let f1,f2 be Function such that
A6: dom f1 = [:X,Y:] and
A7: for x,y st x in X & y in Y holds f1.(x,y) = y and
A8: dom f2 = [:X,Y:] and
A9: for x,y st x in X & y in Y holds f2.(x,y) = y;
for x,y st x in X & y in Y holds f1.(x,y) = f2.(x,y)
proof
let x,y;
assume
A10: x in X & y in Y;
then f1.(x,y) = y by A7;
hence thesis by A9,A10;
end;
hence thesis by A6,A8,Th6;
end;
end;
theorem Th43:
rng pr1(X,Y) c= X
proof
let x;
assume x in rng pr1(X,Y);
then consider p such that
A1: p in dom pr1(X,Y) and
A2: x = pr1(X,Y).p by FUNCT_1:def 3;
p in [:X,Y:] by A1,Def4;
then consider x1,y1 such that
A3: x1 in X & y1 in Y and
A4: p = [x1,y1] by ZFMISC_1:def 2;
x =pr1(X,Y).(x1,y1) by A2,A4;
hence thesis by A3,Def4;
end;
theorem
Y <> {} implies rng pr1(X,Y) = X
proof
set y = the Element of Y;
assume
A1: Y <> {};
A2: X c= rng pr1(X,Y)
proof
let x;
assume
A3: x in X;
then [x,y] in [:X,Y:] by A1,ZFMISC_1:87;
then
A4: [x,y] in dom pr1(X,Y) by Def4;
pr1(X,Y).(x,y) = x by A1,A3,Def4;
hence thesis by A4,FUNCT_1:def 3;
end;
rng pr1(X,Y) c= X by Th43;
hence thesis by A2,XBOOLE_0:def 10;
end;
theorem Th45:
rng pr2(X,Y) c= Y
proof
let y;
assume y in rng pr2(X,Y);
then consider p such that
A1: p in dom pr2(X,Y) and
A2: y = pr2(X,Y).p by FUNCT_1:def 3;
p in [:X,Y:] by A1,Def5;
then consider x1,y1 such that
A3: x1 in X & y1 in Y and
A4: p = [x1,y1] by ZFMISC_1:def 2;
y = pr2(X,Y).(x1,y1) by A2,A4;
hence thesis by A3,Def5;
end;
theorem
X <> {} implies rng pr2(X,Y) = Y
proof
set x = the Element of X;
assume
A1: X <> {};
A2: Y c= rng pr2(X,Y)
proof
let y;
assume
A3: y in Y;
then [x,y] in [:X,Y:] by A1,ZFMISC_1:87;
then
A4: [x,y] in dom pr2(X,Y) by Def5;
pr2(X,Y).(x,y) = y by A1,A3,Def5;
hence thesis by A4,FUNCT_1:def 3;
end;
rng pr2(X,Y) c= Y by Th45;
hence thesis by A2,XBOOLE_0:def 10;
end;
definition
let X,Y;
redefine func pr1(X,Y) -> Function of [:X,Y:],X;
coherence
proof
per cases;
suppose
X = {} implies [:X,Y:] = {};
dom pr1(X,Y) = [:X,Y:] & rng pr1(X,Y) c= X by Def4,Th43;
hence thesis by FUNCT_2:2;
end;
suppose
X = {} & [:X,Y:] <> {};
hence thesis by ZFMISC_1:90;
end;
end;
redefine func pr2(X,Y) -> Function of [:X,Y:],Y;
coherence
proof
per cases;
suppose
Y = {} implies [:X,Y:] = {};
dom pr2(X,Y) = [:X,Y:] & rng pr2(X,Y) c= Y by Def5,Th45;
hence thesis by FUNCT_2:2;
end;
suppose
Y = {} & [:X,Y:] <> {};
hence thesis by ZFMISC_1:90;
end;
end;
end;
definition
let X;
func delta(X) -> Function means
:Def6:
dom it = X & for x st x in X holds it .x = [x,x];
existence
proof
deffunc F(set) = [$1,$1];
ex f being Function st dom f = X & for x st x in X holds f.x = F(x)
from FUNCT_1:sch 3;
hence thesis;
end;
uniqueness
proof
let f1,f2 be Function such that
A1: dom f1 = X and
A2: for x st x in X holds f1.x = [x,x] and
A3: dom f2 = X and
A4: for x st x in X holds f2.x = [x,x];
for x st x in X holds f1.x = f2.x
proof
let x;
assume
A5: x in X;
then f1.x = [x,x] by A2;
hence thesis by A4,A5;
end;
hence thesis by A1,A3,FUNCT_1:2;
end;
end;
theorem Th47:
rng delta X c= [:X,X:]
proof
let y;
assume y in rng delta X;
then consider x such that
A1: x in dom delta X and
A2: y = (delta X).x by FUNCT_1:def 3;
A3: x in X by A1,Def6;
then y = [x,x] by A2,Def6;
hence thesis by A3,ZFMISC_1:87;
end;
definition
let X;
redefine func delta(X) -> Function of X,[:X,X:];
coherence
proof
dom delta X = X & rng delta X c= [:X,X:] by Def6,Th47;
hence thesis by FUNCT_2:2;
end;
end;
definition
let f,g be Function;
func <:f,g:> -> Function means
:Def7:
dom it = dom f /\ dom g & for x st x in dom it holds it.x = [f.x,g.x];
existence
proof
deffunc F(set) = [f.$1,g.$1];
ex fg being Function st dom fg = dom f /\ dom g & for x st x in dom f
/\ dom g holds fg.x = F(x) from FUNCT_1:sch 3;
hence thesis;
end;
uniqueness
proof
let f1,f2 be Function such that
A1: dom f1 = dom f /\ dom g and
A2: for x st x in dom f1 holds f1.x = [f.x,g.x] and
A3: dom f2 = dom f /\ dom g and
A4: for x st x in dom f2 holds f2.x = [f.x,g.x];
for x st x in dom f /\ dom g holds f1.x=f2.x
proof
let x;
assume
A5: x in dom f /\ dom g;
then f1.x=[f.x,g.x] by A1,A2;
hence thesis by A3,A4,A5;
end;
hence thesis by A1,A3,FUNCT_1:2;
end;
end;
registration
let f be empty Function, g be Function;
cluster <:f,g:> -> empty;
coherence
proof
dom f = {};
then dom<:f,g:> = {} /\ dom g by Def7;
hence thesis;
end;
cluster <:g,f:> -> empty;
coherence
proof
dom f = {};
then dom<:g,f:> = {} /\ dom g by Def7;
hence thesis;
end;
end;
theorem Th48:
for f,g being Function st x in dom f /\ dom g holds <:f,g:>.x = [f.x,g.x]
proof
let f,g be Function;
assume x in dom f /\ dom g;
then x in dom <:f,g:> by Def7;
hence thesis by Def7;
end;
theorem Th49:
for f,g being Function st dom f = X & dom g = X & x in X holds
<:f,g:>.x = [f.x,g.x]
proof
let f,g be Function;
assume dom f = X & dom g = X & x in X;
then x in dom f /\ dom g;
then x in dom <:f,g:> by Def7;
hence thesis by Def7;
end;
theorem Th50:
for f,g being Function st dom f = X & dom g = X holds dom <:f,g :> = X
proof
let f,g be Function;
dom <:f,g:> = dom f /\ dom g by Def7;
hence thesis;
end;
theorem Th51:
for f,g being Function holds rng <:f,g:> c= [:rng f,rng g:]
proof
let f,g be Function;
let q;
assume q in rng <:f,g:>;
then consider x such that
A1: x in dom <:f,g:> and
A2: q = <:f,g:>.x by FUNCT_1:def 3;
A3: x in dom f /\ dom g by A1,Def7;
then x in dom f by XBOOLE_0:def 4;
then
A4: f.x in rng f by FUNCT_1:def 3;
x in dom g by A3,XBOOLE_0:def 4;
then
A5: g.x in rng g by FUNCT_1:def 3;
q = [f.x,g.x] by A1,A2,Def7;
hence thesis by A4,A5,ZFMISC_1:87;
end;
theorem Th52:
for f,g being Function st dom f = dom g & rng f c= Y & rng g c=
Z holds pr1(Y,Z)*<:f,g:> = f & pr2(Y,Z)*<:f,g:> = g
proof
let f,g be Function such that
A1: dom f = dom g and
A2: rng f c= Y & rng g c= Z;
A3: [:rng f, rng g:] c= [:Y,Z:] by A2,ZFMISC_1:96;
A4: rng <:f,g:> c= [:rng f, rng g:] by Th51;
dom pr1(Y,Z) = [:Y, Z:] by Def4;
then
A5: dom(pr1(Y,Z)*<:f,g:>) = dom <:f,g:> by A3,A4,RELAT_1:27,XBOOLE_1:1;
then
A6: dom(pr1(Y,Z)*<:f,g:>) = dom f by A1,Th50;
x in dom f implies (pr1(Y,Z)*<:f,g:>).x = f.x
proof
assume
A7: x in dom f;
then
A8: f.x in rng f & g.x in rng g by A1,FUNCT_1:def 3;
thus (pr1(Y,Z)*<:f,g:>).x = pr1(Y,Z).(<:f,g:>.x) by A6,A7,FUNCT_1:12
.= pr1(Y,Z).(f.x,g.x) by A5,A6,A7,Def7
.= f.x by A2,A8,Def4;
end;
hence pr1(Y,Z)*<:f,g:> = f by A6,FUNCT_1:2;
dom pr2(Y,Z) = [:Y, Z:] by Def5;
then
A9: dom(pr2(Y,Z)*<:f,g:>) = dom <:f,g:> by A3,A4,RELAT_1:27,XBOOLE_1:1;
then
A10: dom(pr2(Y,Z)*<:f,g:>) = dom g by A1,Th50;
x in dom g implies (pr2(Y,Z)*<:f,g:>).x = g.x
proof
assume
A11: x in dom g;
then
A12: f.x in rng f & g.x in rng g by A1,FUNCT_1:def 3;
thus (pr2(Y,Z)*<:f,g:>).x = pr2(Y,Z).(<:f,g:>.x) by A10,A11,FUNCT_1:12
.= pr2(Y,Z).(f.x,g.x) by A9,A10,A11,Def7
.= g.x by A2,A12,Def5;
end;
hence thesis by A10,FUNCT_1:2;
end;
theorem Th53:
<:pr1(X,Y),pr2(X,Y):> = id [:X,Y:]
proof
dom pr1(X,Y) = [:X,Y:] & dom pr2(X,Y) = [:X,Y:] by Def4,Def5;
then
A1: dom <:pr1(X,Y),pr2(X,Y):> = [:X,Y:] by Th50;
A2: for x,y st x in X & y in Y holds <:pr1(X,Y),pr2(X,Y):>.(x,y) = (id [:X,Y
:]).(x,y)
proof
let x,y;
assume
A3: x in X & y in Y;
then
A4: [x,y] in [:X,Y:] by ZFMISC_1:87;
hence <:pr1(X,Y),pr2(X,Y):>.(x,y) = [pr1(X,Y).(x,y),pr2(X,Y).(x,y)] by A1
,Def7
.= [x,pr2(X,Y).(x,y)] by A3,Def4
.= [x,y] by A3,Def5
.= (id [:X,Y:]).(x,y) by A4,FUNCT_1:18;
end;
dom id [:X,Y:] = [:X,Y:];
hence thesis by A1,A2,Th6;
end;
theorem Th54:
for f,g,h,k being Function st dom f = dom g & dom k = dom h & <:
f,g:> = <:k,h:> holds f = k & g = h
proof
let f,g,h,k be Function such that
A1: dom f = dom g and
A2: dom k = dom h and
A3: <:f,g:> = <:k,h:>;
A4: dom <:f,g:> = dom f by A1,Th50;
x in dom f implies f.x = k.x
proof
assume x in dom f;
then <:f,g:>.x = [f.x,g.x] & <:k,h:>.x = [k.x,h.x] by A3,A4,Def7;
hence thesis by A3,XTUPLE_0:1;
end;
hence f = k by A2,A3,A4,Th50,FUNCT_1:2;
A5: dom <:f,g:> = dom g by A1,Th50;
x in dom g implies g.x = h.x
proof
assume x in dom g;
then <:f,g:>.x = [f.x,g.x] & <:k,h:>.x = [k.x,h.x] by A3,A5,Def7;
hence thesis by A3,XTUPLE_0:1;
end;
hence thesis by A2,A3,A5,Th50,FUNCT_1:2;
end;
theorem
for f,g,h being Function holds <:f*h,g*h:> = <:f,g:>*h
proof
let f,g,h be Function;
x in dom <:f*h,g*h:> iff x in dom(<:f,g:>*h)
proof
thus x in dom <:f*h,g*h:> implies x in dom(<:f,g:>*h)
proof
assume x in dom <:f*h,g*h:>;
then
A1: x in dom(f*h) /\ dom(g*h) by Def7;
then
A2: x in dom(f*h) by XBOOLE_0:def 4;
x in dom(g*h) by A1,XBOOLE_0:def 4;
then
A3: h.x in dom g by FUNCT_1:11;
h.x in dom f by A2,FUNCT_1:11;
then h.x in dom f /\ dom g by A3,XBOOLE_0:def 4;
then
A4: h.x in dom <:f,g:> by Def7;
x in dom h by A2,FUNCT_1:11;
hence thesis by A4,FUNCT_1:11;
end;
assume
A5: x in dom(<:f,g:>*h);
then
A6: x in dom h by FUNCT_1:11;
h.x in dom <:f,g:> by A5,FUNCT_1:11;
then
A7: h.x in dom f /\ dom g by Def7;
then h.x in dom g by XBOOLE_0:def 4;
then
A8: x in dom(g*h) by A6,FUNCT_1:11;
h.x in dom f by A7,XBOOLE_0:def 4;
then x in dom(f*h) by A6,FUNCT_1:11;
then x in dom(f*h) /\ dom(g*h) by A8,XBOOLE_0:def 4;
hence thesis by Def7;
end;
then
A9: dom <:f*h,g*h:> = dom(<:f,g:>*h) by TARSKI:1;
for x st x in dom <:f*h,g*h:> holds <:f*h,g*h:>.x = (<:f,g:>*h).x
proof
let x;
assume
A10: x in dom <:f*h,g*h:>;
then
A11: x in dom(f*h) /\ dom(g*h) by Def7;
then
A12: x in dom(f*h) by XBOOLE_0:def 4;
then
A13: x in dom h by FUNCT_1:11;
A14: x in dom(g*h) by A11,XBOOLE_0:def 4;
then
A15: h.x in dom g by FUNCT_1:11;
h.x in dom f by A12,FUNCT_1:11;
then
A16: h.x in dom f /\ dom g by A15,XBOOLE_0:def 4;
thus <:f*h,g*h:>.x = [(f*h).x,(g*h).x] by A10,Def7
.= [f.(h.x),(g*h).x] by A12,FUNCT_1:12
.= [f.(h.x),g.(h.x)] by A14,FUNCT_1:12
.= <:f,g:>.(h.x) by A16,Th48
.= (<:f,g:>*h).x by A13,FUNCT_1:13;
end;
hence thesis by A9,FUNCT_1:2;
end;
theorem
for f,g being Function holds <:f,g:>.:A c= [:f.:A,g.:A:]
proof
let f,g be Function;
let y;
assume y in <:f,g:>.:A;
then consider x such that
A1: x in dom <:f,g:> and
A2: x in A and
A3: y = <:f,g:>.x by FUNCT_1:def 6;
A4: x in dom f /\ dom g by A1,Def7;
then x in dom f by XBOOLE_0:def 4;
then
A5: f.x in f.:A by A2,FUNCT_1:def 6;
x in dom g by A4,XBOOLE_0:def 4;
then
A6: g.x in g.: A by A2,FUNCT_1:def 6;
y = [f.x,g.x] by A1,A3,Def7;
hence thesis by A5,A6,ZFMISC_1:def 2;
end;
theorem
for f,g being Function holds <:f,g:>"[:B,C:] = f"B /\ g"C
proof
let f,g be Function;
x in <:f,g:>"[:B,C:] iff x in f"B /\ g"C
proof
thus x in <:f,g:>"[:B,C:] implies x in f"B /\ g"C
proof
assume
A1: x in <:f,g:>"[:B,C:];
then <:f,g:>.x in [:B,C:] by FUNCT_1:def 7;
then consider y1,y2 such that
A2: y1 in B and
A3: y2 in C and
A4: <:f,g:>.x = [y1,y2] by ZFMISC_1:def 2;
A5: x in dom <:f,g:> by A1,FUNCT_1:def 7;
then
A6: x in dom f /\ dom g by Def7;
then
A7: x in dom g by XBOOLE_0:def 4;
A8: [y1,y2] = [f.x,g.x] by A4,A5,Def7;
then y2 = g.x by XTUPLE_0:1;
then
A9: x in g"C by A3,A7,FUNCT_1:def 7;
A10: x in dom f by A6,XBOOLE_0:def 4;
y1 =f.x by A8,XTUPLE_0:1;
then x in f"B by A2,A10,FUNCT_1:def 7;
hence thesis by A9,XBOOLE_0:def 4;
end;
assume
A11: x in f"B /\ g"C;
then
A12: x in g"C by XBOOLE_0:def 4;
then
A13: x in dom g by FUNCT_1:def 7;
A14: x in f"B by A11,XBOOLE_0:def 4;
then x in dom f by FUNCT_1:def 7;
then
A15: x in dom f /\ dom g by A13,XBOOLE_0:def 4;
then
A16: x in dom <:f,g:> by Def7;
A17: g.x in C by A12,FUNCT_1:def 7;
f.x in B by A14,FUNCT_1:def 7;
then [f.x,g.x] in [:B,C:] by A17,ZFMISC_1:def 2;
then <:f,g:>.x in [:B,C:] by A15,Th48;
hence thesis by A16,FUNCT_1:def 7;
end;
hence thesis by TARSKI:1;
end;
theorem Th58:
for f being Function of X,Y for g being Function of X,Z st (Y =
{} implies X = {}) & (Z = {} implies X = {}) holds <:f,g:> is Function of X,[:Y
,Z:]
proof
let f be Function of X,Y;
let g be Function of X,Z;
assume
A1: ( Y = {} implies X = {})&( Z = {} implies X = {});
per cases;
suppose
[:Y,Z:] = {} implies X = {};
rng f c= Y & rng g c= Z by RELAT_1:def 19;
then
A2: [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96;
dom f = X & dom g = X by A1,FUNCT_2:def 1;
then
A3: dom<:f,g:> = X by Th50;
rng <:f,g:> c= [:rng f,rng g:] by Th51;
then rng<:f,g:> c= [:Y,Z:] by A2,XBOOLE_1:1;
hence thesis by A3,FUNCT_2:2;
end;
suppose
[:Y,Z:] = {} & X <> {};
hence thesis by A1;
end;
end;
definition
let X,D1,D2;
let f1 be Function of X,D1;
let f2 be Function of X,D2;
redefine func <:f1,f2:> -> Function of X,[:D1,D2:];
coherence by Th58;
end;
theorem
for f1 being Function of C,D1 for f2 being Function of C,D2 for c
being Element of C holds <:f1,f2:>.c = [f1.c,f2.c]
proof
let f1 be Function of C,D1;
let f2 be Function of C,D2;
let c be Element of C;
dom f1 = C & dom f2 = C by FUNCT_2:def 1;
hence thesis by Th49;
end;
theorem
for f being Function of X,Y for g being Function of X,Z holds rng <:f,
g:> c= [:Y,Z:]
proof
let f be Function of X,Y;
let g be Function of X,Z;
rng f c= Y & rng g c= Z by RELAT_1:def 19;
then
A1: [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96;
rng <:f,g:> c= [:rng f,rng g:] by Th51;
hence thesis by A1,XBOOLE_1:1;
end;
theorem Th61:
for f being Function of X,Y for g being Function of X,Z st (Y =
{} implies X = {}) & (Z = {} implies X = {}) holds pr1(Y,Z)*<:f,g:> = f & pr2(Y
,Z)*<:f,g:> = g
proof
let f be Function of X,Y;
let g be Function of X,Z;
assume ( Y = {} implies X = {})&( Z = {} implies X = {});
then
A1: dom f = X & dom g = X by FUNCT_2:def 1;
rng f c= Y & rng g c= Z by RELAT_1:def 19;
hence thesis by A1,Th52;
end;
theorem
for f being Function of X,D1 for g being Function of X,D2 holds pr1(D1
,D2)*<:f,g:> = f & pr2(D1,D2)*<:f,g:> = g by Th61;
theorem
for f1,f2 being Function of X,Y for g1,g2 being Function of X,Z st (Y
= {} implies X = {}) & (Z = {} implies X = {}) & <:f1,g1:> = <:f2,g2:> holds f1
= f2 & g1 = g2
proof
let f1,f2 be Function of X,Y;
let g1,g2 be Function of X,Z;
assume that
A1: Y = {} implies X = {} and
A2: Z = {} implies X = {};
A3: dom g1 = X & dom g2 = X by A2,FUNCT_2:def 1;
dom f1 = X & dom f2 = X by A1,FUNCT_2:def 1;
hence thesis by A3,Th54;
end;
theorem
for f1,f2 being Function of X,D1 for g1,g2 being Function of X,D2 st
<:f1,g1:> = <:f2,g2:> holds f1 = f2 & g1 = g2
proof
let f1,f2 be Function of X,D1;
let g1,g2 be Function of X,D2;
A1: dom g1 = X & dom g2 = X by FUNCT_2:def 1;
dom f1 = X & dom f2 = X by FUNCT_2:def 1;
hence thesis by A1,Th54;
end;
definition
let f,g be Function;
func [:f,g:] -> Function means
:Def8:
dom it = [:dom f, dom g:] & for x,y st
x in dom f & y in dom g holds it.(x,y) = [f.x,g.y];
existence
proof
deffunc F(set,set) = [f.$1,g.$2];
ex F being Function st dom F = [:dom f,dom g:] & for x,y st x in dom f
& y in dom g holds F.(x,y) = F(x,y) from Lambda3;
hence thesis;
end;
uniqueness
proof
let fg1, fg2 be Function such that
A1: dom fg1 = [:dom f, dom g:] and
A2: for x,y st x in dom f & y in dom g holds fg1.(x,y) = [f.x,g.y] and
A3: dom fg2 = [:dom f, dom g:] and
A4: for x,y st x in dom f & y in dom g holds fg2.(x,y) = [f.x,g.y];
for p st p in [:dom f,dom g:] holds fg1.p=fg2.p
proof
let p;
assume p in [:dom f,dom g:];
then consider x,y such that
A5: x in dom f & y in dom g and
A6: p = [x,y] by ZFMISC_1:def 2;
fg1.(x,y) = [f.x,g.y] & fg2.(x,y) = [f.x,g.y] by A2,A4,A5;
hence thesis by A6;
end;
hence thesis by A1,A3,FUNCT_1:2;
end;
end;
theorem Th65:
for f,g being Function, x,y st [x,y] in [:dom f,dom g:] holds [:
f,g:].(x,y) = [f.x,g.y]
proof
let f,g be Function, x,y;
assume [x,y] in [:dom f,dom g:];
then x in dom f & y in dom g by ZFMISC_1:87;
hence thesis by Def8;
end;
theorem Th66:
for f,g being Function holds [:f,g:] = <:f*pr1(dom f,dom g),g*
pr2(dom f,dom g):>
proof
let f,g be Function;
A1: dom pr1(dom f,dom g) = [:dom f,dom g:] by Def4;
A2: dom pr2(dom f,dom g) = [:dom f,dom g:] by Def5;
rng pr2(dom f,dom g) c= dom g by Th45;
then
A3: dom(g*pr2(dom f,dom g)) = [:dom f,dom g:] by A2,RELAT_1:27;
rng pr1(dom f,dom g) c= dom f by Th43;
then dom(f*pr1(dom f,dom g)) = [:dom f,dom g:] by A1,RELAT_1:27;
then
A4: dom <:f*pr1(dom f,dom g),g*pr2(dom f,dom g):> = [:dom f,dom g:] by A3,Th50;
A5: for x,y st x in dom f & y in dom g holds [:f,g:].(x,y) = <:f*pr1(dom f,
dom g),g*pr2(dom f,dom g):>.(x,y)
proof
let x,y;
assume
A6: x in dom f & y in dom g;
then
A7: [x,y] in [:dom f,dom g:] by ZFMISC_1:87;
thus [:f,g:].(x,y) = [f.x,g.y] by A6,Def8
.= [f.(pr1(dom f,dom g).(x,y)),g.y] by A6,Def4
.= [f.(pr1(dom f,dom g).(x,y)),g.(pr2(dom f,dom g).(x,y))] by A6,Def5
.= [(f*pr1(dom f,dom g)).(x,y),g.(pr2(dom f,dom g).(x,y))] by A1,A7,
FUNCT_1:13
.= [(f*pr1(dom f,dom g)).(x,y),(g*pr2(dom f,dom g)).(x,y)] by A2,A7,
FUNCT_1:13
.= <:f*pr1(dom f,dom g),g*pr2(dom f,dom g):>.(x,y) by A4,A7,Def7;
end;
dom [:f,g:] = [:dom f,dom g:] by Def8;
hence thesis by A4,A5,Th6;
end;
theorem Th67:
for f,g being Function holds rng [:f,g:] = [:rng f,rng g:]
proof
let f,g be Function;
q in rng [:f,g:] iff q in [:rng f,rng g:]
proof
A1: dom [:f,g:]=[:dom f,dom g:] by Def8;
thus q in rng [:f,g:] implies q in [:rng f,rng g:]
proof
assume q in rng [:f,g:];
then consider p such that
A2: p in dom [:f,g:] and
A3: q = [:f,g:].p by FUNCT_1:def 3;
p in [:dom f, dom g:] by A2,Def8;
then consider x,y such that
A4: x in dom f & y in dom g and
A5: p = [x,y] by ZFMISC_1:def 2;
A6: f.x in rng f & g.y in rng g by A4,FUNCT_1:def 3;
q = [:f,g:].(x,y) by A3,A5
.= [f.x,g.y] by A4,Def8;
hence thesis by A6,ZFMISC_1:87;
end;
assume q in [:rng f,rng g:];
then consider y1,y2 such that
A7: y1 in rng f and
A8: y2 in rng g and
A9: q = [y1,y2] by ZFMISC_1:def 2;
consider x2 such that
A10: x2 in dom g and
A11: y2 = g.x2 by A8,FUNCT_1:def 3;
consider x1 such that
A12: x1 in dom f and
A13: y1 = f.x1 by A7,FUNCT_1:def 3;
A14: [x1,x2] in [:dom f,dom g:] by A12,A10,ZFMISC_1:87;
[:f,g:].(x1,x2)=q by A9,A12,A13,A10,A11,Def8;
hence thesis by A14,A1,FUNCT_1:def 3;
end;
hence thesis by TARSKI:1;
end;
theorem Th68:
for f,g being Function st dom f = X & dom g = X holds <:f,g:> =
[:f,g:]*(delta X)
proof
let f,g be Function such that
A1: dom f = X & dom g = X;
A2: dom delta X = X by Def6;
rng delta X c= [:X,X:] by Th47;
then rng delta X c= dom [:f,g:] by A1,Def8;
then
A3: dom([:f,g:]*(delta X)) = X by A2,RELAT_1:27;
dom f /\ dom g = X by A1;
then
A4: dom <:f,g:> = X by Def7;
for x st x in X holds <:f,g:>.x = ([:f,g:]*(delta X)).x
proof
let x;
assume
A5: x in X;
hence <:f,g:>.x = [f.x,g.x] by A4,Def7
.= [:f,g:].(x,x) by A1,A5,Def8
.= [:f,g:].((delta X).x) by A5,Def6
.= ([:f,g:]*(delta X)).x by A3,A5,FUNCT_1:12;
end;
hence thesis by A4,A3,FUNCT_1:2;
end;
theorem
[:id X, id Y:] = id [:X,Y:]
proof
rng pr1(X,Y) c= X by Th43;
then
A1: (id X)*pr1(X,Y) = pr1(X,Y) by RELAT_1:53;
rng pr2(X,Y) c= Y by Th45;
then
A2: (id Y)*pr2(X,Y) = pr2(X,Y) by RELAT_1:53;
dom id X = X & dom id Y = Y;
hence [:id X, id Y:] = <:pr1(X,Y),pr2(X,Y):> by A1,A2,Th66
.= id [:X,Y:] by Th53;
end;
theorem
for f,g,h,k being Function holds [:f,h:]*<:g,k:> = <:f*g,h*k:>
proof
let f,g,h,k be Function;
x in dom([:f,h:]*<:g,k:>) iff x in dom <:f*g,h*k:>
proof
thus x in dom([:f,h:]*<:g,k:>) implies x in dom <:f*g,h*k:>
proof
assume
A1: x in dom([:f,h:]*<:g,k:>);
then
A2: x in dom <:g,k:> by FUNCT_1:11;
then
A3: x in dom g /\ dom k by Def7;
then
A4: x in dom g by XBOOLE_0:def 4;
A5: x in dom k by A3,XBOOLE_0:def 4;
<:g,k:>.x in dom [:f,h:] by A1,FUNCT_1:11;
then [g.x,k.x] in dom [:f,h:] by A2,Def7;
then
A6: [g.x,k.x] in [:dom f,dom h:] by Def8;
then k.x in dom h by ZFMISC_1:87;
then
A7: x in dom(h*k) by A5,FUNCT_1:11;
g.x in dom f by A6,ZFMISC_1:87;
then x in dom(f*g) by A4,FUNCT_1:11;
then x in dom(f*g) /\ dom(h*k) by A7,XBOOLE_0:def 4;
hence thesis by Def7;
end;
assume x in dom <:f*g,h*k:>;
then
A8: x in dom(f*g) /\ dom(h*k) by Def7;
then
A9: x in dom(f*g) by XBOOLE_0:def 4;
A10: x in dom(h*k) by A8,XBOOLE_0:def 4;
then
A11: x in dom k by FUNCT_1:11;
x in dom g by A9,FUNCT_1:11;
then x in dom g /\ dom k by A11,XBOOLE_0:def 4;
then
A12: x in dom <:g,k:> by Def7;
A13: k.x in dom h by A10,FUNCT_1:11;
g.x in dom f by A9,FUNCT_1:11;
then [g.x,k.x] in [:dom f,dom h:] by A13,ZFMISC_1:87;
then [g.x,k.x] in dom [:f,h:] by Def8;
then <:g,k:>.x in dom [:f,h:] by A12,Def7;
hence thesis by A12,FUNCT_1:11;
end;
then
A14: dom([:f,h:]*<:g,k:>) = dom <:f*g,h*k:> by TARSKI:1;
for x st x in dom([:f,h:]*<:g,k:>) holds ([:f,h:]*<:g,k:>).x = <:f*g,h*
k :> . x
proof
let x;
assume
A15: x in dom([:f,h:]*<:g,k:>);
then
A16: x in dom <:g,k:> by FUNCT_1:11;
then
A17: x in dom g /\ dom k by Def7;
then
A18: x in dom g by XBOOLE_0:def 4;
<:g,k:>.x in dom [:f,h:] by A15,FUNCT_1:11;
then [g.x,k.x] in dom [:f,h:] by A16,Def7;
then
A19: [g.x,k.x] in [:dom f,dom h:] by Def8;
then
A20: g.x in dom f by ZFMISC_1:87;
A21: x in dom k by A17,XBOOLE_0:def 4;
A22: k.x in dom h by A19,ZFMISC_1:87;
then
A23: x in dom(h*k) by A21,FUNCT_1:11;
x in dom(f*g) by A20,A18,FUNCT_1:11;
then
A24: x in dom(f*g) /\ dom(h*k) by A23,XBOOLE_0:def 4;
thus ([:f,h:]*<:g,k:>).x = [:f,h:].(<:g,k:>.x) by A15,FUNCT_1:12
.= [:f,h:].(g.x,k.x) by A16,Def7
.= [f.(g.x),h.(k.x)] by A20,A22,Def8
.= [(f*g).x,h.(k.x)] by A18,FUNCT_1:13
.= [(f*g).x,(h*k).x] by A21,FUNCT_1:13
.= <:f*g,h*k:>.x by A24,Th48;
end;
hence thesis by A14,FUNCT_1:2;
end;
theorem
for f,g,h,k being Function holds [:f,h:]*[:g,k:] = [:f*g,h*k:]
proof
let f,g,h,k be Function;
A1: for x,y st x in dom(f*g) & y in dom(h*k) holds ([:f,h:]*[:g,k:]).(x,y)
= [:f*g,h*k:].(x,y)
proof
let x,y such that
A2: x in dom(f*g) and
A3: y in dom(h*k);
A4: g.x in dom f & k.y in dom h by A2,A3,FUNCT_1:11;
A5: x in dom g & y in dom k by A2,A3,FUNCT_1:11;
then [x,y] in [:dom g, dom k:] by ZFMISC_1:87;
then [x,y] in dom [:g,k:] by Def8;
hence ([:f,h:]*[:g,k:]).(x,y) = [:f,h:].([:g,k:].(x,y)) by FUNCT_1:13
.= [:f,h:].(g.x,k.y) by A5,Def8
.= [f.(g.x),h.(k.y)] by A4,Def8
.= [(f*g).x,h.(k.y)] by A2,FUNCT_1:12
.= [(f*g).x,(h*k).y] by A3,FUNCT_1:12
.= [:f*g,h*k:].(x,y) by A2,A3,Def8;
end;
p in dom([:f,h:]*[:g,k:]) iff p in [:dom(f*g),dom(h*k):]
proof
A6: dom [:g,k:] = [:dom g, dom k:] by Def8;
A7: dom [:f,h:] = [:dom f, dom h:] by Def8;
thus p in dom([:f,h:]*[:g,k:]) implies p in [:dom(f*g),dom(h*k):]
proof
assume
A8: p in dom([:f,h:]*[:g,k:]);
then
A9: [:g,k:].p in dom [:f,h:] by FUNCT_1:11;
A10: p in dom [:g,k:] by A8,FUNCT_1:11;
then consider x1,x2 such that
A11: x1 in dom g and
A12: x2 in dom k and
A13: p = [x1,x2] by A6,ZFMISC_1:def 2;
[:g,k:].(x1,x2) =[:g,k:].p by A13;
then
A14: [g.x1,k.x2] in dom [:f,h:] by A6,A10,A9,A13,Th65;
then k.x2 in dom h by A7,ZFMISC_1:87;
then
A15: x2 in dom(h*k) by A12,FUNCT_1:11;
g.x1 in dom f by A7,A14,ZFMISC_1:87;
then x1 in dom(f*g) by A11,FUNCT_1:11;
hence thesis by A13,A15,ZFMISC_1:87;
end;
assume p in [:dom(f*g),dom(h*k):];
then consider x1,x2 such that
A16: x1 in dom(f*g) & x2 in dom(h*k) and
A17: p = [x1,x2] by ZFMISC_1:def 2;
x1 in dom g & x2 in dom k by A16,FUNCT_1:11;
then
A18: [x1,x2] in dom [:g,k:] by A6,ZFMISC_1:87;
g.x1 in dom f & k.x2 in dom h by A16,FUNCT_1:11;
then [g.x1,k.x2] in dom [:f,h:] by A7,ZFMISC_1:87;
then [:g,k:].(x1,x2) in dom [:f,h:] by A6,A18,Th65;
hence thesis by A17,A18,FUNCT_1:11;
end;
then
A19: dom([:f,h:]*[:g,k:]) = [:dom(f*g),dom(h*k):] by TARSKI:1;
[:dom(f*g),dom(h*k):] = dom [:f*g,h*k:] by Def8;
hence thesis by A19,A1,Th6;
end;
theorem
for f,g being Function holds [:f,g:].:[:B,A:] = [:f.:B,g.:A:]
proof
let f,g be Function;
q in [:f,g:].:[:B,A:] iff q in [:f.:B,g.:A:]
proof
A1: [:dom f,dom g:] = dom [:f,g:] by Def8;
thus q in [:f,g:].:[:B,A:] implies q in [:f.:B,g.:A:]
proof
assume q in [:f,g:].:[:B,A:];
then consider p such that
A2: p in dom [:f,g:] and
A3: p in [:B,A:] and
A4: q = [:f,g:].p by FUNCT_1:def 6;
dom [:f,g:] = [:dom f,dom g:] by Def8;
then consider x,y such that
A5: x in dom f and
A6: y in dom g and
A7: p =[x,y] by A2,ZFMISC_1:def 2;
x in B by A3,A7,ZFMISC_1:87;
then
A8: f.x in f.:B by A5,FUNCT_1:def 6;
y in A by A3,A7,ZFMISC_1:87;
then
A9: g.y in g.:A by A6,FUNCT_1:def 6;
q = [:f,g:].(x,y) by A4,A7;
then q=[f.x,g.y] by A5,A6,Def8;
hence thesis by A8,A9,ZFMISC_1:87;
end;
assume q in [:f.:B,g.:A:];
then consider y1,y2 such that
A10: y1 in f.:B and
A11: y2 in g.:A and
A12: q = [y1,y2] by ZFMISC_1:def 2;
consider x1 such that
A13: x1 in dom f and
A14: x1 in B and
A15: y1 = f.x1 by A10,FUNCT_1:def 6;
consider x2 such that
A16: x2 in dom g and
A17: x2 in A and
A18: y2 = g.x2 by A11,FUNCT_1:def 6;
A19: [:f,g:].(x1,x2) = [f.x1,g.x2] by A13,A16,Def8;
[x1,x2] in [:dom f,dom g:] & [x1,x2] in [:B,A:] by A13,A14,A16,A17,
ZFMISC_1:87;
hence thesis by A12,A15,A18,A1,A19,FUNCT_1:def 6;
end;
hence thesis by TARSKI:1;
end;
theorem
for f,g being Function holds [:f,g:]"[:B,A:] = [:f"B,g"A:]
proof
let f,g be Function;
q in [:f,g:]"[:B,A:] iff q in [:f"B,g"A:]
proof
thus q in [:f,g:]"[:B,A:] implies q in [:f"B,g"A:]
proof
assume
A1: q in [:f,g:]"[:B,A:];
then
A2: [:f,g:].q in [:B,A:] by FUNCT_1:def 7;
q in dom [:f,g:] by A1,FUNCT_1:def 7;
then q in [:dom f,dom g:] by Def8;
then consider x1,x2 such that
A3: x1 in dom f and
A4: x2 in dom g and
A5: q = [x1,x2] by ZFMISC_1:def 2;
[:f,g:].q = [:f,g:].(x1,x2) by A5;
then
A6: [f.x1,g.x2] in [:B,A:] by A3,A4,A2,Def8;
then g.x2 in A by ZFMISC_1:87;
then
A7: x2 in g"A by A4,FUNCT_1:def 7;
f.x1 in B by A6,ZFMISC_1:87;
then x1 in f"B by A3,FUNCT_1:def 7;
hence thesis by A5,A7,ZFMISC_1:87;
end;
assume q in [:f"B,g"A:];
then consider x1,x2 such that
A8: x1 in f"B & x2 in g"A and
A9: q = [x1,x2] by ZFMISC_1:def 2;
f.x1 in B & g.x2 in A by A8,FUNCT_1:def 7;
then
A10: [f.x1,g.x2] in [:B,A:] by ZFMISC_1:87;
x1 in dom f & x2 in dom g by A8,FUNCT_1:def 7;
then
A11: [x1,x2] in [:dom f,dom g:] & [:f,g:].(x1,x2) = [f.x1,g.x2] by Def8,
ZFMISC_1:87;
[:dom f,dom g:] = dom [:f,g:] by Def8;
hence thesis by A9,A11,A10,FUNCT_1:def 7;
end;
hence thesis by TARSKI:1;
end;
theorem Th74:
for f being Function of X,Y for g being Function of V,Z holds [:
f,g:] is Function of [:X,V:],[:Y,Z:]
proof
let f be Function of X,Y;
let g be Function of V,Z;
per cases;
suppose
A1: [:Y,Z:] = {} implies [:X,V:] = {};
now
per cases by A1;
suppose
A2: [:Y,Z:] <> {};
rng f c= Y & rng g c= Z by RELAT_1:def 19;
then [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96;
then
A3: rng [:f,g:] c= [:Y,Z:] by Th67;
Z = {} implies V = {} by A2,ZFMISC_1:90;
then
A4: dom g = V by FUNCT_2:def 1;
Y = {} implies X = {} by A2,ZFMISC_1:90;
then dom f = X by FUNCT_2:def 1;
then dom[:f,g:] = [:X,V:] by A4,Def8;
hence thesis by A3,FUNCT_2:2;
end;
suppose
A5: [:X,V:] = {};
then X = {} or V = {};
then dom f = {} or dom g = {};
then [:dom f,dom g:] = {} by ZFMISC_1:90;
then
A6: dom[:f,g:] = [:X,V:] by A5,Def8;
rng f c= Y & rng g c= Z by RELAT_1:def 19;
then [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96;
then rng[:f,g:] c= [:Y,Z:] by Th67;
hence thesis by A6,FUNCT_2:2;
end;
end;
hence thesis;
end;
suppose
A7: [:Y,Z:] = {} & [:X,V:] <> {};
then Y = {} or Z = {};
then f = {} or g = {};
then [:dom f,dom g:] = {} by RELAT_1:38,ZFMISC_1:90;
then
A8: dom [:f,g:] = {} by Def8;
then rng[:f,g:] = {} & dom [:f,g:] c= [:X,V:] by RELAT_1:42,XBOOLE_1:2;
then reconsider R = [:f,g:] as Relation of [:X,V:],[:Y,Z:] by RELSET_1:4
,XBOOLE_1:2;
[:f,g:] = {} by A8;
then R is quasi_total by A7,FUNCT_2:def 1;
hence thesis;
end;
end;
definition
let X1,X2,Y1,Y2;
let f1 be Function of X1,Y1;
let f2 be Function of X2,Y2;
redefine func [:f1,f2:] -> Function of [:X1,X2:],[:Y1,Y2:];
coherence by Th74;
end;
theorem
for f1 being Function of C1,D1 for f2 being Function of C2,D2 for c1
being Element of C1 for c2 being Element of C2 holds [:f1,f2:].(c1,c2) = [f1.c1
,f2.c2]
proof
let f1 be Function of C1,D1;
let f2 be Function of C2,D2;
let c1 be Element of C1;
let c2 be Element of C2;
dom f1 = C1 & dom f2 = C2 by FUNCT_2:def 1;
hence thesis by Def8;
end;
theorem
for f1 being Function of X1,Y1 for f2 being Function of X2,Y2 st (Y1 =
{} implies X1 = {}) & (Y2 = {} implies X2 = {}) holds [:f1,f2:] = <:f1*pr1(X1,
X2),f2*pr2(X1,X2):>
proof
let f1 be Function of X1,Y1;
let f2 be Function of X2,Y2;
assume ( Y1 = {} implies X1 = {})&( Y2 = {} implies X2 = {});
then dom f1 = X1 & dom f2 = X2 by FUNCT_2:def 1;
hence thesis by Th66;
end;
theorem
for f1 being Function of X1,D1 for f2 being Function of X2,D2 holds [:
f1,f2:] = <:f1*pr1(X1,X2),f2*pr2(X1,X2):>
proof
let f1 be Function of X1,D1;
let f2 be Function of X2,D2;
dom f1 = X1 & dom f2 = X2 by FUNCT_2:def 1;
hence thesis by Th66;
end;
theorem
for f1 being Function of X,Y1 for f2 being Function of X,Y2 holds <:f1
,f2:> = [:f1,f2:]*(delta X)
proof
let f1 be Function of X,Y1;
let f2 be Function of X,Y2;
per cases;
suppose
Y1 = {} or Y2 = {};
then
A1: dom f1 = {} or dom f2 = {};
A2: dom[:f1,f2:] = [:dom f1, dom f2:] by Def8
.= {} by A1,ZFMISC_1:90;
dom<:f1,f2:> = dom f1 /\ dom f2 by Def7
.= {} by A1;
hence <:f1,f2:> = {}*delta X .= [:f1,f2:]*delta X by A2,RELAT_1:41;
end;
suppose
Y1 <> {} & Y2 <> {};
then dom f1 = X & dom f2 = X by FUNCT_2:def 1;
hence thesis by Th68;
end;
end;
begin
theorem
for f being Function holds pr1(dom f,rng f).:f = dom f
proof
let f be Function;
now
let y be set;
thus y in dom f implies ex x being set st x in dom pr1(dom f,rng f) & x in
f & y = pr1(dom f,rng f).x
proof
assume
A1: y in dom f;
take [y,f.y];
A2: f.y in rng f by A1,FUNCT_1:def 3;
then [y,f.y] in [:dom f,rng f:] by A1,ZFMISC_1:87;
hence [y,f.y] in dom pr1(dom f,rng f) by Def4;
thus [y,f.y] in f by A1,FUNCT_1:def 2;
thus y = pr1(dom f,rng f).(y,f.y) by A1,A2,Def4
.= pr1(dom f,rng f).[y,f.y];
end;
given x being set such that
A3: x in dom pr1(dom f,rng f) and
x in f and
A4: y = pr1(dom f,rng f).x;
consider x1,x2 being set such that
A5: x1 in dom f & x2 in rng f and
A6: x = [x1,x2] by A3,ZFMISC_1:84;
y = pr1(dom f,rng f).(x1,x2) by A4,A6;
hence y in dom f by A5,Def4;
end;
hence thesis by FUNCT_1:def 6;
end;
theorem
for A,B,C being non empty set, f,g being Function of A,[:B,C:] st
pr1(B,C)*f = pr1(B,C)*g & pr2(B,C)*f = pr2(B,C)*g holds f = g
proof
let A,B,C be non empty set, f,g be Function of A,[:B,C:] such that
A1: pr1(B,C)*f = pr1(B,C)*g & pr2(B,C)*f = pr2(B,C)*g;
now
let a be Element of A;
consider b1 being Element of B, c1 being Element of C such that
A2: f.a = [b1,c1] by DOMAIN_1:1;
consider b2 being Element of B, c2 being Element of C such that
A3: g.a = [b2,c2] by DOMAIN_1:1;
A4: pr1(B,C).(g.a) = (pr1(B,C)*g).a by FUNCT_2:15;
A5: pr1(B,C).(f.a) = (pr1(B,C)*f).a & pr2(B,C).(f.a) = (pr2(B,C)*f).a by
FUNCT_2:15;
A6: pr2(B,C).(b1,c1) = c1 & pr2(B,C).(b2,c2) = c2 by Def5;
pr1(B,C).(b1,c1) = b1 & pr1(B,C).(b2,c2) = b2 by Def4;
hence f.a = g.a by A1,A2,A3,A6,A5,A4,FUNCT_2:15;
end;
hence thesis by FUNCT_2:63;
end;
registration
let F,G be one-to-one Function;
cluster [:F,G:] -> one-to-one;
coherence
proof
let z1,z2 be set such that
A1: z1 in dom [:F,G:] and
A2: z2 in dom [:F,G:] and
A3: [:F,G:].z1 = [:F,G:].z2;
A4: dom[:F,G:] = [:dom F, dom G:] by Def8;
then consider x1,y1 being set such that
A5: x1 in dom F and
A6: y1 in dom G and
A7: z1 = [x1,y1] by A1,ZFMISC_1:84;
A8: [:F,G:].(x1,y1) = [F.x1,G.y1] by A5,A6,Def8;
consider x2,y2 being set such that
A9: x2 in dom F and
A10: y2 in dom G and
A11: z2 = [x2,y2] by A2,A4,ZFMISC_1:84;
A12: [:F,G:].(x2,y2) = [F.x2,G.y2] by A9,A10,Def8;
then F.x1 = F.x2 by A3,A7,A11,A8,XTUPLE_0:1;
then
A13: x1 = x2 by A5,A9,FUNCT_1:def 4;
G.y1 = G.y2 by A3,A7,A11,A8,A12,XTUPLE_0:1;
hence thesis by A6,A7,A10,A11,A13,FUNCT_1:def 4;
end;
end;
registration let A be set;
cluster idempotent for BinOp of A;
existence
proof
take pr1(A,A);
per cases;
suppose
A1: A <> {};
let a be Element of A;
a in A by A1;
hence pr1(A,A).(a,a) = a by Def4;
end;
suppose
A2: A = {};
let a be Element of A;
not [a,a] in dom pr1(A,A) by A2;
hence pr1(A,A).(a,a) = {} by FUNCT_1:def 2
.= a by A2,SUBSET_1:def 1;
end;
end;
end;
registration let A be set, b be idempotent BinOp of A;
let a be Element of A;
reduce b.(a,a) to a;
reducibility by BINOP_1:def 4;
end;
begin
reserve f,g,h for Function,
A for set;
theorem Th1:
delta A = <:id A, id A:>
proof
thus delta A = id [:A,A:]*delta A by FUNCT_2:17
.= [:id A, id A:]*delta A by FUNCT_3:69
.= <:id A, id A:> by FUNCT_3:78;
end;
reserve F for Function,
B,x,y,y1,y2,z for set;
definition
let f;
func f~ -> Function means
:Def1:
dom it = dom f & for x st x in dom f holds
(for y,z st f.x = [y,z] holds it.x = [z,y]) & (f.x = it.x or ex y,z st f.x =[y,
z]);
existence
proof
defpred P[set,set] means (for y,z st f.$1 = [y,z] holds $2 = [z,y]) & (f.
$1 = $2 or ex y,z st f.$1 = [y,z]);
A1: now
let x such that
x in dom f;
now
per cases;
suppose
A2: ex y,z st f.x = [y,z];
then consider y,z such that
A3: f.x = [y,z];
take y1 = [z,y];
thus for y,z st f.x = [y,z] holds y1 = [z,y]
proof
let y9,z9 be set;
assume
A4: f.x = [y9,z9];
then z = z9 by A3,XTUPLE_0:1;
hence thesis by A3,A4,XTUPLE_0:1;
end;
thus f.x = y1 or ex y,z st f.x = [y,z] by A2;
end;
suppose
A5: not ex y,z st f.x = [y,z];
take y1 = f.x;
thus (for y,z st f.x = [y,z] holds y1 = [z,y]) & (f.x = y1 or ex y,z
st f.x = [y,z]) by A5;
end;
end;
hence ex y st P[x,y];
end;
A6: now
let x,y1,y2 such that
x in dom f;
assume that
A7: P[x,y1] and
A8: P[x,y2];
now
per cases;
suppose
ex y,z st f.x = [y,z];
then consider y,z such that
A9: f.x = [y,z];
y1 = [z,y] by A7,A9;
hence y1 = y2 by A8,A9;
end;
suppose
not ex y,z st f.x = [y,z];
hence y1 = y2 by A7,A8;
end;
end;
hence y1 = y2;
end;
thus ex g st dom g = dom f & for x st x in dom f holds P[x,g.x] from
FUNCT_1:sch 2(A6,A1);
end;
uniqueness
proof
defpred P[Function] means for x st x in dom f holds (for y,z st f.x = [y,z
] holds $1.x = [z,y]) & (f.x = $1.x or ex y,z st f.x =[y,z]);
let g1,g2 be Function such that
A10: dom g1 = dom f and
A11: P[g1] and
A12: dom g2 = dom f and
A13: P[g2];
now
let x;
assume
A14: x in dom f;
now
per cases;
suppose
ex y,z st f.x = [y,z];
then consider y,z such that
A15: f.x = [y,z];
g1.x = [z,y] by A11,A14,A15;
hence g1.x = g2.x by A13,A14,A15;
end;
suppose
A16: not ex y,z st f.x = [y,z];
then g1.x = f.x by A11,A14;
hence g1.x = g2.x by A13,A14,A16;
end;
end;
hence g1.x = g2.x;
end;
hence thesis by A10,A12,FUNCT_1:2;
end;
involutiveness
proof
let g,f be Function;
assume that
A17: dom g = dom f and
A18: for x st x in dom f holds (for y,z st f.x = [y,z] holds g.x = [z,
y]) & (f.x = g.x or ex y,z st f.x =[y,z]);
thus dom f = dom g by A17;
let x;
assume
A19: x in dom g;
thus for y,z st g.x = [y,z] holds f.x = [z,y]
proof
let y,z such that
A20: g.x = [y,z];
per cases;
suppose
ex z,y st f.x =[z,y];
then consider y1,y2 such that
A21: f.x = [y1,y2];
A22: g.x = [y2,y1] by A17,A18,A19,A21;
then y = y2 by A20,XTUPLE_0:1;
hence thesis by A20,A21,A22,XTUPLE_0:1;
end;
suppose
not ex z,y st f.x =[z,y];
then f.x = g.x by A17,A18,A19;
hence thesis by A17,A18,A19,A20;
end;
end;
assume g.x <> f.x;
then consider y,z such that
A23: f.x = [y,z] by A17,A18,A19;
take z,y;
thus thesis by A17,A18,A19,A23;
end;
end;
theorem Th2:
<:f,g:> = <:g,f:>~
proof
A1: dom <:f,g:> = dom g /\ dom f by FUNCT_3:def 7
.= dom <:g,f:> by FUNCT_3:def 7;
A2: now
let x;
assume
A3: x in dom <:f,g:>;
then
A4: <:g,f:>.x = [g.x, f.x] by A1,FUNCT_3:def 7;
thus <:f,g:>.x = [f.x, g.x] by A3,FUNCT_3:def 7
.= <:g,f:>~.x by A1,A3,A4,Def1;
end;
dom <:f,g:> = dom (<:g,f:>~) by A1,Def1;
hence thesis by A2,FUNCT_1:2;
end;
theorem Th3:
(f|A)~ = f~|A
proof
A1: dom (f|A) = dom f /\ A by RELAT_1:61
.= dom (f~) /\ A by Def1
.= dom (f~|A) by RELAT_1:61;
A2: now
let x such that
A3: x in dom(f~|A);
A4: dom (f|A) c= dom f by RELAT_1:60;
now
per cases;
suppose
ex y,z st (f|A).x = [y,z];
then consider y,z such that
A5: (f|A).x = [y,z];
A6: f.x = [y,z] by A1,A3,A5,FUNCT_1:47;
thus (f|A)~.x = [z,y] by A1,A3,A5,Def1
.= f~.x by A1,A3,A4,A6,Def1
.= (f~|A).x by A3,FUNCT_1:47;
end;
suppose
A7: not ex y,z st (f|A).x = [y,z];
A8: (f|A).x = f.x by A1,A3,FUNCT_1:47;
(f|A)~.x = (f|A).x by A1,A3,A7,Def1;
hence (f|A)~.x = f~.x by A1,A3,A4,A7,A8,Def1
.= (f~|A).x by A3,FUNCT_1:47;
end;
end;
hence (f|A)~.x = (f~|A).x;
end;
dom ((f|A)~) = dom (f|A) by Def1;
hence thesis by A1,A2,FUNCT_1:2;
end;
theorem
(delta A)~ = delta A
proof
thus (delta A)~ = <:id A, id A:>~ by Th1
.= <:id A, id A:> by Th2
.= delta A by Th1;
end;
theorem Th5:
<:f,g:>|A = <:f|A,g:>
proof
A1: dom (<:f,g:>|A) = dom <:f,g:> /\ A by RELAT_1:61
.= dom f /\ dom g /\ A by FUNCT_3:def 7
.= dom f /\ A /\ dom g by XBOOLE_1:16
.= dom (f|A) /\ dom g by RELAT_1:61;
now
A2: dom (<:f,g:>|A) c= dom <:f,g:> by RELAT_1:60;
let x such that
A3: x in dom (<:f,g:>|A);
A4: x in dom (f|A) by A1,A3,XBOOLE_0:def 4;
thus (<:f,g:>|A).x = <:f,g:>.x by A3,FUNCT_1:47
.= [f.x, g.x] by A3,A2,FUNCT_3:def 7
.= [(f|A).x, g.x] by A4,FUNCT_1:47;
end;
hence thesis by A1,FUNCT_3:def 7;
end;
theorem Th6:
<:f,g:>|A = <:f,g|A:>
proof
thus <:f,g:>|A = <:g,f:>~|A by Th2
.= (<:g,f:>|A)~ by Th3
.= <:g|A,f:>~ by Th5
.= <:f,g|A:> by Th2;
end;
definition
let A, z be set;
func A --> z -> set equals
[:A, {z}:];
coherence;
end;
registration
let A, z be set;
cluster A --> z -> Function-like Relation-like;
coherence
proof
thus A --> z is Function-like
proof
let x,y1,y2;
assume that
A1: [x,y1] in A --> z and
A2: [x,y2] in A --> z;
y1 in {z} by A1,ZFMISC_1:87;
then
A3: y1 = z by TARSKI:def 1;
y2 in {z} by A2,ZFMISC_1:87;
hence thesis by A3,TARSKI:def 1;
end;
thus for x st x in A --> z ex y1,y2 st [y1,y2] =x by RELAT_1:def 1;
end;
end;
theorem Th7:
x in A implies (A --> z).x = z
proof
assume
A1: x in A;
z in {z} by TARSKI:def 1;
then [x,z] in (A --> z) by A1,ZFMISC_1:87;
hence thesis by FUNCT_1:1;
end;
theorem
A <> {} implies rng (A --> x) = {x} by RELAT_1:160;
theorem Th9:
rng f = {x} implies f = (dom f) --> x
proof
assume
A1: rng f = {x};
then dom f <> {} by RELAT_1:42;
then dom((dom f) --> x) = dom f & rng((dom f) -->x) = {x} by RELAT_1:160;
hence thesis by A1,FUNCT_1:7;
end;
registration
let x;
cluster {} --> x -> empty;
coherence by ZFMISC_1:90;
end;
registration
let x;
let A be empty set;
cluster A --> x -> empty;
coherence;
end;
registration
let x;
let A be non empty set;
cluster A --> x -> non empty;
coherence;
end;
theorem
dom ({} --> x) = {} & rng ({} --> x) = {};
theorem Th11:
(for z st z in dom f holds f.z = x) implies f = dom f --> x
proof
assume
A1: for z st z in dom f holds f.z = x;
now
per cases;
suppose
A2: dom f = {};
dom ({} --> x) = {};
hence thesis by A2;
end;
suppose
A3: dom f <> {};
set z = the Element of dom f;
now
let y;
thus y in {x} implies ex y1 st y1 in dom f & y = f.y1
proof
assume y in {x};
then y = x by TARSKI:def 1;
then f.z = y by A1,A3;
hence thesis by A3;
end;
assume ex y1 st y1 in dom f & y = f.y1;
then y = x by A1;
hence y in {x} by TARSKI:def 1;
end;
then rng f = {x} by FUNCT_1:def 3;
hence thesis by Th9;
end;
end;
hence thesis;
end;
theorem Th12:
(A --> x)|B = A /\ B --> x
proof
A1: A = {} or A <> {};
A2: A /\ B = {} or A /\ B <> {};
A3: dom ((A --> x)|B) = dom (A --> x) /\ B by RELAT_1:61
.= A /\ B by A1,RELAT_1:160
.= dom (A /\ B --> x) by A2,RELAT_1:160;
now
let z such that
A4: z in dom (A /\ B --> x);
A /\ B = {} or A /\ B <> {};
then
A5: z in A /\ B by A4,RELAT_1:160;
then
A6: z in A by XBOOLE_0:def 4;
thus ((A --> x)|B).z = (A --> x).z by A3,A4,FUNCT_1:47
.= x by A6,Th7
.= (A /\ B --> x).z by A5,Th7;
end;
hence thesis by A3,FUNCT_1:2;
end;
theorem Th13:
dom (A --> x) = A & rng (A --> x) c= {x}
proof
now
per cases;
suppose
A1: A = {};
rng ({} --> x) = {};
hence thesis by A1,XBOOLE_1:2;
end;
suppose
A <> {};
hence thesis by RELAT_1:160;
end;
end;
hence thesis;
end;
theorem Th14:
x in B implies (A --> x)"B = A
proof
assume
A1: x in B;
now
per cases;
suppose
A2: A = {};
thus thesis by A2;
end;
suppose
A <> {};
then
A3: rng (A --> x) = {x} by RELAT_1:160;
{x} c= B by A1,ZFMISC_1:31;
then {x} /\ B = {x} by XBOOLE_1:28;
hence (A --> x)"B = (A --> x)"{x} by A3,RELAT_1:133
.= dom (A -->x) by A3,RELAT_1:134
.= A by Th13;
end;
end;
hence thesis;
end;
theorem
(A --> x)"{x} = A
proof
x in {x} by TARSKI:def 1;
hence thesis by Th14;
end;
theorem
not x in B implies (A --> x)"B = {}
proof
assume
A1: not x in B;
rng (A --> x) c= {x} by Th13;
then rng (A --> x) misses B by A1,XBOOLE_1:63,ZFMISC_1:50;
hence thesis by RELAT_1:138;
end;
theorem
x in dom h implies h*(A --> x) = A --> h.x
proof
assume
A1: x in dom h;
A2: now
let z;
assume
A3: z in dom (h*(A --> x));
then z in dom (A --> x) by FUNCT_1:11;
then
A4: z in A by Th13;
thus (h*(A --> x)).z = h.((A --> x).z) by A3,FUNCT_1:12
.= h.x by A4,Th7
.= (A --> h.x).z by A4,Th7;
end;
dom (h*(A --> x)) = (A --> x)"dom h by RELAT_1:147
.= A by A1,Th14
.= dom (A --> h.x) by Th13;
hence thesis by A2,FUNCT_1:2;
end;
theorem
A <> {} & x in dom h implies dom(h*(A --> x)) <> {}
proof
assume that
A1: A <> {} and
A2: x in dom h;
set y = the Element of A;
y in A by A1;
then
A3: y in dom (A -->x) by Th13;
(A --> x).y = x by A1,Th7;
hence thesis by A2,A3,FUNCT_1:11;
end;
theorem
(A --> x)*h = h"A --> x
proof
A1: dom ((A --> x)*h) = h"dom(A --> x) by RELAT_1:147
.= h"A by Th13;
A2: now
let z;
assume
A3: z in dom ((A --> x)*h);
then h.z in dom (A --> x) by FUNCT_1:11;
then
A4: h.z in A by Th13;
thus ((A --> x)*h).z = (A --> x).(h.z) by A3,FUNCT_1:12
.= x by A4,Th7
.= (h"A --> x).z by A1,A3,Th7;
end;
dom ((A --> x)*h) = dom (h"A --> x) by A1,Th13;
hence thesis by A2,FUNCT_1:2;
end;
theorem
(A --> [x,y])~ = A --> [y,x]
proof
A1: dom ((A --> [x,y])~) = dom (A --> [x,y]) by Def1;
then
A2: dom ((A --> [x,y])~) = A by Th13;
A3: now
let z;
assume
A4: z in dom ((A --> [x,y])~);
then (A --> [x,y]).z = [x,y] by A2,Th7;
hence ((A --> [x,y])~).z = [y,x] by A1,A4,Def1
.= (A --> [y,x]).z by A2,A4,Th7;
end;
dom ((A --> [x,y])~) = dom (A --> [y,x]) by A2,Th13;
hence thesis by A3,FUNCT_1:2;
end;
definition
let F,f,g;
func F.:(f,g) -> set equals
F * <:f,g:>;
correctness;
end;
registration
let F,f,g;
cluster F.:(f,g) -> Function-like Relation-like;
coherence;
end;
Lm1: x in dom (F*<:f,g:>) implies (F*<:f,g:>).x = F.(f.x,g.x)
proof
assume
A1: x in dom (F*<:f,g:>);
then
A2: x in dom <:f,g:> by FUNCT_1:11;
thus (F*<:f,g:>).x = F.(<:f,g:>.x) by A1,FUNCT_1:12
.= F.(f.x,g.x) by A2,FUNCT_3:def 7;
end;
theorem
for h st dom h = dom(F.:(f,g)) & for z being set st z in dom (F.:(f,g)
) holds h.z = F.(f.z,g.z) holds h = F.:(f,g)
proof
let h;
assume that
A1: dom h = dom(F.:(f,g)) and
A2: for z being set st z in dom (F.:(f,g)) holds h.z = F.(f.z,g.z);
now
let z be set;
assume
A3: z in dom (F.:(f,g));
hence h.z = F.(f.z,g.z) by A2
.= (F.:(f,g)).z by A3,Lm1;
end;
hence thesis by A1,FUNCT_1:2;
end;
theorem
x in dom (F.:(f,g)) implies (F.:(f,g)).x = F.(f.x,g.x) by Lm1;
theorem Th23:
f|A = g|A implies (F.:(f,h))|A = (F.:(g,h))|A
proof
assume
A1: f|A = g|A;
thus (F.:(f,h))|A = F*<:f,h:>|A by RELAT_1:83
.= F*<:f|A,h:> by Th5
.= F*<:g,h:>|A by A1,Th5
.= (F.:(g,h))|A by RELAT_1:83;
end;
theorem Th24:
f|A = g|A implies (F.:(h,f))|A = (F.:(h,g))|A
proof
assume
A1: f|A = g|A;
thus (F.:(h,f))|A = F*<:h,f:>|A by RELAT_1:83
.= F*<:h,f|A:> by Th6
.= F*<:h,g:>|A by A1,Th6
.= (F.:(h,g))|A by RELAT_1:83;
end;
theorem Th25:
F.:(f,g)*h = F.:(f*h, g*h)
proof
thus F.:(f,g)*h = F*(<:f,g:>*h) by RELAT_1:36
.= F.:(f*h, g*h) by FUNCT_3:55;
end;
definition
let F,f,x;
func F[:](f,x) -> set equals
F * <:f, dom f --> x:>;
correctness;
end;
registration
let F,f,x;
cluster F[:](f,x) -> Function-like Relation-like;
coherence;
end;
theorem
F[:](f,x) = F.:(f, dom f --> x);
theorem Th27:
x in dom (F[:](f,z)) implies (F[:](f,z)).x = F.(f.x,z)
proof
A1: dom <:f, dom f --> z:> = dom f /\ dom (dom f --> z) by FUNCT_3:def 7;
assume
A2: x in dom (F[:](f,z));
then x in dom <:f, dom f --> z:> by FUNCT_1:11;
then
A3: x in dom f by A1,XBOOLE_0:def 4;
thus (F[:](f,z)).x = F.(f.x,(dom f --> z).x) by A2,Lm1
.= F.(f.x,z) by A3,Th7;
end;
theorem
f|A = g|A implies (F[:](f,x))|A = (F[:](g,x))|A
proof
assume
A1: f|A = g|A;
dom f /\ A = dom (f|A) by RELAT_1:61
.= dom g /\ A by A1,RELAT_1:61;
then
A2: (dom f --> x)|A = dom g /\ A --> x by Th12
.= (dom g -->x)|A by Th12;
thus (F[:](f,x))|A = (F.:(f, dom f --> x))|A
.= (F.:(g, dom f --> x))|A by A1,Th23
.= (F.:(g, dom g --> x))|A by A2,Th24
.= (F[:](g,x))|A;
end;
theorem Th29:
F[:](f,x)*h = F[:](f*h,x)
proof
A1: dom (dom f -->x) = dom f by Th13;
then
A2: dom ((dom f --> x)*h) = dom (f*h) by RELAT_1:163;
A3: now
let z;
assume
A4: z in dom ((dom f --> x)*h);
then
A5: h.z in dom(dom f -->x) by FUNCT_1:11;
thus ((dom f --> x)*h).z = (dom f --> x).(h.z) by A4,FUNCT_1:12
.= x by A1,A5,Th7;
end;
thus F[:](f,x)*h = F.:(f, dom f --> x)*h
.= F.:(f*h, (dom f --> x)*h) by Th25
.= F[:](f*h,x) by A2,A3,Th11;
end;
theorem
F[:](f,x)*id A = F[:](f|A,x)
proof
thus F[:](f,x)*id A = F[:](f*id A, x) by Th29
.= F[:](f|A, x) by RELAT_1:65;
end;
definition
let F,x,g;
func F[;](x,g) -> set equals
F * <:dom g --> x, g:>;
correctness;
end;
registration
let F,x,g;
cluster F[;](x,g) -> Function-like Relation-like;
coherence;
end;
theorem
F[;](x,g) = F.:(dom g --> x, g);
theorem Th32:
x in dom (F[;](z,f)) implies (F[;](z,f)).x = F.(z,f.x)
proof
A1: dom <:dom f --> z, f:> = dom (dom f --> z) /\ dom f by FUNCT_3:def 7;
assume
A2: x in dom (F[;](z,f));
then x in dom <:dom f --> z, f:> by FUNCT_1:11;
then
A3: x in dom f by A1,XBOOLE_0:def 4;
thus (F[;](z,f)).x = F.((dom f --> z).x, f.x) by A2,Lm1
.= F.(z, f.x) by A3,Th7;
end;
theorem
f|A = g|A implies (F[;](x,f))|A = (F[;](x,g))|A
proof
assume
A1: f|A = g|A;
dom f /\ A = dom (f|A) by RELAT_1:61
.= dom g /\ A by A1,RELAT_1:61;
then
A2: (dom f --> x)|A = dom g /\ A --> x by Th12
.= (dom g -->x)|A by Th12;
thus (F[;](x,f))|A = (F.:(dom f --> x, f))|A
.= (F.:(dom f --> x, g))|A by A1,Th24
.= (F.:(dom g --> x, g))|A by A2,Th23
.= (F[;](x,g))|A;
end;
theorem Th34:
F[;](x,f)*h = F[;](x,f*h)
proof
A1: dom (dom f -->x) = dom f by Th13;
then
A2: dom ((dom f --> x)*h) = dom (f*h) by RELAT_1:163;
A3: now
let z;
assume
A4: z in dom ((dom f --> x)*h);
then
A5: h.z in dom(dom f -->x) by FUNCT_1:11;
thus ((dom f --> x)*h).z = (dom f --> x).(h.z) by A4,FUNCT_1:12
.= x by A1,A5,Th7;
end;
thus F[;](x,f)*h = F.:(dom f --> x, f)*h
.= F.:((dom f --> x)*h, f*h) by Th25
.= F[;](x,f*h) by A2,A3,Th11;
end;
theorem
F[;](x,f)*id A = F[;](x,f|A)
proof
thus F[;](x,f)*id A = F[;](x,f*id A) by Th34
.= F[;](x,f|A) by RELAT_1:65;
end;
reserve X for non empty set,
Y for set,
F for BinOp of X,
f,g,h for Function
of Y,X,
x,x1,x2 for Element of X;
theorem Th36:
F.:(f,g) is Function of Y,X
proof
F*<:f,g:> is Function of Y,X;
hence thesis;
end;
definition
let X be non empty set, Z be set;
let F be BinOp of X, f,g be Function of Z,X;
redefine func F.:(f,g) -> Function of Z,X;
coherence by Th36;
end;
reserve Y for non empty set,
F for BinOp of X,
f,g,h for Function of Y,X,
x,
x1,x2 for Element of X;
theorem Th37:
for z being Element of Y holds (F.:(f,g)).z = F.(f.z,g.z)
proof
let z be Element of Y;
dom (F.:(f,g)) = Y by FUNCT_2:def 1;
hence thesis by Lm1;
end;
theorem Th38:
for h being Function of Y,X holds (for z being Element of Y
holds h.z = F.(f.z,g.z)) implies h = F.:(f,g)
proof
let h be Function of Y,X;
assume
A1: for z being Element of Y holds h.z = F.(f.z,g.z);
now
let z be Element of Y;
thus h.z = F.(f.z,g.z) by A1
.= (F.:(f,g)).z by Th37;
end;
hence thesis by FUNCT_2:63;
end;
theorem
for g being Function of X,X holds F.:(id X, g)*f = F.:(f,g*f)
proof
let g be Function of X,X;
thus F.:(id X, g)*f = F.:(id X*f, g*f) by Th25
.= F.:(f,g*f) by FUNCT_2:17;
end;
theorem
for g being Function of X,X holds F.:(g, id X)*f = F.:(g*f,f)
proof
let g be Function of X,X;
thus F.:(g, id X)*f = F.:(g*f, id X*f) by Th25
.= F.:(g*f, f) by FUNCT_2:17;
end;
theorem
F.:(id X, id X)*f = F.:(f,f)
proof
thus F.:(id X, id X)*f = F.:(id X*f, id X*f) by Th25
.= F.:(id X*f, f) by FUNCT_2:17
.= F.:(f,f) by FUNCT_2:17;
end;
theorem
for g being Function of X,X holds F.:(id X, g).x = F.(x,g.x)
proof
let g be Function of X,X;
thus F.:(id X, g).x = F.(id X.x, g.x) by Th37
.= F.(x,g.x) by FUNCT_1:18;
end;
theorem
for g being Function of X,X holds F.:(g, id X).x = F.(g.x,x)
proof
let g be Function of X,X;
thus F.:(g, id X).x = F.(g.x, id X.x) by Th37
.= F.(g.x, x) by FUNCT_1:18;
end;
theorem
F.:(id X, id X).x = F.(x,x)
proof
thus F.:(id X, id X).x = F.(id X.x, id X.x) by Th37
.= F.(id X.x, x) by FUNCT_1:18
.= F.(x,x) by FUNCT_1:18;
end;
theorem Th45:
for A,B for x being set st x in B holds A --> x is Function of A
, B
proof
let A,B;
let x be set;
A1: rng (A --> x) c= {x} by Th13;
A2: dom (A --> x) = A by Th13;
assume
A3: x in B;
then {x} c= B by ZFMISC_1:31;
then rng (A --> x) c= B by A1,XBOOLE_1:1;
hence thesis by A3,A2,FUNCT_2:def 1,RELSET_1:4;
end;
definition
let I,i be set;
redefine func I --> i -> Function of I,{i};
coherence
proof
dom (I --> i) = I & rng (I --> i) c= {i} by Th13;
hence thesis by FUNCT_2:def 1,RELSET_1:4;
end;
end;
definition
let B be non empty set, A be set, b be Element of B;
redefine func A --> b -> Function of A,B;
coherence by Th45;
end;
theorem
for A,X,x holds A --> x is Function of A, X;
reserve Y for set,
F for BinOp of X,
f,g,h for Function
of Y,X,
x,x1,x2 for Element of X;
theorem Th47:
F[:](f,x) is Function of Y,X
proof
dom f = Y by FUNCT_2:def 1;
then reconsider g = dom f --> x as Function of Y,X;
F*<:f,g:> is Function of Y,X;
hence thesis;
end;
definition
let X be non empty set, Z be set;
let F be BinOp of X, f be Function of Z,X, x be Element of X;
redefine func F[:](f,x) -> Function of Z,X;
coherence by Th47;
end;
reserve Y for non empty set,
F for BinOp of X,
f,g,h for Function of Y,X,
x,
x1,x2 for Element of X;
theorem Th48:
for y being Element of Y holds (F[:](f,x)).y = F.(f.y,x)
proof
let y be Element of Y;
dom (F[:](f,x)) = Y by FUNCT_2:def 1;
hence thesis by Th27;
end;
theorem Th49:
(for y being Element of Y holds g.y = F.(f.y,x)) implies g = F
[:](f,x)
proof
assume
A1: for y being Element of Y holds g.y = F.(f.y,x);
now
let y be Element of Y;
thus g.y = F.(f.y,x) by A1
.= (F[:](f,x)).y by Th48;
end;
hence thesis by FUNCT_2:63;
end;
theorem
F[:](id X, x)*f = F[:](f,x)
proof
thus F[:](id X, x)*f = F[:](id X*f, x) by Th29
.= F[:](f,x) by FUNCT_2:17;
end;
theorem
F[:](id X, x).x = F.(x,x)
proof
thus F[:](id X, x).x = F.(id X.x, x) by Th48
.= F.(x,x) by FUNCT_1:18;
end;
reserve Y for set,
F for BinOp of X,
f,g,h for Function
of Y,X,
x,x1,x2 for Element of X;
theorem Th52:
F[;](x,g) is Function of Y,X
proof
dom g = Y by FUNCT_2:def 1;
then reconsider f = dom g --> x as Function of Y,X;
F*<:f,g:> is Function of Y,X;
hence thesis;
end;
definition
let X be non empty set, Z be set;
let F be BinOp of X, x be Element of X;
let g be Function of Z,X;
redefine func F[;](x,g) -> Function of Z,X;
coherence by Th52;
end;
reserve Y for non empty set,
F for BinOp of X,
f,g,h for Function of Y,X,
x,
x1,x2 for Element of X;
theorem Th53:
for y being Element of Y holds (F[;](x,f)).y = F.(x,f.y)
proof
let y be Element of Y;
dom (F[;](x,f)) = Y by FUNCT_2:def 1;
hence thesis by Th32;
end;
theorem Th54:
(for y being Element of Y holds g.y = F.(x,f.y)) implies g = F
[;](x,f)
proof
assume
A1: for y being Element of Y holds g.y = F.(x,f.y);
now
let y be Element of Y;
thus g.y = F.(x,f.y) by A1
.= (F[;](x,f)).y by Th53;
end;
hence thesis by FUNCT_2:63;
end;
reserve Y for set,
F for BinOp of X,
f,g,h for Function
of Y,X,
x,x1,x2 for Element of X;
theorem
F[;](x, id X)*f = F[;](x,f)
proof
thus F[;](x, id X)*f = F[;](x, id X*f) by Th34
.= F[;](x,f) by FUNCT_2:17;
end;
theorem
F[;](x, id X).x = F.(x,x)
proof
thus F[;](x, id X).x = F.(x, id X.x) by Th53
.= F.(x,x) by FUNCT_1:18;
end;
theorem
for X,Y,Z being non empty set for f being Function of X, [:Y,Z:] for x
being Element of X holds f~.x =[(f.x)`2,(f.x)`1]
proof
let X,Y,Z be non empty set;
let f be Function of X, [:Y,Z:];
let x be Element of X;
x in X;
then
A1: x in dom f by FUNCT_2:def 1;
f.x = [(f.x)`1, (f.x)`2] by MCART_1:22;
hence thesis by A1,Def1;
end;
definition
let X,Y,Z be non empty set;
let f be Function of X, [:Y,Z:];
redefine func rng f -> Relation of Y,Z;
coherence by RELAT_1:def 19;
end;
definition
let X,Y,Z be non empty set;
let f be Function of X, [:Y,Z:];
redefine func f~ -> Function of X, [:Z,Y:];
coherence
proof
A1: rng (f~) c= [:Z,Y:]
proof
let x be set;
assume x in rng (f~);
then consider y being set such that
A2: y in dom (f~) and
A3: x = f~.y by FUNCT_1:def 3;
A4: y in dom f by A2,Def1;
then reconsider y as Element of X;
A5: f.y = [(f.y)`1,(f.y)`2] by MCART_1:21;
then f~.y = [(f.y)`2,(f.y)`1] by A4,Def1;
hence thesis by A3,A5,ZFMISC_1:88;
end;
X = dom f by FUNCT_2:def 1
.= dom (f~) by Def1;
hence thesis by A1,FUNCT_2:def 1,RELSET_1:4;
end;
end;
theorem
for X,Y,Z being non empty set for f being Function of X, [:Y,Z:] holds
rng (f~) = (rng f)~
proof
let X,Y,Z be non empty set;
let f be Function of X, [:Y,Z:];
let x,y be set;
thus [x,y] in rng (f~) implies [x,y] in (rng f)~
proof
assume [x,y] in rng (f~);
then consider z being set such that
A1: z in dom (f~) and
A2: [x,y] = f~.z by FUNCT_1:def 3;
A3: z in dom f by A1,Def1;
f.z = f~~.z
.= [y,x] by A1,A2,Def1;
then [y,x] in rng f by A3,FUNCT_1:def 3;
hence thesis by RELAT_1:def 7;
end;
assume [x,y] in (rng f)~;
then [y,x] in rng f by RELAT_1:def 7;
then consider z being set such that
A4: z in dom f & [y,x] = f.z by FUNCT_1:def 3;
z in dom (f~) & f~.z = [x,y] by A4,Def1;
hence thesis by FUNCT_1:def 3;
end;
reserve y for Element of Y;
theorem
F is associative implies F[:](F[;](x1,f),x2) = F[;](x1,F[:](f,x2))
proof
assume
A1: F is associative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x3 = f.y as Element of X by A2,FUNCT_2:5;
thus (F[:](F[;](x1,f),x2)).y = F.((F[;](x1,f)).y,x2) by A2,Th48
.= F.(F.(x1,x3),x2) by A2,Th53
.= F.(x1,F.(x3,x2)) by A1,BINOP_1:def 3
.= F.(x1,(F[:](f,x2)).y) by A2,Th48;
end;
hence thesis by A2,Th54;
end;
end;
theorem
F is associative implies F.:(F[:](f,x),g) = F.:(f,F[;](x,g))
proof
assume
A1: F is associative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x1 = f.y, x2 = g.y as Element of X by A2,FUNCT_2:5;
thus (F.:(F[:](f,x),g)).y = F.((F[:](f,x)).y,g.y) by A2,Th37
.= F.(F.(x1,x),x2) by A2,Th48
.= F.(x1,F.(x,x2)) by A1,BINOP_1:def 3
.= F.(f.y,(F[;](x,g)).y) by A2,Th53;
end;
hence thesis by A2,Th38;
end;
end;
theorem
F is associative implies F.:(F.:(f,g),h) = F.:(f,F.:(g,h))
proof
assume
A1: F is associative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x1 = f.y, x2 = g.y, x3 = h.y as Element of X by A2,FUNCT_2:5;
thus (F.:(F.:(f,g),h)).y = F.((F.:(f,g)).y,h.y) by A2,Th37
.= F.(F.(f.y,g.y),h.y) by A2,Th37
.= F.(x1,F.(x2,x3)) by A1,BINOP_1:def 3
.= F.(f.y,(F.:(g,h)).y) by A2,Th37;
end;
hence thesis by A2,Th38;
end;
end;
theorem
F is associative implies F[;](F.(x1,x2),f) = F[;](x1,F[;](x2,f))
proof
assume
A1: F is associative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x3 = f.y as Element of X by A2,FUNCT_2:5;
thus (F[;](F.(x1,x2),f)).y = F.(F.(x1,x2),f.y) by A2,Th53
.= F.(x1,F.(x2,x3)) by A1,BINOP_1:def 3
.= F.(x1,(F[;](x2,f)).y) by A2,Th53;
end;
hence thesis by A2,Th54;
end;
end;
theorem
F is associative implies F[:](f, F.(x1,x2)) = F[:](F[:](f,x1),x2)
proof
assume
A1: F is associative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x3 = f.y as Element of X by A2,FUNCT_2:5;
thus (F[:](f, F.(x1,x2))).y = F.(f.y, F.(x1,x2)) by A2,Th48
.= F.(F.(x3,x1),x2) by A1,BINOP_1:def 3
.= F.(F[:](f,x1).y,x2) by A2,Th48;
end;
hence thesis by A2,Th49;
end;
end;
theorem
F is commutative implies F[;](x,f) = F[:](f,x)
proof
assume
A1: F is commutative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x1 = f.y as Element of X by A2,FUNCT_2:5;
thus (F[;](x,f)).y = F.(x,x1) by A2,Th53
.= F.(f.y,x) by A1,BINOP_1:def 2;
end;
hence thesis by A2,Th49;
end;
end;
theorem
F is commutative implies F.:(f,g) = F.:(g,f)
proof
assume
A1: F is commutative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x1 = f.y, x2 = g.y as Element of X by A2,FUNCT_2:5;
thus (F.:(f,g)).y = F.(x1,x2) by A2,Th37
.= F.(g.y,f.y) by A1,BINOP_1:def 2;
end;
hence thesis by A2,Th38;
end;
end;
theorem
F is idempotent implies F.:(f,f) = f
proof
assume
A1: F is idempotent;
per cases;
suppose
A2: Y = {};
hence F.:(f,f) = {}
.= f by A2;
end;
suppose
A3: Y <> {};
now
let y;
reconsider x = f.y as Element of X by A3,FUNCT_2:5;
thus f.y = F.(x,x) by A1
.= F.(f.y,f.y);
end;
hence thesis by A3,Th38;
end;
end;
reserve Y for non empty set,
F for BinOp of X,
f for Function of Y,X,
x for
Element of X,
y for Element of Y;
theorem
F is idempotent implies F[;](f.y,f).y = f.y
proof
assume
A1: F is idempotent;
thus F[;](f.y,f).y = F.(f.y,f.y) by Th53
.= f.y by A1;
end;
theorem
F is idempotent implies F[:](f,f.y).y = f.y
proof
assume
A1: F is idempotent;
thus F[:](f,f.y).y = F.(f.y,f.y) by Th48
.= f.y by A1;
end;
theorem
for F,f,g being Function st [:rng f, rng g:] c= dom F holds dom(F.:(f,
g)) = dom f /\ dom g
proof
let F,f,g be Function such that
A1: [:rng f, rng g:] c= dom F;
rng<:f,g:> c= [:rng f, rng g:] by FUNCT_3:51;
hence dom(F.:(f,g)) = dom<:f,g:> by A1,RELAT_1:27,XBOOLE_1:1
.= dom f /\ dom g by FUNCT_3:def 7;
end;
definition
let IT be Function;
attr IT is Function-yielding means
:Def6:
for x being set st x in dom IT holds IT.x is Function;
end;
registration
cluster Function-yielding for Function;
existence
proof
take the set --> the Function;
let x be set;
thus thesis;
end;
end;
registration
let B be Function-yielding Function, j be set;
cluster B.j -> Function-like Relation-like;
coherence
proof
per cases;
suppose
j in dom B;
hence thesis by Def6;
end;
suppose
not j in dom B;
hence thesis by FUNCT_1:def 2;
end;
end;
end;
registration
let F be Function-yielding Function, f be Function;
cluster F * f -> Function-yielding;
coherence
proof
thus F * f is Function-yielding
proof
let x be set;
assume x in dom (F*f);
then (F*f).x = F.(f.x) by FUNCT_1:12;
hence thesis;
end;
end;
end;
registration
let B;
let c be non empty set;
cluster B --> c -> non-empty;
coherence
proof
not {} in rng(B --> c) by TARSKI:def 1;
hence thesis by RELAT_1:def 9;
end;
end;
theorem
([:X,Y:] --> z).(x,y) = z
proof
[x,y] in [:X,Y:] by ZFMISC_1:87;
hence thesis by Th7;
end;
reserve a,b,c for set;
definition
let a,b,c;
func (a,b).-->c -> Function equals
{[a,b]} --> c;
coherence;
end;
theorem
((a,b).-->c).(a,b) = c
proof
[a,b] in {[a,b]} by TARSKI:def 1;
hence thesis by Th7;
end;
definition
let x,y,a,b be set;
func IFEQ(x,y,a,b) -> set equals
:Def8:
a if x = y otherwise b;
correctness;
end;
definition
let D be set;
let x,y be set, a,b be Element of D;
redefine func IFEQ(x,y,a,b) -> Element of D;
coherence
proof
x = y or x <> y;
hence thesis by Def8;
end;
end;
definition
let x,y be set;
func x .--> y -> set equals
{x} --> y;
coherence;
end;
registration
let x,y be set;
cluster x .--> y -> Function-like Relation-like;
coherence;
end;
registration
let x,y be set;
cluster x .--> y -> one-to-one;
coherence
proof
let x1,x2 be set;
set f = x .--> y;
assume that
A1: x1 in dom f and
A2: x2 in dom f;
A3: dom f = {x} by Th13;
then x1 =x by A1,TARSKI:def 1;
hence thesis by A3,A2,TARSKI:def 1;
end;
end;
theorem Th72:
for x,y be set holds (x .--> y).x = y
proof
let x,y be set;
x in {x} by TARSKI:def 1;
hence thesis by Th7;
end;
theorem
for a,b being set, f being Function holds a.-->b c= f iff a in dom f &
f.a = b
proof
let a,b be set, f be Function;
A1: dom(a.-->b) = {a} by Th13;
then
A2: a in dom(a.-->b) by TARSKI:def 1;
hereby
assume
A3: a.-->b c= f;
then {a} c= dom f by A1,GRFUNC_1:2;
hence a in dom f by ZFMISC_1:31;
thus f.a = (a.-->b).a by A2,A3,GRFUNC_1:2
.= b by Th72;
end;
assume that
A4: a in dom f and
A5: f.a = b;
A6: now
let x be set;
assume x in dom(a.-->b);
then x = a by A1,TARSKI:def 1;
hence (a.-->b).x = f.x by A5,Th72;
end;
dom(a.-->b) c= dom f by A1,A4,ZFMISC_1:31;
hence thesis by A6,GRFUNC_1:2;
end;
notation
let o,m,r be set;
synonym (o,m) :-> r for (o,m) .--> r;
end;
Lm2: for o,m,r be set holds (o,m) :-> r is Function of [:{o},{m}:],{r}
proof
let o,m,r be set;
dom((o,m) :-> r) = {[o,m]} by Th13
.= [:{o},{m}:] by ZFMISC_1:29;
hence thesis by FUNCT_2:def 1;
end;
definition
let o,m,r be set;
redefine func (o,m) :-> r -> Function of [:{o},{m}:],{r} means
not contradiction;
coherence by Lm2;
compatibility
proof
let f be Function of [:{o},{m}:],{r};
(o,m) .--> r is Function of [:{o},{m}:],{r} by Lm2;
hence thesis by FUNCT_2:51;
end;
end;
reserve x,y,z for set;
theorem
x in dom(x .--> y)
proof
dom(x .--> y) = {x} by Th13;
hence thesis by TARSKI:def 1;
end;
theorem
z in dom(x .--> y) implies z = x
proof
dom(x .--> y) = {x} by Th13;
hence thesis by TARSKI:def 1;
end;
theorem
not x in A implies (x .--> y)|A = {}
proof
assume not x in A;
then {x} misses A by ZFMISC_1:50;
then dom(x .--> y) misses A by Th13;
hence thesis by RELAT_1:66;
end;
notation
let x,y;
synonym x :-> y for x .--> y;
end;
definition
let m,o be set;
redefine func m :-> o -> Function of {m}, {o};
coherence;
end;
theorem
for x being Element of {a} for y being Element of {b} holds ((a,b):->c
).(x,y) = c by TARSKI:def 1;
registration
let f be Function-yielding Function, C be set;
cluster f|C -> Function-yielding;
coherence
proof
let i be set;
f.i is Function;
hence thesis by FUNCT_1:47;
end;
end;
registration
let A be set;
let f be Function;
cluster A --> f -> Function-yielding;
coherence
proof
let a be set;
thus thesis;
end;
end;
registration
let X,a be set;
cluster X --> a -> constant;
coherence
proof
let x,y be set;
assume that
A1: x in dom(X --> a) and
A2: y in dom(X --> a);
thus (X --> a).x = a by A1,Th7
.= (X --> a).y by A2,Th7;
end;
end;
registration
cluster non empty constant for Function;
existence
proof
take {{}} --> {};
thus thesis;
end;
end;
registration
let f be constant Function, X be set;
cluster f|X -> constant;
coherence
proof
let x,y be set;
A1: dom(f|X) c= dom f by RELAT_1:60;
assume that
A2: x in dom(f|X) and
A3: y in dom (f|X);
thus (f|X).x = f.x by A2,FUNCT_1:47
.= f.y by A1,A2,A3,FUNCT_1:def 10
.= (f|X).y by A3,FUNCT_1:47;
end;
end;
theorem
for f being non empty constant Function ex y st for x st x in dom f
holds f.x = y
proof
let f be non empty constant Function;
consider y such that
A1: y in rng f by XBOOLE_0:def 1;
take y;
ex x0 being set st x0 in dom f & f.x0 = y by A1,FUNCT_1:def 3;
hence thesis by FUNCT_1:def 10;
end;
theorem
for X being non empty set, x being set holds the_value_of (X --> x) =
x
proof
let X be non empty set, x be set;
set f = X --> x;
ex i being set st i in dom f & the_value_of f = f.i by FUNCT_1:def 12;
hence thesis by Th7;
end;
theorem
for f being constant Function holds f = (dom f) --> the_value_of f
proof
let f be constant Function;
thus dom ((dom f) --> the_value_of f) = dom f by Th13;
let x be set;
assume
A1: x in dom f;
then f <> {} & ((dom f) --> the_value_of f).x = the_value_of f by Th7;
hence thesis by A1,FUNCT_1:def 12;
end;
registration
let X be set, Y be non empty set;
cluster total for PartFunc of X,Y;
existence
proof
consider y being set such that
A1: y in Y by XBOOLE_0:def 1;
reconsider y as Element of Y by A1;
take X --> y;
thus thesis;
end;
end;
registration
let I, A be set;
cluster I --> A -> I-defined;
coherence;
end;
registration
let I, A be set;
cluster I .--> A -> {I}-defined;
coherence;
end;
theorem
(A --> x).:B c= {x};
registration
let I be set, f be Function;
cluster I .--> f -> Function-yielding;
coherence;
end;
registration let I be set;
cluster total for I-defined non-empty Function;
existence
proof
take I --> 1;
thus thesis;
end;
end;
theorem Th82:
x .--> y is_isomorphism_of {[x,x]},{[y,y]}
proof
set F = x .--> y;
set R = {[x,x]};
set S = {[y,y]};
A1: field R = {x} by RELAT_1:173;
hence dom F = field R by Th13;
field S = {y} by RELAT_1:173;
hence rng F = field S by RELAT_1:160;
thus F is one-to-one;
let a,b be set;
hereby
assume [a,b] in R;
then [a,b] = [x,x] by TARSKI:def 1;
then
A2: a = x & b = x by XTUPLE_0:1;
hence a in field R & b in field R by A1,TARSKI:def 1;
F.x = y by Th72;
hence [F.a,F.b] in S by A2,TARSKI:def 1;
end;
assume a in field R & b in field R;
then a = x & b = x by A1,TARSKI:def 1;
hence thesis by TARSKI:def 1;
end;
theorem
{[x,x]}, {[y,y]} are_isomorphic
proof
take x .--> y;
thus thesis by Th82;
end;
registration
let I, A be set;
cluster I --> A -> total for I-defined Function;
coherence;
end;
theorem
for f being Function st x in dom f
holds x .--> f.x c= f
proof
let f be Function;
assume x in dom f;
then [x, f.x] in f by FUNCT_1:1;
then {[x, f.x]} c= f by ZFMISC_1:31;
hence thesis by ZFMISC_1:29;
end;
registration let A be non empty set;
let x be set, i be Element of A;
cluster x .--> i -> A-valued;
coherence
proof
rng(x .--> i) = {i} by RELAT_1:160;
hence rng(x .--> i) c= A by ZFMISC_1:31;
end;
end;
reserve Y for set,
f,g for Function of Y,X,
x for Element of X,
y for Element of Y;
theorem
F is associative implies F.:(F[;](x,f),g) = F[;](x,F.:(f,g))
proof
assume
A1: F is associative;
per cases;
suppose
Y = {};
hence thesis;
end;
suppose
A2: Y <> {};
now
let y;
reconsider x1 = f.y, x2 = g.y as Element of X by A2,FUNCT_2:5;
thus (F[;](x,F.:(f,g))).y = F.(x,F.:(f,g).y) by A2,Th53
.= F.(x,F.(x1,x2)) by A2,Th37
.= F.(F.(x,x1),x2) by A1,BINOP_1:def 3
.= F.(F[;](x,f).y,g.y) by A2,Th53;
end;
hence thesis by A2,Th38;
end;
end;
registration let A be set, B be non empty set, x be Element of B;
cluster A --> x -> B-valued;
coherence;
end;
registration let A be non empty set, x be Element of A, y be set;
cluster x .--> y -> A-defined;
coherence
proof
dom(x .--> y) = {x} by Th13;
hence dom(x .--> y) c= A by ZFMISC_1:31;
end;
end;
theorem
for x,y,A being set st x in A
holds (x .--> y)|A = x .--> y
proof let x,y,A be set;
assume x in A;
then {x} c= A by ZFMISC_1:31;
then dom(x .--> y) c= A by Th13;
hence thesis by RELAT_1:68;
end;
registration
let Y be functional set;
cluster Y-valued -> Function-yielding for Function;
coherence
proof
let f be Function;
assume
A1: f is Y-valued;
let x be set;
thus thesis by A1;
end;
end;
definition
let IT be Function;
attr IT is Relation-yielding means
for x be set st x in dom IT holds IT.x is Relation;
end;
registration
cluster Function-yielding -> Relation-yielding for Function;
coherence
proof let f be Function;
assume
A1: f is Function-yielding;
let x be set;
thus thesis by A1;
end;
end;
registration
cluster empty -> Function-yielding for Function;
coherence
proof let f be Function;
assume
A1: f is empty;
let x be set; thus thesis by A1;
end;
end;
theorem
for X,Y,x,y being set holds X --> x tolerates Y --> y iff x = y or X misses Y
proof
let X,Y,x,y be set;
set f = X --> x, g = Y --> y;
A1: dom g = Y by Th13;
A2: dom f = X by Th13;
thus f tolerates g implies x = y or X misses Y
proof
assume that
A3: for z being set st z in dom f /\ dom g holds f.z = g.z and
A4: x <> y;
assume X meets Y;
then consider z be set such that
A5: z in X and
A6: z in Y by XBOOLE_0:3;
A7: f.z = x by A5,Th7;
A8: g.z = y by A6,Th7;
z in X /\ Y by A5,A6,XBOOLE_0:def 4;
hence thesis by A2,A1,A3,A4,A7,A8;
end;
assume
A9: x = y or X misses Y;
let z be set;
assume
A10: z in dom f /\ dom g;
then
A11: z in Y;
A12: z in X by A2,A10,XBOOLE_0:def 4;
then f.z = x by Th7;
hence thesis by A9,A12,A11,Th7,XBOOLE_0:3;
end;
reserve x,y,z,A for set;
theorem Th88:
rng(x .--> y) = {y}
proof
dom(x .--> y) = {x} by Th13;
hence rng(x .--> y) = {(x .--> y).x} by FUNCT_1:4
.= {y} by Th72;
end;
theorem
z in A implies (A --> x)*(y .--> z) = y .--> x
proof assume
A1: z in A;
A2: dom(y .--> z) = {y} by Th13
.= dom(y .--> x) by Th13;
rng(y .--> z) = {z} by Th88;
then rng(y .--> z) c= A by A1,ZFMISC_1:31;
then rng(y .--> z) c= dom(A --> x) by Th13;
hence dom((A --> x)*(y .--> z)) = dom(y .--> x) by A2,RELAT_1:27;
let e be set;
assume
A3: e in dom((A --> x)*(y .--> z));
thus ((A --> x)*(y .--> z)).e = (A --> x).((y .--> z).e) by A3,FUNCT_1:12
.= (A --> x).z by A3,Th7
.= x by A1,Th7
.= (y .--> x).e by A3,Th7;
end;
begin
reserve a,b,p,x,x9,x1,x19,x2,y,y9,y1,y19,y2,z,z9,z1,z2,X,X9,Y,Y9,Z,Z9 for set;
reserve A,D,D9 for non empty set;
reserve f,g,h for Function;
Lm1: [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]] implies x = x1 & y = y1 & x9= x19 &
y9 = y19
proof
assume [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]];
then [x,x9] = [x1,x19] & [y,y9] = [y1,y19] by XTUPLE_0:1;
hence thesis by XTUPLE_0:1;
end;
theorem Th1:
(for z st z in Z holds ex x,y st z = [x,y]) implies ex X,Y st Z
c= [:X,Y:]
proof
assume
A1: for z st z in Z holds ex x,y st z = [x,y];
defpred P[set] means ex y st [ $1,y] in Z;
consider X such that
A2: x in X iff x in union union Z & P[ x] from XBOOLE_0:sch 1;
defpred P[set] means ex x st [x,$1] in Z;
consider Y such that
A3: y in Y iff y in union union Z & P[y] from XBOOLE_0:sch 1;
take X,Y;
let z;
assume
A4: z in Z;
then consider x,y such that
A5: z = [x,y] by A1;
x in union union Z by A4,A5,ZFMISC_1:134;
then
A6: x in X by A2,A4,A5;
y in union union Z by A4,A5,ZFMISC_1:134;
then y in Y by A3,A4,A5;
hence thesis by A5,A6,ZFMISC_1:87;
end;
theorem
g*f = (g|rng f)*f
proof
x in dom(g*f) iff x in dom((g|rng f)*f)
proof
A1: dom(g|rng f) = dom g /\ rng f by RELAT_1:61;
thus x in dom(g*f) implies x in dom((g|rng f)*f)
proof
assume
A2: x in dom(g*f);
then
A3: x in dom f by FUNCT_1:11;
x in dom f by A2,FUNCT_1:11;
then
A4: f.x in rng f by FUNCT_1:def 3;
f.x in dom g by A2,FUNCT_1:11;
then f.x in dom(g|rng f) by A1,A4,XBOOLE_0:def 4;
hence thesis by A3,FUNCT_1:11;
end;
assume
A5: x in dom((g|rng f)*f);
then f.x in dom(g|rng f) by FUNCT_1:11;
then
A6: f.x in dom g by A1,XBOOLE_0:def 4;
x in dom f by A5,FUNCT_1:11;
hence thesis by A6,FUNCT_1:11;
end;
then
A7: dom(g*f) = dom((g|rng f)*f) by TARSKI:1;
x in dom(g*f) implies (g*f).x = ((g|rng f)*f).x
proof
assume
A8: x in dom(g*f);
then
A9: x in dom f by FUNCT_1:11;
then
A10: f.x in rng f by FUNCT_1:def 3;
thus (g*f).x = g.(f.x) by A8,FUNCT_1:12
.= (g|rng f).(f.x) by A10,FUNCT_1:49
.= ((g|rng f)*f).x by A9,FUNCT_1:13;
end;
hence thesis by A7,FUNCT_1:2;
end;
theorem
id X c= id Y iff X c= Y
proof
thus id X c= id Y implies X c= Y
proof
assume
A1: id X c= id Y;
let x;
assume x in X;
then [x,x] in id X by RELAT_1:def 10;
hence thesis by A1,RELAT_1:def 10;
end;
assume
A2: X c= Y;
let z;
assume
A3: z in id X;
then consider x,x9 such that
A4: x in X and
x9 in X and
A5: z = [x,x9] by ZFMISC_1:84;
x = x9 by A3,A5,RELAT_1:def 10;
hence thesis by A2,A4,A5,RELAT_1:def 10;
end;
theorem
X c= Y implies X --> a c= Y --> a
proof
A1: dom(X --> a) = X by FUNCOP_1:13;
assume
A2: X c= Y;
A3: now
let x;
assume
A4: x in dom(X --> a);
then (X --> a).x = a by FUNCOP_1:7;
hence (X --> a).x = (Y --> a).x by A2,A1,A4,FUNCOP_1:7;
end;
dom(Y --> a) = Y by FUNCOP_1:13;
hence thesis by A2,A1,A3,GRFUNC_1:2;
end;
theorem Th5:
X --> a c= Y --> b implies X c= Y
proof
assume X --> a c= Y --> b;
then
A1: dom(X --> a) c= dom(Y --> b) by RELAT_1:11;
dom(X --> a) = X by FUNCOP_1:13;
hence thesis by A1,FUNCOP_1:13;
end;
theorem
X <> {} & X --> a c= Y --> b implies a = b
proof
assume
A1: X <> {};
set x = the Element of X;
assume
A2: X --> a c= Y --> b;
then X c= Y by Th5;
then x in Y by A1,TARSKI:def 3;
then
A3: (Y --> b).x = b by FUNCOP_1:7;
dom(X --> a) = X & (X --> a).x = a by A1,FUNCOP_1:7,13;
hence thesis by A1,A2,A3,GRFUNC_1:2;
end;
theorem
x in dom f implies x .--> f.x c= f
proof
A1: now
let y;
assume y in dom (x .--> f.x);
then x = y by FUNCOP_1:75;
hence (x .--> f.x).y = f.y by FUNCOP_1:72;
end;
assume
A2: x in dom f;
dom (x .--> f.x) c= dom f
proof
let y;
thus thesis by A2,FUNCOP_1:75;
end;
hence thesis by A1,GRFUNC_1:2;
end;
theorem
Y|`f|X c= f
proof
Y|`f|X c= Y|`f & Y|`f c= f by RELAT_1:59,86;
hence thesis by XBOOLE_1:1;
end;
theorem
f c= g implies Y|`f|X c= Y|`g|X
proof
assume f c= g;
then Y|`f c= Y|`g by RELAT_1:101;
hence thesis by RELAT_1:76;
end;
definition
let f,g;
func f +* g -> Function means
:Def1:
dom it = dom f \/ dom g &
for x st x in dom f \/ dom g holds
(x in dom g implies it.x = g.x) &
(not x in dom g implies it.x = f.x);
existence
proof
deffunc G(set) = f.$1;
deffunc F(set) = g.$1;
defpred P[set] means $1 in dom g;
thus ex F being Function st dom F = dom f \/ dom g &
for x st x in dom f \/ dom g holds
(P[x] implies F.x = F(x)) & (not P[x] implies F.x = G(x))
from PARTFUN1:sch 1;
end;
uniqueness
proof
let h1,h2 be Function such that
A1: dom h1 = dom f \/ dom g and
A2: for x st x in dom f \/ dom g holds (x in dom g implies h1.x = g.x)
& (not x in dom g implies h1.x = f.x) and
A3: dom h2 = dom f \/ dom g and
A4: for x st x in dom f \/ dom g holds (x in dom g implies h2.x = g.x)
& (not x in dom g implies h2.x = f.x);
for x st x in dom f \/ dom g holds h1.x = h2.x
proof
let x;
assume
A5: x in dom f \/ dom g;
then
A6: not x in dom g implies h1.x = f.x & h2.x = f.x by A2,A4;
x in dom g implies h1.x = g.x & h2.x = g.x by A2,A4,A5;
hence thesis by A6;
end;
hence thesis by A1,A3,FUNCT_1:2;
end;
idempotence;
end;
theorem Th10:
dom f c= dom(f+*g) & dom g c= dom(f+*g)
proof
dom(f+*g) = dom f \/ dom g by Def1;
hence thesis by XBOOLE_1:7;
end;
theorem Th11:
not x in dom g implies (f +* g).x = f.x
proof
assume
A1: not x in dom g;
per cases;
suppose
x in dom f;
then x in dom f \/ dom g by XBOOLE_0:def 3;
hence thesis by A1,Def1;
end;
suppose
A2: not x in dom f;
then not x in dom f \/ dom g by A1,XBOOLE_0:def 3;
then not x in dom(f+*g) by Def1;
hence (f+*g).x = {} by FUNCT_1:def 2
.= f.x by A2,FUNCT_1:def 2;
end;
end;
theorem Th12:
x in dom(f +* g) iff x in dom f or x in dom g
proof
x in dom(f +* g) iff x in dom f \/ dom g by Def1;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th13:
x in dom g implies (f+*g).x = g.x
proof
x in dom g implies x in dom f \/ dom g by XBOOLE_0:def 3;
hence thesis by Def1;
end;
theorem Th14:
f +* g +* h = f +* (g +* h)
proof
A1: now
let x such that
x in dom f \/ dom(g +* h);
hereby
assume
A2: x in dom(g +* h);
per cases by A2,Th12;
suppose
A3: x in dom g & not x in dom h;
hence (f +* g +* h).x = (f +* g).x by Th11
.= g.x by A3,Th13
.= (g +* h).x by A3,Th11;
end;
suppose
A4: x in dom h;
hence (f +* g +* h).x = h.x by Th13
.= (g +* h).x by A4,Th13;
end;
end;
assume
A5: not x in dom(g +* h);
then
A6: not x in dom g by Th12;
not x in dom h by A5,Th12;
hence (f +* g +* h).x = (f +* g).x by Th11
.= f.x by A6,Th11;
end;
dom(f +* g +* h) = dom(f +* g) \/ dom h by Def1
.= dom f \/ dom g \/ dom h by Def1
.= dom f \/ (dom g \/ dom h) by XBOOLE_1:4
.= dom f \/ dom(g +* h) by Def1;
hence thesis by A1,Def1;
end;
theorem Th15:
f tolerates g & x in dom f implies (f+*g).x = f.x
proof
assume that
A1: f tolerates g and
A2: x in dom f;
now
per cases;
suppose
x in dom g;
then x in dom f /\ dom g & (f+*g).x = g.x by A2,Th13,XBOOLE_0:def 4;
hence thesis by A1,PARTFUN1:def 4;
end;
suppose
not x in dom g;
hence thesis by Th11;
end;
end;
hence thesis;
end;
theorem
dom f misses dom g & x in dom f implies (f +* g).x = f.x
proof
assume dom f /\ dom g = {} & x in dom f;
then not x in dom g by XBOOLE_0:def 4;
hence thesis by Th11;
end;
theorem Th17:
rng(f +* g) c= rng f \/ rng g
proof
let y;
assume y in rng(f +* g);
then consider x such that
A1: x in dom (f +* g) and
A2: y = (f +* g).x by FUNCT_1:def 3;
x in dom f & not x in dom g or x in dom g by A1,Th12;
then x in dom f & (f +* g).x = f.x or x in dom g & (f +* g).x = g.x by Th11
,Th13;
then y in rng f or y in rng g by A2,FUNCT_1:def 3;
hence thesis by XBOOLE_0:def 3;
end;
theorem
rng g c= rng(f +* g)
proof
let y;
assume y in rng g;
then consider x such that
A1: x in dom g & y = g.x by FUNCT_1:def 3;
x in dom(f +* g) & (f +* g).x = y by A1,Th12,Th13;
hence thesis by FUNCT_1:def 3;
end;
theorem Th19:
dom f c= dom g implies f +* g = g
proof
assume dom f c= dom g;
then dom f \/ dom g = dom g by XBOOLE_1:12;
then dom(f +* g) = dom g & for x st x in dom g holds (f +* g).x = g.x by Def1
;
hence thesis by FUNCT_1:2;
end;
registration let f; let g be empty Function;
reduce g +* f to f;
reducibility
proof
dom g c= dom f by XBOOLE_1:2;
hence thesis by Th19;
end;
reduce f +* g to f;
reducibility
proof
A1: for x st x in dom f holds (f +* g).x = f.x
proof
let x;
assume x in dom f;
then x in dom f \ dom g;
hence thesis by Th11;
end;
dom f \/ dom g = dom f;
then dom(f +* g) = dom f by Def1;
hence thesis by A1,FUNCT_1:2;
end;
end;
theorem Th20:
{} +* f = f;
theorem Th21:
f +* {} = f;
theorem
id(X) +* id(Y) = id(X \/ Y)
proof
A1: x in dom id(X \/ Y) implies (id(X) +* id(Y)).x = id(X \/ Y).x
proof
assume
A2: x in dom id(X \/ Y);
now
per cases;
suppose
A3: x in Y;
dom id Y = Y;
hence (id(X) +* id(Y)).x = (id Y).x by A3,Th13
.= x by A3,FUNCT_1:18
.= id(X \/ Y).x by A2,FUNCT_1:18;
end;
suppose
A4: not x in Y;
then
A5: x in X by A2,XBOOLE_0:def 3;
not x in dom id Y by A4;
hence (id(X) +* id(Y)).x = (id X).x by Th11
.= x by A5,FUNCT_1:18
.= id(X \/ Y).x by A2,FUNCT_1:18;
end;
end;
hence thesis;
end;
dom(id(X) +* id(Y)) = dom id X \/ dom id Y by Def1
.= X \/ dom id Y
.= X \/ Y
.= dom id(X \/ Y);
hence thesis by A1,FUNCT_1:2;
end;
theorem
(f +* g)|(dom g) = g
proof
dom f \/ dom g = dom(f +* g) by Def1;
then
A1: dom((f +* g)|(dom g)) = dom g by RELAT_1:62,XBOOLE_1:7;
for x st x in dom g holds ((f +* g)|(dom g)).x = g.x
proof
let x;
x in dom g implies (f +* g).x = g.x by Th13;
hence thesis by A1,FUNCT_1:47;
end;
hence thesis by A1,FUNCT_1:2;
end;
theorem Th24:
((f +* g)|(dom f \ dom g)) c= f
proof
A1: for x st x in dom((f +* g)|(dom f \ dom g)) holds ((f +* g)|(dom f \ dom
g)).x = f.x
proof
let x such that
A2: x in dom((f +* g)|(dom f \ dom g));
dom((f +* g)|(dom f \ dom g)) c= dom f \ dom g by RELAT_1:58;
then not x in dom g by A2,XBOOLE_0:def 5;
then (f +* g).x = f.x by Th11;
hence thesis by A2,FUNCT_1:47;
end;
dom((f +* g)|(dom f \ dom g)) c= dom f \ dom g by RELAT_1:58;
then dom((f +* g)|(dom f \ dom g)) c= dom f by XBOOLE_1:1;
hence thesis by A1,GRFUNC_1:2;
end;
theorem Th25:
g c= f +* g
proof
dom(f +* g) = dom f \/ dom g by Def1;
then
A1: dom g c= dom(f +* g) by XBOOLE_1:7;
for x st x in dom g holds (f+*g).x = g.x by Th13;
hence thesis by A1,GRFUNC_1:2;
end;
theorem
f tolerates g +* h implies f|(dom f \ dom h) tolerates g
proof
assume
A1: f tolerates g +* h;
let x;
assume
A2: x in dom(f|(dom f \ dom h)) /\ dom g;
then
A3: x in dom(f|(dom f \ dom h)) by XBOOLE_0:def 4;
x in dom g by A2,XBOOLE_0:def 4;
then
A4: x in dom(g +* h) by Th12;
A5: dom(f|(dom f \ dom h)) c= dom f \ dom h by RELAT_1:58;
then x in dom f by A3,XBOOLE_0:def 5;
then
A6: x in dom f /\ dom(g +* h) by A4,XBOOLE_0:def 4;
not x in dom h by A3,A5,XBOOLE_0:def 5;
then (g +* h).x = g.x by Th11;
then f.x = g.x by A1,A6,PARTFUN1:def 4;
hence thesis by A3,A5,FUNCT_1:49;
end;
theorem Th27:
f tolerates g +* h implies f tolerates h
proof
assume
A1: f tolerates g +* h;
let x;
assume
A2: x in dom f /\ dom h;
then
A3: x in dom f by XBOOLE_0:def 4;
A4: x in dom h by A2,XBOOLE_0:def 4;
then x in dom(g +* h) by Th12;
then
A5: x in dom f /\ dom(g +* h) by A3,XBOOLE_0:def 4;
(g +* h).x = h.x by A4,Th13;
hence thesis by A1,A5,PARTFUN1:def 4;
end;
theorem Th28:
f tolerates g iff f c= f +* g
proof
thus f tolerates g implies f c= (f +* g)
proof
dom f \/ dom g = dom(f +* g) by Def1;
then
A1: dom f c= dom(f +* g) by XBOOLE_1:7;
assume f tolerates g;
then for x st x in dom f holds (f +* g).x = f.x by Th15;
hence thesis by A1,GRFUNC_1:2;
end;
thus thesis by Th27,PARTFUN1:54;
end;
theorem Th29:
f +* g c= f \/ g
proof
let p;
assume
A1: p in f +* g;
then consider x,y such that
A2: p = [x,y] by RELAT_1:def 1;
x in dom(f +* g) by A1,A2,FUNCT_1:1;
then x in dom f & not x in dom g or x in dom g by Th12;
then
A3: x in dom f & (f +* g).x = f.x or x in dom g & (f +* g).x = g.x by Th11,Th13
;
y = (f +* g).x by A1,A2,FUNCT_1:1;
then p in f or p in g by A2,A3,FUNCT_1:1;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th30:
f tolerates g iff f \/ g = f +* g
proof
thus f tolerates g implies f \/ g = f +* g
proof
assume f tolerates g;
then
A1: f c= f +* g by Th28;
A2: f +* g c= f \/ g by Th29;
g c= f +* g by Th25;
then f \/ g c= f +* g by A1,XBOOLE_1:8;
hence thesis by A2,XBOOLE_0:def 10;
end;
thus thesis by PARTFUN1:51;
end;
theorem Th31:
dom f misses dom g implies f \/ g = f +* g
proof
assume dom f misses dom g;
then f tolerates g by PARTFUN1:56;
hence thesis by Th30;
end;
theorem Th32:
dom f misses dom g implies f c= f +* g
proof
assume dom f misses dom g;
then f \/ g = f +* g by Th31;
hence thesis by XBOOLE_1:7;
end;
theorem
dom f misses dom g implies (f +* g)|(dom f) = f
proof
assume dom f misses dom g;
then
A1: dom f \ dom g = dom f by XBOOLE_1:83;
dom((f +* g)|(dom f)) = dom(f +* g) /\ dom f by RELAT_1:61
.= (dom f \/ dom g) /\ dom f by Def1
.= dom f by XBOOLE_1:21;
hence thesis by A1,Th24,GRFUNC_1:3;
end;
theorem Th34:
f tolerates g iff f +* g = g +* f
proof
thus f tolerates g implies f +* g = g +* f
proof
assume
A1: f tolerates g;
A2: for x st x in dom(f +* g) holds (f +* g).x = (g +* f).x
proof
let x such that
A3: x in dom(f +* g);
now
A4: dom(f +* g) = dom f \/ dom g by Def1;
per cases by A3,A4,XBOOLE_0:def 3;
suppose
A5: x in dom f & x in dom g;
then
A6: (g +* f).x = f.x by Th13;
x in dom f /\ dom g & (f +* g).x = g.x by A5,Th13,XBOOLE_0:def 4;
hence thesis by A1,A6,PARTFUN1:def 4;
end;
suppose
A7: x in dom f & not x in dom g;
then (f +* g).x = f.x by Th11;
hence thesis by A7,Th13;
end;
suppose
A8: not x in dom f & x in dom g;
then (f +* g).x = g.x by Th13;
hence thesis by A8,Th11;
end;
end;
hence thesis;
end;
dom(f +* g) = dom g \/ dom f by Def1
.= dom(g +* f) by Def1;
hence thesis by A2,FUNCT_1:2;
end;
assume
A9: f +* g = g +* f;
let x;
assume
A10: x in dom f /\ dom g;
then x in dom g by XBOOLE_0:def 4;
then
A11: (f +* g).x = g.x by Th13;
x in dom f by A10,XBOOLE_0:def 4;
hence thesis by A9,A11,Th13;
end;
theorem Th35:
dom f misses dom g implies f +* g = g +* f
proof
assume dom f misses dom g;
then f tolerates g by PARTFUN1:56;
hence thesis by Th34;
end;
theorem
for f,g being PartFunc of X,Y st g is total holds f +* g = g
proof
let f,g be PartFunc of X,Y;
assume dom g = X;
then dom f c= dom g;
hence thesis by Th19;
end;
theorem Th37:
for f,g being Function of X,Y st Y = {} implies X = {} holds f +* g = g
proof
let f,g be Function of X,Y;
assume Y = {} implies X = {};
then dom f = X & dom g = X by FUNCT_2:def 1;
hence thesis by Th19;
end;
theorem
for f,g being Function of X,X holds f +* g = g by Th37;
theorem
for f,g being Function of X,D holds f +* g = g by Th37;
theorem
for f,g being PartFunc of X,Y holds f +* g is PartFunc of X,Y
proof
let f,g be PartFunc of X,Y;
rng (f +* g) c= rng f \/ rng g by Th17;
then
A1: rng(f +* g) c= Y by XBOOLE_1:1;
dom (f +* g) = dom f \/ dom g by Def1;
hence thesis by A1,RELSET_1:4;
end;
definition
let f;
func ~f -> Function means
:Def2:
(for x holds x in dom it iff ex y,z st x =
[z,y] & [y,z] in dom f) & for y,z st [y,z] in dom f holds it.(z,y) = f.(y,z);
existence
proof
defpred P[set,set] means ex y,z st $1 = [z,y] & $2 = f.[y,z];
defpred P[set] means ex y st [ $1,y] in dom f;
consider D1 being set such that
A1: x in D1 iff x in union union dom f & P[ x] from XBOOLE_0:sch 1;
defpred P[set] means ex y st [y,$1] in dom f;
consider D2 being set such that
A2: y in D2 iff y in union union dom f & P[y] from XBOOLE_0:sch 1;
defpred P[set] means ex y,z st $1 = [z,y] & [y,z] in dom f;
consider D being set such that
A3: x in D iff x in [:D2,D1:] & P[ x] from XBOOLE_0:sch 1;
A4: for x,y1,y2 st x in D & P[x,y1] & P[x,y2] holds y1 = y2
proof
let x,y1,y2 such that x in D;
given y,z such that
A5: x = [z,y] and
A6: y1 = f.[y,z];
given y9,z9 such that
A7: x = [z9,y9] and
A8: y2 = f.[y9,z9];
z = z9 by A5,A7,XTUPLE_0:1;
hence thesis by A5,A6,A7,A8,XTUPLE_0:1;
end;
A9: for x st x in D ex y1 st P[x,y1]
proof
let x;
assume x in D;
then consider y,z such that
A10: x = [z,y] and
[y,z] in dom f by A3;
take f.[y,z];
thus thesis by A10;
end;
consider h being Function such that
A11: dom h = D and
A12: for x st x in D holds P[x,h.x] from FUNCT_1:sch 2(A4,A9);
take h;
thus
A13: for x holds x in dom h iff ex y,z st x = [z,y] & [y,z] in dom f
proof
let x;
thus x in dom h implies ex y,z st x = [z,y] & [y,z] in dom f by A3,A11;
given y,z such that
A14: x = [z,y] and
A15: [y,z] in dom f;
y in union union dom f by A15,ZFMISC_1:134; then
A16: y in D1 by A1,A15;
z in union union dom f by A15,ZFMISC_1:134;
then z in D2 by A2,A15;
then [z,y] in [:D2,D1:] by A16,ZFMISC_1:87;
hence thesis by A3,A11,A14,A15;
end;
let y,z;
assume [y,z] in dom f;
then [z,y] in D by A11,A13;
then consider y9,z9 such that
A17: [z,y] = [z9,y9] and
A18: h.(z,y) = f.[y9,z9] by A12;
z = z9 by A17,XTUPLE_0:1;
hence thesis by A17,A18,XTUPLE_0:1;
end;
uniqueness
proof
let h1,h2 be Function such that
A19: for x holds x in dom h1 iff ex y,z st x = [z,y] & [y,z] in dom f and
A20: for y,z st [y,z] in dom f holds h1.(z,y) = f.(y,z) and
A21: for x holds x in dom h2 iff ex y,z st x = [z,y] & [y,z] in dom f and
A22: for y,z st [y,z] in dom f holds h2.(z,y) = f.(y,z);
A23: x in dom h1 implies h1.x = h2.x
proof
assume x in dom h1;
then consider x1,x2 such that
A24: x = [x2,x1] and
A25: [x1,x2] in dom f by A19;
h1.(x2,x1) = f.(x1,x2) by A20,A25
.= h2.(x2,x1) by A22,A25;
hence thesis by A24;
end;
x in dom h1 iff x in dom h2
proof
x in dom h1 iff ex y,z st x = [z,y] & [y,z] in dom f by A19;
hence thesis by A21;
end;
then dom h1 = dom h2 by TARSKI:1;
hence thesis by A23,FUNCT_1:2;
end;
end;
theorem Th41:
rng ~f c= rng f
proof
let y;
assume y in rng ~f;
then consider x such that
A1: x in dom ~f and
A2: y = (~f).x by FUNCT_1:def 3;
consider x1,x2 such that
A3: x = [x2,x1] and
A4: [x1,x2] in dom f by A1,Def2;
y = (~f).(x2,x1) by A2,A3
.= f.(x1,x2) by A4,Def2;
hence thesis by A4,FUNCT_1:def 3;
end;
theorem Th42:
[x,y] in dom f iff [y,x] in dom ~f
proof
thus [x,y] in dom f implies [y,x] in dom ~f by Def2;
assume [y,x] in dom ~f;
then consider x1,y1 such that
A1: [y,x] = [y1,x1] and
A2: [x1,y1] in dom f by Def2;
x1 = x by A1,XTUPLE_0:1;
hence thesis by A1,A2,XTUPLE_0:1;
end;
theorem
[y,x] in dom ~f implies (~f).(y,x) = f.(x,y)
proof
assume [y,x] in dom ~f;
then [x,y] in dom f by Th42;
hence thesis by Def2;
end;
theorem
ex X,Y st dom ~f c= [:X,Y:]
proof
now
let z;
assume z in dom ~f;
then ex x,y st z = [y,x] & [x,y] in dom f by Def2;
hence ex x,y st z = [x,y];
end;
hence thesis by Th1;
end;
theorem Th45:
dom f c= [:X,Y:] implies dom ~f c= [:Y,X:]
proof
assume
A1: dom f c= [:X,Y:];
let z;
assume z in dom ~f;
then ex x,y st z = [y,x] & [x,y] in dom f by Def2;
hence thesis by A1,ZFMISC_1:88;
end;
theorem Th46:
dom f = [:X,Y:] implies dom ~f = [:Y,X:]
proof
assume
A1: dom f = [:X,Y:];
hence dom ~f c= [:Y,X:] by Th45;
let z;
assume z in [:Y,X:];
then consider y,x such that
A2: y in Y & x in X and
A3: z = [y,x] by ZFMISC_1:def 2;
[x,y] in dom f by A1,A2,ZFMISC_1:def 2;
hence thesis by A3,Def2;
end;
theorem Th47:
dom f c= [:X,Y:] implies rng ~f = rng f
proof
assume
A1: dom f c= [:X,Y:];
thus rng ~f c= rng f by Th41;
let y;
assume y in rng f;
then consider x such that
A2: x in dom f and
A3: y = f.x by FUNCT_1:def 3;
consider x1,y1 such that
x1 in X and
y1 in Y and
A4: x =[x1,y1] by A1,A2,ZFMISC_1:84;
A5: [y1,x1] in dom ~f by A2,A4,Th42;
y = f.(x1,y1) by A3,A4
.= (~f).(y1,x1) by A2,A4,Def2;
hence thesis by A5,FUNCT_1:def 3;
end;
theorem
for f being PartFunc of [:X,Y:],Z holds ~f is PartFunc of [:Y,X:],Z
proof
let f be PartFunc of [:X,Y:],Z;
A1: dom f c= [:X,Y:];
then
A2: dom ~f c= [:Y,X:] by Th45;
rng f c= Z;
then rng ~f c= Z by A1,Th47;
hence thesis by A2,RELSET_1:4;
end;
theorem Th49:
for f being Function of [:X,Y:],Z st Z<>{} holds ~f is Function
of [:Y,X:],Z
proof
let f be Function of [:X,Y:],Z;
assume
A1: Z <> {};
then
A2: dom f = [:X,Y:] by FUNCT_2:def 1;
then
A3: [:Y,X:] = dom ~f by Th46;
rng f c= Z;
then rng ~f c= Z by A2,Th47;
then reconsider R = ~f as Relation of [:Y,X:],Z by A3,RELSET_1:4;
R is quasi_total
proof
per cases;
case Z <> {};
dom f = [:X,Y:] by A1,FUNCT_2:def 1;
hence thesis by Th46;
end;
case Z = {};
hence thesis;
end;
end;
hence thesis;
end;
theorem
for f being Function of [:X,Y:],D holds ~f is Function of [:Y,X:],D by Th49;
theorem Th51:
~~f c= f
proof
A1: now
let x;
assume x in dom ~~f;
then consider y2,z2 such that
A2: x = [z2,y2] & [y2,z2] in dom ~f by Def2;
take y2,z2;
thus x = [z2,y2] & [y2,z2] in dom ~ f & [z2,y2] in dom f by A2,Th42;
end;
A3: x in dom ~~f implies (~~f).x = f.x
proof
assume x in dom ~~f;
then consider y2,z2 such that
A4: x = [z2,y2] and
A5: [y2,z2] in dom ~f and
A6: [z2,y2] in dom f by A1;
(~~f).(z2,y2) = (~f).(y2,z2) by A5,Def2
.= f.(z2,y2) by A6,Def2;
hence thesis by A4;
end;
dom ~~f c= dom f
proof
let x;
assume x in dom ~~f;
then
ex y2,z2 st x = [z2,y2] & [y2,z2] in dom ~ f & [z2,y2] in dom f by A1;
hence thesis;
end;
hence thesis by A3,GRFUNC_1:2;
end;
theorem Th52:
dom f c= [:X,Y:] implies ~~f = f
proof
assume
A1: dom f c= [:X,Y:];
A2: ~~f c= f by Th51;
dom ~~ f = dom f
proof
thus dom ~~f c= dom f by A2,RELAT_1:11;
let z;
assume
A3: z in dom f;
then consider x,y such that
x in X and
y in Y and
A4: z = [x,y] by A1,ZFMISC_1:84;
[y,x] in dom ~f by A3,A4,Th42;
hence thesis by A4,Th42;
end;
hence thesis by Th51,GRFUNC_1:3;
end;
theorem
for f being PartFunc of [:X,Y:],Z holds ~~f = f
proof
let f be PartFunc of [:X,Y:],Z;
dom f c= [:X,Y:];
hence thesis by Th52;
end;
definition
let f,g;
func |:f,g:| -> Function means
:Def3:
(for z holds z in dom it iff ex x,y,x9
,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g) & for x,y,x9,y9
st [x,y] in dom f & [x9,y9] in dom g holds it.([x,x9],[y,y9]) = [f.(x,y),g.(x9,
y9)];
existence
proof
defpred P[set,set] means ex x,y,x9,y9 st $1 = [[x,x9],[y,y9]] & $2 = [f.[x
,y],g.[x9,y9]];
defpred P[set] means ex y st [ $1,y] in dom f;
consider D1 being set such that
A1: x in D1 iff x in union union dom f & P[ x] from XBOOLE_0:sch 1;
defpred P[set] means ex x st [x,$1] in dom f;
consider D2 being set such that
A2: y in D2 iff y in union union dom f & P[y] from XBOOLE_0:sch 1;
defpred P[set] means ex y st [ $1,y] in dom g;
consider D19 being set such that
A3: x in D19 iff x in union union dom g & P[ x] from XBOOLE_0:sch 1;
defpred P[set] means ex x st [x,$1] in dom g;
consider D29 being set such that
A4: y in D29 iff y in union union dom g & P[y] from XBOOLE_0:sch 1;
defpred P[set] means ex x,y,x9,y9 st $1 = [[x,x9],[y,y9]] & [x,y] in dom f
& [x9,y9] in dom g;
consider D being set such that
A5: z in D iff z in [:[:D1,D19:],[:D2,D29:]:] & P[z] from XBOOLE_0:sch
1;
A6: for z,z1,z2 st z in D & P[z,z1] & P[z,z2] holds z1 = z2
proof
let z,z1,z2 such that
z in D;
given x,y,x9,y9 such that
A7: z = [[x,x9],[y,y9]] and
A8: z1 = [f.[x,y],g.[x9,y9]];
given x1,y1,x19,y19 such that
A9: z = [[x1,x19],[y1,y19]] and
A10: z2 = [f.[x1,y1],g.[x19,y19]];
A11: x9 = x19 by A7,A9,Lm1;
x = x1 & y = y1 by A7,A9,Lm1;
hence thesis by A7,A8,A9,A10,A11,Lm1;
end;
A12: for z st z in D holds ex z1 st P[z,z1]
proof
let z;
assume z in D;
then consider x,y,x9,y9 such that
A13: z = [[x,x9],[y,y9]] and
[x,y] in dom f and
[x9,y9] in dom g by A5;
take [f.[x,y],g.[x9,y9]];
thus thesis by A13;
end;
consider h being Function such that
A14: dom h = D and
A15: for z st z in D holds P[z,h.z] from FUNCT_1:sch 2(A6,A12);
take h;
thus
A16: for z holds z in dom h iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] &
[x,y] in dom f & [x9,y9] in dom g
proof
let z;
thus z in dom h implies ex x,y,x9,y9 st z = [[x,x9],[y,y9]] & [x,y] in
dom f & [x9,y9] in dom g by A5,A14;
given x,y,x9,y9 such that
A17: z = [[x,x9],[y,y9]] and
A18: [x,y] in dom f and
A19: [x9,y9] in dom g;
y9 in union union dom g by A19,ZFMISC_1:134;
then
A20: y9 in D29 by A4,A19;
y in union union dom f by A18,ZFMISC_1:134;
then y in D2 by A2,A18;
then
A21: [y,y9] in [:D2,D29:] by A20,ZFMISC_1:87;
x9 in union union dom g by A19,ZFMISC_1:134;
then
A22: x9 in D19 by A3,A19;
x in union union dom f by A18,ZFMISC_1:134;
then x in D1 by A1,A18;
then [x,x9] in [:D1,D19:] by A22,ZFMISC_1:87;
then z in [:[:D1,D19:],[:D2,D29:]:] by A17,A21,ZFMISC_1:87;
hence thesis by A5,A14,A17,A18,A19;
end;
let x,y,x9,y9;
assume [x,y] in dom f & [x9,y9] in dom g;
then [[x,x9],[y,y9]] in D by A14,A16;
then consider x1,y1,x19,y19 such that
A23: [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]] and
A24: h.[[x,x9],[y,y9]] = [f.[x1,y1],g.[x19,y19]] by A15;
A25: x9= x19 by A23,Lm1;
x = x1 & y = y1 by A23,Lm1;
hence thesis by A23,A24,A25,Lm1;
end;
uniqueness
proof
let h1,h2 be Function such that
A26: for z holds z in dom h1 iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] &
[x,y] in dom f & [x9,y9] in dom g and
A27: for x,y,x9,y9 st [x,y] in dom f & [x9,y9] in dom g holds h1.([x,
x9],[y,y9]) = [f.(x,y),g.(x9,y9)] and
A28: for z holds z in dom h2 iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] &
[x,y] in dom f & [x9,y9] in dom g and
A29: for x,y,x9,y9 st [x,y] in dom f & [x9,y9] in dom g holds h2.([x,
x9],[y,y9]) = [f.(x,y),g.(x9,y9)];
A30: z in dom h1 implies h1.z = h2.z
proof
assume z in dom h1;
then consider x,y,x9,y9 such that
A31: z = [[x,x9],[y,y9]] and
A32: [x,y] in dom f & [x9,y9] in dom g by A26;
h1.([x,x9],[y,y9]) = [f.(x,y),g.(x9,y9)] by A27,A32
.= h2.([x,x9],[y,y9]) by A29,A32;
hence thesis by A31;
end;
z in dom h1 iff z in dom h2
proof
z in dom h1 iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom
f & [x9,y9] in dom g by A26;
hence thesis by A28;
end;
then dom h1 = dom h2 by TARSKI:1;
hence thesis by A30,FUNCT_1:2;
end;
end;
theorem Th54:
[[x,x9],[y,y9]] in dom |:f,g:| iff [x,y] in dom f & [x9,y9] in dom g
proof
thus [[x,x9],[y,y9]] in dom |:f,g:| implies [x,y] in dom f & [x9,y9] in dom
g
proof
assume [[x,x9],[y,y9]] in dom |:f,g:|;
then consider x1,y1,x19,y19 such that
A1: [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]] and
A2: [x1,y1] in dom f & [x19,y19] in dom g by Def3;
x = x1 & x9= x19 by A1,Lm1;
hence thesis by A1,A2,Lm1;
end;
thus thesis by Def3;
end;
theorem
[[x,x9],[y,y9]] in dom |:f,g:| implies |:f,g:|.([x,x9],[y,y9]) = [f.(x
,y),g.(x9,y9)]
proof
assume [[x,x9],[y,y9]] in dom |:f,g:|;
then [x,y] in dom f & [x9,y9] in dom g by Th54;
hence thesis by Def3;
end;
theorem Th56:
rng |:f,g:| c= [:rng f,rng g:]
proof
let z;
assume z in rng |:f,g:|;
then consider p such that
A1: p in dom |:f,g:| and
A2: z = |:f,g:|.p by FUNCT_1:def 3;
consider x,y,x9,y9 such that
A3: p = [[x,x9],[y,y9]] and
A4: [x,y] in dom f & [x9,y9] in dom g by A1,Def3;
A5: f.[x,y] in rng f & g.[x9,y9] in rng g by A4,FUNCT_1:def 3;
z = |:f,g:|.([x,x9],[y,y9]) by A2,A3
.= [f.(x,y),g.(x9,y9)] by A4,Def3;
hence thesis by A5,ZFMISC_1:87;
end;
theorem Th57:
dom f c= [:X,Y:] & dom g c= [:X9,Y9:] implies dom|:f,g:| c= [:[:
X,X9:],[:Y,Y9:]:]
proof
assume
A1: dom f c= [:X,Y:] & dom g c= [:X9,Y9:];
let xy be set;
assume xy in dom|:f,g:|;
then consider x,y,x9,y9 such that
A2: xy = [[x,x9],[y,y9]] and
A3: [x,y] in dom f & [x9,y9] in dom g by Def3;
y in Y & y9 in Y9 by A1,A3,ZFMISC_1:87;
then
A4: [y,y9] in [:Y,Y9:] by ZFMISC_1:87;
x in X & x9 in X9 by A1,A3,ZFMISC_1:87;
then [x,x9] in [:X,X9:] by ZFMISC_1:87;
hence thesis by A2,A4,ZFMISC_1:87;
end;
theorem Th58:
dom f = [:X,Y:] & dom g = [:X9,Y9:] implies
dom|:f,g:| = [:[:X,X9:],[:Y,Y9:]:]
proof
assume
A1: dom f = [:X,Y:] & dom g = [:X9,Y9:];
hence dom|:f,g:| c= [:[:X,X9:],[:Y,Y9:]:] by Th57;
let z;
assume z in [:[:X,X9:],[:Y,Y9:]:];
then consider xx,yy being set such that
A2: xx in [:X,X9:] and
A3: yy in [:Y,Y9:] and
A4: z = [xx,yy] by ZFMISC_1:def 2;
consider y,y9 such that
A5: y in Y & y9 in Y9 and
A6: yy = [y,y9] by A3,ZFMISC_1:def 2;
consider x,x9 such that
A7: x in X & x9 in X9 and
A8: xx = [x,x9] by A2,ZFMISC_1:def 2;
[x,y] in dom f & [x9,y9] in dom g by A1,A7,A5,ZFMISC_1:87;
hence thesis by A4,A8,A6,Def3;
end;
theorem
for f being PartFunc of [:X,Y:],Z for g being PartFunc of [:X9,Y9:],Z9
holds |:f,g:| is PartFunc of [:[:X,X9:],[:Y,Y9:]:],[:Z,Z9:]
proof
let f be PartFunc of [:X,Y:],Z;
let g be PartFunc of [:X9,Y9:],Z9;
rng |:f,g:| c= [:rng f,rng g:] & [:rng f,rng g:] c= [:Z,Z9:] by Th56,
ZFMISC_1:96;
then
A1: rng|:f,g:| c= [:Z,Z9:] by XBOOLE_1:1;
dom f c= [:X,Y:] & dom g c= [:X9,Y9:];
then dom|:f,g:| c= [:[:X,X9:],[:Y,Y9:]:] by Th57;
hence thesis by A1,RELSET_1:4;
end;
theorem Th60:
for f being Function of [:X,Y:],Z for g being Function of [:X9,
Y9:],Z9 st Z <> {} & Z9 <> {} holds |:f,g:| is Function of [:[:X,X9:],[:Y,Y9:]
:],[:Z,Z9:]
proof
let f be Function of [:X,Y:],Z;
let g be Function of [:X9,Y9:],Z9;
rng |:f,g:| c= [:rng f,rng g:] & [:rng f,rng g:] c= [:Z,Z9:] by Th56,
ZFMISC_1:96;
then
A1: rng|:f,g:| c= [:Z,Z9:] by XBOOLE_1:1;
assume
A2: Z <> {} & Z9 <> {};
then dom f = [:X,Y:] & dom g = [:X9,Y9:] by FUNCT_2:def 1;
then [:[:X,X9:],[:Y,Y9:]:] = dom|:f,g:| by Th58;
then reconsider
R = |:f,g:| as Relation of [:[:X,X9:],[:Y,Y9:]:],[:Z,Z9:] by A1,RELSET_1:4;
R is quasi_total
proof
per cases;
case [:Z,Z9:] <> {};
dom f = [:X,Y:] & dom g = [:X9,Y9:] by A2,FUNCT_2:def 1;
hence thesis by Th58;
end;
case [:Z,Z9:] = {};
hence thesis;
end;
end;
hence thesis;
end;
theorem
for f being Function of [:X,Y:],D for g being Function of [:X9,Y9:],D9
holds |:f,g:| is Function of [:[:X,X9:],[:Y,Y9:]:],[:D,D9:] by Th60;
definition
let x,y,a,b be set;
func (x,y) --> (a,b) -> set equals
(x .--> a) +* (y .--> b);
correctness;
end;
registration
let x,y,a,b be set;
cluster (x,y) --> (a,b) -> Function-like Relation-like;
coherence;
end;
theorem Th62:
dom((x1,x2) --> (y1,y2)) = {x1,x2} & rng((x1,x2) --> (y1,y2)) c=
{y1,y2}
proof
set f = {x1} --> y1, g = {x2} -->y2, h = (x1,x2) --> (y1,y2);
rng f \/ rng g c= {y1} \/ {y2} by XBOOLE_1:13;
then
A1: rng f \/ rng g c= {y1,y2} by ENUMSET1:1;
dom f = {x1} & dom g = {x2} by FUNCOP_1:13;
then dom f \/ dom g = {x1,x2} by ENUMSET1:1;
hence dom h = {x1,x2} by Def1;
rng h c= rng f \/ rng g by Th17;
hence thesis by A1,XBOOLE_1:1;
end;
theorem Th63:
(x1 <> x2 implies ((x1,x2) --> (y1,y2)).x1 = y1) & ((x1,x2) -->
(y1,y2)).x2 = y2
proof
set f = {x1} --> y1, g = {x2} -->y2, h = (x1,x2) --> (y1,y2);
A1: x2 in {x2} by TARSKI:def 1;
A2: x1 in {x1} by TARSKI:def 1;
hereby
assume x1 <> x2;
then not x1 in dom g by TARSKI:def 1;
then h.x1 = f.x1 by Th11;
hence h.x1 = y1 by A2,FUNCOP_1:7;
end;
{x2} = dom g by FUNCOP_1:13;
then h.x2 = g.x2 by A1,Th13;
hence thesis by A1,FUNCOP_1:7;
end;
theorem
x1 <> x2 implies rng((x1,x2) --> (y1,y2)) = {y1,y2}
proof
set h = (x1,x2) --> (y1,y2);
assume
A1: x1 <> x2;
thus rng h c= {y1,y2} by Th62;
let y;
assume y in {y1,y2};
then y = y1 or y = y2 by TARSKI:def 2;
then
A2: h.x1 = y or h.x2 = y by A1,Th63;
dom h = {x1,x2} by Th62;
then x1 in dom h & x2 in dom h by TARSKI:def 2;
hence thesis by A2,FUNCT_1:def 3;
end;
theorem
(x1,x2) --> (y,y) = {x1,x2} --> y
proof
set F = (x1,x2)-->(y,y), f = {x1}-->y, g = {x2}-->y, F9 = {x1,x2}-->y;
now
thus
A1: dom F = {x1,x2} & dom F9 = {x1,x2} by Th62,FUNCOP_1:13;
let x such that
A2: x in {x1,x2};
now
per cases by A1,A2,Th12;
suppose
A3: x in dom f & not x in dom g;
then F.x = f.x by Th11;
hence F.x = y & F9.x = y by A2,A3,FUNCOP_1:7;
end;
suppose
A4: x in dom g;
then F.x = g.x by Th13;
hence F.x = y & F9.x = y by A2,A4,FUNCOP_1:7;
end;
end;
hence F.x = F9.x;
end;
hence thesis by FUNCT_1:2;
end;
definition
let A,x1,x2;
let y1,y2 be Element of A;
redefine func (x1,x2) --> (y1,y2) -> Function of {x1,x2},A;
coherence
proof
set f = {x1} --> y1, g = {x2} -->y2, h = (x1,x2) --> (y1,y2);
rng h c= rng f \/ rng g by Th17;
then
A1: rng h c= A by XBOOLE_1:1;
dom h = {x1,x2} by Th62;
hence thesis by A1,FUNCT_2:def 1,RELSET_1:4;
end;
end;
theorem
for a,b,c,d being set, g being Function st dom g = {a,b} & g.a = c & g
.b = d holds g = (a,b) --> (c,d)
proof
let a,b,c,d be set;
let h be Function such that
A1: dom h = {a,b} and
A2: h.a = c and
A3: h.b = d;
set f = {a} --> c, g = {b} -->d;
A4: b in {b} by TARSKI:def 1;
A5: a in {a} by TARSKI:def 1;
A6: now
let x such that
A7: x in dom f \/ dom g;
thus x in dom g implies h.x = g.x
proof
assume x in dom g;
then x = b by TARSKI:def 1;
hence thesis by A3,A4,FUNCOP_1:7;
end;
assume not x in dom g;
then x in dom f by A7,XBOOLE_0:def 3;
then x = a by TARSKI:def 1;
hence h.x = f.x by A2,A5,FUNCOP_1:7;
end;
dom f = {a} & dom g = {b} by FUNCOP_1:13;
then dom h = dom f \/ dom g by A1,ENUMSET1:1;
hence thesis by A6,Def1;
end;
theorem Th67:
for a,b,c,d being set st a <> c holds (a,c) --> (b,d) = { [a,b],
[c,d] }
proof
let a,b,c,d be set such that
A1: a <> c;
set f = {a} --> b, g = {c} --> d;
A2: dom f = {a} & dom g = {c} by FUNCOP_1:13;
{a} --> b = {[a,b]} & {c} --> d = {[c,d]} by ZFMISC_1:29;
hence (a,c) --> (b,d) = {[a,b]} \/ {[c,d]} by A1,A2,Th31,ZFMISC_1:11
.= { [a,b], [c,d] } by ENUMSET1:1;
end;
theorem
for a,b,x,y,x9,y9 being set st a <> b & (a,b) --> (x,y) = (a,b) --> (
x9,y9) holds x = x9 & y = y9
proof
let a,b,x,y,x9,y9 be set such that
A1: a <> b and
A2: (a,b) --> (x,y) = (a,b) --> (x9,y9);
thus x = ((a,b) --> (x,y)).a by A1,Th63
.= x9 by A1,A2,Th63;
thus y = ((a,b) --> (x,y)).b by Th63
.= y9 by A2,Th63;
end;
begin
theorem
for f1,f2, g1,g2 being Function st rng g1 c= dom f1 & rng g2 c= dom f2
& f1 tolerates f2 holds (f1+*f2)*(g1+*g2) = (f1*g1)+*(f2*g2)
proof
let f1,f2, g1,g2 be Function;
assume that
A1: rng g1 c= dom f1 & rng g2 c= dom f2 and
A2: f1 tolerates f2;
A3: rng (g1+*g2) c= (rng g1) \/ rng g2 & dom (f1+*f2) = (dom f1) \/ dom f2
by Def1,Th17;
(rng g1) \/ rng g2 c= (dom f1) \/ dom f2 by A1,XBOOLE_1:13;
then
A4: dom ((f1+*f2)*(g1+*g2)) = dom (g1+*g2) by A3,RELAT_1:27,XBOOLE_1:1
.= (dom g1) \/ dom g2 by Def1;
A5: dom (f1*g1) = dom g1 & dom (f2*g2) = dom g2 by A1,RELAT_1:27;
A6: now
let x be set;
A7: not x in dom g2 or x in dom g2;
assume
A8: x in (dom g1) \/ dom g2;
then
A9: ((f1+*f2)*(g1+*g2)).x = (f1+*f2).((g1+*g2).x) by A4,FUNCT_1:12;
x in dom g1 or x in dom g2 by A8,XBOOLE_0:def 3;
then
(g1+*g2).x = g1.x & ((f1*g1)+*(f2*g2)).x = (f1*g1).x & (f1*g1).x = f1
.(g1.x) & g1.x in rng g1 & (g1.x in rng g1 implies g1.x in dom f1) or (g1+*g2).
x = g2.x & ((f1*g1)+*(f2*g2)).x = (f2*g2).x & (f2*g2).x = f2.(g2.x) & g2.x in
rng g2 & (g2.x in rng g2 implies g2.x in dom f2) by A1,A5,A8,A7,Def1,
FUNCT_1:12,def 3;
hence ((f1+*f2)*(g1+*g2)).x = ((f1*g1)+*(f2*g2)).x by A2,A9,Th13,Th15;
end;
dom ((f1*g1)+*(f2*g2)) = (dom g1) \/ dom g2 by A5,Def1;
hence thesis by A4,A6,FUNCT_1:2;
end;
reserve A,B for set;
theorem Th70:
dom f c= A \/ B implies f|A +* f|B = f
proof
A1: dom(f|A) = dom f /\ A & dom(f|B) = dom f /\ B by RELAT_1:61;
A2: x in dom(f|A) \/ dom(f|B) implies (x in dom(f|B) implies f.x = f|B.x) &
(not x in dom(f|B) implies f.x = f|A.x)
proof
assume
A3: x in dom(f|A) \/ dom(f|B);
thus x in dom(f|B) implies f.x = f|B.x by FUNCT_1:47;
assume not x in dom(f|B);
then x in dom(f|A) by A3,XBOOLE_0:def 3;
hence thesis by FUNCT_1:47;
end;
assume dom f c= A \/ B;
then dom f = dom f /\ (A \/ B) by XBOOLE_1:28
.= dom(f|A) \/ dom(f|B) by A1,XBOOLE_1:23;
hence thesis by A2,Def1;
end;
theorem Th71:
for p,q being Function , A being set holds (p +* q)|A = p|A +* q|A
proof
let p,q be Function , A be set;
A1: dom ((p +* q)|A) = dom (p +* q) /\ A by RELAT_1:61
.= (dom p \/ dom q) /\ A by Def1
.= (dom p /\ A) \/ (dom q /\ A) by XBOOLE_1:23
.= dom (p|A) \/ (dom q /\ A) by RELAT_1:61
.= dom (p|A) \/ dom (q|A) by RELAT_1:61;
for x being set st x in dom (p|A) \/ dom (q|A) holds (x in dom (q|A)
implies ((p +* q)|A).x = (q|A).x) & (not x in dom (q|A) implies ((p +* q)|A).x
= (p|A).x)
proof
let x be set;
assume
A2: x in dom (p|A) \/ dom (q|A);
then x in dom (p|A) or x in dom (q|A) by XBOOLE_0:def 3;
then x in (dom p /\ A) or x in dom q /\ A by RELAT_1:61;
then
A3: x in A by XBOOLE_0:def 4;
hereby
assume
A4: x in dom (q|A);
then x in (dom q /\ A) by RELAT_1:61;
then
A5: x in dom q by XBOOLE_0:def 4;
thus ((p +* q)|A).x = (p +* q).x by A1,A2,FUNCT_1:47
.= q.x by A5,Th13
.= (q|A).x by A4,FUNCT_1:47;
end;
assume
A6: not x in dom (q|A);
then not x in (dom q /\ A) by RELAT_1:61;
then
A7: not x in dom q by A3,XBOOLE_0:def 4;
A8: x in dom (p|A) by A2,A6,XBOOLE_0:def 3;
then x in dom p /\ A by RELAT_1:61;
then x in dom p by XBOOLE_0:def 4;
then x in dom (p +* q) by Th12;
then x in dom (p +* q) /\ A by A3,XBOOLE_0:def 4;
then x in dom ((p +* q)|A) by RELAT_1:61;
hence ((p +* q)|A).x = (p +* q).x by FUNCT_1:47
.= p.x by A7,Th11
.= (p|A).x by A8,FUNCT_1:47;
end;
hence thesis by A1,Def1;
end;
theorem Th72:
for f,g being Function, A being set st A misses dom g holds
(f +* g)|A = f|A
proof
let f,g be Function, A be set;
assume A misses dom g;
then dom g /\ A = {} by XBOOLE_0:def 7;
then dom (g|A) = {} by RELAT_1:61;
then g|A = {};
hence (f +* g)|A = f|A +* {} by Th71
.= f|A;
end;
theorem
for f,g being Function , A being set holds dom f misses A implies
(f +* g)|A = g|A
proof
let f,g be Function , A be set;
assume dom f misses A;
then dom f /\ A = {} by XBOOLE_0:def 7;
then dom (f|A) = {} by RELAT_1:61;
then f|A = {};
hence (f +* g)|A = {} +* g|A by Th71
.= g|A;
end;
theorem
for f,g,h being Function st dom g = dom h holds f +* g +* h = f +* h
proof
let f,g,h be Function;
assume
A1: dom g = dom h;
thus f +* g +* h = f +* (g +* h) by Th14
.= f +* h by A1,Th19;
end;
Lm2:
for f,g being Function holds f c= g implies g +* f = g
proof
let f,g be Function;
assume
A1: f c= g;
then f tolerates g by PARTFUN1:54;
hence g+*f = f\/ g by Th30
.= g by A1,XBOOLE_1:12;
end;
theorem
for f being Function, A being set holds f +* f|A = f by Lm2,RELAT_1:59;
theorem
for f,g being Function, B,C being set st dom f c= B & dom g c= C & B
misses C holds (f +* g)|B = f & (f +* g)|C = g
proof
let f,g be Function, B,C be set;
assume that
A1: dom f c= B and
A2: dom g c= C and
A3: B misses C;
dom f misses C by A1,A3,XBOOLE_1:63;
then dom f /\ C = {} by XBOOLE_0:def 7;
then dom (f|C) = {} by RELAT_1:61;
then
A4: f|C = {};
dom g misses B by A2,A3,XBOOLE_1:63;
then dom g /\ B = {} by XBOOLE_0:def 7;
then dom (g|B) = {} by RELAT_1:61;
then
A5: g|B = {};
thus (f +* g)|B = f|B +* g|B by Th71
.= f|B by A5,Th21
.= f by A1,RELAT_1:68;
thus (f +* g)|C = f|C +* g|C by Th71
.= g|C by A4,Th20
.= g by A2,RELAT_1:68;
end;
theorem
for p,q being Function, A being set holds dom p c= A & dom q misses A
implies (p +* q)|A = p
proof
let p,q be Function, A be set;
assume that
A1: dom p c= A and
A2: dom q misses A;
thus (p +* q )|A = p|A by A2,Th72
.= p by A1,RELAT_1:68;
end;
theorem
for f being Function, A,B being set holds f|(A \/ B) = f|A +* f|B
proof
let f be Function, A,B be set;
A1: f|(A \/ B)|B = f|((A \/ B) /\ B) by RELAT_1:71
.= f|B by XBOOLE_1:21;
A2: dom (f|(A \/ B)) c= A \/ B by RELAT_1:58;
f|(A \/ B)|A = f|((A \/ B) /\ A) by RELAT_1:71
.= f|A by XBOOLE_1:21;
hence thesis by A1,A2,Th70;
end;
reserve x,y,i,j,k for set;
theorem
(i,j):->k = [i,j].-->k;
theorem
((i,j):->k).(i,j) = k by FUNCOP_1:71;
theorem
for a,b,c being set holds (a,a) --> (b,c) = a .--> c
proof
let a,b,c be set;
dom(a .-->c) = {a} by FUNCOP_1:13
.= dom({a} -->b) by FUNCOP_1:13;
hence thesis by Th19;
end;
theorem
for x,y holds x .--> y = {[x,y]} by ZFMISC_1:29;
theorem
for f being Function, a,b,c being set st a <> c holds (f +* (a .-->b))
.c = f.c
proof
let f be Function, a,b,c be set such that
A1: a <> c;
set g = a .-->b;
not c in dom g by A1,TARSKI:def 1;
hence thesis by Th11;
end;
theorem
for f being Function, a,b,c,d being set st a <> b holds
(f +* ((a,b)-->(c,d))) .a = c & (f +* ((a,b)-->(c,d))) .b = d
proof
let f be Function, a,b,c,d be set such that
A1: a <> b;
set g = (a,b)-->(c,d);
A2: dom g = {a,b} by Th62;
then a in dom g by TARSKI:def 2;
hence (f +* g).a = g.a by Th13
.= c by A1,Th63;
b in dom g by A2,TARSKI:def 2;
hence (f +* g).b = g.b by Th13
.= d by Th63;
end;
theorem Th85:
for a,b being set, f being Function st a in dom f & f.a = b
holds a .--> b c= f
proof
let a,b be set, f be Function;
assume a in dom f & f.a = b;
then [a,b] in f by FUNCT_1:1;
then {[a,b]} c= f by ZFMISC_1:31;
hence thesis by ZFMISC_1:29;
end;
theorem
for a,b,c,d being set, f being Function st
a in dom f & c in dom f & f.a = b & f.c = d holds (a,c) --> (b,d) c= f
proof
let a,b,c,d be set, f be Function;
assume that
A1: a in dom f and
A2: c in dom f and
A3: f.a = b & f.c = d;
per cases;
suppose
A4: a <> c;
[a,b] in f & [c,d] in f by A1,A2,A3,FUNCT_1:1;
then { [a,b], [c,d]} c= f by ZFMISC_1:32;
hence thesis by A4,Th67;
end;
suppose
a = c;
hence thesis by A1,A3,Th85;
end;
end;
theorem Th87:
for f,g,h being Function st f c= h & g c= h holds f +* g c= h
proof
let f,g,h be Function;
assume f c= h & g c= h;
then
A1: f \/ g c= h by XBOOLE_1:8;
f +* g c= f \/ g by Th29;
hence thesis by A1,XBOOLE_1:1;
end;
theorem
for f, g being Function, A being set st A /\ dom f c= A /\ dom g holds
(f+*g|A)|A = g|A
proof
let f, g be Function, A be set;
assume
A1: A /\ dom f c= A /\ dom g;
A2: dom (f|A) = A /\ dom f & dom (g|A) = A /\ dom g by RELAT_1:61;
thus (f+*g|A)|A = (f|A)+*(g|A)|A by Th71
.= (f|A)+*g|A
.= g|A by A1,A2,Th19;
end;
theorem
for f be Function, a,b,n,m be set holds
(f +* (a .--> b) +* (m .--> n)).m = n
proof
let f be Function, a,b,n,m be set;
set mn=m .--> n;
dom mn ={ m } by FUNCOP_1:13;
then m in dom mn by TARSKI:def 1;
hence (f +* (a .--> b) +* mn).m=mn.m by Th13
.=n by FUNCOP_1:72;
end;
theorem
for f be Function, n,m be set holds (f +* (n .--> m) +* (m .--> n)).n=
m
proof
let f be Function,n,m be set;
set mn=m .--> n, nm=n .--> m;
dom mn ={ m } by FUNCOP_1:13;
then
A1: m in dom mn by TARSKI:def 1;
per cases;
suppose
A2: n=m;
hence (f +* nm +* mn).n=mn.m by A1,Th13
.=m by A2,FUNCOP_1:72;
end;
suppose
A3: n<>m;
dom nm ={ n } by FUNCOP_1:13;
then
A4: n in dom nm by TARSKI:def 1;
not n in dom mn by A3,TARSKI:def 1;
hence (f +* nm +* mn).n=(f +* nm).n by Th11
.=nm.n by A4,Th13
.=m by FUNCOP_1:72;
end;
end;
theorem
for f be Function, a,b,n,m,x be set st x <> m & x <> a holds (f +* (a
.--> b) +* (m .--> n)).x=f.x
proof
let f be Function, a,b,n,m,x be set;
assume that
A1: x<>m and
A2: x<>a;
set mn=m .--> n, nm=a .--> b;
A3: not x in dom nm by A2,TARSKI:def 1;
not x in dom mn by A1,TARSKI:def 1;
hence (f +* nm +* mn).x=(f +* nm).x by Th11
.=f.x by A3,Th11;
end;
theorem
f is one-to-one & g is one-to-one & rng f misses rng g implies
f+*g is one-to-one
proof
assume that
A1: f is one-to-one and
A2: g is one-to-one and
A3: rng f misses rng g;
let x1,x2 be set;
set fg = f+*g;
assume that
A4: x1 in dom fg and
A5: x2 in dom fg and
A6: fg.x1 = fg.x2;
A7: x1 in dom f or x1 in dom g by A4,Th12;
A8: x2 in dom f or x2 in dom g by A5,Th12;
per cases;
suppose
A9: x1 in dom g & x2 in dom g;
then fg.x1 = g.x1 & fg.x2 = g.x2 by Th13;
hence thesis by A2,A6,A9,FUNCT_1:def 4;
end;
suppose
A10: x1 in dom g & not x2 in dom g;
then x2 in dom f by A5,Th12;
then
A11: f.x2 in rng f by FUNCT_1:def 3;
A12: g.x1 in rng g by A10,FUNCT_1:def 3;
fg.x1 = g.x1 & fg.x2 = f.x2 by A10,Th11,Th13;
hence thesis by A3,A6,A12,A11,XBOOLE_0:3;
end;
suppose
A13: not x1 in dom g & x2 in dom g;
then x1 in dom f by A4,Th12;
then
A14: f.x1 in rng f by FUNCT_1:def 3;
A15: g.x2 in rng g by A13,FUNCT_1:def 3;
fg.x1 = f.x1 & fg.x2 = g.x2 by A13,Th11,Th13;
hence thesis by A3,A6,A15,A14,XBOOLE_0:3;
end;
suppose
A16: not x1 in dom g & not x2 in dom g;
then fg.x1 = f.x1 & fg.x2 = f.x2 by Th11;
hence thesis by A1,A6,A7,A8,A16,FUNCT_1:def 4;
end;
end;
registration let f,g be Function;
reduce f +* g +* g to f +* g;
reducibility
proof
thus f +* g +* g = f +*( g +* g ) by Th14
.= f +* g;
end;
end;
theorem
for f,g being Function holds f +* g +* g = f +* g;
theorem
for f,g,h being Function, D being set holds (f +* g)|D =h | D implies
(h +* g) | D = (f +* g) | D
proof
let f,g,h be Function, D be set;
assume
A1: (f +* g)|D =h | D;
A2: dom ((f +* g) | D) = dom (f +* g) /\ D by RELAT_1:61
.= (dom f \/ dom g) /\ D by Def1;
A3: dom ((h +* g) | D) = dom (h +* g) /\ D by RELAT_1:61
.= (dom h \/ dom g) /\ D by Def1;
then
A4: dom ((h +* g) | D) = (dom h /\ D) \/ (dom g /\ D) by XBOOLE_1:23
.= ((dom f \/ dom g) /\ D) \/ (dom g /\ D) by A1,A2,RELAT_1:61
.= ((dom f \/ dom g) \/ dom g) /\ D by XBOOLE_1:23
.= (dom f \/ (dom g \/ dom g)) /\ D by XBOOLE_1:4
.= (dom f \/ dom g ) /\ D;
now
let x be set;
assume
A5: x in dom ((f +* g) | D);
then
A6: x in dom f \/ dom g by A2,XBOOLE_0:def 4;
A7: x in D by A2,A5,XBOOLE_0:def 4;
A8: x in dom h \/ dom g & ((h +* g) | D).x = (h +* g).x by A2,A3,A4,A5,
FUNCT_1:47,XBOOLE_0:def 4;
per cases;
suppose
A9: x in dom g;
((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47
.=g.x by A6,A9,Def1;
hence ((h +* g) | D).x =((f +* g) | D).x by A8,A9,Def1;
end;
suppose
not x in dom g;
hence ((h +* g) | D).x = h.x by A8,Def1
.=((f +* g) | D).x by A1,A7,FUNCT_1:49;
end;
end;
hence thesis by A2,A4,FUNCT_1:2;
end;
theorem
for f,g,h being Function, D being set holds f | D =h | D implies (h +*
g) | D = (f +* g) | D
proof
let f,g,h be Function, D be set;
assume
A1: f |D = h | D;
A2: dom ((f +* g) | D) = dom (f +* g) /\ D by RELAT_1:61
.= (dom f \/ dom g) /\ D by Def1;
A3: dom ((h +* g) | D) = dom (h +* g) /\ D by RELAT_1:61
.= (dom h \/ dom g) /\ D by Def1;
then
A4: dom ((h +* g) | D) = (dom h /\ D) \/ (dom g /\ D) by XBOOLE_1:23
.= dom (f| D) \/ (dom g /\ D) by A1,RELAT_1:61
.= (dom f /\ D) \/ (dom g /\ D) by RELAT_1:61
.= (dom f \/ dom g ) /\ D by XBOOLE_1:23;
now
let x be set;
assume
A5: x in dom ((f +* g) | D);
then
A6: x in dom f \/ dom g by A2,XBOOLE_0:def 4;
A7: x in D by A2,A5,XBOOLE_0:def 4;
A8: x in dom h \/ dom g & ((h +* g) | D).x = (h +* g).x by A2,A3,A4,A5,
FUNCT_1:47,XBOOLE_0:def 4;
per cases;
suppose
A9: x in dom g;
((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47
.=g.x by A6,A9,Def1;
hence ((h +* g) | D).x =((f +* g) | D).x by A8,A9,Def1;
end;
suppose
A10: not x in dom g;
then
A11: ((h +* g) | D).x = h.x by A8,Def1
.=(h | D ).x by A7,FUNCT_1:49;
thus ((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47
.=f.x by A6,A10,Def1
.=((h +* g) | D).x by A1,A7,A11,FUNCT_1:49;
end;
end;
hence thesis by A2,A4,FUNCT_1:2;
end;
theorem Th96:
x .--> x = id{x}
proof
for y,z holds [y,z] in x .--> x iff y in {x} & y = z
proof
let y,z;
A1: x .--> x = {[x,x]} by ZFMISC_1:29;
thus [y,z] in x .--> x implies y in {x} & y = z
proof
assume [y,z] in x .--> x;
then
A2: [y,z] = [x,x] by A1,TARSKI:def 1;
then y = x by XTUPLE_0:1;
hence thesis by A2,TARSKI:def 1,XTUPLE_0:1;
end;
assume y in {x};
then y = x by TARSKI:def 1;
hence thesis by A1,TARSKI:def 1;
end;
hence thesis by RELAT_1:def 10;
end;
theorem Th97:
f c= g implies f+*g = g
proof
assume
A1: f c= g;
then f tolerates g by PARTFUN1:54;
hence f+*g = f\/ g by Th30
.= g by A1,XBOOLE_1:12;
end;
theorem Th98:
f c= g implies g+*f = g
proof
assume
A1: f c= g;
then f tolerates g by PARTFUN1:54;
hence g+*f = f\/ g by Th30
.= g by A1,XBOOLE_1:12;
end;
begin
definition
let f,x,y;
func f+~(x,y) equals
f+*((x .--> y)*f);
coherence;
end;
registration
let f,x,y;
cluster f+~(x,y) -> Relation-like Function-like;
coherence;
end;
theorem Th99:
dom(f+~(x,y)) = dom f
proof
thus dom(f+~(x,y)) = dom f \/ dom((x .--> y)*f) by Def1
.= dom f by RELAT_1:25,XBOOLE_1:12;
end;
theorem Th100:
x <> y implies not x in rng(f+~(x,y))
proof
assume
A1: x <> y;
assume x in rng(f+~(x,y));
then consider z such that
A2: z in dom(f+~(x,y)) and
A3: (f+~(x,y)).z = x by FUNCT_1:def 3;
A4: z in dom f by A2,Th99;
A5: now
assume
A6: not z in dom((x .--> y)*f);
then f.z = x by A3,Th11;
then f.z in dom(x .--> y) by FUNCOP_1:74;
hence contradiction by A4,A6,FUNCT_1:11;
end;
(x .--> y).(f.z) = ((x .--> y)*f).z by A4,FUNCT_1:13
.= x by A3,A5,Th13;
then f.z <> x by A1,FUNCOP_1:72;
then not f.z in dom(x .--> y) by FUNCOP_1:75;
hence thesis by A5,FUNCT_1:11;
end;
theorem
x in rng f implies y in rng(f+~(x,y))
proof
assume x in rng f;
then consider z such that
A1: z in dom f and
A2: f.z = x by FUNCT_1:def 3;
A3: dom((x .--> y)*f) c= dom(f+~(x,y)) by Th10;
x in dom(x.-->y) by FUNCOP_1:74;
then
A4: z in dom((x .--> y)*f) by A1,A2,FUNCT_1:11;
then (f+~(x,y)).z = ((x .--> y)*f).z by Th13
.= (x .--> y).(f.z) by A1,FUNCT_1:13
.= y by A2,FUNCOP_1:72;
hence thesis by A4,A3,FUNCT_1:3;
end;
theorem Th102:
f+~(x,x) = f
proof
thus f+~(x,x) = f+*((id{x})*f) by Th96
.= f by Th98,RELAT_1:50;
end;
theorem Th103:
not x in rng f implies f+~(x,y) = f
proof
A1: dom (x .--> y) = {x} by FUNCOP_1:13;
assume not x in rng f;
then dom (x .--> y) misses rng f by A1,ZFMISC_1:50;
then (x .--> y)*f = {} by RELAT_1:44;
hence thesis by Th21;
end;
theorem
rng(f+~(x,y)) c= rng f \ {x} \/ {y}
proof
per cases;
suppose
A1: not x in rng f;
then f+~(x,y) = f by Th103;
then rng(f+~(x,y)) = rng f \ {x} by A1,ZFMISC_1:57;
hence thesis by XBOOLE_1:7;
end;
suppose that
A2: x in rng f and
A3: x = y;
f+~(x,y) = f by A3,Th102;
hence thesis by A2,A3,ZFMISC_1:116;
end;
suppose that
A4: x <> y;
not x in rng(f+~(x,y)) by A4,Th100;
then
A5: rng(f+~(x,y)) \ {x} = rng(f+~(x,y)) by ZFMISC_1:57;
rng(x .--> y) = {y} by FUNCOP_1:8;
then
A6: rng f \/ rng((x .--> y)*f) c= rng f \/ {y} by RELAT_1:26,XBOOLE_1:9;
rng(f+~(x,y)) c= rng f \/ rng((x .--> y)*f) by Th17;
then rng(f+~(x,y)) c= rng f \/ {y} by A6,XBOOLE_1:1;
then rng(f+~(x,y)) c= rng f \/ {y} \ {x} by A5,XBOOLE_1:33;
hence thesis by A4,ZFMISC_1:123;
end;
end;
theorem
f.z <> x implies (f+~(x,y)).z = f.z
proof
assume f.z <> x;
then not f.z in dom(x.-->y) by FUNCOP_1:75;
then not z in dom((x.-->y)*f) by FUNCT_1:11;
hence thesis by Th11;
end;
theorem
z in dom f & f.z = x implies (f+~(x,y)).z = y
proof
assume that
A1: z in dom f and
A2: f.z = x;
f.z in dom(x.-->y) by A2,FUNCOP_1:74;
then
A3: z in dom((x.-->y)*f) by A1,FUNCT_1:11;
hence (f+~(x,y)).z = ((x.-->y)*f).z by Th13
.= (x.-->y).x by A2,A3,FUNCT_1:12
.= y by FUNCOP_1:72;
end;
theorem
not x in dom f implies f c= f +*(x .--> y)
proof
assume not x in dom f;
then dom f misses {x} by ZFMISC_1:50;
then dom f misses dom(x .--> y) by FUNCOP_1:13;
hence thesis by Th32;
end;
theorem
for f being PartFunc of X,Y, x,y st x in X & y in Y holds f+*(x .--> y
) is PartFunc of X,Y
proof
let f be PartFunc of X,Y, x,y;
assume that
A1: x in X and
A2: y in Y;
A3: {x} c= X by A1,ZFMISC_1:31;
{y} c= Y by A2,ZFMISC_1:31;
then rng(x .--> y) c= Y by FUNCOP_1:8;
then
A4: rng f \/ rng(x .--> y) c= Y by XBOOLE_1:8;
rng(f+*(x .--> y)) c= rng f \/ rng(x .--> y) by Th17;
then
A5: rng(f+*(x .--> y)) c= Y by A4,XBOOLE_1:1;
dom(f+*(x .--> y)) = dom f \/ dom(x .--> y) by Def1
.= dom f \/ {x} by FUNCOP_1:13;
hence thesis by A3,A5,RELSET_1:4,XBOOLE_1:8;
end;
registration
let f be Function, g be non empty Function;
cluster f +* g -> non empty;
coherence
proof
dom (f+*g) = dom f \/ dom g by Def1;
hence thesis;
end;
cluster g +* f -> non empty;
coherence
proof
dom (g+*f) = dom g \/ dom f by Def1;
hence thesis;
end;
end;
registration
let f,g be non-empty Function;
cluster f+*g -> non-empty;
coherence
proof
set h = f+*g;
A1: dom (f+*g) = dom f \/ dom g by Def1;
not {} in rng h
proof
assume {} in rng h;
then consider x being set such that
A2: x in dom (f+*g) & {} = h.x by FUNCT_1:def 3;
not x in dom g or x in dom g;
then {} = f.x & x in dom f or {} = g.x & x in dom g by A1,A2,Def1,
XBOOLE_0:def 3;
then {} in rng f or {} in rng g by FUNCT_1:def 3;
hence thesis by RELAT_1:def 9;
end;
hence thesis by RELAT_1:def 9;
end;
end;
definition let X,Y be set;
let f,g be PartFunc of X,Y;
redefine func f+* g -> PartFunc of X,Y;
coherence
proof
A1: dom(f+* g) c= dom f \/ dom g by Def1;
A2: dom(f+* g) c= X by A1,XBOOLE_1:1;
A3: rng(f+* g) c= rng f \/ rng g by Th17;
rng(f+* g) c= Y by A3,XBOOLE_1:1;
then f+* g is Relation of X,Y by A2,RELSET_1:4;
hence thesis;
end;
end;
theorem
dom ((x --> y)+*(x .-->z)) = succ x
proof
thus dom ((x --> y)+*(x .-->z))
= dom (x --> y) \/ dom (x .-->z) by Def1
.= x \/ dom (x .-->z) by FUNCOP_1:13
.= x \/ {x} by FUNCOP_1:13
.= succ x by ORDINAL1:def 1;
end;
theorem
dom ((x --> y)+*(x .-->z)+*(succ x .-->z)) = succ succ x
proof
thus dom ((x --> y)+*(x .-->z)+*(succ x .-->z))
= dom ((x --> y)+*(x .-->z)) \/ dom(succ x .-->z) by Def1
.= dom (x --> y) \/ dom (x .-->z) \/ dom(succ x .-->z) by Def1
.= x \/ dom (x .-->z) \/ dom(succ x .-->z) by FUNCOP_1:13
.= x \/ {x} \/ dom(succ x .-->z) by FUNCOP_1:13
.= x \/ {x} \/ {succ x} by FUNCOP_1:13
.= succ x \/ {succ x} by ORDINAL1:def 1
.= succ succ x by ORDINAL1:def 1;
end;
registration let f,g be Function-yielding Function;
cluster f+*g -> Function-yielding;
coherence
proof
let x be set;
assume x in dom(f+*g);
then
A1: x in dom f \/ dom g by Def1;
per cases by A1,XBOOLE_0:def 3;
suppose
x in dom g;
then (f+*g).x = g.x by Th13;
hence (f+*g).x is Function;
end;
suppose
x in dom f & not x in dom g;
then (f+*g).x = f.x by Th11;
hence (f+*g).x is Function;
end;
end;
end;
registration
let I be set;
let f,g be I-defined Function;
cluster f+*g -> I-defined;
coherence
proof
dom (f+*g) = dom f \/ dom g by Def1;
then dom (f+*g) c= I;
hence thesis by RELAT_1:def 18;
end;
end;
registration
let I be set;
let f be total I-defined Function;
let g be I-defined Function;
cluster f+*g -> total for I-defined Function;
coherence
proof
dom f = I by PARTFUN1:def 2;
then dom (f+*g) = I \/ dom g by Def1
.= I by XBOOLE_1:12;
hence thesis by PARTFUN1:def 2;
end;
cluster g+*f -> total for I-defined Function;
coherence
proof
dom f = I by PARTFUN1:def 2;
then dom (g+*f) = I \/ dom g by Def1
.= I by XBOOLE_1:12;
hence thesis by PARTFUN1:def 2;
end;
end;
registration let I be set;
let g,h be I-valued Function;
cluster g+*h -> I-valued;
coherence
proof
A1: rng(g+*h) c= rng g \/ rng h by Th17;
rng(g+*h) c= I by A1,XBOOLE_1:1;
hence thesis by RELAT_1:def 19;
end;
end;
registration let f be Function;
let g,h be f-compatible Function;
cluster g+*h -> f-compatible;
coherence
proof
let x;
assume
A1: x in dom(g+*h);
A2: dom(g+*h) = dom g \/ dom h by Def1;
per cases by A1,A2,XBOOLE_0:def 3;
suppose
A3: x in dom g & not x in dom h;
then g.x in f.x by FUNCT_1:def 14;
hence (g+*h).x in f.x by A3,Th11;
end;
suppose
A4: x in dom h;
then h.x in f.x by FUNCT_1:def 14;
hence (g+*h).x in f.x by A4,Th13;
end;
end;
end;
theorem
f|A +* f = f by Th97,RELAT_1:59;
theorem
for R being Relation st dom R = {x} & rng R = {y}
holds R = x .--> y
proof let R be Relation;
assume that
A1: dom R = {x} and
A2: rng R = {y};
set g = x .--> y;
A3: g = {[x,y]} by ZFMISC_1:29;
for a, b being set holds [a,b] in R iff [a,b] in g
proof
let a, b be set;
hereby
assume
A4: [a,b] in R;
then b in rng R by XTUPLE_0:def 13;
then
A5: b = y by A2,TARSKI:def 1;
a in dom R by A4,XTUPLE_0:def 12;
then a = x by A1,TARSKI:def 1;
hence [a,b] in g by A3,A5,TARSKI:def 1;
end;
assume [a,b] in g;
then
A6: [a,b] = [x,y] by A3,TARSKI:def 1;
then
A7: b = y by XTUPLE_0:1;
a = x by A6,XTUPLE_0:1;
then a in dom R by A1,TARSKI:def 1;
then consider z being set such that
A8: [a,z] in R by XTUPLE_0:def 12;
z in rng R by A8,XTUPLE_0:def 13;
hence thesis by A2,A7,A8,TARSKI:def 1;
end;
hence thesis by RELAT_1:def 2;
end;
theorem
(f +* (x .-->y)).x = y
proof
A1: x in {x} by TARSKI:def 1;
then dom(x .--> y) = {x} & x in dom f \/ {x} by FUNCOP_1:13,XBOOLE_0:def 3;
hence (f +* (x .-->y) ).x = (x .-->y).x by A1,Def1
.= y by FUNCOP_1:72;
end;
theorem
f +* (x .--> z1) +* (x .--> z2) = f +* (x .--> z2)
proof
A1: dom (x .--> z1) = {x} by FUNCOP_1:13
.= dom (x .--> z2) by FUNCOP_1:13;
thus f +* (x .--> z1) +* (x .--> z2)
= f +* ((x .--> z1) +* (x .--> z2)) by Th14
.= f +* (x .--> z2) by A1,Th19;
end;
registration let A be non empty set, a,b be Element of A, x,y be set;
cluster (a,b) --> (x,y) -> A-defined;
coherence;
end;
theorem
dom g misses dom h implies f +* g +* h +* g = f +* g +* h
proof assume
A1: dom g misses dom h;
thus f +* g +* h +* g
= f +* (g +* h) +* g by Th14
.= f +* (g +* h +* g) by Th14
.= f +* (h +* g +* g) by A1,Th35
.= f +* (h +* g)
.= f +* (g +* h) by A1,Th35
.= f +* g +* h by Th14;
end;
theorem
dom f misses dom h & f c= g +* h implies f c= g
proof assume that
A1: dom f misses dom h and
A2: f c= g +* h;
A3: (g +* h)|dom f = g|dom f +* h|dom f by Th71
.= g|dom f +* {} by A1,RELAT_1:66
.= g|dom f;
f|dom f = f;
then f c= g|dom f by A2,A3,RELAT_1:76;
hence f c= g by RELAT_1:184;
end;
theorem Th117:
dom f misses dom h & f c= g implies f c= g +* h
proof assume that
A1: dom f misses dom h and
A2: f c= g;
A3: (g +* h)|dom f = g|dom f +* h|dom f by Th71
.= g|dom f +* {} by A1,RELAT_1:66
.= g|dom f;
f|dom f = f;
then f c= (g +* h)|dom f by A2,A3,RELAT_1:76;
hence f c= g +* h by RELAT_1:184;
end;
theorem
dom g misses dom h implies f +* g +* h = f +* h +* g
proof assume
A1: dom g misses dom h;
thus f +* g +* h = f +* (g +* h) by Th14
.= f +* (h +* g) by A1,Th35
.= f +* h +* g by Th14;
end;
theorem
dom f misses dom g implies (f +* g) \ g = f
proof assume
A1: dom f misses dom g;
then
A2: f misses g by RELAT_1:179;
thus (f +* g) \ g
= (f \/ g) \ g by A1,Th31
.= f by A2,XBOOLE_1:88;
end;
theorem
dom f misses dom g implies f \ g = f
proof
assume dom f misses dom g;
then f misses g by RELAT_1:179;
hence thesis by XBOOLE_1:83;
end;
theorem
dom g misses dom h implies (f \ g) +* h = (f +* h) \ g
proof
assume
A1: dom g misses dom h;
A2: dom(f+*h) = dom f \/ dom h by Def1;
A3: dom((f\g)+*h) = dom(f\g) \/ dom h by Def1;
A4: dom((f\g)+*h) = dom((f+*h)\g)
proof
thus dom((f\g)+*h) c= dom((f+*h)\g)
proof
let x be set;
assume
A5: x in dom((f\g)+*h);
per cases by A3,A5,XBOOLE_0:def 3;
suppose that
A6: x in dom(f\g) and
A7: not x in dom h;
consider y being set such that
A8: [x,y] in f\g by A6,XTUPLE_0:def 12;
A9: x in dom f by A8,XTUPLE_0:def 12;
then
A10: x in dom(f+*h) by A2,XBOOLE_0:def 3;
A11: not [x,y] in g by A8,XBOOLE_0:def 5;
A12: (f+*h).x = f.x by A7,Th11;
f.x = y by A8,A9,FUNCT_1:def 2;
then [x,y] in f+*h by A12,A10,FUNCT_1:def 2;
then [x,y] in (f+*h)\g by A11,XBOOLE_0:def 5;
hence thesis by XTUPLE_0:def 12;
end;
suppose
A13: x in dom h;
then
A14: not x in dom g by A1,XBOOLE_0:3;
x in dom(f+*h) by A2,A13,XBOOLE_0:def 3;
then
A15: x in dom(f+*h) \ dom g by A14,XBOOLE_0:def 5;
dom(f+*h) \ dom g c= dom((f+*h)\g) by RELAT_1:3;
hence thesis by A15;
end;
end;
let x be set;
assume x in dom((f+*h)\g);
then consider y being set such that
A16: [x,y] in (f+*h)\g by XTUPLE_0:def 12;
A17: x in dom(f+*h) by A16,XTUPLE_0:def 12;
then
A18: y = (f+*h).x by A16,FUNCT_1:def 2;
per cases by A2,A17,XBOOLE_0:def 3;
suppose that
A19: x in dom f and
A20: not x in dom h;
A21: not [x,y] in g by A16,XBOOLE_0:def 5;
(f+*h).x = f.x by A20,Th11;
then [x,y] in f by A19,A18,FUNCT_1:def 2;
then [x,y] in f\g by A21,XBOOLE_0:def 5;
then x in dom(f\g) by XTUPLE_0:def 12;
hence thesis by A3,XBOOLE_0:def 3;
end;
suppose x in dom h;
hence thesis by A3,XBOOLE_0:def 3;
end;
end;
now
let x be set;
assume
A22: x in dom((f\g)+*h);
per cases by A3,A22,XBOOLE_0:def 3;
suppose that
A23: x in dom(f\g) and
A24: not x in dom h;
thus ((f\g)+*h).x = (f\g).x by A24,Th11
.= f.x by A23,GRFUNC_1:2
.= (f+*h).x by A24,Th11
.= ((f+*h)\g).x by A4,A22,GRFUNC_1:2;
end;
suppose
A25: x in dom h;
then
A26: not x in dom g by A1,XBOOLE_0:3;
x in dom(f+*h) by A25,A2,XBOOLE_0:def 3;
then x in dom(f+*h) \ dom g by A26,XBOOLE_0:def 5;
hence ((f+*h)\g).x = (f+*h).x by GRFUNC_1:32
.= h.x by A25,Th13
.= ((f\g)+*h).x by A25,Th13;
end;
end;
hence thesis by A4,FUNCT_1:2;
end;
theorem
for f1,f2,g1,g2 being Function
st f1 c= g1 & f2 c= g2 & dom f1 misses dom g2
holds f1 +* f2 c= g1 +* g2
proof
let f1,f2,g1,g2 be Function such that
A1: f1 c= g1 and
A2: f2 c= g2 and
A3: dom f1 misses dom g2;
A4: f1 c= g1 +* g2 by A1,A3,Th117;
g2 c= g1 +* g2 by Th25;
then f2 c= g1 +* g2 by A2,XBOOLE_1:1;
hence f1 +* f2 c= g1 +* g2 by A4,Th87;
end;
theorem Th123:
for f, g, h being Function st f c= g holds f +* h c= g +* h
proof
let f, g, h be Function;
assume
A1: f c= g;
now
dom (f +* h) = dom f \/ dom h & dom (g +* h) = dom g \/ dom h by Def1;
hence dom (f +* h) c= dom (g +* h) by A1,RELAT_1:11,XBOOLE_1:9;
let x be set;
assume x in dom (f +* h);
then
A2: x in dom f or x in dom h by Th12;
per cases;
suppose
A3: x in dom h;
hence (f +* h).x = h.x by Th13
.= (g +* h).x by A3,Th13;
end;
suppose
A4: not x in dom h;
then (f +* h).x = f.x & (g +* h).x = g.x by Th11;
hence (f +* h).x = (g +* h).x by A1,A2,A4,GRFUNC_1:2;
end;
end;
hence thesis by GRFUNC_1:2;
end;
theorem
for f, g, h being Function st f c= g & dom f misses dom h holds f c= g +* h
proof
let f, g, h be Function;
assume f c= g;
then
A1: f +* h c= g +* h by Th123;
assume dom f misses dom h;
then f c= f +* h by Th32;
hence thesis by A1,XBOOLE_1:1;
end;
registration
let x, y be set;
cluster x .--> y -> trivial;
coherence
proof
x .--> y = {[x,y]} by ZFMISC_1:29;
hence thesis;
end;
end;
theorem
for f,g,h being Function st f tolerates g & g tolerates h & h
tolerates f holds f+*g tolerates h
proof
let f,g,h be Function such that
A1: f tolerates g and
A2: g tolerates h and
A3: h tolerates f;
let x be set;
assume
A4: x in (dom (f+*g)) /\ dom h;
then x in dom (f+*g) by XBOOLE_0:def 4;
then
A5: x in dom f or x in dom g by Th12;
x in dom h by A4,XBOOLE_0:def 4;
then
x in (dom h) /\ dom f & (f+*g).x = f.x or x in (dom g) /\ dom h & (f+*g)
.x = g.x by A1,A5,Th13,Th15,XBOOLE_0:def 4;
hence thesis by A2,A3,PARTFUN1:def 4;
end;
begin
theorem
{} is Element of omega
proof
{} in omega by ORDINAL1:def 11;
hence thesis by SUBSET_1:def 1;
end;
begin
reserve A,A1,A2,B,C,D for Ordinal,
X,Y for set,
x,y,a,b,c for set,
L,L1,L2,L3 for T-Sequence,
f for Function;
scheme
OrdinalInd { P[Ordinal] } : for A holds P[A]
provided
A1: P[{}] and
A2: for A st P[A] holds P[succ A] and
A3: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B]
holds P[A]
proof
A4: for A st for B st B in A holds P[B] holds P[A]
proof
let A such that
A5: for B st B in A holds P[B];
A6: now
assume that
A7: A <> {} and
A8: for B holds A <> succ B;
A is limit_ordinal by A8,ORDINAL1:29;
hence thesis by A3,A5,A7;
end;
now
given B such that
A9: A = succ B;
B in A by A9,ORDINAL1:6;
hence thesis by A2,A5,A9;
end;
hence thesis by A1,A6;
end;
thus for A holds P[A] from ORDINAL1:sch 2(A4);
end;
theorem Th1:
A c= B iff succ A c= succ B
proof
A c= B iff A in succ B by ORDINAL1:22;
hence thesis by ORDINAL1:21;
end;
theorem Th2:
union succ A = A
proof
thus union succ A c= A
proof
let x;
assume x in union succ A;
then consider X such that
A1: x in X and
A2: X in succ A by TARSKI:def 4;
reconsider X as Ordinal by A2;
X c= A by A2,ORDINAL1:22;
hence thesis by A1;
end;
thus thesis by ORDINAL1:6,ZFMISC_1:74;
end;
theorem
succ A c= bool A
proof
let x;
assume
A1: x in succ A;
then reconsider B = x as Ordinal;
x in A or x = A by A1,ORDINAL1:8;
then B c= A by ORDINAL1:def 2;
hence thesis;
end;
theorem
{} is limit_ordinal
proof
thus {} = union {} by ZFMISC_1:2;
end;
theorem Th5:
union A c= A
proof
let x;
assume x in union A;
then consider Y such that
A1: x in Y and
A2: Y in A by TARSKI:def 4;
Y c= A by A2,ORDINAL1:def 2;
hence thesis by A1;
end;
definition
let L;
func last L -> set equals
L.(union dom L);
coherence;
end;
theorem
dom L = succ A implies last L = L.A by Th2;
theorem
On X c= X
proof
thus x in On X implies x in X by ORDINAL1:def 9;
end;
theorem Th8:
On A = A
proof
x in A iff x in A & x is Ordinal;
hence thesis by ORDINAL1:def 9;
end;
theorem Th9:
X c= Y implies On X c= On Y
proof
assume
A1: X c= Y;
let x;
assume x in On X;
then x in X & x is Ordinal by ORDINAL1:def 9;
hence thesis by A1,ORDINAL1:def 9;
end;
theorem
Lim X c= X
proof
thus x in Lim X implies x in X by ORDINAL1:def 10;
end;
theorem
X c= Y implies Lim X c= Lim Y
proof
assume
A1: X c= Y;
let x;
assume x in Lim X;
then x in X & ex A st x = A & A is limit_ordinal by ORDINAL1:def 10;
hence thesis by A1,ORDINAL1:def 10;
end;
theorem
Lim X c= On X
proof
let x;
assume x in Lim X;
then x in X & ex A st x = A & A is limit_ordinal by ORDINAL1:def 10;
hence thesis by ORDINAL1:def 9;
end;
theorem Th13:
(for x st x in X holds x is Ordinal) implies meet X is Ordinal
proof
assume
A1: for x st x in X holds x is Ordinal;
now
defpred P[Ordinal] means $1 in X;
set x = the Element of X;
assume
A2: X <> {};
then x is Ordinal by A1;
then
A3: ex A st P[A] by A2;
consider A such that
A4: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A3);
for x holds x in A iff for Y st Y in X holds x in Y
proof
let x;
thus x in A implies for Y st Y in X holds x in Y
proof
assume
A5: x in A;
let Y;
assume
A6: Y in X;
then reconsider B = Y as Ordinal by A1;
A c= B by A4,A6;
hence thesis by A5;
end;
assume for Y st Y in X holds x in Y;
hence thesis by A4;
end;
hence thesis by A2,SETFAM_1:def 1;
end;
hence thesis by SETFAM_1:def 1;
end;
registration
cluster limit_ordinal for Ordinal;
existence
proof
take omega;
thus thesis by ORDINAL1:def 11;
end;
end;
definition
let X;
func inf X -> Ordinal equals
meet On X;
coherence
proof
x in On X implies x is Ordinal by ORDINAL1:def 9;
hence thesis by Th13;
end;
func sup X -> Ordinal means
:Def3:
On X c= it & for A st On X c= A holds it c= A;
existence
proof
defpred P[Ordinal] means On X c= $1;
x in On X implies x is Ordinal by ORDINAL1:def 9;
then reconsider A = union On X as Ordinal by ORDINAL1:23;
On X c= succ A
proof
let x;
assume
A1: x in On X;
then reconsider B = x as Ordinal by ORDINAL1:def 9;
B c= A by A1,ZFMISC_1:74;
hence thesis by ORDINAL1:22;
end;
then
A2: ex A st P[A];
thus ex F being Ordinal st P[F] & for A st P[A] holds F c= A from ORDINAL1
:sch 1(A2);
end;
uniqueness
proof
let B,C;
assume ( On X c= B & for A st On X c= A holds B c= A )&( On X c= C & for
A st On X c= A holds C c= A );
hence B c= C & C c= B;
end;
end;
theorem
A in X implies inf X c= A
proof
assume A in X;
then A in On X by ORDINAL1:def 9;
hence thesis by SETFAM_1:3;
end;
theorem
On X <> {} & (for A st A in X holds D c= A) implies D c= inf X
proof
assume that
A1: On X <> {} and
A2: for A st A in X holds D c= A;
let x such that
A3: x in D;
for Y st Y in On X holds x in Y
proof
let Y;
assume
A4: Y in On X;
then reconsider A = Y as Ordinal by ORDINAL1:def 9;
A in X by A4,ORDINAL1:def 9;
then D c= A by A2;
hence thesis by A3;
end;
hence thesis by A1,SETFAM_1:def 1;
end;
theorem
A in X & X c= Y implies inf Y c= inf X
proof
assume A in X;
then
A1: On X <> {} by ORDINAL1:def 9;
assume X c= Y;
then On X c= On Y by Th9;
hence thesis by A1,SETFAM_1:6;
end;
theorem
A in X implies inf X in X
proof
defpred P[Ordinal] means $1 in X;
assume A in X;
then
A1: ex A st P[A];
consider A such that
A2: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A1);
A3: A in On X by A2,ORDINAL1:def 9;
A4: now
let x;
thus x in A implies for Y st Y in On X holds x in Y
proof
assume
A5: x in A;
let Y;
assume
A6: Y in On X;
then reconsider B = Y as Ordinal by ORDINAL1:def 9;
Y in X by A6,ORDINAL1:def 9;
then A c= B by A2;
hence thesis by A5;
end;
assume for Y st Y in On X holds x in Y;
hence x in A by A3;
end;
On X <> {} by A2,ORDINAL1:def 9;
hence thesis by A2,A4,SETFAM_1:def 1;
end;
theorem Th18:
sup A = A
proof
On A = A & for B st On A c= B holds A c= B by Th8;
hence thesis by Def3;
end;
theorem Th19:
A in X implies A in sup X
proof
assume A in X;
then
A1: A in On X by ORDINAL1:def 9;
On X c= sup X by Def3;
hence thesis by A1;
end;
theorem Th20:
(for A st A in X holds A in D) implies sup X c= D
proof
assume
A1: for A st A in X holds A in D;
On X c= D
proof
let x;
assume
A2: x in On X;
then reconsider A = x as Ordinal by ORDINAL1:def 9;
A in X by A2,ORDINAL1:def 9;
hence thesis by A1;
end;
hence thesis by Def3;
end;
theorem
A in sup X implies ex B st B in X & A c= B
proof
assume that
A1: A in sup X and
A2: for B st B in X holds not A c= B;
for B st B in X holds B in A by A2,ORDINAL1:16;
then sup X c= A by Th20;
hence contradiction by A1,ORDINAL1:5;
end;
theorem
X c= Y implies sup X c= sup Y
proof
assume X c= Y;
then
A1: On X c= On Y by Th9;
On Y c= sup Y by Def3;
then On X c= sup Y by A1,XBOOLE_1:1;
hence thesis by Def3;
end;
theorem
sup { A } = succ A
proof
A1: On { A } c= succ A
proof
let x;
assume x in On { A };
then x in { A } by ORDINAL1:def 9;
then x = A by TARSKI:def 1;
hence thesis by ORDINAL1:6;
end;
now
A in { A } by TARSKI:def 1;
then
A2: A in On { A } by ORDINAL1:def 9;
let B;
assume On { A } c= B;
hence succ A c= B by A2,ORDINAL1:21;
end;
hence thesis by A1,Def3;
end;
theorem
inf X c= sup X
proof
let x;
set y = the Element of On X;
assume
A1: x in inf X;
then reconsider y as Ordinal by ORDINAL1:def 9,SETFAM_1:1;
On X c= sup X by Def3;
then y in sup X by A1,SETFAM_1:1,TARSKI:def 3;
then
A2: y c= sup X by ORDINAL1:def 2;
x in y by A1,SETFAM_1:1,def 1;
hence thesis by A2;
end;
scheme
TSLambda { A()->Ordinal, F(Ordinal)->set } : ex L st dom L = A() & for A st
A in A() holds L.A = F(A) proof
deffunc G(set) = F(sup union { $1 });
consider f such that
A1: dom f = A() & for x st x in A() holds f.x = G(x) from FUNCT_1:sch 3;
reconsider f as T-Sequence by A1,ORDINAL1:def 7;
take L = f;
thus dom L = A() by A1;
let A;
assume A in A();
hence L.A = F(sup union { A }) by A1
.= F(sup A) by ZFMISC_1:25
.= F(A) by Th18;
end;
definition
let f;
attr f is Ordinal-yielding means
:Def4:
ex A st rng f c= A;
end;
registration
cluster Ordinal-yielding for T-Sequence;
existence
proof
set A = the Ordinal;
set L = the T-Sequence of A;
take L,A;
thus thesis by RELAT_1:def 19;
end;
end;
definition
mode Ordinal-Sequence is Ordinal-yielding T-Sequence;
end;
registration
let A;
cluster -> Ordinal-yielding for T-Sequence of A;
coherence
proof
let L be T-Sequence of A;
take A;
thus thesis by RELAT_1:def 19;
end;
end;
registration
let L be Ordinal-Sequence;
let A;
cluster L|A -> Ordinal-yielding;
coherence
proof
consider B such that
A1: rng L c= B by Def4;
L|A is Ordinal-yielding
proof
take B;
rng(L|A) c= rng L by RELAT_1:70;
hence thesis by A1,XBOOLE_1:1;
end;
hence thesis;
end;
end;
reserve fi,psi for Ordinal-Sequence;
theorem Th25:
A in dom fi implies fi.A is Ordinal
proof
assume A in dom fi;
then
A1: fi.A in rng fi by FUNCT_1:def 3;
ex B st rng fi c= B by Def4;
hence thesis by A1;
end;
registration
let f be Ordinal-Sequence, a be Ordinal;
cluster f.a -> ordinal;
coherence
proof
a in dom f or not a in dom f;
hence thesis by Th25,FUNCT_1:def 2;
end;
end;
scheme
OSLambda { A()->Ordinal, F(Ordinal)->Ordinal } : ex fi st dom fi = A() & for
A st A in A() holds fi.A = F(A) proof
consider L such that
A1: dom L = A() & for A st A in A() holds L.A = F(A) from TSLambda;
L is Ordinal-yielding
proof
take sup rng L;
let x;
assume
A2: x in rng L;
then consider y such that
A3: y in dom L and
A4: x = L.y by FUNCT_1:def 3;
reconsider y as Ordinal by A3;
L.y = F(y) by A1,A3;
then
A5: x in On rng L by A2,A4,ORDINAL1:def 9;
On rng L c= sup rng L by Def3;
hence thesis by A5;
end;
then reconsider L as Ordinal-Sequence;
take fi = L;
thus dom fi = A() by A1;
let A;
assume A in A();
hence thesis by A1;
end;
scheme
TSUniq1 { A()->Ordinal, B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence)
->set, L1()->T-Sequence, L2()->T-Sequence } : L1() = L2()
provided
A1: dom L1() = A() and
A2: {} in A() implies L1().{} = B() and
A3: for A st succ A in A() holds L1().(succ A) = C(A,L1().A) and
A4: for A st A in A() & A <> {} & A is limit_ordinal holds L1().A = D(A,
L1()|A) and
A5: dom L2() = A() and
A6: {} in A() implies L2().{} = B() and
A7: for A st succ A in A() holds L2().(succ A) = C(A,L2().A) and
A8: for A st A in A() & A <> {} & A is limit_ordinal holds L2().A = D(A,
L2()|A)
proof
defpred P[set] means L1().$1 <> L2().$1;
consider X such that
A9: Y in X iff Y in A() & P[Y] from XBOOLE_0:sch 1;
for b holds b in X implies b in A() by A9;
then
A10: X c= A() by TARSKI:def 3;
assume L1() <> L2();
then ex a st a in A() & L1().a <> L2().a by A1,A5,FUNCT_1:2;
then X <> {} by A9;
then consider B such that
A11: B in X and
A12: for C st C in X holds B c= C by A10,ORDINAL1:20;
A13: B in A() by A9,A11;
then
A14: B c= A() by ORDINAL1:def 2;
then
A15: dom(L1()|B) = B & dom(L2()|B) = B by A1,A5,RELAT_1:62;
A16: now
let C;
assume
A17: C in B;
then not C in X by A12,ORDINAL1:5;
hence L1().C = L2().C by A9,A14,A17;
end;
A18: now
let a;
assume
A19: a in B;
L1()|B.a = L1().a & L2()|B.a = L2().a by A15,A19,FUNCT_1:47;
hence L1()|B.a = L2()|B.a by A16,A19;
end;
A20: now
given C such that
A21: B = succ C;
A22: L1().C = L1()|B.C & L2().C = L2()|B.C by A21,FUNCT_1:49,ORDINAL1:6;
L1().B = C(C,L1().C) & L2().B = C(C,L2().C) by A3,A7,A13,A21;
hence L1().B = L2().B by A18,A21,A22,ORDINAL1:6;
end;
now
assume that
A23: B <> {} and
A24: for C holds B <> succ C;
B is limit_ordinal by A24,ORDINAL1:29;
then L1().B = D(B,L1()|B) & L2().B = D(B,L2()|B) by A4,A8,A13,A23;
hence L1().B = L2().B by A15,A18,FUNCT_1:2;
end;
hence contradiction by A2,A6,A9,A11,A20;
end;
scheme
TSExist1 { A()->Ordinal, B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence
)->set } : ex L st dom L = A() & ({} in A() implies L.{} = B() ) & (for A st
succ A in A() holds L.(succ A) = C(A,L.A) ) & for A st A in A() & A <> {} & A
is limit_ordinal holds L.A = D(A,L|A) proof
defpred P[Ordinal,T-Sequence] means dom $2 = $1 & ({} in $1 implies $2.{} =
B() ) & (for A st succ A in $1 holds $2.(succ A) = C(A,$2.A) ) & for A st A in
$1 & A <> {} & A is limit_ordinal holds $2.A = D(A,$2|A);
defpred R[Ordinal] means ex L st P[$1,L];
A1: for B st for C st C in B holds R[C] holds R[B]
proof
defpred R[set,set] means $1 is Ordinal & $2 is T-Sequence & for A,L st A =
$1 & L = $2 holds P[A,L];
let B such that
A2: for C st C in B ex L st P[C,L];
A3: for a,b,c st R[a,b] & R[a,c] holds b = c
proof
let a,b,c;
assume that
A4: a is Ordinal and
A5: b is T-Sequence and
A6: for A,L st A = a & L = b holds P[A,L] and
a is Ordinal and
A7: c is T-Sequence and
A8: for A,L st A = a & L = c holds P[ A,L];
reconsider a as Ordinal by A4;
reconsider c as T-Sequence by A7;
A9: dom c = a by A8;
A10: for A st A in a & A <> {} & A is limit_ordinal holds c.A = D(A,c|A)
by A8;
A11: for A st succ A in a holds c.(succ A) = C(A,c.A) by A8;
A12: {} in a implies c.{} = B() by A8;
reconsider b as T-Sequence by A5;
A13: {} in a implies b.{} = B() by A6;
A14: for A st succ A in a holds b.(succ A) = C(A,b.A) by A6;
A15: for A st A in a & A <> {} & A is limit_ordinal holds b.A = D(A,b|A)
by A6;
A16: dom b = a by A6;
b = c from TSUniq1(A16,A13,A14,A15,A9,A12,A11,A10);
hence thesis;
end;
consider G being Function such that
A17: [a,b] in G iff a in B & R[a,b] from FUNCT_1:sch 1(A3);
defpred Q[set,set] means ex A,L st A = $1 & L = G.$1 & (A = {} & $2 = B()
or (ex B st A = succ B & $2 = C(B,L.B)) or A <> {} & A is limit_ordinal & $2 =
D(A,L));
A18: dom G = B
proof
thus a in dom G implies a in B
proof
assume a in dom G;
then ex b st [a,b] in G by XTUPLE_0:def 12;
hence thesis by A17;
end;
let a;
assume
A19: a in B;
then reconsider a9 = a as Ordinal;
consider L such that
A20: P[a9,L] by A2,A19;
for A holds for K be T-Sequence holds A = a9 & K = L implies P[A,K]
by A20;
then [a9,L] in G by A17,A19;
hence thesis by XTUPLE_0:def 12;
end;
A21: for a st a in B ex b st Q[a,b]
proof
let a;
assume
A22: a in B;
then reconsider A = a as Ordinal;
consider c such that
A23: [a,c] in G by A18,A22,XTUPLE_0:def 12;
reconsider L = c as T-Sequence by A17,A23;
A24: now
given C such that
A25: A = succ C;
thus ex b st Q[a,b]
proof
take C(C,L.C), A, L;
thus A = a & L = G.a by A23,FUNCT_1:1;
thus thesis by A25;
end;
end;
A26: now
assume
A27: A <> {} & for C holds A <> succ C;
thus Q[a,D(A,L)]
proof
take A,L;
thus A = a & L = G.a by A23,FUNCT_1:1;
thus thesis by A27,ORDINAL1:29;
end;
end;
now
assume
A28: A = {};
thus Q[a,B()]
proof
take A,L;
thus A = a & L = G.a by A23,FUNCT_1:1;
thus thesis by A28;
end;
end;
hence thesis by A24,A26;
end;
A29: for a,b,c st a in B & Q[a,b] & Q[a,c] holds b = c
proof
let a,b,c such that
a in B;
given Ab being Ordinal,Lb being T-Sequence such that
A30: Ab = a and
A31: Lb = G.a and
A32: Ab = {} & b = B() or (ex B st Ab = succ B & b = C(B,Lb.B)) or
Ab <> {} & Ab is limit_ordinal & b = D(Ab,Lb);
given Ac being Ordinal,Lc being T-Sequence such that
A33: Ac = a and
A34: Lc = G.a and
A35: Ac = {} & c = B() or (ex B st Ac = succ B & c = C(B,Lc.B)) or
Ac <> {} & Ac is limit_ordinal & c = D(Ac,Lc);
now
given C such that
A36: Ab = succ C;
consider A such that
A37: Ab = succ A and
A38: b = C(A,Lb.A) by A32,A36,ORDINAL1:29;
consider D such that
A39: Ac = succ D and
A40: c = C(D,Lc.D) by A30,A33,A35,A36,ORDINAL1:29;
A = D by A30,A33,A37,A39,ORDINAL1:7;
hence thesis by A31,A34,A38,A40;
end;
hence thesis by A30,A31,A32,A33,A34,A35;
end;
consider F being Function such that
A41: dom F = B & for a st a in B holds Q[a,F.a] from FUNCT_1:sch 2(A29
,A21);
reconsider L = F as T-Sequence by A41,ORDINAL1:def 7;
take L;
thus dom L = B by A41;
thus {} in B implies L.{} = B()
proof
assume {} in B;
then ex A being Ordinal, K being T-Sequence st A = {} & K = G.{} & (A =
{} & F.{} = B() or (ex B st A = succ B & F.{} = C(B,K.B)) or A <> {} & A is
limit_ordinal & F.{} = D(A,K)) by A41;
hence thesis;
end;
A42: for A,L1 st A in B & L1 = G.A holds L|A = L1
proof
defpred P[Ordinal] means for L1 st $1 in B & L1 = G.$1 holds L|$1 = L1;
A43: for A st for C st C in A holds P[C] holds P[A]
proof
let A such that
for C st C in A for L1 st C in B & L1 = G.C holds L|C = L1;
let L1;
assume that
A44: A in B and
A45: L1 = G.A;
A46: [A,L1] in G by A18,A44,A45,FUNCT_1:1;
then
A47: P[A,L1] by A17;
A48: now
let x;
assume
A49: x in A;
then reconsider x9 = x as Ordinal;
A50: x9 in B by A44,A49,ORDINAL1:10;
then consider A1,L2 such that
A51: A1 = x9 and
A52: L2 = G.x9 and
A53: A1 = {} & L.x9 = B() or (ex B st A1 = succ B & L.x9 = C(B,
L2.B)) or A1 <> {} & A1 is limit_ordinal & L.x9 = D(A1,L2) by A41;
for D,L3 st D = x9 & L3 = L1|x9 holds P[D,L3]
proof
let D,L3 such that
A54: D = x9 and
A55: L3 = L1|x9;
x9 c= A by A49,ORDINAL1:def 2;
hence dom L3 = D by A47,A54,A55,RELAT_1:62;
thus {} in D implies L3.{} = B() by A47,A49,A54,A55,FUNCT_1:49
,ORDINAL1:10;
thus succ C in D implies L3.(succ C) = C(C,L3.C)
proof
assume
A56: succ C in D;
C in succ C by ORDINAL1:6;
then
A57: L1|x9.C = L1.C by A54,A56,FUNCT_1:49,ORDINAL1:10;
succ C in A & L1|x9.succ C = L1.succ C by A49,A54,A56,FUNCT_1:49
,ORDINAL1:10;
hence thesis by A17,A46,A55,A57;
end;
let C;
assume that
A58: C in D and
A59: C <> {} & C is limit_ordinal;
C c= x9 by A54,A58,ORDINAL1:def 2;
then
A60: L1|C = L3|C by A55,FUNCT_1:51;
C in A by A49,A54,A58,ORDINAL1:10;
then L1.C = D(C,L3|C) by A17,A46,A59,A60;
hence thesis by A54,A55,A58,FUNCT_1:49;
end;
then [x9,L1|x9] in G by A17,A50;
then
A61: L1|x9 = L2 by A52,FUNCT_1:1;
A62: L|A.x = L.x by A49,FUNCT_1:49;
now
given D such that
A63: x9 = succ D;
A64: L1.x = C(D,L1.D) by A17,A46,A49,A63;
consider C such that
A65: A1 = succ C and
A66: L.x9 = C(C,L2.C) by A51,A53,A63,ORDINAL1:29;
C = D by A51,A63,A65,ORDINAL1:7;
hence L1.x = L|A.x by A62,A61,A63,A66,A64,FUNCT_1:49,ORDINAL1:6;
end;
hence L1.x = L|A.x by A17,A46,A49,A51,A53,A62,A61;
end;
A c= dom L by A41,A44,ORDINAL1:def 2;
then dom(L|A) = A by RELAT_1:62;
hence thesis by A47,A48,FUNCT_1:2;
end;
thus for A holds P[A] from ORDINAL1:sch 2(A43);
end;
thus succ A in B implies L.(succ A) = C(A,L.A)
proof
assume
A67: succ A in B;
then consider C being Ordinal, K being T-Sequence such that
A68: C = succ A and
A69: K = G.succ A and
A70: C = {} & F.succ A = B() or (ex B st C = succ B & F.succ A = C(B
,K.B)) or C <> {} & C is limit_ordinal & F.succ A = D(C,K) by A41;
A71: K = L|succ A by A42,A67,A69;
consider D such that
A72: C = succ D and
A73: F.succ A = C(D,K.D) by A68,A70,ORDINAL1:29;
A = D by A68,A72,ORDINAL1:7;
hence thesis by A73,A71,FUNCT_1:49,ORDINAL1:6;
end;
let D;
assume that
A74: D in B and
A75: D <> {} & D is limit_ordinal;
ex A being Ordinal, K being T-Sequence st A = D & K = G.D & (A = {}
& F.D = B() or (ex B st A = succ B & F.D = C(B,K.B)) or A <> {} & A is
limit_ordinal & F.D = D(A,K)) by A41,A74;
hence thesis by A42,A74,A75,ORDINAL1:29;
end;
for A holds R[A] from ORDINAL1:sch 2(A1);
hence thesis;
end;
scheme
TSResult { L()->T-Sequence, F(Ordinal)->set, A()->Ordinal, B()->set, C(
Ordinal,set)->set, D(Ordinal,T-Sequence)->set } : for A st A in dom L() holds L
().A = F(A)
provided
A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.
{} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C
in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) and
A2: dom L() = A() and
A3: {} in A() implies L().{} = B() and
A4: for A st succ A in A() holds L().(succ A) = C(A,L().A) and
A5: for A st A in A() & A <> {} & A is limit_ordinal holds L().A = D(A,L ()|A)
proof
let A;
set L = L()|succ A;
assume A in dom L();
then
A6: succ A c= dom L() by ORDINAL1:21;
A7: for C st succ C in succ A holds L.succ C = C(C,L.C)
proof
let C such that
A8: succ C in succ A;
C in succ C by ORDINAL1:6;
then
A9: L.C = L().C by A8,FUNCT_1:49,ORDINAL1:10;
L.succ C = L().succ C by A8,FUNCT_1:49;
hence thesis by A2,A4,A6,A8,A9;
end;
A10: for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C )
proof
let C;
assume that
A11: C in succ A and
A12: C <> {} & C is limit_ordinal;
C c= succ A by A11,ORDINAL1:def 2;
then
A13: L|C = L()|C by FUNCT_1:51;
L.C = L().C by A11,FUNCT_1:49;
hence thesis by A2,A5,A6,A11,A12,A13;
end;
{} c= succ A;
then {} c< succ A by XBOOLE_0:def 8;
then
A14: {} in succ A & L.{} = L().{} by FUNCT_1:49,ORDINAL1:11;
A15: dom L = succ A by A6,RELAT_1:62;
then A in succ A & last L = L.A by Th2,ORDINAL1:21;
then last L = L().A by FUNCT_1:49;
hence thesis by A1,A2,A3,A6,A15,A14,A7,A10;
end;
scheme
TSDef { A()->Ordinal, B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence)->
set } : (ex x,L st x = last L & dom L = succ A() & L.{} = B() & (for C st succ
C in succ A() holds L.succ C = C(C,L.C)) & for C st C in succ A() & C <> {} & C
is limit_ordinal holds L.C = D(C,L|C) ) & for x1,x2 being set st (ex L st x1 =
last L & dom L = succ A() & L.{} = B() & (for C st succ C in succ A() holds L.
succ C = C(C,L.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal
holds L.C = D(C,L|C) ) & (ex L st x2 = last L & dom L = succ A() & L.{} = B() &
(for C st succ C in succ A() holds L.succ C = C(C,L.C)) & for C st C in succ A(
) & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) holds x1 = x2 proof
consider L such that
A1: dom L = succ A() & ({} in succ A() implies L.{} = B() ) & (for C st
succ C in succ A() holds L.(succ C) = C(C,L.C)) & for C st C in succ A() & C <>
{} & C is limit_ordinal holds L.C = D(C,L|C) from TSExist1;
thus ex x,L st x = last L & dom L = succ A() & L.{} = B() & (for C st succ C
in succ A() holds L.succ C = C(C,L.C)) & for C st C in succ A() & C <> {} & C
is limit_ordinal holds L.C = D(C,L|C)
proof
take x = last L, L;
thus x = last L & dom L = succ A() by A1;
{} c= succ A();
then {} c< succ A() by XBOOLE_0:def 8;
hence thesis by A1,ORDINAL1:11;
end;
let x1,x2 be set;
given L1 such that
A2: x1 = last L1 and
A3: dom L1 = succ A() and
A4: L1.{} = B() and
A5: for C st succ C in succ A() holds L1.succ C = C(C,L1.C) and
A6: for C st C in succ A() & C <> {} & C is limit_ordinal holds L1.C = D
(C,L1|C);
A7: {} in succ A() implies L1.{} = B() by A4;
given L2 such that
A8: x2 = last L2 and
A9: dom L2 = succ A() and
A10: L2.{} = B() and
A11: for C st succ C in succ A() holds L2.succ C = C(C,L2.C) and
A12: for C st C in succ A() & C <> {} & C is limit_ordinal holds L2.C =
D(C,L2|C);
A13: {} in succ A() implies L2.{} = B() by A10;
L1 = L2 from TSUniq1(A3,A7,A5,A6,A9,A13,A11,A12);
hence thesis by A2,A8;
end;
scheme
TSResult0 { F(Ordinal)->set, B()->set, C(Ordinal,set)->set, D(Ordinal,
T-Sequence)->set } : F({}) = B()
provided
A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.
{} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C
in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C)
proof
consider L such that
A2: dom L = succ {} & ({} in succ {} implies L.{} = B() ) & (for A st
succ A in succ {} holds L.(succ A) = C(A,L.A) ) & for A st A in succ {} & A <>
{} & A is limit_ordinal holds L.A = D(A,L|A) from TSExist1;
B() = last L by A2,Th2,ORDINAL1:6;
hence thesis by A1,A2,ORDINAL1:6;
end;
scheme
TSResultS { B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence)->set, F(
Ordinal)->set } : for A holds F(succ A) = C(A,F(A))
provided
A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.
{} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C
in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C)
proof
let A;
consider L such that
A2: dom L = succ succ A and
A3: {} in succ succ A implies L.{} = B() and
A4: for C st succ C in succ succ A holds L.(succ C) = C(C,L.C) and
A5: for C st C in succ succ A & C <> {} & C is limit_ordinal holds L.C =
D(C,L|C) from TSExist1;
A6: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.{} =
B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in
succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by A1;
A7: for B st B in dom L holds L.B = F(B) from TSResult(A6,A2,A3,A4, A5);
then
A8: L.succ A = F(succ A) by A2,ORDINAL1:6;
A in succ A & succ A in succ succ A by ORDINAL1:6;
then L.A = F(A) by A2,A7,ORDINAL1:10;
hence thesis by A4,A8,ORDINAL1:6;
end;
scheme
TSResultL { L()->T-Sequence, A()->Ordinal, F(Ordinal)->set, B()->set, C(
Ordinal,set)->set, D(Ordinal,T-Sequence)->set } : F(A()) = D(A(),L())
provided
A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.
{} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C
in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) and
A2: A() <> {} & A() is limit_ordinal and
A3: dom L() = A() and
A4: for A st A in A() holds L().A = F(A)
proof
A5: A() in succ A() by ORDINAL1:6;
consider L such that
A6: dom L = succ A() and
A7: {} in succ A() implies L.{} = B() and
A8: for C st succ C in succ A() holds L.(succ C) = C(C,L.C) and
A9: for C st C in succ A() & C <> {} & C is limit_ordinal holds L.C = D(
C,L|C) from TSExist1;
set L1 = L|A();
A10: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.{} =
B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in
succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by A1;
A11: for B st B in dom L holds L.B = F(B) from TSResult(A10,A6,A7,A8, A9);
A12: now
let x;
assume
A13: x in A();
then reconsider x9 = x as Ordinal;
thus L1.x = L.x9 by A13,FUNCT_1:49
.= F(x9) by A6,A11,A5,A13,ORDINAL1:10
.= L().x by A4,A13;
end;
A() c= dom L by A6,A5,ORDINAL1:def 2;
then dom L1 = A() by RELAT_1:62;
then L1 = L() by A3,A12,FUNCT_1:2;
then L.A() = D(A(),L()) by A2,A9,ORDINAL1:6;
hence thesis by A6,A11,ORDINAL1:6;
end;
scheme
OSExist { A()->Ordinal, B()->Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal
,T-Sequence)->Ordinal } : ex fi st dom fi = A() & ({} in A() implies fi.{} = B(
) ) & (for A st succ A in A() holds fi.(succ A) = C(A,fi.A) ) & for A st A in A
() & A <> {} & A is limit_ordinal holds fi.A = D(A,fi|A) proof
deffunc CC(Ordinal,set) = C($1,sup union {$2});
consider L such that
A1: dom L = A() and
A2: {} in A() implies L.{} = B() and
A3: for A st succ A in A() holds L.(succ A) = CC(A,L.A) and
A4: for A st A in A() & A <> {} & A is limit_ordinal holds L.A = D(A,L|A
) from TSExist1;
L is Ordinal-yielding
proof
take sup rng L;
let x;
assume
A5: x in rng L;
then consider y such that
A6: y in dom L and
A7: x = L.y by FUNCT_1:def 3;
reconsider y as Ordinal by A6;
A8: now
assume that
A9: y <> {} and
A10: for B holds y <> succ B;
y is limit_ordinal by A10,ORDINAL1:29;
then L.y = D(y,L|y) by A1,A4,A6,A9;
hence x is Ordinal by A7;
end;
A11: On rng L c= sup rng L by Def3;
now
given B such that
A12: y = succ B;
L.y = C(B,sup union {L.B}) by A1,A3,A6,A12;
hence x is Ordinal by A7;
end;
then x in On rng L by A1,A2,A5,A6,A7,A8,ORDINAL1:def 9;
hence thesis by A11;
end;
then reconsider L as Ordinal-Sequence;
take fi = L;
thus dom fi = A() & ({} in A() implies fi.{} = B() ) by A1,A2;
thus for A st succ A in A() holds fi.(succ A) = C(A,fi.A)
proof
let A;
reconsider B = fi.A as Ordinal;
sup union {B} = sup B by ZFMISC_1:25
.= B by Th18;
hence thesis by A3;
end;
thus thesis by A4;
end;
scheme
OSResult { fi()->Ordinal-Sequence, F(Ordinal)->Ordinal, A()->Ordinal, B()->
Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,T-Sequence)->Ordinal } : for A
st A in dom fi() holds fi().A = F(A)
provided
A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A &
fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C
st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) and
A2: dom fi() = A() and
A3: {} in A() implies fi().{} = B() and
A4: for A st succ A in A() holds fi().(succ A) = C(A,fi().A) and
A5: for A st A in A() & A <> {} & A is limit_ordinal holds fi().A = D(A,
fi()|A)
proof
let A;
set fi = fi()|succ A;
assume A in dom fi();
then
A6: succ A c= dom fi() by ORDINAL1:21;
A7: for C st succ C in succ A holds fi.succ C = C(C,fi.C)
proof
let C such that
A8: succ C in succ A;
C in succ C by ORDINAL1:6;
then
A9: fi.C = fi().C by A8,FUNCT_1:49,ORDINAL1:10;
fi.succ C = fi().succ C by A8,FUNCT_1:49;
hence thesis by A2,A4,A6,A8,A9;
end;
A10: for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi
|C)
proof
let C;
assume that
A11: C in succ A and
A12: C <> {} & C is limit_ordinal;
C c= succ A by A11,ORDINAL1:def 2;
then
A13: fi|C = fi()|C by FUNCT_1:51;
fi.C = fi().C by A11,FUNCT_1:49;
hence thesis by A2,A5,A6,A11,A12,A13;
end;
{} c= succ A;
then {} c< succ A by XBOOLE_0:def 8;
then
A14: {} in succ A & fi.{} = fi().{} by FUNCT_1:49,ORDINAL1:11;
A15: dom fi = succ A by A6,RELAT_1:62;
then A in succ A & last fi = fi.A by Th2,ORDINAL1:21;
then last fi = fi().A by FUNCT_1:49;
hence thesis by A1,A2,A3,A6,A15,A14,A7,A10;
end;
scheme
OSDef { A()->Ordinal, B()->Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,
T-Sequence)->Ordinal } : (ex A,fi st A = last fi & dom fi = succ A() & fi.{} =
B() & (for C st succ C in succ A() holds fi.succ C = C(C,fi.C)) & for C st C in
succ A() & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st
(ex fi st A1 = last fi & dom fi = succ A() & fi.{} = B() & (for C st succ C in
succ A() holds fi.succ C = C(C,fi.C)) & for C st C in succ A() & C <> {} & C is
limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ
A() & fi.{} = B() & (for C st succ C in succ A() holds fi.succ C = C(C,fi.C)) &
for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) )
holds A1 = A2 proof
consider fi such that
A1: dom fi = succ A() & ({} in succ A() implies fi.{} = B() ) & (for C
st succ C in succ A() holds fi.(succ C) = C(C,fi.C)) & for C st C in succ A() &
C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) from OSExist;
reconsider A = last fi as Ordinal;
thus ex A,fi st A = last fi & dom fi = succ A() & fi.{} = B() & (for C st
succ C in succ A() holds fi.succ C = C(C,fi.C)) & for C st C in succ A() & C <>
{} & C is limit_ordinal holds fi.C = D(C,fi|C)
proof
take A, fi;
thus A = last fi & dom fi = succ A() by A1;
{} c= succ A();
then {} c< succ A() by XBOOLE_0:def 8;
hence thesis by A1,ORDINAL1:11;
end;
deffunc CD(Ordinal,Ordinal) = C($1,sup union { $2 });
let A1,A2 be Ordinal;
given L1 being Ordinal-Sequence such that
A2: A1 = last L1 and
A3: dom L1 = succ A() and
A4: L1.{} = B() and
A5: for C st succ C in succ A() holds L1.succ C = C(C,L1.C) and
A6: for C st C in succ A() & C <> {} & C is limit_ordinal holds L1.C = D
(C,L1|C);
A7: {} in succ A() implies L1.{} = B() by A4;
A8: for C st succ C in succ A() holds L1.(succ C) = CD(C,L1.C)
proof
let C such that
A9: succ C in succ A();
reconsider x9 = L1.C as Ordinal;
sup union { L1.C } = sup x9 by ZFMISC_1:25
.= x9 by Th18;
hence thesis by A5,A9;
end;
given L2 being Ordinal-Sequence such that
A10: A2 = last L2 and
A11: dom L2 = succ A() and
A12: L2.{} = B() and
A13: for C st succ C in succ A() holds L2.succ C = C(C,L2.C) and
A14: for C st C in succ A() & C <> {} & C is limit_ordinal holds L2.C =
D(C,L2|C);
A15: for C st C in succ A() & C <> {} & C is limit_ordinal holds L2.C = D(C,
L2|C) by A14;
A16: for C st C in succ A() & C <> {} & C is limit_ordinal holds L1.C = D(C,
L1|C) by A6;
A17: for C st succ C in succ A() holds L2.(succ C) = CD(C,L2.C)
proof
let C such that
A18: succ C in succ A();
reconsider x9 = L2.C as Ordinal;
sup union { L2.C } = sup x9 by ZFMISC_1:25
.= x9 by Th18;
hence thesis by A13,A18;
end;
A19: {} in succ A() implies L2.{} = B() by A12;
L1 = L2 from TSUniq1(A3,A7,A8,A16,A11,A19,A17,A15);
hence thesis by A2,A10;
end;
scheme
OSResult0 { F(Ordinal)->Ordinal, B()->Ordinal, C(Ordinal,Ordinal)->Ordinal,
D(Ordinal,T-Sequence)->Ordinal } : F({}) = B()
provided
A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A &
fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C
st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C)
proof
consider fi such that
A2: dom fi = succ {} & ({} in succ {} implies fi.{} = B() ) & (for A st
succ A in succ {} holds fi.(succ A) = C(A,fi.A) ) & for A st A in succ {} & A
<> {} & A is limit_ordinal holds fi.A = D(A,fi|A) from OSExist;
B() = last fi by A2,Th2,ORDINAL1:6;
hence thesis by A1,A2,ORDINAL1:6;
end;
scheme
OSResultS { B()->Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,T-Sequence)
->Ordinal, F(Ordinal)->Ordinal } : for A holds F(succ A) = C(A,F(A))
provided
A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A &
fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C
st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C)
proof
let A;
consider fi such that
A2: dom fi = succ succ A and
A3: {} in succ succ A implies fi.{} = B() and
A4: for C st succ C in succ succ A holds fi.(succ C) = C(C,fi.C) and
A5: for C st C in succ succ A & C <> {} & C is limit_ordinal holds fi.C
= D(C,fi|C) from OSExist;
A6: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi.
{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C
in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by A1;
A7: for B st B in dom fi holds fi.B = F(B) from OSResult(A6,A2,A3,A4, A5);
then
A8: fi.succ A = F(succ A) by A2,ORDINAL1:6;
A in succ A & succ A in succ succ A by ORDINAL1:6;
then fi.A = F(A) by A2,A7,ORDINAL1:10;
hence thesis by A4,A8,ORDINAL1:6;
end;
scheme
OSResultL { fi()->Ordinal-Sequence, A()->Ordinal, F(Ordinal)->Ordinal, B()->
Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,T-Sequence)->Ordinal } : F(A())
= D(A(),fi())
provided
A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A &
fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C
st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) and
A2: A() <> {} & A() is limit_ordinal and
A3: dom fi() = A() and
A4: for A st A in A() holds fi().A = F(A)
proof
A5: A() in succ A() by ORDINAL1:6;
consider fi such that
A6: dom fi = succ A() and
A7: {} in succ A() implies fi.{} = B() and
A8: for C st succ C in succ A() holds fi.(succ C) = C(C,fi.C) and
A9: for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D
(C,fi|C) from OSExist;
set psi = fi|A();
A10: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi.
{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C
in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by A1;
A11: for B st B in dom fi holds fi.B = F(B) from OSResult(A10,A6,A7,A8, A9);
A12: now
let x;
assume
A13: x in A();
then reconsider x9 = x as Ordinal;
thus psi.x = fi.x9 by A13,FUNCT_1:49
.= F(x9) by A6,A11,A5,A13,ORDINAL1:10
.= fi().x by A4,A13;
end;
A() c= dom fi by A6,A5,ORDINAL1:def 2;
then dom psi = A() by RELAT_1:62;
then psi = fi() by A3,A12,FUNCT_1:2;
then fi.A() = D(A(),fi()) by A2,A9,ORDINAL1:6;
hence thesis by A6,A11,ORDINAL1:6;
end;
definition
let L;
func sup L -> Ordinal equals
sup rng L;
correctness;
func inf L -> Ordinal equals
inf rng L;
correctness;
end;
theorem
sup L = sup rng L & inf L = inf rng L;
definition
let L;
func lim_sup L -> Ordinal means
ex fi st it = inf fi & dom fi = dom L & for
A st A in dom L holds fi.A = sup rng (L|(dom L \ A));
existence
proof
deffunc F(Ordinal) = sup rng (L|(dom L \ $1));
consider fi such that
A1: dom fi = dom L & for A st A in dom L holds fi.A = F(A) from
OSLambda;
take inf fi, fi;
thus thesis by A1;
end;
uniqueness
proof
let A1,A2 be Ordinal;
given fi such that
A2: A1 = inf fi & dom fi = dom L and
A3: for A st A in dom L holds fi.A = sup rng (L|(dom L \ A));
given psi such that
A4: A2 = inf psi & dom psi = dom L and
A5: for A st A in dom L holds psi.A = sup rng (L|(dom L \ A));
now
let x;
assume
A6: x in dom L;
then reconsider A = x as Ordinal;
fi.A = sup rng (L|(dom L \ A)) by A3,A6;
hence fi.x = psi.x by A5,A6;
end;
hence thesis by A2,A4,FUNCT_1:2;
end;
func lim_inf L -> Ordinal means
ex fi st it = sup fi & dom fi = dom L & for
A st A in dom L holds fi.A = inf rng (L|(dom L \ A));
existence
proof
deffunc F(Ordinal) = inf rng (L|(dom L \ $1));
consider fi such that
A7: dom fi = dom L & for A st A in dom L holds fi.A = F(A) from
OSLambda;
take sup fi, fi;
thus thesis by A7;
end;
uniqueness
proof
let A1,A2 be Ordinal;
given fi such that
A8: A1 = sup fi & dom fi = dom L and
A9: for A st A in dom L holds fi.A = inf rng (L|(dom L \ A));
given psi such that
A10: A2 = sup psi & dom psi = dom L and
A11: for A st A in dom L holds psi.A = inf rng (L|(dom L \ A));
now
let x;
assume
A12: x in dom L;
then reconsider A = x as Ordinal;
fi.A = inf rng (L|(dom L \ A)) by A9,A12;
hence fi.x = psi.x by A11,A12;
end;
hence thesis by A8,A10,FUNCT_1:2;
end;
end;
definition
let A,fi;
pred A is_limes_of fi means
:Def9:
ex B st B in dom fi & for C st B c= C &
C in dom fi holds fi.C = {} if A = {} otherwise for B,C st B in A & A in C ex D
st D in dom fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E &
fi.E in C;
consistency;
end;
definition
let fi;
given A such that
A1: A is_limes_of fi;
func lim fi -> Ordinal means
:Def10:
it is_limes_of fi;
existence by A1;
uniqueness
proof
let A1,A2 be Ordinal such that
A2: (A1 = {} & ex B st B in dom fi & for C st B c= C & C in dom fi
holds fi.C = {}) or (A1 <> {} & for B,C st B in A1 & A1 in C ex D st D in dom
fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E & fi.E in C)
and
A3: (A2 = {} & ex B st B in dom fi & for C st B c= C & C in dom fi
holds fi.C = {}) or (A2 <> {} & for B,C st B in A2 & A2 in C ex D st D in dom
fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E & fi.E in C);
A4: now
set x = the Element of A1;
reconsider x as Ordinal;
assume A1 in A2;
then consider D such that
A5: D in dom fi and
A6: for A st D c= A & A in dom fi holds A1 in fi.A & fi.A in succ A2
by A3,ORDINAL1:6;
now
assume A1 = {};
then consider B such that
A7: B in dom fi and
A8: for C st B c= C & C in dom fi holds fi.C = {} by A2;
B c= D or D c= B;
then consider E being Ordinal such that
A9: E = D & B c= D or E = B & D c= B;
fi.E = {} by A5,A7,A8,A9;
hence contradiction by A5,A6,A7,A9;
end;
then consider C such that
A10: C in dom fi and
A11: for A st C c= A & A in dom fi holds x in fi.A & fi.A in succ A1
by A2,ORDINAL1:6;
C c= D or D c= C;
then consider E being Ordinal such that
A12: E = D & C c= D or E = C & D c= C;
fi.E in succ A1 by A5,A10,A11,A12;
then
A13: fi.E in A1 or fi.E = A1 by ORDINAL1:8;
A1 in fi.E by A5,A6,A10,A12;
hence contradiction by A13;
end;
set x = the Element of A2;
reconsider x as Ordinal;
assume A1 <> A2;
then A1 in A2 or A2 in A1 by ORDINAL1:14;
then consider D such that
A14: D in dom fi and
A15: for A st D c= A & A in dom fi holds A2 in fi.A & fi.A in succ A1
by A2,A4,ORDINAL1:6;
now
assume A2 = {};
then consider B such that
A16: B in dom fi and
A17: for C st B c= C & C in dom fi holds fi.C = {} by A3;
B c= D or D c= B;
then consider E being Ordinal such that
A18: E = D & B c= D or E = B & D c= B;
fi.E = {} by A14,A16,A17,A18;
hence contradiction by A14,A15,A16,A18;
end;
then consider C such that
A19: C in dom fi and
A20: for A st C c= A & A in dom fi holds x in fi.A & fi.A in succ A2
by A3,ORDINAL1:6;
C c= D or D c= C;
then consider E being Ordinal such that
A21: E = D & C c= D or E = C & D c= C;
fi.E in succ A2 by A14,A19,A20,A21;
then
A22: fi.E in A2 or fi.E = A2 by ORDINAL1:8;
A2 in fi.E by A14,A15,A19,A21;
hence contradiction by A22;
end;
end;
definition
let A,fi;
func lim(A,fi) -> Ordinal equals
lim(fi|A);
correctness;
end;
definition
let L be Ordinal-Sequence;
attr L is increasing means
for A,B st A in B & B in dom L holds L.A in L.B;
attr L is continuous means
for A,B st A in dom L & A <> {} & A is
limit_ordinal & B = L.A holds B is_limes_of L|A;
end;
definition
let A,B;
func A +^ B -> Ordinal means
:Def14:
ex fi st it = last fi & dom fi = succ B
& fi.{} = A & (for C st succ C in succ B holds fi.succ C = succ(fi.C)) & for C
st C in succ B & C <> {} & C is limit_ordinal holds fi.C = sup(fi|C);
correctness
proof
deffunc D(Ordinal,T-Sequence) = sup $2;
deffunc C(Ordinal,Ordinal) = succ $2;
(ex F being Ordinal,fi st F = last fi & dom fi = succ B & fi.{} = A &
(for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B
& C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st (ex fi
st A1 = last fi & dom fi = succ B & fi.{} = A & (for C st succ C in succ B
holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is
limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ
B & fi.{} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C
st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) holds A1
= A2 from OSDef;
hence thesis;
end;
end;
definition
let A,B;
func A *^ B -> Ordinal means
:Def15:
ex fi st it = last fi & dom fi = succ A
& fi.{} = {} & (for C st succ C in succ A holds fi.succ C = (fi.C)+^B) & for C
st C in succ A & C <> {} & C is limit_ordinal holds fi.C = union sup(fi|C);
correctness
proof
deffunc D(Ordinal,Ordinal-Sequence) = union sup $2;
deffunc C(Ordinal,Ordinal) = $2+^B;
(ex F being Ordinal,fi st F = last fi & dom fi = succ A & fi.{} = {} &
(for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A
& C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st (ex fi
st A1 = last fi & dom fi = succ A & fi.{} = {} & (for C st succ C in succ A
holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is
limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ
A & fi.{} = {} & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for
C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) holds
A1 = A2 from OSDef;
hence thesis;
end;
end;
registration
let O be Ordinal;
cluster -> ordinal for Element of O;
coherence;
end;
definition
let A,B;
func exp(A,B) -> Ordinal means
:Def16:
ex fi st it = last fi & dom fi = succ
B & fi.{} = 1 & (for C st succ C in succ B holds fi.succ C = A*^(fi.C)) & for C
st C in succ B & C <> {} & C is limit_ordinal holds fi.C = lim(fi|C);
correctness
proof
deffunc D(Ordinal,Ordinal-Sequence) = lim $2;
deffunc C(Ordinal,Ordinal) = A*^$2;
(ex F being Ordinal,fi st F = last fi & dom fi = succ B & fi.{} = 1 &
(for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B
& C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st (ex fi
st A1 = last fi & dom fi = succ B & fi.{} = 1 & (for C st succ C in succ B
holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is
limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ
B & fi.{} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C
st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) holds A1
= A2 from OSDef;
hence thesis;
end;
end;
theorem Th27:
A+^{} = A
proof
deffunc C(Ordinal,Ordinal) = succ $2;
deffunc D(Ordinal,T-Sequence) = sup $2;
deffunc F(Ordinal) = A+^$1;
A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def14;
thus F({}) = A from OSResult0(A1);
end;
theorem Th28:
A+^succ B = succ(A+^B)
proof
deffunc C(Ordinal,Ordinal) = succ $2;
deffunc D(Ordinal,T-Sequence) = sup $2;
deffunc F(Ordinal) = A+^$1;
A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def14;
for B holds F(succ B) = C(B,F(B)) from OSResultS(A1);
hence thesis;
end;
theorem Th29:
B <> {} & B is limit_ordinal implies for fi st dom fi = B & for
C st C in B holds fi.C = A+^C holds A+^B = sup fi
proof
deffunc C(Ordinal,Ordinal) = succ $2;
deffunc D(Ordinal,Ordinal-Sequence) = sup $2;
assume
A1: B <> {} & B is limit_ordinal;
deffunc F(Ordinal) = A+^$1;
let fi such that
A2: dom fi = B and
A3: for C st C in B holds fi.C = F(C);
A4: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def14;
thus F(B) = D(B,fi) from OSResultL(A4,A1,A2,A3);
end;
theorem Th30:
{}+^A = A
proof
defpred P[Ordinal] means {}+^$1 = $1;
A1: for A holds P[A] implies P[succ A] by Th28;
A2: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds
P[A]
proof
deffunc F(Ordinal) = {}+^$1;
let A;
assume that
A3: A <> {} & A is limit_ordinal and
A4: for B st B in A holds {}+^B = B;
consider fi such that
A5: dom fi = A & for B st B in A holds fi.B = F(B) from OSLambda;
A6: rng fi = A
proof
thus x in rng fi implies x in A
proof
assume x in rng fi;
then consider y such that
A7: y in dom fi and
A8: x = fi.y by FUNCT_1:def 3;
reconsider y as Ordinal by A7;
x = {}+^y by A5,A7,A8
.= y by A4,A5,A7;
hence thesis by A5,A7;
end;
let x;
assume
A9: x in A;
then reconsider B = x as Ordinal;
{}+^B = B & fi.B = {}+^B by A4,A5,A9;
hence thesis by A5,A9,FUNCT_1:def 3;
end;
{}+^A = sup fi by A3,A5,Th29
.= sup rng fi;
hence thesis by A6,Th18;
end;
A10: P[{}] by Th27;
for A holds P[A] from OrdinalInd(A10,A1,A2);
hence thesis;
end;
Lm1: 1 = succ {};
theorem
A+^1 = succ A
proof
thus A+^1 = succ(A+^{}) by Lm1,Th28
.= succ A by Th27;
end;
theorem Th32:
A in B implies C +^ A in C +^ B
proof
defpred P[Ordinal] means A in $1 implies C +^ A in C +^ $1;
A1: for B st for D st D in B holds P[D] holds P[B]
proof
let B such that
A2: for D st D in B holds A in D implies C +^ A in C +^ D and
A3: A in B;
A4: now
given D such that
A5: B = succ D;
A6: now
assume A in D;
then
A7: C +^ A in C +^ D by A2,A5,ORDINAL1:6;
succ(C +^ D) = C +^ succ D & C +^ D in succ(C +^ D) by Th28,ORDINAL1:6
;
hence thesis by A5,A7,ORDINAL1:10;
end;
now
assume
A8: not A in D;
A c< D iff A c= D & A <> D by XBOOLE_0:def 8;
then C +^ A in succ(C +^ D) by A3,A5,A8,ORDINAL1:11,22;
hence thesis by A5,Th28;
end;
hence thesis by A6;
end;
now
deffunc F(Ordinal) = C+^$1;
consider fi such that
A9: dom fi = B & for D st D in B holds fi.D = F(D) from OSLambda;
fi.A = C+^A by A3,A9;
then
A10: C+^A in rng fi by A3,A9,FUNCT_1:def 3;
assume for D holds B <> succ D;
then B is limit_ordinal by ORDINAL1:29;
then C+^B = sup fi by A3,A9,Th29
.= sup rng fi;
hence thesis by A10,Th19;
end;
hence thesis by A4;
end;
for B holds P[B] from ORDINAL1:sch 2(A1);
hence thesis;
end;
theorem Th33:
A c= B implies C +^ A c= C +^ B
proof
assume
A1: A c= B;
now
assume A <> B;
then A c< B by A1,XBOOLE_0:def 8;
then C +^ A in C +^ B by Th32,ORDINAL1:11;
hence thesis by ORDINAL1:def 2;
end;
hence thesis;
end;
theorem Th34:
A c= B implies A +^ C c= B +^ C
proof
defpred P[Ordinal] means A +^ $1 c= B +^ $1;
assume
A1: A c= B;
A2: for C st for D st D in C holds P[D] holds P[C]
proof
let C such that
A3: for D st D in C holds A +^ D c= B +^ D;
A4: now
given D such that
A5: C = succ D;
A6: B +^ C = succ(B +^ D) by A5,Th28;
A +^ D c= B +^ D & A +^ C = succ(A +^ D) by A3,A5,Th28,ORDINAL1:6;
hence thesis by A6,Th1;
end;
A7: now
deffunc F(Ordinal) = A+^$1;
assume that
A8: C <> {} and
A9: for D holds C <> succ D;
consider fi such that
A10: dom fi = C & for D st D in C holds fi.D = F(D) from OSLambda;
A11: now
let D;
assume D in rng fi;
then consider x such that
A12: x in dom fi and
A13: D = fi.x by FUNCT_1:def 3;
reconsider x as Ordinal by A12;
A14: B +^ x in B +^ C by A10,A12,Th32;
D = A+^x & A +^ x c= B +^ x by A3,A10,A12,A13;
hence D in B +^ C by A14,ORDINAL1:12;
end;
C is limit_ordinal by A9,ORDINAL1:29;
then A+^C = sup fi by A8,A10,Th29
.= sup rng fi;
hence thesis by A11,Th20;
end;
now
assume
A15: C = {};
then A +^ C = A by Th27;
hence thesis by A1,A15,Th27;
end;
hence thesis by A4,A7;
end;
for C holds P[C] from ORDINAL1:sch 2(A2);
hence thesis;
end;
theorem Th35:
{}*^A = {}
proof
deffunc D(Ordinal,T-Sequence) = union sup $2;
deffunc F(Ordinal) = $1*^A;
deffunc C(Ordinal,Ordinal) = $2+^A;
A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = {} & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def15;
thus F({}) = {} from OSResult0(A1);
end;
theorem Th36:
(succ B)*^A = B*^A +^ A
proof
deffunc D(Ordinal,T-Sequence) = union sup $2;
deffunc F(Ordinal) = $1*^A;
deffunc C(Ordinal,Ordinal) = $2 +^ A;
A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = {} & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def15;
for B holds F(succ B) = C(B,F(B)) from OSResultS(A1);
hence thesis;
end;
theorem Th37:
B <> {} & B is limit_ordinal implies for fi st dom fi = B & for
C st C in B holds fi.C = C*^A holds B*^A = union sup fi
proof
deffunc D(Ordinal,Ordinal-Sequence) = union sup $2;
assume
A1: B <> {} & B is limit_ordinal;
deffunc C(Ordinal,Ordinal) = $2+^A;
deffunc F(Ordinal) = $1*^A;
let fi such that
A2: dom fi = B and
A3: for C st C in B holds fi.C = F(C);
A4: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = {} & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def15;
thus F(B) = D(B,fi) from OSResultL(A4,A1,A2,A3);
end;
theorem Th38:
A*^{} = {}
proof
defpred P[Ordinal] means $1*^{} = {};
A1: for A st P[A] holds P[succ A]
proof
let A;
assume A*^{} = {};
hence (succ A)*^{} = {}+^{} by Th36
.= {} by Th27;
end;
A2: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds
P[A]
proof
deffunc F(Ordinal) = $1*^{};
let A;
assume that
A3: A <> {} and
A4: A is limit_ordinal and
A5: for B st B in A holds B*^{} = {};
consider fi such that
A6: dom fi = A & for B st B in A holds fi.B = F(B) from OSLambda;
rng fi = succ {}
proof
thus x in rng fi implies x in succ {}
proof
assume x in rng fi;
then consider y such that
A7: y in dom fi and
A8: x = fi.y by FUNCT_1:def 3;
reconsider y as Ordinal by A7;
x = y*^{} by A6,A7,A8
.= {} by A5,A6,A7;
hence thesis by TARSKI:def 1;
end;
let x;
assume x in succ {};
then
A9: x = {} by TARSKI:def 1;
{} c= A;
then
A10: {} c< A by A3,XBOOLE_0:def 8;
then
A11: {} in A by ORDINAL1:11;
{} *^ {} = {} by Th35;
then fi.x = x by A6,A10,A9,ORDINAL1:11;
hence thesis by A6,A11,A9,FUNCT_1:def 3;
end;
then
A12: sup rng fi = succ {} by Th18;
A*^{} = union sup fi by A3,A4,A6,Th37
.= union sup rng fi;
hence thesis by A12,Th2;
end;
A13: P[{}] by Th35;
for A holds P[A] from OrdinalInd(A13,A1,A2);
hence thesis;
end;
theorem Th39:
1*^A = A & A*^1 = A
proof
defpred P[Ordinal] means $1*^succ {} = $1;
thus 1*^A = {}*^A +^ A by Lm1,Th36
.= {} +^ A by Th35
.= A by Th30;
A1: for A st for B st B in A holds P[B] holds P[A]
proof
let A such that
A2: for B st B in A holds B*^(succ {}) = B;
A3: now
deffunc F(Ordinal) = $1*^succ {};
assume that
A4: A <> {} and
A5: for B holds A <> succ B;
consider fi such that
A6: dom fi = A & for D st D in A holds fi.D = F(D) from OSLambda;
A7: A = rng fi
proof
thus A c= rng fi
proof
let x;
assume
A8: x in A;
then reconsider B = x as Ordinal;
x = B*^succ {} by A2,A8
.= fi.x by A6,A8;
hence thesis by A6,A8,FUNCT_1:def 3;
end;
let x;
assume x in rng fi;
then consider y such that
A9: y in dom fi and
A10: x = fi.y by FUNCT_1:def 3;
reconsider y as Ordinal by A9;
fi.y = y*^succ {} by A6,A9
.= y by A2,A6,A9;
hence thesis by A6,A9,A10;
end;
A11: A is limit_ordinal by A5,ORDINAL1:29;
then A*^succ {} = union sup fi by A4,A6,Th37
.= union sup rng fi;
hence A*^succ {} = union A by A7,Th18
.= A by A11,ORDINAL1:def 6;
end;
now
given B such that
A12: A = succ B;
thus A*^(succ {}) = B*^(succ {}) +^ succ {} by A12,Th36
.= B +^ succ {} by A2,A12,ORDINAL1:6
.= succ(B +^ {}) by Th28
.= A by A12,Th27;
end;
hence thesis by A3,Th35;
end;
for A holds P[A] from ORDINAL1:sch 2(A1);
hence thesis;
end;
theorem Th40:
C <> {} & A in B implies A*^C in B*^C
proof
A1: {} c= C;
defpred P[Ordinal] means A in $1 implies A*^C in $1*^C;
assume C <> {};
then
A2: {} c< C by A1,XBOOLE_0:def 8;
then
A3: {} in C by ORDINAL1:11;
A4: for B st for D st D in B holds P[D] holds P[B]
proof
let B such that
A5: for D st D in B holds A in D implies A *^ C in D *^ C and
A6: A in B;
A7: now
given D such that
A8: B = succ D;
A9: now
assume A in D;
then
A10: A*^C in D*^C by A5,A8,ORDINAL1:6;
A11: D*^C +^ {} in D*^C +^ C by A2,Th32,ORDINAL1:11;
D*^C +^ C = (succ D)*^C & D*^C +^ {} = D*^C by Th27,Th36;
hence thesis by A8,A10,A11,ORDINAL1:10;
end;
now
A12: A*^C +^ {} = A*^C by Th27;
assume
A13: not A in D;
A c< D iff A c= D & A <> D by XBOOLE_0:def 8;
then A*^C +^ {} in D*^C +^ C by A3,A6,A8,A13,Th32,ORDINAL1:11,22;
hence thesis by A8,A12,Th36;
end;
hence thesis by A9;
end;
now
A14: A*^C +^ {} = A*^C & A*^C +^ {} in A*^C +^ C by A2,Th27,Th32,ORDINAL1:11;
A15: (succ A)*^C = A*^C +^ C by Th36;
deffunc F(Ordinal) = $1*^C;
consider fi such that
A16: dom fi = B & for D st D in B holds fi.D = F(D) from OSLambda;
assume for D holds B <> succ D;
then
A17: B is limit_ordinal by ORDINAL1:29;
then
A18: succ A in B by A6,ORDINAL1:28;
then fi.(succ A) = (succ A)*^C by A16;
then (succ A)*^C in rng fi by A16,A18,FUNCT_1:def 3;
then
A19: (succ A)*^C c= union sup rng fi by Th19,ZFMISC_1:74;
B*^C = union sup fi by A6,A17,A16,Th37
.= union sup rng fi;
hence thesis by A19,A14,A15;
end;
hence thesis by A7;
end;
for B holds P[B] from ORDINAL1:sch 2(A4);
hence thesis;
end;
theorem
A c= B implies A*^C c= B*^C
proof
assume
A1: A c= B;
A2: now
assume
A3: C <> {};
now
assume A <> B;
then A c< B by A1,XBOOLE_0:def 8;
then A*^C in B*^C by A3,Th40,ORDINAL1:11;
hence thesis by ORDINAL1:def 2;
end;
hence thesis;
end;
now
assume C = {};
then A*^C = {} by Th38;
hence thesis;
end;
hence thesis by A2;
end;
theorem
A c= B implies C*^A c= C*^B
proof
assume
A1: A c= B;
now
defpred P[Ordinal] means $1*^A c= $1*^B;
assume
A2: B <> {};
A3: for C st for D st D in C holds P[D] holds P[C]
proof
let C such that
A4: for D st D in C holds D*^A c= D*^B;
A5: now
given D such that
A6: C = succ D;
D*^A c= D*^B by A4,A6,ORDINAL1:6;
then
A7: D*^A +^ A c= D*^B +^ A by Th34;
A8: C*^A = D*^A +^ A & C*^B = D*^B +^ B by A6,Th36;
D*^B +^ A c= D*^B +^ B by A1,Th33;
hence thesis by A7,A8,XBOOLE_1:1;
end;
A9: now
deffunc F(Ordinal) = $1*^A;
assume that
A10: C <> {} and
A11: for D holds C <> succ D;
consider fi such that
A12: dom fi = C & for D st D in C holds fi.D = F(D) from OSLambda;
now
let D;
assume D in rng fi;
then consider x such that
A13: x in dom fi and
A14: D = fi.x by FUNCT_1:def 3;
reconsider x as Ordinal by A13;
A15: x*^B in C*^B by A2,A12,A13,Th40;
D = x*^A & x*^A c= x*^B by A4,A12,A13,A14;
hence D in C*^B by A15,ORDINAL1:12;
end;
then
A16: sup rng fi c= C*^B by Th20;
C is limit_ordinal by A11,ORDINAL1:29;
then
A17: C*^A = union sup fi by A10,A12,Th37
.= union sup rng fi;
union sup rng fi c= sup rng fi by Th5;
hence thesis by A17,A16,XBOOLE_1:1;
end;
now
assume C = {};
then C*^A = {} by Th35;
hence thesis;
end;
hence thesis by A5,A9;
end;
for C holds P[C] from ORDINAL1:sch 2(A3);
hence thesis;
end;
hence thesis by A1;
end;
theorem Th43:
exp(A,{}) = 1
proof
deffunc D(Ordinal,Ordinal-Sequence) = lim $2;
deffunc F(Ordinal) = exp(A,$1);
deffunc C(Ordinal,Ordinal) = A*^$2;
A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def16;
thus F({}) = 1 from OSResult0(A1);
end;
theorem Th44:
exp(A,succ B) = A*^exp(A,B)
proof
deffunc D(Ordinal,Ordinal-Sequence) = lim $2;
deffunc F(Ordinal) = exp(A,$1);
deffunc C(Ordinal,Ordinal) = A *^ $2;
A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def16;
for B holds F(succ B) = C(B,F(B)) from OSResultS(A1);
hence thesis;
end;
theorem Th45:
B <> {} & B is limit_ordinal implies for fi st dom fi = B & for
C st C in B holds fi.C = exp(A,C) holds exp(A,B) = lim fi
proof
deffunc D(Ordinal,Ordinal-Sequence) = lim $2;
assume
A1: B <> {} & B is limit_ordinal;
deffunc C(Ordinal,Ordinal) = A*^$2;
deffunc F(Ordinal) = exp(A,$1);
let fi such that
A2: dom fi = B and
A3: for C st C in B holds fi.C = F(C);
A4: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi.
{} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C
in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def16;
thus F(B) = D(B,fi) from OSResultL(A4,A1,A2,A3);
end;
theorem
exp(A,1) = A & exp(1,A) = 1
proof
defpred P[Ordinal] means exp(1,$1) = 1;
A1: for A st P[A] holds P[succ A]
proof
let A;
assume exp(1,A) = 1;
hence exp(1,succ A) = 1*^1 by Th44
.= 1 by Th39;
end;
thus exp(A,1) = A*^exp(A,{}) by Lm1,Th44
.= A*^1 by Th43
.= A by Th39;
A2: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds
P[A]
proof
deffunc F(Ordinal) = exp(1,$1);
let A such that
A3: A <> {} and
A4: A is limit_ordinal and
A5: for B st B in A holds exp(1,B) = 1;
consider fi such that
A6: dom fi = A & for B st B in A holds fi.B = F(B) from OSLambda;
A7: rng fi c= { 1 }
proof
let x;
assume x in rng fi;
then consider y such that
A8: y in dom fi and
A9: x = fi.y by FUNCT_1:def 3;
reconsider y as Ordinal by A8;
x = exp(1,y) by A6,A8,A9
.= 1 by A5,A6,A8;
hence thesis by TARSKI:def 1;
end;
now
set x = the Element of A;
thus {} <> 1;
let B,C such that
A10: B in 1 & 1 in C;
reconsider x as Ordinal;
take D = x;
thus D in dom fi by A3,A6;
let E be Ordinal;
assume that
D c= E and
A11: E in dom fi;
fi.E in rng fi by A11,FUNCT_1:def 3;
hence B in fi.E & fi.E in C by A7,A10,TARSKI:def 1;
end;
then
A12: 1 is_limes_of fi by Def9;
exp(1,A) = lim fi by A3,A4,A6,Th45;
hence thesis by A12,Def10;
end;
A13: P[{}] by Th43;
for A holds P[A] from OrdinalInd(A13,A1,A2);
hence thesis;
end;
theorem
for A ex B,C st B is limit_ordinal & C is natural & A = B +^ C
proof
defpred Th[Ordinal] means ex B,C st B is limit_ordinal & C is natural & $1 =
B +^ C;
A1: for A st for B st B in A holds Th[B] holds Th[A]
proof
let A such that
A2: for B st B in A holds Th[B];
A3: (ex B st A = succ B) implies Th[A]
proof
given B such that
A4: A = succ B;
consider C,D such that
A5: C is limit_ordinal and
A6: D is natural and
A7: B = C +^ D by A2,A4,ORDINAL1:6;
take C, E = succ D;
thus C is limit_ordinal by A5;
thus E in omega by A6,ORDINAL1:def 12;
thus thesis by A4,A7,Th28;
end;
(for B holds A <> succ B) implies Th[A]
proof
assume
A8: for D holds A <> succ D;
take B = A, C = {};
thus B is limit_ordinal by A8,ORDINAL1:29;
thus C in omega by ORDINAL1:def 11;
thus thesis by Th27;
end;
hence thesis by A3;
end;
thus for A holds Th[A] from ORDINAL1:sch 2(A1);
end;
registration
let X be set, o be Ordinal;
cluster X --> o -> Ordinal-yielding;
coherence
proof
rng(X --> o) c= {o} & {o} c= succ o by FUNCOP_1:13,XBOOLE_1:7;
then rng(X --> o) c= succ o by XBOOLE_1:1;
hence thesis by Def4;
end;
end;
registration
let O be Ordinal, x be set;
cluster O --> x -> T-Sequence-like;
coherence
proof
dom(O --> x) = O by FUNCOP_1:13;
hence thesis by ORDINAL1:def 7;
end;
end;
definition
let A,B be Ordinal;
pred A is_cofinal_with B means
ex xi being Ordinal-Sequence st dom xi = B &
rng xi c= A & xi is increasing & A = sup xi;
reflexivity
proof
let A;
A1: dom id A = A by RELAT_1:45;
then reconsider xi = id A as T-Sequence by ORDINAL1:def 7;
A2: rng id A = A by RELAT_1:45;
then reconsider xi as Ordinal-Sequence by Def4;
take xi;
thus dom xi = A & rng xi c= A by RELAT_1:45;
thus xi is increasing
proof
let B,C;
assume that
A3: B in C and
A4: C in dom xi;
xi.C = C by A1,A4,FUNCT_1:18;
hence thesis by A1,A3,A4,FUNCT_1:18,ORDINAL1:10;
end;
thus thesis by A2,Th18;
end;
end;
reserve e,u for set;
theorem Th48:
e in rng psi implies e is Ordinal
proof
assume e in rng psi;
then ex u st u in dom psi & e = psi.u by FUNCT_1:def 3;
hence thesis;
end;
theorem
rng psi c= sup psi
proof
let e;
assume
A1: e in rng psi;
then e is Ordinal by Th48;
hence thesis by A1,Th19;
end;
theorem
A is_cofinal_with {} implies A = {}
proof
given psi such that
A1: dom psi = {} and
rng psi c= A and
psi is increasing and
A2: A = sup psi;
thus A = sup {} by A1,A2,RELAT_1:42
.= {} by Th18;
end;
scheme
OmegaInd {a()-> Nat, P[set]}:
P[a()]
provided
A1: P[{}] and
A2: for a being Nat st P[a] holds P[succ a]
proof
defpred P[Ordinal] means $1 is natural implies P[$1];
A3: now
let A;
assume
A4: P[A];
now
assume succ A is natural;
then
A5: succ A in omega by ORDINAL1:def 12;
A in succ A by ORDINAL1:6;
then A is Element of omega by A5,ORDINAL1:10;
hence P[succ A] by A2,A4;
end;
hence P[succ A];
end;
A6: now
let A;
assume
A7: A <> {};
{} c= A;
then {} c< A by A7,XBOOLE_0:def 8;
then
A8: {} in A by ORDINAL1:11;
A9: not A in A;
assume A is limit_ordinal;
then omega c= A by A8,ORDINAL1:def 11;
then not A in omega by A9;
hence (for B st B in A holds P[B]) implies P[A] by ORDINAL1:def 12;
end;
A10: P[{}] by A1;
for A holds P[A] from OrdinalInd(A10,A3,A6);
hence thesis;
end;
registration
let a, b be Nat;
cluster a +^ b -> natural;
coherence
proof
defpred P[Nat] means a+^$1 is natural;
A1: now
let b be Nat;
assume P[b];
then reconsider c = a+^b as Nat;
a+^succ b = succ c by Th28;
hence P[succ b];
end;
A2: P[{}] by Th27;
thus P[b] from OmegaInd(A2,A1);
end;
end;
registration
let x,y be set, a,b be Nat;
cluster IFEQ(x,y,a,b) -> natural;
coherence
proof
per cases;
suppose
x = y;
hence thesis by FUNCOP_1:def 8;
end;
suppose
x <> y;
hence thesis by FUNCOP_1:def 8;
end;
end;
end;
scheme LambdaRecEx{A() -> set,G(set,set) -> set}:
ex f being Function st dom f = omega & f.{} = A() &
for n being Nat holds f.succ n = G(n,f.n)
proof
deffunc D(set,set) = {};
consider L being T-Sequence such that
A1: dom L = omega and
A2: {} in omega implies L.{} = A() and
A3: for A being Ordinal st succ A in omega holds L.(succ A) = G(A,L.A) and
for A being Ordinal st A in omega & A <> {} & A is limit_ordinal holds L.A
= D(A,L|A) from TSExist1;
take L;
thus dom L = omega by A1;
{} in omega by ORDINAL1:def 12;
hence L.{} = A() by A2;
let n be Nat;
succ n in omega by ORDINAL1:def 12;
hence thesis by A3;
end;
reserve n for Nat;
scheme RecUn{A() -> set, F, G() -> Function, P[set,set,set]}:
F() = G()
provided
A1: dom F() = omega and
A2: F().{} = A() and
A3: for n holds P[n,F().n,F().(succ n)] and
A4: dom G() = omega and
A5: G().{} = A() and
A6: for n holds P[n,G().n,G().(succ n)] and
A7: for n for x,y1,y2 being set st P[n,x,y1] & P[n,x,y2] holds y1 = y2
proof
defpred P[Nat] means F().$1 = G().$1;
A8: for n st P[n] holds P[succ n]
proof
let n;
assume F().n = G().n;
then
A9: P[n,F().n,G().(succ n)] by A6;
P[n,F().n,F().(succ n)] by A3;
hence thesis by A7,A9;
end;
A10: P[{}] by A2,A5;
for n holds P[n] proof let n;
thus thesis from OmegaInd(A10,A8);
end;
then for x st x in omega holds F().x = G().x;
hence thesis by A1,A4,FUNCT_1:2;
end;
scheme LambdaRecUn{A() -> set, F(set,set) -> set, F, G() -> Function}:
F() = G()
provided
A1: dom F() = omega and
A2: F().{} = A() and
A3: for n holds F().(succ n) = F(n,F().n) and
A4: dom G() = omega and
A5: G().{} = A() and
A6: for n holds G().(succ n) = F(n,G().n)
proof
defpred P[Nat,set,set] means $3=F($1,$2);
A7: for n holds P[n,G().n,G().(succ n)] by A6;
A8: for n being Nat,x,y1,y2 being set st P[n,x,y1] & P[n,x,y2]
holds y1=y2;
A9: for n holds P[n,F().n,F().(succ n)] by A3;
thus F() = G() from RecUn(A1,A2,A9,A4,A5,A7,A8);
end;
begin
reserve fi,psi for Ordinal-Sequence,
A,B,C,D for Ordinal,
X,Y for set,
x,y for set;
theorem
X c= succ X by XBOOLE_1:7;
theorem
succ X c= Y implies X c= Y
proof
X c= succ X by XBOOLE_1:7;
hence thesis by XBOOLE_1:1;
end;
theorem
A in B iff succ A in succ B
proof
A in B iff succ A c= B by ORDINAL1:21;
hence thesis by ORDINAL1:22;
end;
theorem
X c= A implies union X is Ordinal
proof
assume X c= A;
then for x st x in X holds x is Ordinal;
hence thesis by ORDINAL1:23;
end;
theorem Th5:
union On X is Ordinal
proof
x in On X implies x is Ordinal by ORDINAL1:def 9;
hence thesis by ORDINAL1:23;
end;
theorem Th6:
X c= A implies On X = X
proof
defpred P[set] means $1 in X & $1 is Ordinal;
assume X c= A;
then
A1: x in X iff P[x];
A2: x in On X iff P[x] by ORDINAL1:def 9;
thus thesis from XBOOLE_0:sch 2(A2,A1);
end;
theorem Th7:
On {A} = {A}
proof
{A} c= succ A by XBOOLE_1:7;
hence thesis by Th6;
end;
theorem Th8:
A <> {} implies {} in A
proof
A1: {} c= A by XBOOLE_1:2;
assume A <> {};
then {} c< A by A1,XBOOLE_0:def 8;
hence thesis by ORDINAL1:11;
end;
theorem
inf A = {}
proof
A1: inf A = meet A by ORDINAL2:8;
then A <> {} implies thesis by Th8,SETFAM_1:4;
hence thesis by A1,SETFAM_1:def 1;
end;
theorem
inf {A} = A
proof
thus inf {A} = meet {A} by Th7
.= A by SETFAM_1:10;
end;
theorem
X c= A implies meet X is Ordinal
proof
assume X c= A;
then inf X = meet X by Th6;
hence thesis;
end;
registration
let A,B;
cluster A \/ B -> ordinal;
coherence
proof
A c= B or B c= A;
hence thesis by XBOOLE_1:12;
end;
cluster A /\ B -> ordinal;
coherence
proof
A c= B or B c= A;
hence thesis by XBOOLE_1:28;
end;
end;
theorem
A \/ B = A or A \/ B = B
proof
A c= B or B c= A;
hence thesis by XBOOLE_1:12;
end;
theorem
A /\ B = A or A /\ B = B
proof
A c= B or B c= A;
hence thesis by XBOOLE_1:28;
end;
Lm1: 1 = succ {};
theorem Th14:
A in 1 implies A = {}
proof
assume A in 1;
hence A c= {} & {} c= A by Lm1,ORDINAL1:22,XBOOLE_1:2;
end;
theorem
1 = {{}} by Lm1;
theorem Th16:
A c= 1 implies A = {} or A = 1
proof
assume that
A1: A c= 1 and
A2: A <> {} and
A3: A <> 1;
A c< 1 by A1,A3,XBOOLE_0:def 8;
hence contradiction by A2,Th14,ORDINAL1:11;
end;
theorem
(A c= B or A in B) & C in D implies A+^C in B+^D
proof
assume that
A1: A c= B or A in B and
A2: C in D;
A3: B+^C in B+^D by A2,ORDINAL2:32;
A c= B by A1,ORDINAL1:def 2;
hence thesis by A3,ORDINAL1:12,ORDINAL2:34;
end;
theorem
A c= B & C c= D implies A+^C c= B+^D
proof
assume that
A1: A c= B and
A2: C c= D;
A3: B+^C c= B+^D by A2,ORDINAL2:33;
A+^C c= B+^C by A1,ORDINAL2:34;
hence thesis by A3,XBOOLE_1:1;
end;
theorem Th19:
A in B & (C c= D & D <> {} or C in D) implies A*^C in B*^D
proof
assume that
A1: A in B and
A2: C c= D & D <> {} or C in D;
A3: C c= D by A2,ORDINAL1:def 2;
A*^D in B*^D by A1,A2,ORDINAL2:40;
hence thesis by A3,ORDINAL1:12,ORDINAL2:42;
end;
theorem
A c= B & C c= D implies A*^C c= B*^D
proof
assume that
A1: A c= B and
A2: C c= D;
A3: B*^C c= B*^D by A2,ORDINAL2:42;
A*^C c= B*^C by A1,ORDINAL2:41;
hence thesis by A3,XBOOLE_1:1;
end;
theorem Th21:
B+^C = B+^D implies C = D
proof
assume that
A1: B+^C = B+^D and
A2: C <> D;
C in D or D in C by A2,ORDINAL1:14;
then B+^C in B+^C by A1,ORDINAL2:32;
hence contradiction;
end;
theorem Th22:
B+^C in B+^D implies C in D
proof
assume that
A1: B+^C in B+^D and
A2: not C in D;
D c= C by A2,ORDINAL1:16;
hence contradiction by A1,ORDINAL1:5,ORDINAL2:33;
end;
theorem Th23:
B+^C c= B+^D implies C c= D
proof
assume
A1: B+^C c= B+^D;
B+^C c= B+^D & B+^C <> B+^D iff B+^C c< B+^D by XBOOLE_0:def 8;
then C = D or C in D by A1,Th21,Th22,ORDINAL1:11;
hence thesis by ORDINAL1:def 2;
end;
theorem Th24:
A c= A+^B & B c= A+^B
proof
A1: {}+^B c= A+^B by ORDINAL2:34,XBOOLE_1:2;
A+^{} c= A+^B by ORDINAL2:33,XBOOLE_1:2;
hence thesis by A1,ORDINAL2:27,30;
end;
theorem
A in B implies A in B+^C & A in C+^B
proof
assume
A1: A in B;
A2: B c= C+^B by Th24;
B c= B+^C by Th24;
hence thesis by A1,A2;
end;
theorem Th26:
A+^B = {} implies A = {} & B = {}
proof
assume
A1: A+^B = {};
then
A2: B c= {} by Th24;
A c= {} by A1,Th24;
hence thesis by A2,XBOOLE_1:3;
end;
theorem Th27:
A c= B implies ex C st B = A+^C
proof
defpred P[Ordinal] means A c= $1 implies ex C st $1 = A+^C;
A1: for B st P[B] holds P[succ B]
proof
let B such that
A2: A c= B implies ex C st B = A+^C and
A3: A c= succ B;
A4: now
assume A <> succ B;
then A c< succ B by A3,XBOOLE_0:def 8;
then A in succ B by ORDINAL1:11;
then consider C such that
A5: B = A+^C by A2,ORDINAL1:22;
succ B = A+^succ C by A5,ORDINAL2:28;
hence thesis;
end;
A = succ B implies succ B = A+^{} by ORDINAL2:27;
hence thesis by A4;
end;
A6: for B st B <> {} & B is limit_ordinal & for C st C in B holds P[C]
holds P[B]
proof
deffunc F(Ordinal) = A +^ $1;
let B such that
B <> {} and
A7: B is limit_ordinal and
for C st C in B holds A c= C implies ex D st C = A+^D and
A8: A c= B;
defpred P[Ordinal] means B c= A+^$1;
A9: B = {}+^B by ORDINAL2:30;
{}+^B c= A+^B by ORDINAL2:34,XBOOLE_1:2;
then
A10: ex C st P[C] by A9;
consider C such that
A11: P[C] & for D st P[D] holds C c= D from ORDINAL1:sch 1(A10);
consider L being Ordinal-Sequence such that
A12: dom L = C & for D st D in C holds L.D = F(D) from ORDINAL2:sch 3;
A13: now
for D st D in rng L holds D in B
proof
let D;
assume D in rng L;
then consider y such that
A14: y in dom L and
A15: D = L.y by FUNCT_1:def 3;
reconsider y as Ordinal by A14;
A16: not C c= y by A12,A14,ORDINAL1:5;
L.y = A+^y by A12,A14;
hence thesis by A11,A15,A16,ORDINAL1:16;
end;
then
A17: sup rng L c= B by ORDINAL2:20;
A18: C is limit_ordinal
proof
assume not thesis;
then consider D such that
A19: C = succ D by ORDINAL1:29;
not C c= D by A19,ORDINAL1:5,6;
then A+^D in B by A11,ORDINAL1:16;
then
A20: succ(A+^D) c= B by ORDINAL1:21;
succ(A+^D) = A+^succ D by ORDINAL2:28;
then B = succ(A+^D) by A11,A19,A20,XBOOLE_0:def 10;
hence contradiction by A7,ORDINAL1:29;
end;
assume C <> {};
then A+^C = sup L by A12,A18,ORDINAL2:29
.= sup rng L;
then B = A+^C by A11,A17,XBOOLE_0:def 10;
hence thesis;
end;
now
assume C = {};
then A+^C = A by ORDINAL2:27;
hence B = A by A8,A11,XBOOLE_0:def 10
.= A+^{} by ORDINAL2:27;
end;
hence thesis by A13;
end;
A21: P[{}]
proof
assume A c= {};
then A = {} by XBOOLE_1:3;
then {} = A+^{} by ORDINAL2:30;
hence thesis;
end;
for B holds P[B] from ORDINAL2:sch 1(A21,A1,A6);
hence thesis;
end;
theorem Th28:
A in B implies ex C st B = A+^C & C <> {}
proof
assume
A1: A in B;
then A c= B by ORDINAL1:def 2;
then consider C such that
A2: B = A+^C by Th27;
take C;
thus B = A+^C by A2;
assume C = {};
then B = A by A2,ORDINAL2:27;
hence contradiction by A1;
end;
theorem Th29:
A <> {} & A is limit_ordinal implies B+^A is limit_ordinal
proof
assume that
A1: A <> {} and
A2: A is limit_ordinal;
{} c= A by XBOOLE_1:2;
then
A3: {} c< A by A1,XBOOLE_0:def 8;
deffunc F(Ordinal) = B +^ $1;
consider L being Ordinal-Sequence such that
A4: dom L = A & for C st C in A holds L.C = F(C) from ORDINAL2:sch 3;
A5: B+^A = sup L by A1,A2,A4,ORDINAL2:29
.= sup rng L;
for C st C in B+^A holds succ C in B+^A
proof
let C such that
A6: C in B+^A;
A7: now
assume not C in B;
then consider D such that
A8: C = B+^D by Th27,ORDINAL1:16;
now
assume not D in A;
then B+^A c= B+^D by ORDINAL1:16,ORDINAL2:33;
then C in C by A6,A8;
hence contradiction;
end;
then
A9: succ D in A by A2,ORDINAL1:28;
then L.(succ D) = B+^succ D by A4
.= succ(B+^D) by ORDINAL2:28;
then succ C in rng L by A4,A8,A9,FUNCT_1:def 3;
hence thesis by A5,ORDINAL2:19;
end;
now
assume C in B;
then
A10: succ C c= B by ORDINAL1:21;
A11: (succ C)+^{} = succ C by ORDINAL2:27;
B+^{} in B+^A by A3,ORDINAL1:11,ORDINAL2:32;
hence thesis by A10,A11,ORDINAL1:12,ORDINAL2:34;
end;
hence thesis by A7;
end;
hence thesis by ORDINAL1:28;
end;
theorem Th30:
A+^B+^C = A+^(B+^C)
proof
defpred Sigma[Ordinal] means A+^B+^$1 = A+^(B+^$1);
A1: for C st Sigma[C] holds Sigma[succ C]
proof
let C such that
A2: A+^B+^C = A+^(B+^C);
thus A+^B+^succ C = succ(A+^B+^C) by ORDINAL2:28
.= A+^succ(B+^C) by A2,ORDINAL2:28
.= A+^(B+^succ C) by ORDINAL2:28;
end;
A3: for C st C <> {} & C is limit_ordinal & for D st D in C holds Sigma[D]
holds Sigma[C]
proof
deffunc F(Ordinal) = A +^ B +^ $1;
let C such that
A4: C <> {} and
A5: C is limit_ordinal and
A6: for D st D in C holds Sigma[D];
consider L being Ordinal-Sequence such that
A7: dom L = C & for D st D in C holds L.D = F(D) from ORDINAL2:sch 3;
deffunc F(Ordinal) = A +^ $1;
consider L1 being Ordinal-Sequence such that
A8: dom L1 = B+^C & for D st D in B+^C holds L1.D = F(D) from
ORDINAL2:sch 3;
A9: rng L c= rng L1
proof
let x;
assume x in rng L;
then consider y such that
A10: y in dom L and
A11: x = L.y by FUNCT_1:def 3;
reconsider y as Ordinal by A10;
A12: B+^y in B+^C by A7,A10,ORDINAL2:32;
L.y = A+^B+^y by A7,A10;
then
A13: L.y = A+^(B+^y) by A6,A7,A10;
L1.(B+^y) = A+^(B+^y) by A7,A8,A10,ORDINAL2:32;
hence thesis by A8,A11,A13,A12,FUNCT_1:def 3;
end;
A14: B+^C <> {} by A4,Th26;
B+^C is limit_ordinal by A4,A5,Th29;
then
A15: A+^(B+^C) = sup L1 by A8,A14,ORDINAL2:29
.= sup rng L1;
A+^B+^C = sup L by A4,A5,A7,ORDINAL2:29
.= sup rng L;
hence A+^B+^C c= A+^(B+^C) by A15,A9,ORDINAL2:22;
let x;
assume
A16: x in A+^(B+^C);
then reconsider x9 = x as Ordinal;
A17: now
A18: A c= A+^B by Th24;
assume
A19: not x in A+^B;
then A+^B c= x9 by ORDINAL1:16;
then consider E being Ordinal such that
A20: x9 = A+^E by A18,Th27,XBOOLE_1:1;
B c= E by A19,A20,ORDINAL1:16,ORDINAL2:32;
then consider F being Ordinal such that
A21: E = B+^F by Th27;
A22: now
assume not F in C;
then B+^C c= B+^F by ORDINAL1:16,ORDINAL2:33;
then A+^(B+^C) c= A+^(B+^F) by ORDINAL2:33;
then x9 in x9 by A16,A20,A21;
hence contradiction;
end;
then x = A+^B+^F by A6,A20,A21;
hence thesis by A22,ORDINAL2:32;
end;
A23: A+^B+^{} = A+^B by ORDINAL2:27;
A+^B+^{} c= A+^B+^C by ORDINAL2:33,XBOOLE_1:2;
hence thesis by A23,A17;
end;
A+^B+^{} = A+^B by ORDINAL2:27
.= A+^(B+^{}) by ORDINAL2:27;
then
A24: Sigma[{}];
for C holds Sigma[C] from ORDINAL2:sch 1(A24,A1,A3);
hence thesis;
end;
theorem
A*^B = {} implies A = {} or B = {}
proof
assume that
A1: A*^B = {} and
A2: A <> {} and
A3: B <> {};
{} c= A by XBOOLE_1:2;
then {} c< A by A2,XBOOLE_0:def 8;
hence contradiction by A1,A3,ORDINAL1:11,ORDINAL2:40;
end;
theorem
A in B & C <> {} implies A in B*^C & A in C*^B
proof
assume that
A1: A in B and
A2: C <> {};
{} c= C by XBOOLE_1:2;
then {} c< C by A2,XBOOLE_0:def 8;
then {} in C by ORDINAL1:11;
then
A3: 1 c= C by Lm1,ORDINAL1:21;
then
A4: 1*^B c= C*^B by ORDINAL2:41;
A5: 1*^B = B by ORDINAL2:39;
A6: B*^1 = B by ORDINAL2:39;
B*^1 c= B*^C by A3,ORDINAL2:42;
hence thesis by A1,A4,A6,A5;
end;
theorem Th33:
B*^A = C*^A & A <> {} implies B = C
proof
assume that
A1: B*^A = C*^A and
A2: A <> {} and
A3: B <> C;
B in C or C in B by A3,ORDINAL1:14;
then B*^A in B*^A by A1,A2,ORDINAL2:40;
hence contradiction;
end;
theorem Th34:
B*^A in C*^A implies B in C
proof
assume that
A1: B*^A in C*^A and
A2: not B in C;
C c= B by A2,ORDINAL1:16;
hence contradiction by A1,ORDINAL1:5,ORDINAL2:41;
end;
theorem Th35:
B*^A c= C*^A & A <> {} implies B c= C
proof
assume
A1: B*^A c= C*^A;
B*^A c= C*^A & B*^A <> C*^A iff B*^A c< C*^A by XBOOLE_0:def 8;
then (A <> {} implies B = C) or B in C by A1,Th33,Th34,ORDINAL1:11;
hence thesis by ORDINAL1:def 2;
end;
theorem Th36:
B <> {} implies A c= A*^B & A c= B*^A
proof
assume B <> {};
then {} in B by Th8;
then
A1: 1 c= B by Lm1,ORDINAL1:21;
then
A2: A*^1 c= A*^B by ORDINAL2:42;
1*^A c= B*^A by A1,ORDINAL2:41;
hence thesis by A2,ORDINAL2:39;
end;
theorem
A*^B = 1 implies A = 1 & B = 1
proof
assume
A1: A*^B = 1;
then
A2: B <> {} by ORDINAL2:38;
{} c= B by XBOOLE_1:2;
then {} c< B by A2,XBOOLE_0:def 8;
then {} in B by ORDINAL1:11;
then
A3: 1 c= B by Lm1,ORDINAL1:21;
A4: now
A5: B = 1*^B by ORDINAL2:39;
assume 1 in A;
hence contradiction by A1,A2,A3,A5,ORDINAL1:5,ORDINAL2:40;
end;
now
assume A in 1;
then A c= {} by Lm1,ORDINAL1:22;
then A = {} by XBOOLE_1:3;
hence contradiction by A1,ORDINAL2:35;
end;
hence A = 1 by A4,ORDINAL1:14;
hence thesis by A1,ORDINAL2:39;
end;
theorem Th38:
A in B+^C implies A in B or ex D st D in C & A = B+^D
proof
assume that
A1: A in B+^C and
A2: not A in B;
consider D such that
A3: A = B+^D by A2,Th27,ORDINAL1:16;
take D;
assume not thesis;
then C c= D by A3,ORDINAL1:16;
hence contradiction by A1,A3,ORDINAL1:5,ORDINAL2:33;
end;
definition
let C,fi;
func C+^fi -> Ordinal-Sequence means
: Def1:
dom it = dom fi & for A st A in dom fi holds it.A = C+^(fi.A);
existence
proof
deffunc F(Ordinal) = C+^(fi.$1);
thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi
holds F.A = F(A) from ORDINAL2:sch 3;
end;
uniqueness
proof
let f1,f2 be Ordinal-Sequence such that
A1: dom f1 = dom fi and
A2: for A st A in dom fi holds f1.A = C+^(fi.A) and
A3: dom f2 = dom fi and
A4: for A st A in dom fi holds f2.A = C+^(fi.A);
now
let x;
assume
A5: x in dom fi;
then reconsider A = x as Ordinal;
thus f1.x = C+^(fi.A) by A2,A5
.= f2.x by A4,A5;
end;
hence thesis by A1,A3,FUNCT_1:2;
end;
func fi+^C -> Ordinal-Sequence means
dom it = dom fi & for A st A in dom fi holds it.A = (fi.A)+^C;
existence
proof
deffunc F(Ordinal) = (fi.$1)+^C;
thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi
holds F.A = F(A) from ORDINAL2:sch 3;
end;
uniqueness
proof
let f1,f2 be Ordinal-Sequence such that
A6: dom f1 = dom fi and
A7: for A st A in dom fi holds f1.A = (fi.A)+^C and
A8: dom f2 = dom fi and
A9: for A st A in dom fi holds f2.A = (fi.A)+^C;
now
let x;
assume
A10: x in dom fi;
then reconsider A = x as Ordinal;
thus f1.x = (fi.A)+^C by A7,A10
.= f2.x by A9,A10;
end;
hence thesis by A6,A8,FUNCT_1:2;
end;
func C*^fi -> Ordinal-Sequence means
dom it = dom fi & for A st A in dom fi holds it.A = C*^(fi.A);
existence
proof
deffunc F(Ordinal) = C*^(fi.$1);
thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi
holds F.A = F(A) from ORDINAL2:sch 3;
end;
uniqueness
proof
let f1,f2 be Ordinal-Sequence such that
A11: dom f1 = dom fi and
A12: for A st A in dom fi holds f1.A = C*^(fi.A) and
A13: dom f2 = dom fi and
A14: for A st A in dom fi holds f2.A = C*^(fi.A);
now
let x;
assume
A15: x in dom fi;
then reconsider A = x as Ordinal;
thus f1.x = C*^(fi.A) by A12,A15
.= f2.x by A14,A15;
end;
hence thesis by A11,A13,FUNCT_1:2;
end;
func fi*^C -> Ordinal-Sequence means
: Def4:
dom it = dom fi & for A st A in dom fi holds it.A = (fi.A)*^C;
existence
proof
deffunc F(Ordinal) = (fi.$1)*^C;
thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi
holds F.A = F(A) from ORDINAL2:sch 3;
end;
uniqueness
proof
let f1,f2 be Ordinal-Sequence such that
A16: dom f1 = dom fi and
A17: for A st A in dom fi holds f1.A = (fi.A)*^C and
A18: dom f2 = dom fi and
A19: for A st A in dom fi holds f2.A = (fi.A)*^C;
now
let x;
assume
A20: x in dom fi;
then reconsider A = x as Ordinal;
thus f1.x = (fi.A)*^C by A17,A20
.= f2.x by A19,A20;
end;
hence thesis by A16,A18,FUNCT_1:2;
end;
end;
theorem Th39:
{} <> dom fi & dom fi = dom psi & (for A,B st A in dom fi & B =
fi.A holds psi.A = C+^B) implies sup psi = C+^sup fi
proof
assume that
A1: {} <> dom fi and
A2: dom fi = dom psi and
A3: for A,B st A in dom fi & B = fi.A holds psi.A = C+^B;
set z = the Element of dom fi;
reconsider z9 = fi.z as Ordinal;
A4: C+^sup rng fi c= sup rng psi
proof
let x;
assume
A5: x in C+^sup rng fi;
then reconsider A = x as Ordinal;
A6: now
given B such that
A7: B in sup rng fi and
A8: A = C+^B;
consider D such that
A9: D in rng fi and
A10: B c= D by A7,ORDINAL2:21;
consider x such that
A11: x in dom fi and
A12: D = fi.x by A9,FUNCT_1:def 3;
reconsider x as Ordinal by A11;
psi.x = C+^D by A3,A11,A12;
then C+^D in rng psi by A2,A11,FUNCT_1:def 3;
then C+^D in sup rng psi by ORDINAL2:19;
hence A in sup rng psi by A8,A10,ORDINAL1:12,ORDINAL2:33;
end;
now
C+^z9 = psi.z by A1,A3;
then C+^z9 in rng psi by A1,A2,FUNCT_1:def 3;
then
A13: C+^z9 in sup rng psi by ORDINAL2:19;
assume
A14: A in C;
C c= C+^z9 by Th24;
then A c= C+^z9 by A14,ORDINAL1:def 2;
hence A in sup rng psi by A13,ORDINAL1:12;
end;
hence thesis by A5,A6,Th38;
end;
sup rng psi c= C+^sup rng fi
proof
let x;
assume
A15: x in sup rng psi;
then reconsider A = x as Ordinal;
consider B such that
A16: B in rng psi and
A17: A c= B by A15,ORDINAL2:21;
consider y such that
A18: y in dom psi and
A19: B = psi.y by A16,FUNCT_1:def 3;
reconsider y as Ordinal by A18;
reconsider y9 = fi.y as Ordinal;
y9 in rng fi by A2,A18,FUNCT_1:def 3;
then
A20: y9 in sup rng fi by ORDINAL2:19;
B = C+^y9 by A2,A3,A18,A19;
then B in C+^sup rng fi by A20,ORDINAL2:32;
hence thesis by A17,ORDINAL1:12;
end;
hence thesis by A4,XBOOLE_0:def 10;
end;
theorem Th40:
A is limit_ordinal implies A*^B is limit_ordinal
proof
A1: now
deffunc F(Ordinal) = $1 *^ B;
assume that
A2: A <> {} and
A3: A is limit_ordinal;
consider fi such that
A4: dom fi = A & for C st C in A holds fi.C = F(C) from ORDINAL2:sch 3;
A5: A*^B = union sup fi by A2,A3,A4,ORDINAL2:37
.= union sup rng fi;
for C st C in A*^B holds succ C in A*^B
proof
let C;
assume
A6: C in A*^B;
then consider X such that
A7: C in X and
A8: X in sup rng fi by A5,TARSKI:def 4;
reconsider X as Ordinal by A8;
consider D such that
A9: D in rng fi and
A10: X c= D by A8,ORDINAL2:21;
consider x such that
A11: x in dom fi and
A12: D = fi.x by A9,FUNCT_1:def 3;
succ C c= D by A7,A10,ORDINAL1:21;
then
A13: succ C in succ D by ORDINAL1:22;
reconsider x as Ordinal by A11;
A14: succ x in dom fi by A3,A4,A11,ORDINAL1:28;
then fi.succ x = (succ x)*^B by A4
.= x*^B+^B by ORDINAL2:36;
then x*^B+^B in rng fi by A14,FUNCT_1:def 3;
then
A15: x*^B+^B in sup rng fi by ORDINAL2:19;
A16: x*^B+^succ {} = succ(x*^B+^{}) by ORDINAL2:28;
B<>{} by A6,ORDINAL2:38;
then {} in B by Th8;
then
A17: succ {} c= B by ORDINAL1:21;
A18: x*^B+^{} = x*^B by ORDINAL2:27;
x*^B = fi.x by A4,A11;
then succ D in sup rng fi by A12,A17,A16,A18,A15,ORDINAL1:12,ORDINAL2:33;
hence thesis by A5,A13,TARSKI:def 4;
end;
hence thesis by ORDINAL1:28;
end;
assume A is limit_ordinal;
hence thesis by A1,ORDINAL2:35;
end;
theorem Th41:
A in B*^C & B is limit_ordinal implies ex D st D in B & A in D*^ C
proof
assume that
A1: A in B*^C and
A2: B is limit_ordinal;
deffunc F(Ordinal) = $1 *^ C;
consider fi such that
A3: dom fi = B & for D st D in B holds fi.D = F(D) from ORDINAL2:sch 3;
B <> {} by A1,ORDINAL2:35;
then B*^C = union sup fi by A2,A3,ORDINAL2:37
.= union sup rng fi;
then consider X such that
A4: A in X and
A5: X in sup rng fi by A1,TARSKI:def 4;
reconsider X as Ordinal by A5;
consider D such that
A6: D in rng fi and
A7: X c= D by A5,ORDINAL2:21;
consider x such that
A8: x in dom fi and
A9: D = fi.x by A6,FUNCT_1:def 3;
reconsider x as Ordinal by A8;
take E = succ x;
thus E in B by A2,A3,A8,ORDINAL1:28;
A10: D+^{} = D by ORDINAL2:27;
A11: C <> {} by A1,ORDINAL2:38;
E*^C = x*^C+^C by ORDINAL2:36
.= D+^C by A3,A8,A9;
then D in E*^C by A11,A10,Th8,ORDINAL2:32;
hence thesis by A4,A7,ORDINAL1:10;
end;
theorem Th42:
dom fi = dom psi & C <> {} & sup fi is limit_ordinal & (for A,B
st A in dom fi & B = fi.A holds psi.A = B*^C) implies sup psi = (sup fi)*^C
proof
assume that
A1: dom fi = dom psi and
A2: C <> {} and
A3: sup fi is limit_ordinal and
A4: for A,B st A in dom fi & B = fi.A holds psi.A = B*^C;
A5: (sup rng fi)*^C c= sup rng psi
proof
let x;
assume
A6: x in (sup rng fi)*^C;
then reconsider A = x as Ordinal;
consider B such that
A7: B in sup rng fi and
A8: A in B*^C by A3,A6,Th41;
consider D such that
A9: D in rng fi and
A10: B c= D by A7,ORDINAL2:21;
consider y such that
A11: y in dom fi and
A12: D = fi.y by A9,FUNCT_1:def 3;
reconsider y as Ordinal by A11;
reconsider y9 = psi.y as Ordinal;
A13: y9 in rng psi by A1,A11,FUNCT_1:def 3;
y9 = D*^C by A4,A11,A12;
then
A14: D*^C in sup rng psi by A13,ORDINAL2:19;
B*^C c= D*^C by A10,ORDINAL2:41;
hence thesis by A8,A14,ORDINAL1:10;
end;
sup rng psi c= (sup rng fi)*^C
proof
let x;
assume
A15: x in sup rng psi;
then reconsider A = x as Ordinal;
consider B such that
A16: B in rng psi and
A17: A c= B by A15,ORDINAL2:21;
consider y such that
A18: y in dom psi and
A19: B = psi.y by A16,FUNCT_1:def 3;
reconsider y as Ordinal by A18;
reconsider y9 = fi.y as Ordinal;
y9 in rng fi by A1,A18,FUNCT_1:def 3;
then
A20: y9 in sup rng fi by ORDINAL2:19;
B = y9*^C by A1,A4,A18,A19;
then B in (sup rng fi)*^C by A2,A20,ORDINAL2:40;
hence thesis by A17,ORDINAL1:12;
end;
hence thesis by A5,XBOOLE_0:def 10;
end;
theorem Th43:
{} <> dom fi implies sup (C+^fi) = C+^sup fi
proof
A1: for A,B st A in dom fi & B = fi.A holds (C+^fi).A = C+^B by Def1;
dom (C+^fi) = dom fi by Def1;
hence thesis by A1,Th39;
end;
theorem Th44:
{} <> dom fi & C <> {} & sup fi is limit_ordinal implies sup (fi
*^C) = (sup fi)*^C
proof
A1: for A,B st A in dom fi & B = fi.A holds (fi*^C).A = B*^C by Def4;
dom (fi*^C) = dom fi by Def4;
hence thesis by A1,Th42;
end;
theorem Th45:
B <> {} implies union(A+^B) = A+^union B
proof
assume
A1: B <> {};
A2: now
assume not ex C st B = succ C;
then
A3: B is limit_ordinal by ORDINAL1:29;
then A+^B is limit_ordinal by A1,Th29;
then union(A+^B) = A+^B by ORDINAL1:def 6;
hence thesis by A3,ORDINAL1:def 6;
end;
now
given C such that
A4: B = succ C;
thus union(A+^B) = union succ (A+^C) by A4,ORDINAL2:28
.= A+^C by ORDINAL2:2
.= A+^union B by A4,ORDINAL2:2;
end;
hence thesis by A2;
end;
theorem Th46:
(A+^B)*^C = A*^C +^ B*^C
proof
defpred S[Ordinal] means (A+^$1)*^C = A*^C +^ $1*^C;
A1: for B st S[B] holds S[succ B]
proof
let B such that
A2: (A+^B)*^C = A*^C +^ B*^C;
thus (A+^succ B)*^C = (succ(A+^B))*^C by ORDINAL2:28
.= A*^C +^ B*^C +^ C by A2,ORDINAL2:36
.= A*^C +^ (B*^C +^ C) by Th30
.= A*^C +^ (succ B)*^C by ORDINAL2:36;
end;
A3: for B st B <> {} & B is limit_ordinal & for D st D in B holds S[D] holds
S[B]
proof
deffunc F(Ordinal) = A +^ $1;
let B such that
A4: B <> {} and
A5: B is limit_ordinal and
A6: for D st D in B holds S[D];
consider fi such that
A7: dom fi = B & for D st D in B holds fi.D = F(D) from ORDINAL2:sch
3;
A+^B is limit_ordinal by A4,A5,Th29;
then
A8: (A+^B)*^C is limit_ordinal by Th40;
A9: dom (fi*^C) = dom fi by Def4;
A10: now
assume
A11: C = {};
then
A12: A*^C = {} by ORDINAL2:38;
A13: B*^C = {} by A11,ORDINAL2:38;
(A+^B)*^C = {} by A11,ORDINAL2:38;
hence thesis by A12,A13,ORDINAL2:27;
end;
deffunc F(Ordinal) = $1 *^ C;
consider psi such that
A14: dom psi = B & for D st D in B holds psi.D = F(D) from ORDINAL2:
sch 3;
A15: now
let x;
assume
A16: x in B;
then reconsider k = x as Ordinal;
reconsider m = fi.k, n = psi.k as Ordinal;
thus (fi*^C).x = m*^C by A7,A16,Def4
.= (A+^k)*^C by A7,A16
.= A*^C+^k*^C by A6,A16
.= A*^C+^n by A14,A16
.= (A*^C+^psi).x by A14,A16,Def1;
end;
reconsider k = psi.{} as Ordinal;
{} in B by A4,Th8;
then k in rng psi by A14,FUNCT_1:def 3;
then
A17: k in sup rng psi by ORDINAL2:19;
dom (A*^C+^psi) = dom psi by Def1;
then
A18: fi*^C = A*^C+^psi by A7,A14,A9,A15,FUNCT_1:2;
A19: A+^B = sup fi by A4,A5,A7,ORDINAL2:29;
now
assume C <> {};
then (A+^B)*^C = sup(fi*^C) by A4,A5,A7,A19,Th29,Th44
.= A*^C+^sup psi by A4,A14,A18,Th43;
hence (A+^B)*^C = union(A*^C+^sup psi) by A8,ORDINAL1:def 6
.= A*^C+^union sup psi by A17,Th45
.= A*^C+^B*^C by A4,A5,A14,ORDINAL2:37;
end;
hence thesis by A10;
end;
(A+^{})*^C = A*^C by ORDINAL2:27
.= A*^C +^ {} by ORDINAL2:27
.= A*^C +^ {}*^C by ORDINAL2:35;
then
A20: S[{}];
for B holds S[B] from ORDINAL2:sch 1(A20,A1,A3);
hence thesis;
end;
theorem Th47:
A <> {} implies ex C,D st B = C*^A+^D & D in A
proof
defpred I[Ordinal] means ex C,D st $1 = C*^A+^D & D in A;
assume
A1: A <> {};
A2: for B st B <> {} & B is limit_ordinal & for A st A in B holds I[A]
holds I[B]
proof
{} in A by A1,Th8;
then
A3: succ {} c= A by ORDINAL1:21;
let B such that
B <> {} and
A4: B is limit_ordinal and
for A st A in B holds I[A];
defpred P[Ordinal] means $1 in B & B in $1*^A;
B*^1 = B by ORDINAL2:39;
then
A5: B c= B*^A by A3,ORDINAL2:42;
A6: now
assume B <> B*^A;
then B c< B*^A by A5,XBOOLE_0:def 8;
then B in B*^A by ORDINAL1:11;
then
A7: ex C st P[C] by A4,Th41;
consider C such that
A8: P[C] and
A9: for C1 being Ordinal st P[C1] holds C c= C1 from ORDINAL1:sch 1
(A7);
now
assume C is limit_ordinal;
then consider C1 being Ordinal such that
A10: C1 in C and
A11: B in C1*^A by A8,Th41;
C1 in B by A8,A10,ORDINAL1:10;
hence contradiction by A9,A10,A11,ORDINAL1:5;
end;
then consider C1 being Ordinal such that
A12: C = succ C1 by ORDINAL1:29;
A13: C1 in C by A12,ORDINAL1:6;
then C1 in B by A8,ORDINAL1:10;
then not B in C1*^A by A9,A13,ORDINAL1:5;
then consider D such that
A14: B = C1*^A+^D by Th27,ORDINAL1:16;
thus I[B]
proof
take C1,D;
thus B = C1*^A+^D by A14;
C1*^A+^D in C1*^A+^A by A8,A12,A14,ORDINAL2:36;
hence thesis by Th22;
end;
end;
B = B*^A implies B = B*^A+^{} & {} in A by A1,Th8,ORDINAL2:27;
hence thesis by A6;
end;
A15: for B st I[B] holds I[succ B]
proof
let B;
given C,D such that
A16: B = C*^A+^D and
A17: D in A;
A18: now
assume not succ D in A;
then
A19: A c= succ D by ORDINAL1:16;
take C1 = succ C, D1 = {};
succ D c= A by A17,ORDINAL1:21;
then
A20: A = succ D by A19,XBOOLE_0:def 10;
thus C1*^A+^D1 = C1*^A by ORDINAL2:27
.= C*^A+^A by ORDINAL2:36
.= succ B by A16,A20,ORDINAL2:28;
thus D1 in A by A1,Th8;
end;
now
assume
A21: succ D in A;
take C1 = C, D1 = succ D;
thus C1*^A+^D1 = succ B by A16,ORDINAL2:28;
thus D1 in A by A21;
end;
hence thesis by A18;
end;
A22: I[{}]
proof
take C = {}, D = {};
thus {} = {}+^{} by ORDINAL2:27
.= C*^A+^D by ORDINAL2:35;
thus thesis by A1,Th8;
end;
for B holds I[B] from ORDINAL2:sch 1(A22,A15,A2);
hence thesis;
end;
theorem Th48:
for C1,D1,C2,D2 being Ordinal st C1*^A+^D1 = C2*^A+^D2 & D1 in A
& D2 in A holds C1 = C2 & D1 = D2
proof
let C1,D1,C2,D2 be Ordinal such that
A1: C1*^A+^D1 = C2*^A+^D2 and
A2: D1 in A and
A3: D2 in A;
set B = C1*^A+^D1;
A4: now
assume C2 in C1;
then consider C such that
A5: C1 = C2+^C and
A6: C <> {} by Th28;
B = C2*^A+^C*^A+^D1 by A5,Th46
.= C2*^A+^(C*^A+^D1) by Th30;
then
A7: D2 = C*^A+^D1 by A1,Th21;
A8: C*^A c= C*^A+^D1 by Th24;
A c= C*^A by A6,Th36;
hence contradiction by A3,A7,A8,ORDINAL1:5;
end;
now
assume C1 in C2;
then consider C such that
A9: C2 = C1+^C and
A10: C <> {} by Th28;
B = C1*^A+^C*^A+^D2 by A1,A9,Th46
.= C1*^A+^(C*^A+^D2) by Th30;
then
A11: D1 = C*^A+^D2 by Th21;
A12: C*^A c= C*^A+^D2 by Th24;
A c= C*^A by A10,Th36;
hence contradiction by A2,A11,A12,ORDINAL1:5;
end;
hence C1 = C2 by A4,ORDINAL1:14;
hence thesis by A1,Th21;
end;
theorem Th49:
1 in B & A <> {} & A is limit_ordinal implies for fi st dom fi =
A & for C st C in A holds fi.C = C*^B holds A*^B = sup fi
proof
assume that
A1: 1 in B and
A2: A <> {} and
A3: A is limit_ordinal;
let fi;
assume that
A4: dom fi = A and
A5: for C st C in A holds fi.C = C*^B;
now
given C such that
A6: sup fi = succ C;
consider D such that
A7: D in rng fi and
A8: C c= D by A6,ORDINAL1:6,ORDINAL2:21;
D in sup fi by A7,ORDINAL2:19;
then
A9: succ D c= succ C by A6,ORDINAL1:21;
succ C c= succ D by A8,ORDINAL2:1;
then succ C = succ D by A9,XBOOLE_0:def 10;
then C = D by ORDINAL1:7;
then consider x such that
A10: x in dom fi and
A11: C = fi.x by A7,FUNCT_1:def 3;
reconsider x as Ordinal by A10;
A12: C = x*^B by A4,A5,A10,A11;
C+^1 in C+^B by A1,ORDINAL2:32;
then
A13: sup fi in C+^B by A6,ORDINAL2:31;
A14: (succ x)*^B = x*^B+^B by ORDINAL2:36;
A15: succ x in dom fi by A3,A4,A10,ORDINAL1:28;
then fi.succ x = (succ x)*^B by A4,A5;
then C+^B in rng fi by A15,A12,A14,FUNCT_1:def 3;
hence contradiction by A13,ORDINAL2:19;
end;
then
A16: sup fi is limit_ordinal by ORDINAL1:29;
A*^B = union sup fi by A2,A3,A4,A5,ORDINAL2:37;
hence thesis by A16,ORDINAL1:def 6;
end;
theorem
(A*^B)*^C = A*^(B*^C)
proof
defpred P[Ordinal] means ($1*^B)*^C = $1*^(B*^C);
A1: {}*^C = {} by ORDINAL2:35;
A2: for A st P[A] holds P[succ A]
proof
let A such that
A3: (A*^B)*^C = A*^(B*^C);
thus ((succ A)*^B)*^C = (A*^B+^B)*^C by ORDINAL2:36
.= A*^(B*^C)+^B*^C by A3,Th46
.= A*^(B*^C)+^1*^(B*^C) by ORDINAL2:39
.= (A+^1)*^(B*^C) by Th46
.= (succ A)*^(B*^C) by ORDINAL2:31;
end;
A4: for A st A <> {} & A is limit_ordinal & for D st D in A holds P[D] holds
P[A]
proof
let A such that
A5: A <> {} and
A6: A is limit_ordinal and
A7: for D st D in A holds (D*^B)*^C = D*^(B*^C);
A8: now
deffunc F(Ordinal) = $1 *^ B;
assume that
A9: 1 in B and
A10: 1 in C;
consider fi such that
A11: dom fi = A & for D st D in A holds fi.D = F(D) from ORDINAL2:
sch 3;
A12: dom(fi*^C) = A & for D st D in A holds (fi*^C).D = D*^(B*^C)
proof
thus dom(fi*^C) = A by A11,Def4;
let D;
assume
A13: D in A;
then
A14: fi.D = D*^B by A11;
(fi*^C).D = (fi.D)*^C by A11,A13,Def4;
hence thesis by A7,A13,A14;
end;
1 = 1*^1 by ORDINAL2:39;
then 1 in B*^C by A9,A10,Th19;
then
A15: A*^(B*^C) = sup(fi*^C) by A5,A6,A12,Th49;
A*^B = sup fi by A5,A6,A9,A11,Th49;
hence thesis by A5,A6,A10,A11,A15,Th40,Th44;
end;
now
assume not (1 in B & 1 in C);
then
A16: B = {} or B = 1 or C = {} or C = 1 by Th16,ORDINAL1:16;
A17: {}*^C = {} by ORDINAL2:35;
A18: A*^B*^1 = A*^B by ORDINAL2:39;
A19: (A*^B)*^{} = {} by ORDINAL2:38;
A20: A*^1 = A by ORDINAL2:39;
A*^{} = {} by ORDINAL2:38;
hence thesis by A16,A17,A20,A19,A18,ORDINAL2:38,39;
end;
hence thesis by A8;
end;
{}*^B = {} by ORDINAL2:35;
then
A21: P[{}] by A1,ORDINAL2:35;
for A holds P[A] from ORDINAL2:sch 1(A21,A2,A4);
hence thesis;
end;
definition
let A,B;
func A -^ B -> Ordinal means
: Def5:
A = B+^it if B c= A otherwise it = {};
existence by Th27;
uniqueness by Th21;
consistency;
func A div^ B -> Ordinal means
: Def6:
ex C st A = it*^B+^C & C in B if B <> {} otherwise it = {};
consistency;
existence by Th47;
uniqueness by Th48;
end;
definition
let A,B;
func A mod^ B -> Ordinal equals
A-^(A div^ B)*^B;
correctness;
end;
theorem
A in B implies B = A+^(B-^A)
proof
assume A in B;
then A c= B by ORDINAL1:def 2;
hence thesis by Def5;
end;
theorem Th52:
A+^B-^A = B
proof
A c= A+^B by Th24;
hence thesis by Def5;
end;
theorem Th53:
A in B & (C c= A or C in A) implies A-^C in B-^C
proof
assume that
A1: A in B and
A2: C c= A or C in A;
A c= B by A1,ORDINAL1:def 2;
then C c= B by A2,ORDINAL1:def 2,XBOOLE_1:1;
then
A3: B = C+^(B-^C) by Def5;
C c= A by A2,ORDINAL1:def 2;
then A = C+^(A-^C) by Def5;
hence thesis by A1,A3,Th22;
end;
theorem Th54:
A-^A = {}
proof
A+^{} = A by ORDINAL2:27;
hence thesis by Def5;
end;
theorem
A in B implies B-^A <> {} & {} in B-^A
proof
assume A in B;
then A-^A in B-^A by Th53;
hence thesis by Th54;
end;
theorem Th56:
A-^{} = A & {}-^A = {}
proof
A1: {}+^A = A by ORDINAL2:30;
{} c= A by XBOOLE_1:2;
hence A-^{} = A by A1,Def5;
not A c= {} or A c= {};
then thesis or A = {} by Def5,XBOOLE_1:3;
hence thesis by A1,Def5;
end;
theorem
A-^(B+^C) = (A-^B)-^C
proof
now
per cases;
suppose
B+^C c= A;
then A = B+^C+^(A-^(B+^C)) by Def5;
then A = B+^(C+^(A-^(B+^C))) by Th30;
then C+^(A-^(B+^C)) = A-^B by Th52;
hence thesis by Th52;
end;
suppose
A1: not B+^C c= A;
A2: now
assume A = B+^(A-^B);
then not C c= A-^B by A1,ORDINAL2:33;
hence A-^B-^C = {} by Def5;
end;
B c= A or not B c= A;
then
A3: A = B+^(A-^B) or A-^B = {} by Def5;
A-^(B+^C) = {} by A1,Def5;
hence thesis by A3,A2,Th56;
end;
end;
hence thesis;
end;
theorem
A c= B implies C-^B c= C-^A
proof
assume
A1: A c= B;
then
A2: B = A+^(B-^A) by Def5;
A3: now
assume
A4: B c= C;
then
A5: C = B+^(C-^B) by Def5;
A c= C by A1,A4,XBOOLE_1:1;
then B+^(C-^B) = A+^(C-^A) by A5,Def5;
then A+^((B-^A)+^(C-^B)) = A+^(C-^A) by A2,Th30;
then (B-^A)+^(C-^B) = C-^A by Th21;
hence thesis by Th24;
end;
now
assume not B c= C;
then C-^B = {} by Def5;
hence thesis by XBOOLE_1:2;
end;
hence thesis by A3;
end;
theorem
A c= B implies A-^C c= B-^C
proof
assume
A1: A c= B;
A2: now
assume
A3: C c= A;
then
A4: A = C+^(A-^C) by Def5;
C c= B by A1,A3,XBOOLE_1:1;
then C+^(A-^C) c= C+^(B-^C) by A1,A4,Def5;
hence thesis by Th23;
end;
now
assume not C c= A;
then A-^C = {} by Def5;
hence thesis by XBOOLE_1:2;
end;
hence thesis by A2;
end;
theorem
C <> {} & A in B+^C implies A-^B in C
proof
assume
A1: C <> {};
A2: B+^C-^B = C by Th52;
not B c= A implies A-^B = {} by Def5;
hence thesis by A1,A2,Th8,Th53;
end;
theorem
A+^B in C implies B in C-^A
proof
A1: A+^B-^A = B by Th52;
A c= A+^B by Th24;
hence thesis by A1,Th53;
end;
theorem
A c= B+^(A-^B)
proof
now
per cases;
suppose
B c= A;
hence thesis by Def5;
end;
suppose
A1: not B c= A;
then A-^B = {} by Def5;
hence thesis by A1,ORDINAL2:27;
end;
end;
hence thesis;
end;
theorem
A*^C -^ B*^C = (A-^B)*^C
proof
A1: now
assume
A2: not B c= A;
then
A3: not B*^C c= A*^C or C = {} by Th35;
A4: {}*^C = {} by ORDINAL2:35;
A5: A*^{} = {} by ORDINAL2:38;
A-^B = {} by A2,Def5;
hence thesis by A3,A5,A4,Def5,Th56;
end;
now
assume B c= A;
then A = B+^(A-^B) by Def5;
then A*^C = B*^C+^(A-^B)*^C by Th46;
hence thesis by Th52;
end;
hence thesis by A1;
end;
theorem Th64:
(A div^ B)*^B c= A
proof
now
per cases;
suppose
B <> {};
then ex C st A = (A div^ B)*^B+^C & C in B by Def6;
hence thesis by Th24;
end;
suppose
B = {};
then A div^ B = {} by Def6;
then (A div^ B)*^B = {} by ORDINAL2:35;
hence thesis by XBOOLE_1:2;
end;
end;
hence thesis;
end;
theorem Th65:
A = (A div^ B)*^B+^(A mod^ B)
proof
(A div^ B)*^B c= A by Th64;
hence thesis by Def5;
end;
theorem
A = B*^C+^D & D in C implies B = A div^ C & D = A mod^ C
proof
assume that
A1: A = B*^C+^D and
A2: D in C;
thus B = A div^ C by A1,A2,Def6;
hence thesis by A1,Th52;
end;
theorem
A in B*^C implies A div^ C in B & A mod^ C in C
proof
A1: A = (A div^ C)*^C+^(A mod^ C) by Th65;
assume
A2: A in B*^C;
then C <> {} by ORDINAL2:38;
then
A3: ex D st A = (A div^ C)*^C+^D & D in C by Def6;
then
A4: (A div^ C)*^C c= A by Th24;
assume not thesis;
then B*^C c= (A div^ C)*^C by A3,A1,Th21,ORDINAL1:16,ORDINAL2:41;
hence contradiction by A2,A4,ORDINAL1:5;
end;
theorem Th68:
B <> {} implies A*^B div^ B = A
proof
assume B <> {};
then
A1: {} in B by Th8;
A*^B = A*^B+^{} by ORDINAL2:27;
hence thesis by A1,Def6;
end;
theorem
A*^B mod^ B = {}
proof
A1: A*^{} = {} by ORDINAL2:38;
A2: A*^B-^A*^B = {} by Th54;
{}-^(A*^B div^ B)*^B = {} by Th56;
hence thesis by A1,A2,Th68;
end;
theorem
{} div^ A = {} & {} mod^ A = {} & A mod^ {} = A
proof
A1: A = {} or A <> {};
{} = {}*^A by ORDINAL2:35;
hence {} div^ A = {} by A1,Def6,Th68;
thus {} mod^ A = {} by Th56;
thus A mod^ {} = A-^{} by ORDINAL2:38
.= A by Th56;
end;
theorem
A div^ 1 = A & A mod^ 1 = {}
proof
A1: A = A*^1 by ORDINAL2:39;
A2: A = A+^{} by ORDINAL2:27;
A3: {} in 1 by Th8;
hence A div^ 1 = A by A1,A2,Def6;
thus A mod^ 1 = A-^A by A1,A2,A3,Def6
.= {} by Th54;
end;
begin
theorem
sup X c= succ union On X
proof
reconsider A = union On X as Ordinal by Th5;
On X c= succ A
proof
let x;
assume
A1: x in On X;
then reconsider a = x as Ordinal by ORDINAL1:def 9;
a c= A by A1,ZFMISC_1:74;
hence thesis by ORDINAL1:22;
end;
hence thesis by ORDINAL2:def 3;
end;
reserve e,u for set;
theorem
succ A is_cofinal_with 1
proof
deffunc F(set) = A;
consider psi such that
A1: dom psi = 1 & for B st B in 1 holds psi.B = F(B) from ORDINAL2:sch 3;
take psi;
thus dom psi = 1 by A1;
thus rng psi c= succ A
proof
let e;
assume e in rng psi;
then consider u such that
A2: u in 1 and
A3: e = psi.u by A1,FUNCT_1:def 3;
reconsider u as Ordinal by A2;
psi.u = A by A1,A2;
hence thesis by A3,ORDINAL1:6;
end;
thus psi is increasing
proof
let B,C;
assume that
A4: B in C and
A5: C in dom psi;
thus thesis by A1,A4,A5,Th14;
end;
A6: psi.{} = A by A1,Lm1,ORDINAL1:6;
rng psi = {psi.{}} by A1,Lm1,FUNCT_1:4;
hence thesis by A6,ORDINAL2:23;
end;
theorem Th74:
for a,b being Ordinal st a+^b is natural holds a in omega & b in omega
proof
let x,y be Ordinal such that
A1: x+^y in omega;
A2: y c= x+^y by Th24;
x c= x+^y by Th24;
hence thesis by A1,A2,ORDINAL1:12;
end;
registration
let a, b be natural Ordinal;
cluster a -^ b -> natural;
coherence
proof
not b c= a or b c= a;
then a -^ b = {} or a = b+^(a-^b) by Def5;
hence a-^b in omega by Th74,ORDINAL1:def 11;
end;
cluster a *^ b -> natural;
coherence
proof
defpred P[natural Ordinal] means $1*^b is natural;
A1: now
let a be natural Ordinal;
assume P[a];
then reconsider c = a*^b as natural Ordinal;
(succ a)*^b = c+^b by ORDINAL2:36;
hence P[succ a];
end;
A2: P[{}] by ORDINAL2:35;
P[a] from ORDINAL2:sch 17(A2,A1);
hence thesis;
end;
end;
theorem
for a,b being Ordinal st a*^b is natural non empty holds a in omega &
b in omega
proof
let x,y be Ordinal such that
A1: x*^y in omega;
assume
A2: x*^y is non empty;
then y <> {} by ORDINAL2:38;
then
A3: x c= x*^y by Th36;
x <> {} by A2,ORDINAL2:35;
then y c= x*^y by Th36;
hence thesis by A1,A3,ORDINAL1:12;
end;
definition
let a,b be natural Ordinal;
redefine func a+^b;
commutativity
proof
let a,b be natural Ordinal;
defpred R[natural Ordinal] means a+^$1 = $1+^a;
A1: now
let b be natural Ordinal;
assume
A2: R[b];
defpred P[natural Ordinal] means (succ b)+^$1 = succ (b+^$1);
A3: now
let a be natural Ordinal;
assume
A4: P[a];
(succ b)+^succ a = succ ((succ b)+^a) by ORDINAL2:28
.= succ (b+^succ a) by A4,ORDINAL2:28;
hence P[succ a];
end;
(succ b)+^{} = succ b by ORDINAL2:27
.= succ (b+^{}) by ORDINAL2:27;
then
A5: P[{}];
P[a] from ORDINAL2:sch 17(A5,A3);
hence R[succ b] by A2,ORDINAL2:28;
end;
a+^{} = a by ORDINAL2:27
.= {}+^a by ORDINAL2:30;
then
A6: R[{}];
thus R[b] from ORDINAL2:sch 17(A6,A1);
end;
end;
definition
let a,b be natural Ordinal;
redefine func a*^b;
commutativity
proof
let a,b be natural Ordinal;
defpred R[natural Ordinal] means a*^$1 = $1*^a;
A1: now
let b be natural Ordinal;
defpred P[natural Ordinal] means $1*^succ b = $1*^b+^$1;
assume
A2: R[b];
A3: now
let a be natural Ordinal;
assume
A4: P[a];
(succ a)*^succ b = a*^(succ b)+^succ b by ORDINAL2:36
.= a*^b+^(a+^succ b) by A4,Th30
.= a*^b+^succ (a+^b) by ORDINAL2:28
.= succ (a*^b+^(a+^b)) by ORDINAL2:28
.= succ (a*^b+^b+^a) by Th30
.= succ ((succ a)*^b+^a) by ORDINAL2:36
.= (succ a)*^b+^succ a by ORDINAL2:28;
hence P[succ a];
end;
{}*^succ b = {} by ORDINAL2:35
.= {}+^{} by ORDINAL2:27
.= {}*^b+^{} by ORDINAL2:35;
then
A5: P[{}];
P[a] from ORDINAL2:sch 17(A5,A3);
hence R[succ b] by A2,ORDINAL2:36;
end;
a*^{} = {} by ORDINAL2:38
.= {}*^a by ORDINAL2:35;
then
A6: R[{}];
thus R[b] from ORDINAL2:sch 17(A6,A1);
end;
end;
begin
reserve a,b,x,y,z,z1,z2,z3,y1,y3,y4,A,B,C,D,G,M,N,X,Y,Z,W0,W00 for set,
R,S,T, W,W1,W2 for Relation,
F,H,H1 for Function;
theorem Th1:
x in field R iff ex y st ([x,y] in R or [y,x] in R)
proof
x in (dom R \/ rng R) iff x in dom R or x in rng R by XBOOLE_0:def 3;
hence thesis by RELAT_1:def 6,XTUPLE_0:def 12,def 13;
end;
theorem Th2:
X <> {} & Y <> {} & W = [: X,Y :] implies field W = X \/ Y
proof
set a = the Element of X,b = the Element of Y;
assume that
A1: X <> {} and
A2: Y <> {} and
A3: W = [: X,Y :];
A4: x in field W implies x in X \/ Y
proof
assume x in field W;
then consider y such that
A5: [x,y] in W or [y,x] in W by Th1;
A6: [y,x] in W implies x in X \/ Y
proof
assume [y,x] in W;
then x in Y by A3,ZFMISC_1:87;
hence thesis by XBOOLE_0:def 3;
end;
[x,y] in W implies x in X \/ Y
proof
assume [x,y] in W;
then x in X by A3,ZFMISC_1:87;
hence thesis by XBOOLE_0:def 3;
end;
hence thesis by A5,A6;
end;
x in X \/ Y implies x in field W
proof
A7: x in X implies x in field W
proof
assume x in X;
then [x,b] in W by A2,A3,ZFMISC_1:87;
hence thesis by Th1;
end;
A8: x in Y implies x in field W
proof
assume x in Y;
then [a,x] in W by A1,A3,ZFMISC_1:87;
hence thesis by Th1;
end;
assume x in X \/ Y;
hence thesis by A7,A8,XBOOLE_0:def 3;
end;
hence thesis by A4,TARSKI:1;
end;
scheme
RSeparation { A()-> set, P[Relation] } : ex B st for R being Relation holds
R in B iff R in A() & P[R] proof
defpred p[set,set] means $1 = $2 & ex S st S = $2 & P[S];
A1: for y,t,v being set st p[y,t] & p[y,v] holds t = v;
consider B such that
A2: for t being set holds t in B iff ex y being set st y in A() & p[y,t]
from TARSKI:sch 1(A1);
take B;
let R;
R in B implies ex T st T in A() & T = R & P[R]
proof
assume R in B;
then consider y being set such that
A3: y in A() and
A4: y = R and
A5: ex S st S = R & P[S] by A2;
reconsider y as Relation by A4;
take y;
thus thesis by A3,A4,A5;
end;
hence R in B implies R in A() & P[R];
thus thesis by A2;
end;
theorem Th3:
for x,y,W st x in field W & y in field W & W is well-ordering
holds not x in W-Seg(y) implies [y,x] in W
proof
let x,y,W;
assume that
A1: x in field W and
A2: y in field W and
A3: W is well-ordering;
W is connected by A3,WELLORD1:def 4;
then W is_connected_in field W by RELAT_2:def 14;
then
A4: x<>y implies [x,y] in W or [y,x] in W by A1,A2,RELAT_2:def 6;
W is reflexive by A3,WELLORD1:def 4;
then
A5: W is_reflexive_in field W by RELAT_2:def 9;
assume not x in W-Seg(y);
hence thesis by A1,A5,A4,RELAT_2:def 1,WELLORD1:1;
end;
theorem Th4:
for x,y,W st x in field W & y in field W & W is well-ordering
holds x in W-Seg(y) implies not [y,x] in W
proof
let x,y,W;
assume that
A1: x in field W & y in field W and
A2: W is well-ordering;
W is antisymmetric by A2,WELLORD1:def 4;
then
A3: W is_antisymmetric_in field W by RELAT_2:def 12;
assume x in W-Seg(y);
then
A4: x<>y & [x,y] in W by WELLORD1:1;
assume [y,x] in W;
hence contradiction by A1,A3,A4,RELAT_2:def 4;
end;
theorem Th5:
for F,D st (for X st X in D holds not F.X in X & F.X in union D)
ex R st field R c= union D & R is well-ordering & not field R in D & for y st y
in field R holds R-Seg(y) in D & F.(R-Seg(y)) = y
proof
let F,D;
assume
A1: for X st X in D holds not F.X in X & F.X in union D;
defpred P[Relation] means $1 is well-ordering & for y st y in field $1 holds
$1-Seg(y) in D & F.($1-Seg(y)) = y;
set W0=bool [: union D, union D :];
consider G such that
A2: W in G iff W in W0 & P[W] from RSeparation;
defpred P[set,set] means ex W st [$1,$2] in W & W in G;
consider S such that
A3: [x,y] in S iff x in union D & y in union D & P[x,y] from RELAT_1:
sch 1;
take R = S;
A4: x in field R implies x in union D & ex W st x in field W & W in G
proof
assume x in field R;
then consider y such that
A5: [x,y] in R or [y,x] in R by Th1;
(x in union D & y in union D & ex S st [x,y] in S & S in G) or (y in
union D & x in union D & ex S st [y,x] in S & S in G) by A3,A5;
then consider S such that
A6: ( [x,y] in S or [y,x] in S)& S in G;
thus x in union D by A3,A5;
take S;
thus thesis by A6,Th1;
end;
then x in field R implies x in union D;
hence field R c= union D by TARSKI:def 3;
A7: for W1,W2 holds W1 in G & W2 in G implies ((W1 c= W2 & for x st x in
field W1 holds W1-Seg(x) = W2-Seg(x) ) or (W2 c= W1 & for x st x in field W2
holds W2-Seg(x) = W1-Seg(x) ))
proof
let W1,W2;
assume that
A8: W1 in G and
A9: W2 in G;
A10: W2 is well-ordering by A2,A9;
defpred P[set] means $1 in field W2 & W1 |_2 (W1-Seg($1)) = W2 |_2 (W2-Seg
($1));
consider C such that
A11: x in C iff x in field W1 & P[x] from XBOOLE_0:sch 1;
A12: W1 is well-ordering by A2,A8;
A13: x in C implies W1-Seg(x) = W2-Seg(x)
proof
assume
A14: x in C;
for y holds y in W1-Seg(x) iff y in W2-Seg(x)
proof
let y;
field (W1 |_2(W1-Seg(x))) = W1-Seg(x) & field (W2 |_2(W2-Seg(x)))
= W2-Seg(x ) by A12,A10,WELLORD1:32;
hence thesis by A11,A14;
end;
hence thesis by TARSKI:1;
end;
A15: x in C implies W1-Seg(x) c= C
proof
assume
A16: x in C;
y in W1-Seg(x) implies y in C
proof
assume
A17: y in W1-Seg(x);
then
A18: y in W2-Seg(x) by A13,A16;
then
A19: [y,x] in W2 by WELLORD1:1;
then
A20: y in field W2 by RELAT_1:15;
A21: W1-Seg(y)=(W1 |_2 (W1-Seg(x)))-Seg(y) by A12,A17,WELLORD1:27
.=(W2 |_2 (W2-Seg(x)))-Seg(y) by A11,A16
.=W2-Seg(y) by A10,A18,WELLORD1:27;
A22: [y,x] in W1 by A17,WELLORD1:1;
then
A23: y in field W1 by RELAT_1:15;
x in field W2 by A19,RELAT_1:15;
then
A24: W2-Seg(y) c= W2-Seg(x) by A10,A18,A20,WELLORD1:30;
x in field W1 by A22,RELAT_1:15;
then W1-Seg(y) c= W1-Seg(x) by A12,A17,A23,WELLORD1:30;
then W1 |_2 (W1-Seg(y)) = (W1 |_2 (W1-Seg(x))) |_2 (W1-Seg(y)) by
WELLORD1:22
.= (W2 |_2 (W2-Seg(x))) |_2 (W2-Seg(y)) by A11,A16,A21
.= W2 |_2 (W2-Seg(y)) by A24,WELLORD1:22;
hence thesis by A11,A23,A20;
end;
hence thesis by TARSKI:def 3;
end;
A25: y1 in field W1 & not y1 in C implies ex y3 st y3 in field W1 & C=W1
-Seg(y3) & not y3 in C
proof
set Y = field W1 \ C;
assume y1 in field W1 & not y1 in C;
then Y <> {} by XBOOLE_0:def 5;
then consider a such that
A26: a in Y and
A27: for b st b in Y holds [a,b] in W1 by A12,WELLORD1:6;
take y3=a;
x in C iff x in W1-Seg(y3)
proof
thus x in C implies x in W1-Seg(y3)
proof
assume that
A28: x in C and
A29: not x in W1-Seg(y3);
x in field W1 by A11,A28;
then
A30: [y3,x] in W1 by A12,A26,A29,Th3;
A31: W1-Seg(x) c= C by A15,A28;
y3 <> x implies y3 in C
proof
assume y3 <> x;
then y3 in W1-Seg(x) by A30,WELLORD1:1;
hence thesis by A31;
end;
hence contradiction by A26,A28,XBOOLE_0:def 5;
end;
thus x in W1-Seg(y3) implies x in C
proof
assume that
A32: x in W1-Seg(y3) and
A33: not x in C;
[x,y3] in W1 by A32,WELLORD1:1;
then
A34: x in field W1 by RELAT_1:15;
then x in Y by A33,XBOOLE_0:def 5;
then [y3,x] in W1 by A27;
hence contradiction by A12,A26,A32,A34,Th4;
end;
end;
hence thesis by A26,TARSKI:1,XBOOLE_0:def 5;
end;
A35: x in C implies W2-Seg(x) c= C
proof
assume
A36: x in C;
let y;
assume
A37: y in W2-Seg(x);
then
A38: y in W1-Seg(x) by A13,A36;
then
A39: [y,x] in W1 by WELLORD1:1;
then
A40: y in field W1 by RELAT_1:15;
A41: W2-Seg(y)=(W2 |_2 (W2-Seg(x)))-Seg(y) by A10,A37,WELLORD1:27
.=(W1 |_2 (W1-Seg(x)))-Seg(y) by A11,A36
.=W1-Seg(y) by A12,A38,WELLORD1:27;
A42: [y,x] in W2 by A37,WELLORD1:1;
then
A43: y in field W2 by RELAT_1:15;
x in field W1 by A39,RELAT_1:15;
then
A44: W1-Seg(y) c= W1-Seg(x) by A12,A38,A40,WELLORD1:30;
x in field W2 by A42,RELAT_1:15;
then W2-Seg(y) c= W2-Seg(x) by A10,A37,A43,WELLORD1:30;
then W2 |_2 (W2-Seg(y)) = (W2 |_2 (W2-Seg(x))) |_2 (W2-Seg(y)) by
WELLORD1:22
.= (W1 |_2 (W1-Seg(x))) |_2 (W1-Seg(y)) by A11,A36,A41
.= W1 |_2 (W1-Seg(y)) by A44,WELLORD1:22;
hence thesis by A11,A43,A40;
end;
A45: y1 in field W2 & not y1 in C implies ex y3 st y3 in field W2 & C=W2
-Seg(y3) & not y3 in C
proof
set Y = field W2 \ C;
assume y1 in field W2 & not y1 in C;
then Y <> {} by XBOOLE_0:def 5;
then consider a such that
A46: a in Y and
A47: for b st b in Y holds [a,b] in W2 by A10,WELLORD1:6;
take y3=a;
x in C iff x in W2-Seg(y3)
proof
thus x in C implies x in W2-Seg(y3)
proof
assume that
A48: x in C and
A49: not x in W2-Seg(y3);
x in field W2 by A11,A48;
then
A50: [y3,x] in W2 by A10,A46,A49,Th3;
A51: W2-Seg(x) c= C by A35,A48;
y3 <> x implies y3 in C
proof
assume y3 <> x;
then y3 in W2-Seg(x) by A50,WELLORD1:1;
hence thesis by A51;
end;
hence contradiction by A46,A48,XBOOLE_0:def 5;
end;
thus x in W2-Seg(y3) implies x in C
proof
assume that
A52: x in W2-Seg(y3) and
A53: not x in C;
[x,y3] in W2 by A52,WELLORD1:1;
then
A54: x in field W2 by RELAT_1:15;
then x in Y by A53,XBOOLE_0:def 5;
then [y3,x] in W2 by A47;
hence contradiction by A10,A46,A52,A54,Th4;
end;
end;
hence thesis by A46,TARSKI:1,XBOOLE_0:def 5;
end;
A55: C = field W1 or C = field W2
proof
assume not C = field W1;
then ex x st not (x in C implies x in field W1) or not (x in field W1
implies x in C) by TARSKI:1;
then consider y3 such that
A56: y3 in field W1 and
A57: C=W1-Seg(y3) and
A58: not y3 in C by A11,A25;
assume not C = field W2;
then ex x st not (x in C implies x in field W2) or not (x in field W2
implies x in C) by TARSKI:1;
then consider y4 such that
A59: y4 in field W2 and
A60: C=W2-Seg(y4) and
not y4 in C by A11,A45;
A61: y3 = F.(W2-Seg(y4)) by A2,A8,A56,A57,A60
.= y4 by A2,A9,A59;
z in W1 |_2 (W1-Seg(y3)) iff z in W2 |_2 (W2-Seg(y3))
proof
A62: z in W1 & z in [: W1-Seg(y3),W1-Seg(y3) :] implies z in W2 & z in
[: W2-Seg(y3),W2-Seg(y3) :]
proof
assume that
A63: z in W1 and
A64: z in [: W1-Seg(y3),W1-Seg(y3) :];
consider z1,z2 such that
A65: z1 in W1-Seg(y3) and
A66: z2 in W1-Seg(y3) and
A67: z=[z1,z2] by A64,ZFMISC_1:def 2;
z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by A63,A67,
WELLORD1:1;
then
A68: z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by A13,A57,A66;
z1 in field W2 by A11,A57,A65;
hence thesis by A10,A57,A60,A61,A64,A67,A68,Th3,WELLORD1:1;
end;
z in W2 & z in [: W2-Seg(y3),W2-Seg(y3) :] implies z in W1 & z
in [: W1-Seg(y3),W1-Seg(y3) :]
proof
assume that
A69: z in W2 and
A70: z in [: W2-Seg(y3),W2-Seg(y3) :];
consider z1,z2 such that
A71: z1 in W2-Seg(y3) and
A72: z2 in W2-Seg(y3) and
A73: z=[z1,z2] by A70,ZFMISC_1:def 2;
z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by A69,A73,
WELLORD1:1;
then
A74: z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by A13,A60,A61,A72;
z1 in field W1 by A11,A60,A61,A71;
hence thesis by A12,A57,A60,A61,A70,A73,A74,Th3,WELLORD1:1;
end;
hence thesis by A62,XBOOLE_0:def 4;
end;
then W1 |_2 (W1-Seg(y3)) = W2 |_2 (W2-Seg(y3)) by TARSKI:1;
hence contradiction by A11,A56,A58,A59,A61;
end;
A75: C = field W2 implies (W2 c= W1 & for x st x in field W2 holds W2-Seg
(x) = W1-Seg(x) )
proof
assume
A76: C = field W2;
[z1,z2] in W2 implies [z1,z2] in W1
proof
assume
A77: [z1,z2] in W2;
then
A78: z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by WELLORD1:1;
z1 in C by A76,A77,RELAT_1:15;
then
A79: z1 in field W1 by A11;
z2 in C by A76,A77,RELAT_1:15;
then z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by A13,A78;
hence thesis by A12,A79,Th3,WELLORD1:1;
end;
hence thesis by A13,A76,RELAT_1:def 3;
end;
C = field W1 implies (W1 c= W2 & for x st x in field W1 holds W1-Seg
(x) = W2-Seg(x) )
proof
assume
A80: C = field W1;
[z1,z2] in W1 implies [z1,z2] in W2
proof
assume
A81: [z1,z2] in W1;
then
A82: z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by WELLORD1:1;
z1 in C by A80,A81,RELAT_1:15;
then
A83: z1 in field W2 by A11;
z2 in C by A80,A81,RELAT_1:15;
then z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by A13,A82;
hence thesis by A10,A83,Th3,WELLORD1:1;
end;
hence thesis by A13,A80,RELAT_1:def 3;
end;
hence thesis by A55,A75;
end;
A84: x in field R & y in field R & [x,y] in R & [y,x] in R implies x=y
proof
assume that
x in field R and
y in field R and
A85: [x,y] in R and
A86: [y,x] in R;
consider W1 such that
A87: [x,y] in W1 and
A88: W1 in G by A3,A85;
consider W2 such that
A89: [y,x] in W2 and
A90: W2 in G by A3,A86;
A91: W2 c= W1 implies x=y
proof
W1 is well-ordering by A2,A88;
then W1 well_orders field W1 by WELLORD1:4;
then
A92: W1 is_antisymmetric_in field W1 by WELLORD1:def 5;
assume
A93: W2 c= W1;
then x in field W1 & y in field W1 by A89,RELAT_1:15;
hence thesis by A87,A89,A93,A92,RELAT_2:def 4;
end;
W1 c= W2 implies x=y
proof
W2 is well-ordering by A2,A90;
then W2 well_orders field W2 by WELLORD1:4;
then
A94: W2 is_antisymmetric_in field W2 by WELLORD1:def 5;
assume
A95: W1 c= W2;
then x in field W2 & y in field W2 by A87,RELAT_1:15;
hence thesis by A87,A89,A95,A94,RELAT_2:def 4;
end;
hence thesis by A7,A88,A90,A91;
end;
then
A96: R is_antisymmetric_in field R by RELAT_2:def 4;
A97: W in G implies field W c= field R
proof
assume
A98: W in G;
let x;
assume x in field W;
then consider y such that
A99: [x,y] in W or [y,x] in W by Th1;
A100: [y,x] in W implies [y,x] in R
proof
assume
A101: [y,x] in W;
W in W0 by A2,A98;
then ex z1,z2 st z1 in union D & z2 in union D & [y,x]=[z1,z2] by A101,
ZFMISC_1:84;
hence thesis by A3,A98,A101;
end;
[x,y] in W implies [x,y] in R
proof
assume
A102: [x,y] in W;
W in W0 by A2,A98;
then ex z1,z2 st z1 in union D & z2 in union D & [x,y]=[z1,z2] by A102,
ZFMISC_1:84;
hence thesis by A3,A98,A102;
end;
hence thesis by A99,A100,Th1;
end;
A103: for y st y in field R holds R-Seg(y) in D & F.(R-Seg(y)) = y
proof
let y;
assume
A104: y in field R;
then consider W such that
A105: y in field W and
A106: W in G by A4;
A107: y in union D by A4,A104;
A108: field W c= field R by A97,A106;
A109: x in W-Seg(y) implies x in R-Seg(y)
proof
assume
A110: x in W-Seg(y);
then
A111: [x,y] in W by WELLORD1:1;
then x in field W by RELAT_1:15;
then x in union D by A4,A108;
then
A112: [x,y] in R by A3,A106,A107,A111;
not x =y by A110,WELLORD1:1;
hence thesis by A112,WELLORD1:1;
end;
x in R-Seg(y) implies x in W-Seg(y)
proof
assume
A113: x in R-Seg(y);
then [x,y] in R by WELLORD1:1;
then consider W1 such that
A114: [x,y] in W1 and
A115: W1 in G by A3;
A116: y in field W1 by A114,RELAT_1:15;
not x =y by A113,WELLORD1:1;
then x in W1-Seg(y) by A114,WELLORD1:1;
hence thesis by A7,A105,A106,A115,A116;
end;
then W-Seg(y) = R-Seg(y) by A109,TARSKI:1;
hence thesis by A2,A105,A106;
end;
A117: x in field R & y in field R & x <>y implies [x,y] in R or [y,x] in R
proof
assume that
A118: x in field R and
A119: y in field R and
A120: x <>y;
consider W2 such that
A121: y in field W2 and
A122: W2 in G by A4,A119;
consider W1 such that
A123: x in field W1 and
A124: W1 in G by A4,A118;
A125: x in union D & y in union D by A4,A118,A119;
A126: W2 c= W1 implies [x,y] in R or [y,x] in R
proof
W1 is well-ordering by A2,A124;
then W1 well_orders field W1 by WELLORD1:4;
then
A127: W1 is_connected_in field W1 by WELLORD1:def 5;
assume W2 c= W1;
then field W2 c= field W1 by RELAT_1:16;
then [x,y] in W1 or [y,x] in W1 by A120,A123,A121,A127,RELAT_2:def 6;
hence thesis by A3,A124,A125;
end;
W1 c= W2 implies [x,y] in R or [y,x] in R
proof
W2 is well-ordering by A2,A122;
then W2 well_orders field W2 by WELLORD1:4;
then
A128: W2 is_connected_in field W2 by WELLORD1:def 5;
assume W1 c= W2;
then field W1 c= field W2 by RELAT_1:16;
then [x,y] in W2 or [y,x] in W2 by A120,A123,A121,A128,RELAT_2:def 6;
hence thesis by A3,A125,A122;
end;
hence thesis by A7,A124,A122,A126;
end;
then
A129: R is_connected_in field R by RELAT_2:def 6;
A130: R is_well_founded_in field R
proof
let Y;
assume that
A131: Y c= field R and
A132: Y <> {};
set y = the Element of Y;
y in field R by A131,A132,TARSKI:def 3;
then consider W such that
A133: y in field W and
A134: W in G by A4;
W is well-ordering by A2,A134;
then W well_orders field W by WELLORD1:4;
then
A135: W is_well_founded_in field W by WELLORD1:def 5;
set A = Y /\ field W;
A136: A c= field W by XBOOLE_1:17;
A <> {} by A132,A133,XBOOLE_0:def 4;
then consider a such that
A137: a in A and
A138: W-Seg(a) misses A by A135,A136,WELLORD1:def 3;
ex b st b in Y & R-Seg(b) misses Y
proof
take b= a;
thus b in Y by A137,XBOOLE_0:def 4;
assume not thesis;
then consider x being set such that
A139: x in R-Seg(b) and
A140: x in Y by XBOOLE_0:3;
[x,b] in R by A139,WELLORD1:1;
then consider W1 such that
A141: [x,b] in W1 and
A142: W1 in G by A3;
A143: b in field W1 by A141,RELAT_1:15;
x<>b by A139,WELLORD1:1;
then x in W1-Seg(b) by A141,WELLORD1:1;
then
A144: x in W-Seg(a) by A7,A134,A136,A137,A142,A143;
then [x,a] in W by WELLORD1:1;
then x in field W by RELAT_1:15;
then x in A by A140,XBOOLE_0:def 4;
hence contradiction by A138,A144,XBOOLE_0:3;
end;
hence thesis;
end;
A145: x in field R & y in field R & z in field R & [x,y] in R & [y,z] in R
implies [x,z] in R
proof
assume that
x in field R and
y in field R and
z in field R and
A146: [x,y] in R and
A147: [y,z] in R;
A148: x in union D & z in union D by A3,A146,A147;
consider W1 such that
A149: [x,y] in W1 and
A150: W1 in G by A3,A146;
consider W2 such that
A151: [y,z] in W2 and
A152: W2 in G by A3,A147;
ex W st [x,y] in W & [y,z] in W & W in G
proof
take W = W2;
A153: not x in W1-Seg(y) implies [x,y] in W
proof
A154: W1 is well-ordering by A2,A150;
then W1 well_orders field W1 by WELLORD1:4;
then
A155: W1 is_antisymmetric_in field W1 by WELLORD1:def 5;
W is well-ordering by A2,A152;
then W well_orders field W by WELLORD1:4;
then
A156: W is_reflexive_in field W by WELLORD1:def 5;
A157: x in field W1 & y in field W1 by A149,RELAT_1:15;
assume not x in W1-Seg(y);
then [y,x] in W1 by A157,A154,Th3;
then
A158: x=y by A149,A157,A155,RELAT_2:def 4;
y in field W by A151,RELAT_1:15;
hence thesis by A158,A156,RELAT_2:def 1;
end;
y in field W1 & y in field W by A149,A151,RELAT_1:15;
then W1-Seg(y) = W-Seg(y) by A7,A150,A152;
hence thesis by A151,A152,A153,WELLORD1:1;
end;
then consider W such that
A159: [x,y] in W and
A160: [y,z] in W and
A161: W in G;
A162: z in field W by A160,RELAT_1:15;
W is well-ordering by A2,A161;
then W well_orders field W by WELLORD1:4;
then
A163: W is_transitive_in field W by WELLORD1:def 5;
x in field W & y in field W by A159,RELAT_1:15;
then [x,z] in W by A159,A160,A163,A162,RELAT_2:def 8;
hence thesis by A3,A148,A161;
end;
then
A164: R is_transitive_in field R by RELAT_2:def 8;
A165: x in field R implies [x,x] in R
proof
assume
A166: x in field R;
then consider W such that
A167: x in field W and
A168: W in G by A4;
W is well-ordering by A2,A168;
then W well_orders field W by WELLORD1:4;
then W is_reflexive_in field W by WELLORD1:def 5;
then
A169: [x,x] in W by A167,RELAT_2:def 1;
x in union D by A4,A166;
hence thesis by A3,A168,A169;
end;
A170: not field R in D
proof
set a0=F.(field R);
reconsider W3 = [: field R,{ a0 } :] as Relation;
reconsider W4 = { [a0,a0]} as Relation;
reconsider W1=R \/ [: field R,{ a0 }:] \/ {[ a0,a0 ]} as Relation;
{[ a0,a0 ]} c= W1 & [ a0,a0 ] in {[ a0,a0 ]} by TARSKI:def 1,XBOOLE_1:7;
then
A171: a0 in field W1 by RELAT_1:15;
field W4 = {a0,a0} by RELAT_1:17;
then
A172: field W4 = {a0}\/{a0} by ENUMSET1:1;
A173: field R = {} implies field W1 =field R \/ { a0 }
proof
assume
A174: field R = {};
A175: field W3 = {}
proof
set z3 = the Element of field W3;
assume field W3 <> {};
then ex z2 st [z3,z2] in W3 or [z2,z3] in W3 by Th1;
hence contradiction by A174,ZFMISC_1:90;
end;
field W1 =field (R \/ W3) \/ field W4 by RELAT_1:18;
then field W1 =field R \/ {} \/ {a0} by A172,A175,RELAT_1:18;
hence thesis;
end;
A176: field R <> {} implies field W1 =field R \/ { a0 }
proof
assume field R <> {};
then
A177: field W3 = field R \/ { a0 } by Th2;
field W1 =field (R \/ W3) \/ field W4 by RELAT_1:18;
then
field W1 =field R \/ (field R \/ { a0 }) \/ {a0} by A172,A177,RELAT_1:18;
then field W1 =(field R \/ field R) \/ { a0 } \/ {a0} by XBOOLE_1:4;
then field W1 =(field R \/ field R) \/ ({ a0 } \/ {a0}) by XBOOLE_1:4;
hence thesis;
end;
A178: x in field W1 implies x in field R or x = a0
proof
assume x in field W1;
then x in field R or x in {a0} by A176,A173,XBOOLE_0:def 3;
hence thesis by TARSKI:def 1;
end;
A179: [x,y] in W1 iff [x,y] in R or [x,y] in W3 or [x,y] in W4
proof
[x,y] in W1 iff ([x,y] in (R \/ W3) or [x,y] in W4) by XBOOLE_0:def 3;
hence thesis by XBOOLE_0:def 3;
end;
x in field W1 & y in field W1 & x <>y implies [x,y] in W1 or [y,x] in W1
proof
assume that
A180: x in field W1 and
A181: y in field W1 and
A182: x <>y;
A183: not x in field R implies [x,y] in W1 or [y,x] in W1
proof
assume not x in field R;
then
A184: x = a0 by A178,A180;
A185: y in field R implies [x,y] in W1 or [y,x] in W1
proof
assume y in field R;
then [y,x] in W3 by A184,ZFMISC_1:106;
hence thesis by A179;
end;
y = a0 implies [x,y] in W1 or [y,x] in W1
proof
assume y = a0;
then [x,y] in W4 by A184,TARSKI:def 1;
hence thesis by A179;
end;
hence thesis by A178,A181,A185;
end;
A186: not y in field R implies [x,y] in W1 or [y,x] in W1
proof
assume not y in field R;
then
A187: y = a0 by A178,A181;
A188: x in field R implies [y,x] in W1 or [x,y] in W1
proof
assume x in field R;
then [x,y] in W3 by A187,ZFMISC_1:106;
hence thesis by A179;
end;
x = a0 implies [y,x] in W1 or [x,y] in W1
proof
assume x = a0;
then [y,x] in W4 by A187,TARSKI:def 1;
hence thesis by A179;
end;
hence thesis by A178,A180,A188;
end;
x in field R & y in field R implies [x,y] in W1 or [y,x] in W1
proof
assume x in field R & y in field R;
then [x,y] in R or [y,x] in R by A117,A182;
hence thesis by A179;
end;
hence thesis by A183,A186;
end;
then
A189: W1 is_connected_in field W1 by RELAT_2:def 6;
assume
A190: field R in D;
for x,y holds [x,y] in W1 implies [x,y] in [: union D, union D :]
proof
let x,y;
assume
A191: [x,y] in W1;
then y in field W1 by RELAT_1:15;
then y in field R or y=a0 by A178;
then
A192: y in union D by A1,A4,A190;
x in field W1 by A191,RELAT_1:15;
then x in field R or x=a0 by A178;
then x in union D by A1,A4,A190;
hence thesis by A192,ZFMISC_1:def 2;
end;
then
A193: W1 c= [: union D,union D :] by RELAT_1:def 3;
A194: not a0 in field R by A1,A190;
A195: [x,y] in W1 & y in field R implies [x,y] in R & x in field R
proof
assume that
A196: [x,y] in W1 and
A197: y in field R;
A198: not [x,y] in W4
proof
assume [x,y] in W4;
then [x,y] = [a0,a0] by TARSKI:def 1;
hence contradiction by A194,A197,XTUPLE_0:1;
end;
not [x,y] in W3 by A194,A197,ZFMISC_1:106;
hence [x,y] in R by A179,A196,A198;
[x,y] in R or [x,y] in W3 or [x,y] in W4 by A179,A196;
hence thesis by A198,RELAT_1:15,ZFMISC_1:106;
end;
x in field W1 & y in field W1 & [x,y] in W1 & [y,x] in W1 implies x= y
proof
assume that
A199: x in field W1 and
A200: y in field W1 and
A201: [x,y] in W1 and
A202: [y,x] in W1;
A203: x in field R implies x=y
proof
assume
A204: x in field R;
then
A205: [y,x] in R by A195,A202;
A206: y in field R by A195,A202,A204;
then [x,y] in R by A195,A201;
hence thesis by A84,A204,A205,A206;
end;
A207: y in field R implies x=y
proof
assume
A208: y in field R;
then
A209: [x,y] in R by A195,A201;
A210: x in field R by A195,A201,A208;
then [y,x] in R by A195,A202;
hence thesis by A84,A208,A209,A210;
end;
y in field R or y =a0 by A178,A200;
hence thesis by A178,A199,A203,A207;
end;
then
A211: W1 is_antisymmetric_in field W1 by RELAT_2:def 4;
A212: y in field R implies W1-Seg(y) = R-Seg(y)
proof
assume
A213: y in field R;
A214: x in W1-Seg(y) implies x in R-Seg(y)
proof
assume
A215: x in W1-Seg(y);
then [x,y] in W1 by WELLORD1:1;
then
A216: [x,y] in R by A195,A213;
x<>y by A215,WELLORD1:1;
hence thesis by A216,WELLORD1:1;
end;
x in R-Seg(y) implies x in W1-Seg(y)
proof
assume
A217: x in R-Seg(y);
then [x,y] in R by WELLORD1:1;
then
A218: [x,y] in W1 by A179;
x<>y by A217,WELLORD1:1;
hence thesis by A218,WELLORD1:1;
end;
hence thesis by A214,TARSKI:1;
end;
A219: W1 is_well_founded_in field W1
proof
let Y;
assume that
A220: Y c= field W1 and
A221: Y <> {};
A222: not Y c=field R implies ex a st a in Y & W1-Seg(a) misses Y
proof
assume not Y c= field R;
A223: not (field R) /\ Y = {} implies ex a st a in Y & W1-Seg(a) misses Y
proof
set X = (field R) /\ Y;
A224: X c= field R by XBOOLE_1:17;
assume not (field R) /\ Y = {};
then consider y such that
A225: y in X and
A226: R-Seg(y) misses X by A130,A224,WELLORD1:def 3;
A227: R-Seg(y) /\ Y c= R-Seg(y) /\ X
proof
let x;
assume
A228: x in R-Seg(y) /\ Y;
then
A229: x in Y by XBOOLE_0:def 4;
A230: x in R-Seg(y) by A228,XBOOLE_0:def 4;
then [x,y] in R by WELLORD1:1;
then x in field R by RELAT_1:15;
then x in X by A229,XBOOLE_0:def 4;
hence thesis by A230,XBOOLE_0:def 4;
end;
R-Seg(y) /\ X = {} by A226,XBOOLE_0:def 7;
then W1-Seg(y) /\ Y = {} by A212,A224,A225,A227;
then
A231: W1-Seg(y) misses Y by XBOOLE_0:def 7;
y in Y by A225,XBOOLE_0:def 4;
hence thesis by A231;
end;
(field R) /\ Y = {} implies ex a st a in Y & W1-Seg(a) misses Y
proof
set y = the Element of Y;
A232: W1-Seg(a0) c= field R
proof
let z be set;
assume
A233: z in W1-Seg(a0);
then [z,a0] in W1 by WELLORD1:1;
then
A234: z in field W1 by RELAT_1:15;
z <> a0 by A233,WELLORD1:1;
hence thesis by A178,A234;
end;
A235: y in field W1 by A220,A221,TARSKI:def 3;
assume
A236: (field R) /\ Y = {};
then not y in field R by A221,XBOOLE_0:def 4;
then y = a0 by A178,A235;
then W1-Seg(y) /\ Y = {} by A236,A232,XBOOLE_1:3,26;
then W1-Seg(y) misses Y by XBOOLE_0:def 7;
hence thesis by A221;
end;
hence thesis by A223;
end;
Y c= field R implies ex a st a in Y & W1-Seg(a) misses Y
proof
assume
A237: Y c= field R;
then consider b such that
A238: b in Y & R-Seg(b) misses Y by A130,A221,WELLORD1:def 3;
take b;
thus thesis by A212,A237,A238;
end;
hence thesis by A222;
end;
A239: for y st y in field W1 holds W1-Seg(y) in D & F.(W1-Seg(y)) = y
proof
let y;
A240: y in field R implies W1-Seg(y) = R-Seg(y)
proof
assume
A241: y in field R;
A242: x in W1-Seg(y) implies x in R-Seg(y)
proof
A243: [x,y] in W4 implies [x,y] = [a0,a0] by TARSKI:def 1;
assume
A244: x in W1-Seg(y);
then [x,y] in W1 by WELLORD1:1;
then [x,y] in (R \/ W3) or [x,y] in W4 by XBOOLE_0:def 3;
then
A245: [x,y] in R or [x,y] in W3 or [x,y] in W4 by XBOOLE_0:def 3;
not x=y by A244,WELLORD1:1;
hence thesis by A194,A241,A245,A243,WELLORD1:1,XTUPLE_0:1
,ZFMISC_1:106;
end;
x in R-Seg(y) implies x in W1-Seg(y)
proof
assume
A246: x in R-Seg(y);
then [x,y] in R by WELLORD1:1;
then [x,y] in R \/ W3 by XBOOLE_0:def 3;
then
A247: [x,y] in W1 by XBOOLE_0:def 3;
not x=y by A246,WELLORD1:1;
hence thesis by A247,WELLORD1:1;
end;
hence thesis by A242,TARSKI:1;
end;
A248: x in W1-Seg(a0) implies x in field R
proof
assume
A249: x in W1-Seg(a0);
then [x,a0] in W1 by WELLORD1:1;
then
A250: x in field W1 by RELAT_1:15;
not x=a0 by A249,WELLORD1:1;
hence thesis by A178,A250;
end;
A251: x in field R implies x in W1-Seg(a0)
proof
assume
A252: x in field R;
then [x,a0] in W3 by ZFMISC_1:106;
then [x,a0] in R \/ W3 by XBOOLE_0:def 3;
then [x,a0] in W1 by XBOOLE_0:def 3;
hence thesis by A194,A252,WELLORD1:1;
end;
assume y in field W1;
then y in field R or y=a0 by A178;
hence thesis by A103,A190,A240,A248,A251,TARSKI:1;
end;
x in field W1 & y in field W1 & z in field W1 & [x,y] in W1 & [y,z]
in W1 implies [x,z] in W1
proof
assume that
A253: x in field W1 and
y in field W1 and
A254: z in field W1 and
A255: [x,y] in W1 and
A256: [y,z] in W1;
A257: z = a0 implies [x,z] in W1
proof
assume
A258: z = a0;
A259: x = a0 implies [x,z] in W1
proof
assume x = a0;
then [x,z] in W4 by A258,TARSKI:def 1;
hence thesis by A179;
end;
x in field R implies [x,z] in W1
proof
assume x in field R;
then [x,z] in W3 by A258,ZFMISC_1:106;
hence thesis by A179;
end;
hence thesis by A178,A253,A259;
end;
z in field R implies [x,z] in W1
proof
assume
A260: z in field R;
then
A261: [y,z] in R by A195,A256;
A262: y in field R by A195,A256,A260;
then [x,y] in R & x in field R by A195,A255;
then [x,z] in R by A145,A260,A261,A262;
hence thesis by A179;
end;
hence thesis by A178,A254,A257;
end;
then
A263: W1 is_transitive_in field W1 by RELAT_2:def 8;
x in field W1 implies [x,x] in W1
proof
A264: x = a0 implies [x,x] in W1
proof
A265: [a0,a0] in W4 by TARSKI:def 1;
assume x=a0;
hence thesis by A179,A265;
end;
A266: x in field R implies [x,x] in W1
proof
assume x in field R;
then [x,x] in R by A165;
hence thesis by A179;
end;
assume x in field W1;
hence thesis by A178,A266,A264;
end;
then W1 is_reflexive_in field W1 by RELAT_2:def 1;
then W1 well_orders field W1 by A263,A211,A189,A219,WELLORD1:def 5;
then W1 is well-ordering by WELLORD1:4;
then W1 in G by A2,A193,A239;
then field W1 c= field R by A97;
hence contradiction by A1,A190,A171;
end;
R is_reflexive_in field R by A165,RELAT_2:def 1;
then R well_orders field R by A164,A96,A129,A130,WELLORD1:def 5;
hence thesis by A103,A170,WELLORD1:4;
end;
Lm1: X,M are_equipotent iff ex Z st (for x st x in X ex y st y in M & [x,y] in
Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in
Z & [y,z2] in Z holds x = y iff z1 = z2
proof
A1: ( ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st y in
M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z
holds x = y iff z1 = z2 ) implies X,M are_equipotent
proof
assume ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st
y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in
Z holds x = y iff z1 = z2;
hence ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st y
in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z
holds x = y iff z1 = z2;
end;
X,M are_equipotent implies ex Z st (for x st x in X ex y st y in M & [x,
y] in Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,
z1] in Z & [y,z2] in Z holds x = y iff z1 = z2
proof
assume ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st
y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in
Z holds x = y iff z1 = z2;
hence thesis;
end;
hence thesis by A1;
end;
theorem
for N ex R st R is well-ordering & field R = N
proof
let N;
consider M such that
A1: N in M & for X,Y holds X in M & Y c= X implies Y in M and
A2: for X holds X in M implies bool X in M and
A3: for X holds X c= M implies X,M are_equipotent or X in M by ZFMISC_1:112;
defpred P[set] means not $1,M are_equipotent;
consider D such that
A4: A in D iff A in bool M & P[A] from XBOOLE_0:sch 1;
A5: union D c= M
proof
let x;
assume x in union D;
then consider A such that
A6: x in A and
A7: A in D by TARSKI:def 4;
A in bool M by A4,A7;
hence thesis by A6;
end;
set F = id D;
for Z st Z in D holds not F.Z in Z & F.Z in union D
proof
let Z;
assume
A8: Z in D;
not Z in Z;
hence not F.Z in Z by A8,FUNCT_1:18;
X in D implies X in union D
proof
A9: X in { X } by TARSKI:def 1;
assume X in D;
then
A10: X in bool M & not X,M are_equipotent by A4;
A11: not { X },M are_equipotent
proof
A12: X <> bool X
proof
assume X = bool X;
then not X in bool X;
hence contradiction by ZFMISC_1:def 1;
end;
assume { X },M are_equipotent;
then consider Z such that
for x st x in { X } ex y st y in M & [x,y] in Z and
A13: for y st y in M ex x st x in { X } & [x,y] in Z and
A14: for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1
= z2 by Lm1;
bool X in M by A2,A3,A10;
then consider y such that
A15: y in {X} and
A16: [y,bool X] in Z by A13;
consider x such that
A17: x in {X} and
A18: [x,X] in Z by A3,A10,A13;
x=X by A17,TARSKI:def 1;
then y=x by A15,TARSKI:def 1;
hence contradiction by A14,A12,A18,A16;
end;
X in M by A3,A10;
then x in {X} implies x in M by TARSKI:def 1;
then { X } c= M by TARSKI:def 3;
then { X } in D by A4,A11;
hence thesis by A9,TARSKI:def 4;
end;
then Z in union D by A8;
hence thesis by A8,FUNCT_1:18;
end;
then consider S such that
A19: field S c= union D and
A20: S is well-ordering and
A21: not field S in D and
for y st y in field S holds S-Seg(y) in D & F.(S-Seg(y)) = y by Th5;
not field S c= M or field S,M are_equipotent by A4,A21;
then consider Z such that
A22: for x st x in field S ex y st y in M & [x,y] in Z and
A23: for y st y in M ex x st x in field S & [x,y] in Z and
A24: for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2
by A5,A19,Lm1,XBOOLE_1:1;
defpred P[set,set] means [$2,$1] in Z;
A25: for x st x in M ex y st P[x,y]
proof
let x;
assume x in M;
then ex y st y in field S & [y,x] in Z by A23;
hence thesis;
end;
A26: for x,z1,z2 st x in M & P[x,z1] & P[x,z2] holds z1 = z2 by A24;
consider H such that
A27: dom H = M and
A28: for x st x in M holds P[x, H.x] from FUNCT_1:sch 2(A26,A25);
defpred P[set,set] means $2={$1};
defpred P[set] means ex x,y st $1=[x,y] & [H.x,H.y] in S;
consider W0 such that
A29: z in W0 iff z in [: M,M :] & P[z] from XBOOLE_0:sch 1;
A30: x in field S implies x in rng H
proof
assume x in field S;
then consider y such that
A31: y in M and
A32: [x,y] in Z by A22;
set z1= H.y;
z1 in rng H & [z1,y] in Z by A27,A28,A31,FUNCT_1:def 3;
hence thesis by A24,A32;
end;
for z1,z2 st z1 in dom H & z2 in dom H & H.z1 = H.z2 holds z1 = z2
proof
let z1,z2;
assume that
A33: z1 in dom H & z2 in dom H and
A34: H.z1 = H.z2;
[H.z1,z1] in Z & [H.z2,z2] in Z by A27,A28,A33;
hence thesis by A24,A34;
end;
then
A35: H is one-to-one by FUNCT_1:def 4;
z in W0 implies ex x,y st z=[x,y]
proof
assume z in W0;
then ex z1,z2 st z=[z1,z2] & [H.z1,H.z2] in S by A29;
hence thesis;
end;
then reconsider W0 as Relation by RELAT_1:def 1;
A36: z in field W0 implies z in M
proof
assume z in field W0;
then consider z1 such that
A37: [z,z1] in W0 or [z1,z] in W0 by Th1;
A38: [z1,z] in W0 implies z in M
proof
assume [z1,z] in W0;
then [z1,z] in [: M,M :] by A29;
hence thesis by ZFMISC_1:87;
end;
[z,z1] in W0 implies z in M
proof
assume [z,z1] in W0;
then [z,z1] in [: M,M :] by A29;
hence thesis by ZFMISC_1:87;
end;
hence thesis by A37,A38;
end;
A39: for x st x in N ex y st P[x,y];
A40: for x,z1,z2 st x in N & P[x,z1] & P[x,z2] holds z1 = z2;
consider H1 such that
A41: dom H1 = N and
A42: for x st x in N holds P[x, H1.x] from FUNCT_1:sch 2(A40,A39);
for z1,z2 st z1 in dom H1 & z2 in dom H1 & H1.z1 = H1.z2 holds z1 = z2
proof
let z1,z2;
assume that
A43: z1 in dom H1 and
A44: z2 in dom H1 and
A45: H1.z1 = H1.z2;
H1.z1={z1} by A41,A42,A43;
then
A46: z1 in H1.z2 by A45,TARSKI:def 1;
H1.z2={z2} by A41,A42,A44;
hence thesis by A46,TARSKI:def 1;
end;
then
A47: H1 is one-to-one by FUNCT_1:def 4;
set S1=W0 |_2 rng H1;
x in rng H implies x in field S
proof
assume x in rng H;
then consider z1 such that
A48: z1 in dom H & x = H.z1 by FUNCT_1:def 3;
( ex z2 st z2 in field S & [z2,z1] in Z)& [x,z1] in Z by A23,A27,A28,A48;
hence thesis by A24;
end;
then
A49: rng H = field S by A30,TARSKI:1;
z in M implies z in field W0
proof
assume
A50: z in M;
ex z1 st [z,z1] in W0 or [z1,z] in W0
proof
H.z in field S by A27,A49,A50,FUNCT_1:def 3;
then consider z2 such that
A51: [H.z,z2] in S or [z2,H.z] in S by Th1;
A52: [H.z,z2] in S implies ex z1 st [z,z1] in W0 or [z1,z] in W0
proof
assume
A53: [H.z,z2] in S;
then z2 in rng H by A49,RELAT_1:15;
then consider z3 such that
A54: z3 in dom H and
A55: z2=H.z3 by FUNCT_1:def 3;
take z3;
[z,z3] in [: M,M :] by A27,A50,A54,ZFMISC_1:87;
hence thesis by A29,A53,A55;
end;
[z2,H.z] in S implies ex z1 st [z,z1] in W0 or [z1,z] in W0
proof
assume
A56: [z2,H.z] in S;
then z2 in rng H by A49,RELAT_1:15;
then consider z3 such that
A57: z3 in dom H and
A58: z2=H.z3 by FUNCT_1:def 3;
take z3;
[z3,z] in [: M,M :] by A27,A50,A57,ZFMISC_1:87;
hence thesis by A29,A56,A58;
end;
hence thesis by A51,A52;
end;
hence thesis by Th1;
end;
then
A59: field W0 = M by A36,TARSKI:1;
for a,b holds [a,b] in W0 iff a in field W0 & b in field W0 & [H.a,H.b ] in S
proof
let a,b;
A60: [a,b] in W0 implies a in field W0 & b in field W0 & [H.a,H.b] in S
proof
assume
A61: [a,b] in W0;
then
A62: [a,b] in [: M,M :] by A29;
consider x,y such that
A63: [a,b] = [x,y] and
A64: [H.x,H.y] in S by A29,A61;
a=x by A63,XTUPLE_0:1;
hence thesis by A59,A62,A63,A64,XTUPLE_0:1,ZFMISC_1:87;
end;
a in field W0 & b in field W0 & [H.a,H.b] in S implies [a,b] in W0
proof
assume that
A65: a in field W0 & b in field W0 and
A66: [H.a,H.b] in S;
[a,b] in [: M,M :] by A59,A65,ZFMISC_1:87;
hence thesis by A29,A66;
end;
hence thesis by A60;
end;
then H is_isomorphism_of W0,S by A27,A35,A49,A59,WELLORD1:def 7;
then
A67: (H") is_isomorphism_of S, W0 by WELLORD1:39;
then W0 is well-ordering by A20,WELLORD1:44;
then
A68: S1 is well-ordering by WELLORD1:25;
defpred P[set] means ex x,y st $1=[x,y] & [H1.x,H1.y] in S1;
consider W00 such that
A69: z in W00 iff z in [: N,N :] & P[z] from XBOOLE_0:sch 1;
z in W00 implies ex x,y st z=[x,y]
proof
assume z in W00;
then ex z1,z2 st z=[z1,z2] & [H1.z1,H1.z2] in S1 by A69;
hence thesis;
end;
then reconsider W00 as Relation by RELAT_1:def 1;
A70: z in field W00 implies z in N
proof
assume z in field W00;
then consider z1 such that
A71: [z,z1] in W00 or [z1,z] in W00 by Th1;
A72: [z1,z] in W00 implies z in N
proof
assume [z1,z] in W00;
then [z1,z] in [: N,N :] by A69;
hence thesis by ZFMISC_1:87;
end;
[z,z1] in W00 implies z in N
proof
assume [z,z1] in W00;
then [z,z1] in [: N,N :] by A69;
hence thesis by ZFMISC_1:87;
end;
hence thesis by A71,A72;
end;
rng H1 c= M
proof
let x;
assume x in rng H1;
then consider y such that
A73: y in dom H1 and
A74: x = H1.y by FUNCT_1:def 3;
z1 in { y } implies z1 in N by A41,A73,TARSKI:def 1;
then
A75: { y } c= N by TARSKI:def 3;
x = { y } by A41,A42,A73,A74;
hence thesis by A1,A75;
end;
then
A76: field S1 = rng H1 by A20,A59,A67,WELLORD1:31,44;
z in N implies z in field W00
proof
assume
A77: z in N;
ex z1 st [z,z1] in W00 or [z1,z] in W00
proof
H1.z in field S1 by A41,A76,A77,FUNCT_1:def 3;
then consider z2 such that
A78: [H1.z,z2] in S1 or [z2,H1.z] in S1 by Th1;
A79: [H1.z,z2] in S1 implies ex z1 st [z,z1] in W00 or [z1,z] in W00
proof
assume
A80: [H1.z,z2] in S1;
then z2 in rng H1 by A76,RELAT_1:15;
then consider z3 such that
A81: z3 in dom H1 and
A82: z2=H1.z3 by FUNCT_1:def 3;
take z3;
[z,z3] in [: N,N :] by A41,A77,A81,ZFMISC_1:87;
hence thesis by A69,A80,A82;
end;
[z2,H1.z] in S1 implies ex z1 st [z,z1] in W00 or [z1,z] in W00
proof
assume
A83: [z2,H1.z] in S1;
then z2 in rng H1 by A76,RELAT_1:15;
then consider z3 such that
A84: z3 in dom H1 and
A85: z2=H1.z3 by FUNCT_1:def 3;
take z3;
[z3,z] in [: N,N :] by A41,A77,A84,ZFMISC_1:87;
hence thesis by A69,A83,A85;
end;
hence thesis by A78,A79;
end;
hence thesis by Th1;
end;
then
A86: field W00 = N by A70,TARSKI:1;
for a,b holds [a,b] in W00 iff a in field W00 & b in field W00 & [H1.a
,H1.b] in S1
proof
let a,b;
A87: [a,b] in W00 implies a in field W00 & b in field W00 & [H1.a,H1.b] in S1
proof
assume
A88: [a,b] in W00;
then
A89: [a,b] in [: N,N :] by A69;
consider x,y such that
A90: [a,b] = [x,y] and
A91: [H1.x,H1.y] in S1 by A69,A88;
a=x by A90,XTUPLE_0:1;
hence thesis by A86,A89,A90,A91,XTUPLE_0:1,ZFMISC_1:87;
end;
a in field W00 & b in field W00 & [H1.a,H1.b] in S1 implies [a,b] in W00
proof
assume that
A92: a in field W00 & b in field W00 and
A93: [H1.a,H1.b] in S1;
[a,b] in [: N,N :] by A86,A92,ZFMISC_1:87;
hence thesis by A69,A93;
end;
hence thesis by A87;
end;
then H1 is_isomorphism_of W00,S1 by A41,A47,A76,A86,WELLORD1:def 7;
then (H1") is_isomorphism_of S1, W00 by WELLORD1:39;
hence thesis by A68,A86,WELLORD1:44;
end;
begin
definition
let f be Function;
let a,b,c be set;
func f.(a,b,c) -> set equals
f.[a,b,c];
correctness;
end;
reserve A,B,C,D,E for non empty set,
a for Element of A,
b for Element of B,
c for Element of C,
d for Element of D,
X,Y,Z,S,x,y,z,s,t for set;
definition
let A,B,C,D;
let f be Function of [:A,B,C:],D;
let a,b,c;
redefine func f.(a,b,c) -> Element of D;
coherence
proof
f.([a,b,c]) is Element of D;
hence thesis;
end;
end;
theorem Th1:
for f1,f2 being Function of [:X,Y,Z:],D st for x,y,z st x in X &
y in Y & z in Z holds f1.[x,y,z] = f2.[x,y,z] holds f1 = f2
proof
let f1,f2 be Function of [:X,Y,Z:],D such that
A1: for x,y,z st x in X & y in Y & z in Z holds f1.[x,y,z] = f2.[x,y,z];
for t st t in [:X,Y,Z:] holds f1.t = f2.t
proof
let t;
assume t in [:X,Y,Z:];
then ex x,y,z st x in X & y in Y & z in Z & t = [x,y,z] by MCART_1:68;
hence thesis by A1;
end;
hence thesis by FUNCT_2:12;
end;
theorem Th2:
for f1,f2 being Function of [:A,B,C:],D st for a,b,c holds f1.[a,
b,c] = f2.[a,b,c] holds f1 = f2
proof
let f1,f2 be Function of [:A,B,C:],D;
assume for a,b,c holds f1.[a,b,c] = f2.[a,b,c];
then for x,y,z st x in A & y in B & z in C holds f1.[x,y,z] = f2.[x,y,z];
hence thesis by Th1;
end;
theorem
for f1,f2 being Function of [:A,B,C:],D st for a being Element of A
for b being Element of B for c being Element of C holds f1.(a,b,c) = f2.(a,b,c)
holds f1 = f2
proof
let f1,f2 be Function of [:A,B,C:],D such that
A1: for a being Element of A for b being Element of B for c being
Element of C holds f1.(a,b,c) = f2.(a,b,c);
for a being Element of A for b being Element of B for c being Element of
C holds f1.[a,b,c] = f2.[a,b,c]
proof
let a be Element of A;
let b be Element of B;
let c be Element of C;
f1.(a,b,c) = f1.[a,b,c] & f2.(a,b,c) = f2.[a,b,c];
hence thesis by A1;
end;
hence thesis by Th2;
end;
definition
let A be set;
mode TriOp of A is Function of [:A,A,A:],A;
end;
scheme
FuncEx3D { X,Y,Z,T() -> non empty set, P[set,set,set,set] } : ex f being
Function of [:X(),Y(),Z():],T() st for x being Element of X() for y being
Element of Y() for z being Element of Z() holds P[x,y,z,f.[x,y,z]]
provided
A1: for x being Element of X() for y being Element of Y() for z being
Element of Z() ex t being Element of T() st P[x,y,z,t]
proof
defpred Q[set,set] means ( for x being (Element of X()), y being (Element of
Y()), z being Element of Z() st $1 = [x,y,z] holds P[x,y,z,$2]);
A2: for p being Element of [:X(),Y(),Z():] ex t being Element of T() st Q[p, t]
proof
let p be Element of [:X(),Y(),Z():];
consider x1, y1, z1 be set such that
A3: x1 in X() and
A4: y1 in Y() and
A5: z1 in Z() and
A6: p = [x1,y1,z1] by MCART_1:68;
reconsider z1 as Element of Z() by A5;
reconsider y1 as Element of Y() by A4;
reconsider x1 as Element of X() by A3;
consider t being Element of T() such that
A7: P[x1,y1,z1,t] by A1;
take t;
let x be (Element of X()), y be (Element of Y()), z be Element of Z();
assume
A8: p = [x,y,z];
then x1 = x & y1 = y by A6,XTUPLE_0:3;
hence thesis by A6,A7,A8,XTUPLE_0:3;
end;
consider f being Function of [:X(),Y(),Z():],T() such that
A9: for p being Element of [:X(),Y(),Z():] holds Q[p,f.p] from FUNCT_2:
sch 3 (A2);
take f;
let x be Element of X();
let y be Element of Y();
let z be Element of Z();
thus thesis by A9;
end;
scheme
TriOpEx { A()->non empty set, P[ Element of A(), Element of A(), Element of
A(), Element of A()] }: ex o being TriOp of A() st for a,b,c being Element of A
() holds P[a,b,c,o.(a,b,c)]
provided
A1: for x,y,z being Element of A() ex t being Element of A() st P[x,y,z, t]
proof
defpred Q[Element of A(),Element of A(),Element of A(),Element of A()] means
for r being Element of A() st r = $4 holds P[$1,$2,$3,r];
A2: for x,y,z being Element of A() ex t being Element of A() st Q[x,y,z,t]
proof
let x,y,z be Element of A();
consider t being Element of A() such that
A3: P[x,y,z,t] by A1;
take t;
thus thesis by A3;
end;
consider f being Function of [:A(),A(),A():],A() such that
A4: for a,b,c being Element of A() holds Q[a,b,c,f.[a,b,c]] from
FuncEx3D(A2 );
take f;
let a,b,c be Element of A();
thus thesis by A4;
end;
scheme
Lambda3D { X, Y, Z, T()->non empty set, F( Element of X(), Element of Y(),
Element of Z()) -> Element of T() }: ex f being Function of [:X(),Y(),Z():],T()
st for x being Element of X() for y being Element of Y() for z being Element of
Z() holds f.[x,y,z]=F(x,y,z) proof
defpred Q[Element of X(),Element of Y(),Element of Z(),Element of T()] means
$4 = F($1,$2,$3);
A1: for x being Element of X() for y being Element of Y() for z being
Element of Z() ex t being Element of T() st Q[x,y,z,t];
ex f being Function of [:X(),Y(),Z():],T() st for x being Element of X()
for y being Element of Y() for z being Element of Z() holds Q[x,y,z,f.[x,y,z]]
from FuncEx3D(A1);
hence thesis;
end;
scheme
TriOpLambda { A,B,C,D()->non empty set, O( Element of A(), Element of B(),
Element of C()) -> Element of D() }: ex o being Function of [:A(),B(),C():],D()
st for a being Element of A(), b being Element of B(), c being Element of C()
holds o.(a,b,c) = O(a,b,c) proof
consider f being Function of [:A(),B(),C():],D() such that
A1: for a being Element of A(), b being Element of B(), c being Element
of C() holds f.[a,b,c] = O(a,b,c) from Lambda3D;
take f;
let a be Element of A(), b be Element of B(), c be Element of C();
thus thesis by A1;
end;
definition
let f be Function;
let a,b,c,d be set;
func f.(a,b,c,d) -> set equals
f.[a,b,c,d];
correctness;
end;
definition
let A,B,C,D,E;
let f be Function of [:A,B,C,D:],E;
let a,b,c,d;
redefine func f.(a,b,c,d) -> Element of E;
coherence
proof
f.([a,b,c,d]) is Element of E;
hence thesis;
end;
end;
theorem Th4:
for f1,f2 being Function of [:X,Y,Z,S:],D st for x,y,z,s st x in
X & y in Y & z in Z & s in S holds f1.[x,y,z,s] = f2.[x,y,z,s] holds f1 = f2
proof
let f1,f2 be Function of [:X,Y,Z,S:],D such that
A1: for x,y,z,s st x in X & y in Y & z in Z & s in S holds f1.[x,y,z,s]
= f2.[x,y,z,s];
for t st t in [:X,Y,Z,S:] holds f1.t = f2.t
proof
let t;
assume t in [:X,Y,Z,S:];
then ex x,y,z,s st x in X & y in Y & z in Z & s in S & t = [x,y,z,s] by
MCART_1:79;
hence thesis by A1;
end;
hence thesis by FUNCT_2:12;
end;
theorem Th5:
for f1,f2 being Function of [:A,B,C,D:],E st for a,b,c,d holds f1
.[a,b,c,d] = f2.[a,b,c,d] holds f1 = f2
proof
let f1,f2 be Function of [:A,B,C,D:],E;
assume for a,b,c,d holds f1.[a,b,c,d] = f2.[a,b,c,d];
then
for x,y,z,s st x in A & y in B & z in C & s in D holds f1.[x,y,z,s] = f2
.[x,y,z,s];
hence thesis by Th4;
end;
theorem
for f1,f2 being Function of [:A,B,C,D:],E st for a,b,c,d holds f1.(a,b
,c,d) = f2.(a,b,c,d) holds f1 = f2
proof
let f1,f2 be Function of [:A,B,C,D:],E such that
A1: for a,b,c,d holds f1.(a,b,c,d) = f2.(a,b,c,d);
for a,b,c,d holds f1.[a,b,c,d] = f2.[a,b,c,d]
proof
let a,b,c,d;
f1.(a,b,c,d) = f1.[a,b,c,d] & f2.(a,b,c,d) = f2.[a,b,c,d];
hence thesis by A1;
end;
hence thesis by Th5;
end;
definition
let A;
mode QuaOp of A is Function of [:A,A,A,A:],A;
end;
scheme
FuncEx4D { X, Y, Z, S, T() -> non empty set, P[set,set,set,set,set] }: ex f
being Function of [:X(),Y(),Z(),S():],T() st for x being Element of X() for y
being Element of Y() for z being Element of Z() for s being Element of S()
holds P[x,y,z,s,f.[x,y,z,s]]
provided
A1: for x being Element of X() for y being Element of Y() for z being
Element of Z() for s being Element of S() ex t being Element of T() st P[x,y,z,
s,t]
proof
defpred Q[set,set] means for x being (Element of X()), y being (Element of Y
()), z being (Element of Z()), s being Element of S() st $1 = [x,y,z,s] holds P
[x,y,z,s,$2];
A2: for p being Element of [:X(),Y(),Z(),S():] ex t being Element of T() st
Q[p,t]
proof
let p be Element of [:X(),Y(),Z(),S():];
consider x1, y1, z1, s1 be set such that
A3: x1 in X() and
A4: y1 in Y() and
A5: z1 in Z() and
A6: s1 in S() and
A7: p = [x1,y1,z1,s1] by MCART_1:79;
reconsider s1 as Element of S() by A6;
reconsider z1 as Element of Z() by A5;
reconsider y1 as Element of Y() by A4;
reconsider x1 as Element of X() by A3;
consider t being Element of T() such that
A8: P[x1,y1,z1,s1,t] by A1;
take t;
let x be Element of X(), y be Element of Y(), z be Element of Z(), s be
Element of S();
assume
A9: p = [x,y,z,s];
then
A10: z1 = z by A7,XTUPLE_0:5;
x1 = x & y1 = y by A7,A9,XTUPLE_0:5;
hence thesis by A7,A8,A9,A10,XTUPLE_0:5;
end;
consider f being Function of [:X(),Y(),Z(),S():],T() such that
A11: for p being Element of [:X(),Y(),Z(),S():] holds Q[p,f.p] from
FUNCT_2:sch 3(A2);
take f;
let x be Element of X();
let y be Element of Y();
let z be Element of Z();
let s be Element of S();
thus thesis by A11;
end;
scheme
QuaOpEx { A()->non empty set, P[ Element of A(), Element of A(), Element of
A(), Element of A(), Element of A()] }: ex o being QuaOp of A() st for a,b,c,d
being Element of A() holds P[a,b,c,d,o.(a,b,c,d)]
provided
A1: for x,y,z,s being Element of A() ex t being Element of A() st P[x,y, z,s,t]
proof
defpred Q[Element of A(), Element of A(),Element of A(), Element of A(),
Element of A()] means for r being Element of A() st r = $5 holds P[$1,$2,$3,$4,
$5];
A2: for x,y,z,s being Element of A() ex t being Element of A() st Q[x,y,z,s, t]
proof
let x,y,z,s be Element of A();
consider t being Element of A() such that
A3: P[x,y,z,s,t] by A1;
take t;
thus thesis by A3;
end;
consider f being Function of [:A(),A(),A(),A():],A() such that
A4: for a,b,c,d being Element of A() holds Q[a,b,c,d,f.[a,b,c,d]] from
FuncEx4D(A2);
take f;
let a,b,c,d be Element of A();
thus thesis by A4;
end;
scheme
Lambda4D { X, Y, Z, S, T() -> non empty set, F( Element of X(), Element of Y
(), Element of Z(), Element of S()) -> Element of T() }: ex f being Function of
[:X(),Y(),Z(),S():],T() st for x being Element of X() for y being Element of Y(
) for z being Element of Z() for s being Element of S() holds f.[x,y,z,s]=F(x,y
,z,s) proof
defpred P[Element of X(),Element of Y(),Element of Z(),Element of S(),
Element of T()] means $5 = F($1,$2,$3,$4);
A1: for x being Element of X() for y being Element of Y() for z being
Element of Z() for s being Element of S() ex t being Element of T() st P[x,y,z,
s,t];
ex f being Function of [:X(),Y(),Z(),S():],T() st for x being Element of
X() for y being Element of Y() for z being Element of Z() for s being Element
of S() holds P[x,y,z,s,f.[x,y,z,s]] from FuncEx4D(A1);
hence thesis;
end;
scheme
QuaOpLambda { A()->non empty set, O( Element of A(), Element of A(), Element
of A(), Element of A()) -> Element of A() }: ex o being QuaOp of A() st for a,b
,c,d being Element of A() holds o.(a,b,c,d) = O(a,b,c,d) proof
deffunc F(Element of A(),Element of A(),Element of A(),Element of A()) = O(
$1,$2,$3,$4);
consider f being Function of [:A(),A(),A(),A():],A() such that
A1: for a,b,c,d being Element of A() holds f.[a,b,c,d] = F(a,b,c,d) from
Lambda4D;
take f;
let a,b,c,d be Element of A();
thus thesis by A1;
end;