:: Relations and Their Basic Properties
:: by Edmund Woronowicz
::
:: Received March 15, 1989
:: Copyright (c) 1990-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies XBOOLE_0, TARSKI, ZFMISC_1, SUBSET_1, RELAT_1, VALUED_1;
notations TARSKI, XBOOLE_0, ZFMISC_1, XTUPLE_0, SUBSET_1;
constructors TARSKI, SUBSET_1, ZFMISC_1, XTUPLE_0, XBOOLE_0;
registrations XBOOLE_0, ZFMISC_1, XTUPLE_0;
requirements SUBSET, BOOLE;
definitions TARSKI, XBOOLE_0, ZFMISC_1;
equalities TARSKI, XBOOLE_0;
expansions TARSKI, XBOOLE_0;
theorems TARSKI, XBOOLE_0, ZFMISC_1, ENUMSET1, XBOOLE_1, XTUPLE_0;
schemes XBOOLE_0;
begin
reserve A,X,X1,X2,Y,Y1,Y2
for set, a,b,c,d,x,y,z
for object;
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;
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
by Def1;
end;
scheme
RelExistence{A,B() -> set, P[object,object]}:
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 object
holds p
in R iff p
in [:A(),B():]
&
ex x,y st p=[x,y] & P[x,y]
proof
defpred Q[object] means
ex x,y st $
1=[x,y] & P[x,y];
consider B
being set
such that
A1:
for p
being object
holds p
in B iff p
in [:A(),B():] & Q[p]
from
XBOOLE_0:sch
1;
for p
being object st p
in B
holds ex x,y st p = [x,y]
proof
let p
be object;
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 object
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 object
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
be object;
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
be object;
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 object;
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;
end;
registration
let a, b
be set;
cluster [:a,b:] -> Relation-like;
coherence
proof
let z;
assume z
in [:a,b:];
then ex x,y
being object 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 object;
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
be object;
assume
A2: x
in P;
then ex y,z st x = [y,z]
by Def1;
hence thesis by A1,A2;
end;
end;
:: DOMAIN OF RELATION
notation
let R
be Relation;
synonym dom R
for proj1 R;
end;
:: CODOMAIN OF RELATION
notation
let R
be Relation;
synonym rng R
for proj2 R;
end;
::$CT 6
theorem Th1:
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 Th1,XBOOLE_1:
28;
theorem Th3:
dom {[x,y]} = {x} & rng {[x,y]} = {y}
proof
set R = {[x,y]};
for z
being object
holds z
in dom R iff z
in {x}
proof let z
be object;
thus z
in dom R
implies z
in {x}
proof
assume z
in dom R;
then consider b
being object
such that
A2: [z,b]
in R
by XTUPLE_0:def
12;
[z,b] = [x,y]
by 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 TARSKI:def
1;
hence thesis by XTUPLE_0:def
12;
end;
hence dom R = {x}
by TARSKI:
2;
for z
being object
holds z
in rng R iff z
in {y}
proof let z
be object;
thus z
in rng R
implies z
in {y}
proof
assume z
in rng R;
then consider a
being object
such that
A3: [a,z]
in R
by XTUPLE_0:def
13;
[a,z] = [x,y]
by 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 TARSKI:def
1;
hence thesis by XTUPLE_0:def
13;
end;
hence thesis by TARSKI:
2;
end;
theorem
dom {[a,b],[x,y]} = {a,x} & rng {[a,b],[x,y]} = {b,y}
proof
set R = {[a,b],[x,y]};
thus dom R = {a,x}
proof
thus dom R c= {a,x}
proof
let z
be object;
assume z
in dom R;
then consider c
being object
such that
A2: [z,c]
in R
by XTUPLE_0:def
12;
[z,c] = [a,b]
or [z,c] = [x,y]
by A2,TARSKI:def
2;
then z = a
or z = x
by XTUPLE_0:
1;
hence thesis by TARSKI:def
2;
end;
let z
be object;
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 TARSKI:def
2;
hence thesis by XTUPLE_0:def
12;
end;
thus rng R c= {b,y}
proof
let z
be object;
assume z
in rng R;
then consider d
being object
such that
A3: [d,z]
in R
by XTUPLE_0:def
13;
[d,z] = [a,b]
or [d,z] = [x,y]
by A3,TARSKI:def
2;
then z = b
or z = y
by XTUPLE_0:
1;
hence thesis by TARSKI:def
2;
end;
let z
be object;
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 TARSKI:def
2;
hence thesis by XTUPLE_0:def
13;
end;
theorem
P c= R
implies dom P c= dom R & rng P c= rng R
by XTUPLE_0:
8,
9;
theorem
rng(P \/ R) = rng P \/ rng R
by XTUPLE_0:
27;
theorem
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;
:: FIELD OF RELATION
definition
::$CD 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 XTUPLE_0:
8,
9;
hence thesis by XBOOLE_1:
13;
end;
theorem Th11:
field {[x,y]} = {x,y}
proof
dom {[x,y]} = {x} & rng {[x,y]} = {y}
by Th3;
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 XTUPLE_0:
23
.= dom P \/ dom R \/ (rng P \/ rng R)
by XTUPLE_0:
27
.= 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
be object;
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 XTUPLE_0:
24,
28;
hence thesis by A1,A2,XBOOLE_0:def
4;
end;
:: CONVERSE RELATION
definition
let R;
func R~ -> Relation means
:Def5:
[x,y]
in it iff [y,x]
in R;
existence
proof
defpred Q[object,object] 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 Th14:
rng R = dom(R~) & dom R = rng(R~)
proof
thus rng R c= dom(R~)
proof
let u
be object;
assume u
in rng R;
then consider x
being object
such that
A1: [x,u]
in R
by XTUPLE_0:def
13;
[u,x]
in R~
by A1,Def5;
hence thesis by XTUPLE_0:def
12;
end;
thus dom(R~) c= rng R
proof
let u
be object;
assume u
in dom(R~);
then consider x
being object
such that
A2: [u,x]
in R~
by XTUPLE_0:def
12;
[x,u]
in R
by A2,Def5;
hence thesis by XTUPLE_0:def
13;
end;
thus dom R c= rng(R~)
proof
let u
be object;
assume u
in dom R;
then consider x
being object
such that
A3: [u,x]
in R
by XTUPLE_0:def
12;
[x,u]
in R~
by A3,Def5;
hence thesis by XTUPLE_0:def
13;
end;
let u
be object;
assume u
in rng(R~);
then consider x
being object
such that
A4: [x,u]
in R~
by XTUPLE_0:def
13;
[u,x]
in R
by A4,Def5;
hence thesis by XTUPLE_0:def
12;
end;
theorem
field R = field(R~)
proof
thus field R = rng(R~) \/ rng R
by Th14
.= field(R~)
by Th14;
end;
theorem
(P /\ R)~ = P~ /\ R~
proof
let x,y;
[x,y]
in (P /\ R)~ iff [y,x]
in P /\ R
by Def5;
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 Def5;
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 Def5;
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 Def5;
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 Def5;
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 Def5;
hence thesis by XBOOLE_0:def
5;
end;
:: COMPOSITION OF RELATIONS
definition
let P,R
be set;
func P(
#)R -> Relation means
:Def6:
[x,y]
in it iff
ex z st [x,z]
in P & [z,y]
in R;
existence
proof
defpred Z[object,object] 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 Th19:
dom(P*R) c= dom P
proof
let x
be object;
assume x
in dom(P*R);
then consider y
being object
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,Def6;
hence thesis by XTUPLE_0:def
12;
end;
theorem Th20:
rng(P*R) c= rng R
proof
let y
be object;
assume y
in rng(P*R);
then consider x
being object
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,Def6;
hence thesis by XTUPLE_0:def
13;
end;
theorem
rng R c= dom P
implies dom(R*P) = dom R
proof
assume
A1:
for y
being object
holds y
in rng R
implies y
in dom P;
thus dom(R*P) c= dom R
by Th19;
let x
be object;
assume x
in dom R;
then consider y
being object
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
being object
such that
A3: [y,z]
in P
by XTUPLE_0:def
12;
[x,z]
in R*P
by A2,A3,Def6;
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
being object st y
in dom P
holds y
in rng R;
thus rng(R*P) c= rng P
by Th20;
let z
be object;
assume z
in rng P;
then consider y
being object
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
being object
such that
A3: [x,y]
in R
by XTUPLE_0:def
13;
[x,z]
in R*P
by A2,A3,Def6;
hence thesis by XTUPLE_0:def
13;
end;
theorem Th23:
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 Def6;
hence thesis by A1,Def6;
end;
theorem Th24:
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 Def6;
hence thesis by A1,Def6;
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 Def6;
hence [x,y]
in R*S
by A1,Def6;
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 Def6;
[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,Def6;
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 Def6;
[z,y]
in R \/ Q
by A5,XBOOLE_0:def
3;
hence [x,y]
in P*(R \/ Q)
by A4,Def6;
end;
suppose [x,y]
in P*R;
then consider z
such that
A6: [x,z]
in P
and
A7: [z,y]
in R
by Def6;
[z,y]
in R \/ Q
by A7,XBOOLE_0:def
3;
hence [x,y]
in P*(R \/ Q)
by A6,Def6;
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 Def6;
[z,y]
in Q
by A2,XBOOLE_0:def
4;
then
A3: [x,y]
in P*Q
by A1,Def6;
[z,y]
in R
by A2,XBOOLE_0:def
4;
then [x,y]
in P*R
by A1,Def6;
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 Def6;
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 Def6;
then [y,b]
in R \ Q
by A2,A3,XBOOLE_0:def
5;
hence [a,b]
in P*(R \ Q)
by A2,Def6;
end;
theorem
(P*R)~ = R~*P~
proof
let a,b;
hereby
assume [a,b]
in (P*R)~;
then [b,a]
in P*R
by Def5;
then consider y
such that
A1: [b,y]
in P & [y,a]
in R
by Def6;
[y,b]
in P~ & [a,y]
in R~
by A1,Def5;
hence [a,b]
in R~*P~
by Def6;
end;
assume [a,b]
in R~*P~;
then consider y
such that
A2: [a,y]
in R~ & [y,b]
in P~
by Def6;
[y,a]
in R & [b,y]
in P
by A2,Def5;
then [b,a]
in P*R
by Def6;
hence [a,b]
in (P*R)~
by Def5;
end;
theorem Th30:
(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 Def6;
consider x
such that
A3: [a,x]
in P
and
A4: [x,y]
in R
by A1,Def6;
[x,b]
in R*Q
by A2,A4,Def6;
hence [a,b]
in P*(R*Q)
by A3,Def6;
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 Def6;
consider x
such that
A7: [y,x]
in R
and
A8: [x,b]
in Q
by A6,Def6;
[a,x]
in P*R
by A5,A7,Def6;
hence [a,b]
in (P*R)*Q
by A8,Def6;
end;
:: EMPTY RELATION
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 object 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 object st the Element
of f = [x1,x2]
by Def1;
hence thesis by XTUPLE_0:def
13;
end;
end;
theorem Th31:
(
for x,y
holds not [x,y]
in R)
implies R = {};
theorem Th32:
dom {} = {} & rng {} = {};
theorem Th33:
{}*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 Def6;
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 Def6;
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 Th33;
cluster R*X -> empty;
coherence by Th33;
end;
theorem
field {} = {};
theorem Th35:
dom R = {} or rng R = {} implies R = {};
theorem
dom R = {} iff rng R = {} by Th32,Th35;
registration
let X be empty set;
cluster X~ -> empty;
coherence
proof
for x,y st [x,y] in {}~ holds contradiction by Def5;
hence thesis by Th31;
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;
consider y such that
A3: [x,y] in R & [y,z] in P by A2,Def6;
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 :Def7:
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 Th20;
hence not {} in rng(R*S) by Def7;
end;
end;
:: IDENTITY RELATION
definition
let X;
func id X -> Relation means
:Def8:
[x,y] in it iff x in X & x = y;
existence
proof
defpred Z[object,object] 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 be object;
assume x in dom(id X);
then ex y being object st [x,y] in id X by XTUPLE_0:def
12;
hence x in X by Def8;
end;
let x be object;
assume x in X;
then [x,x] in id X by Def8;
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 be object;
assume x in rng id X;
then consider y being object such that
A1: [y,x] in id X by XTUPLE_0:def
13;
x = y by A1,Def8;
hence thesis by A1,Def8;
end;
let x be object;
[x,x] in id X iff x in X by Def8;
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 Def5;
hence thesis by Def8;
end;
assume
A1: [x,y] in id X;
then x = y by Def8;
hence thesis by A1,Def5;
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 Def8;
hence thesis by A1;
end;
theorem Th42:
[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 Def6;
hence thesis by Def8;
end;
assume x in X;
then [x,x] in id X by Def8;
hence thesis by Def6;
end;
theorem Th43:
[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 Def6;
z = y by A2,Def8;
hence thesis by A1,A2,Def8;
end;
y in Y implies [y,y] in id Y by Def8;
hence thesis by Def6;
end;
theorem Th44:
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 Def6;
hence thesis by Def8;
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 Def6;
hence thesis by Def8;
end;
end;
theorem Th45:
dom R c= X implies (id X)*R = R
proof
assume
A1: dom R c= X;
R c= (id X)*R
proof
let x,y;
assume
A2: [x,y] in R;
then x in dom R by XTUPLE_0:def
12;
then [x,x] in id X by A1,Def8;
hence thesis by A2,Def6;
end;
hence thesis by Th44;
end;
theorem
(id dom R)*R = R by Th45;
theorem Th47:
rng R c= Y implies R*(id Y) = R
proof
assume
A1: rng R c= Y;
R c= R*(id Y)
proof
let x,y;
assume
A2: [x,y] in R;
then y in rng R by XTUPLE_0:def
13;
then [y,y] in (id Y) by A1,Def8;
hence thesis by A2,Def6;
end;
hence thesis by Th44;
end;
theorem
R*(id rng R) = R by Th47;
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 Th30,Th45;
hence thesis by Th47;
end;
definition
let R,X;
func R|X -> Relation means
:Def9:
[x,y] in it iff x in X & [x,y] in R;
existence
proof
defpred Z[object,object] 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 Def9;
hence thesis by Th31;
end;
end;
theorem Th51:
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 being object such that
A1: [x,y] in R|X by XTUPLE_0:def
12;
[x,y] in R by A1,Def9;
hence thesis by A1,Def9,XTUPLE_0:def
12;
end;
assume
A2: x in X;
assume x in dom R;
then consider y being object such that
A3: [x,y] in R by XTUPLE_0:def
12;
[x,y] in R|X by A2,A3,Def9;
hence thesis by XTUPLE_0:def
12;
end;
theorem
dom(R|X) c= X by Th51;
theorem Th53:
R|X c= R by Def9;
theorem
dom(R|X) c= dom R by Th51;
theorem Th55:
dom(R|X) = dom R /\ X
proof
for x being object holds x in dom(R|X) iff x in dom R /\ X
proof let x be object;
x in dom(R|X) iff x in dom R & x in X by Th51;
hence thesis by XBOOLE_0:def
4;
end;
hence thesis by TARSKI:
2;
end;
theorem
X c= dom R implies dom(R|X) = X
proof
dom(R|X) = dom R /\ X by Th55;
hence thesis by XBOOLE_1:
28;
end;
theorem
(R|X)*P c= R*P by Th24,Th53;
theorem
P*(R|X) c= P*R by Th23,Th53;
theorem
R|X = (id X)*R
proof
let x,y;
[x,y] in R|X iff [x,y] in R & x in X by Def9;
hence thesis by Th42;
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 object;
assume
A2: x in (dom R) /\ X;
then x in dom R by XBOOLE_0:def
4;
then
A3: ex y being object st [x,y] in R by XTUPLE_0:def
12;
x in X by A2,XBOOLE_0:def
4;
hence thesis by A1,A3,Def9;
end;
thus thesis;
end;
end;
assume
A4: (dom R) /\ X = {};
let x,y;
hereby
assume
A5: [x,y] in R|X;
then x in X by Def9;
then
A6: not x in dom R by A4,XBOOLE_0:def
4;
[x,y] in R by A5,Def9;
hence [x,y] in {} by A6,XTUPLE_0:def
12;
end;
thus thesis;
end;
theorem Th61:
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 Def9;
A3: [x,y] in R by A1,Def9;
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,Def9;
end;
theorem Th62:
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 Th1,Th61;
hence thesis by A1,XBOOLE_1:
1,
28;
end;
registration let R;
reduce R|dom R to R;
reducibility by Th62;
end;
theorem
R|dom R = R;
theorem Th64:
rng(R|X) c= rng R by Th53,XTUPLE_0:
9;
theorem Th65:
(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 Def9;
A2: [x,y] in R|(X /\ Y) iff [x,y] in R & x in X /\ Y by Def9;
[x,y] in (R|X)|Y iff [x,y] in R|X & x in Y by Def9;
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 Th65;
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 Th65;
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 Th65;
end;
theorem Th69:
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 Def9;
hence [x,y] in R|Y by A1,Def9;
end;
theorem Th70:
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 Def9;
hence thesis by A1,Def9;
end;
theorem Th71:
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 Th69,Th70;
hence thesis;
end;
theorem Th72:
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 Def9; then
A2: x in X or x in Y by XBOOLE_0:def
3;
[x,y] in R by A1,Def9;
then [x,y] in R|X or [x,y] in R|Y by A2,Def9;
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 Def9;
then
A5: x in X \/ Y by XBOOLE_0:def
3;
[x,y] in R by A4,Def9;
hence [x,y] in R|(X \/ Y) by A5,Def9;
end;
suppose
A6: [x,y] in R|X;
then x in X by Def9;
then
A7: x in X \/ Y by XBOOLE_0:def
3;
[x,y] in R by A6,Def9;
hence [x,y] in R|(X \/ Y) by A7,Def9;
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 Def9;
A3: [x,y] in R by A1,Def9;
x in Y by A2,XBOOLE_0:def
4; then
A4: [x,y] in R|Y by A3,Def9;
x in X by A2,XBOOLE_0:def
4;
then [x,y] in R|X by A3,Def9;
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 Def9;
A7: [x,y] in R|X by A5,XBOOLE_0:def
4;
then x in X by Def9; then
A8: x in X /\ Y by A6,XBOOLE_0:def
4;
[x,y] in R by A7,Def9;
hence [x,y] in R|(X /\ Y) by A8,Def9;
end;
theorem Th74:
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 Def9;
then not x in Y by XBOOLE_0:def
5;
then
A3: not [x,y] in R|Y by Def9;
[x,y] in R by A1,Def9;
then [x,y] in R|X by A2,Def9;
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 Def9;
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 Def9;
x in X by A4,Def9;
then x in X \ Y by A4,A6,Def9,XBOOLE_0:def
5;
hence [x,y] in R|(X \ Y) by A5,Def9;
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 Def9;
hence thesis by Th31;
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 Def9;
then consider a such that
A2: [x,a] in P and
A3: [a,y] in R by Def6;
x in X by A1,Def9;
then [x,a] in P|X by A2,Def9;
hence [x,y] in (P|X)*R by A3,Def6;
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 Def6;
[x,a] in P by A4,Def9;
then
A6: [x,y] in P*R by A5,Def6;
x in X by A4,Def9;
hence [x,y] in (P*R)|X by A6,Def9;
end;
definition
let Y,R;
func Y|`R -> Relation means
:Def10:
[x,y] in it iff y in Y & [x,y] in R;
existence
proof
defpred Z[object,object] 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 Def10;
hence thesis by Th31;
end;
end;
theorem Th78:
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 being object such that
A1: [x,y] in Y|`R by XTUPLE_0:def
13;
[x,y] in R by A1,Def10;
hence thesis by A1,Def10,XTUPLE_0:def
13;
end;
assume
A2: y in Y;
assume y in rng R;
then consider x being object such that
A3: [x,y] in R by XTUPLE_0:def
13;
[x,y] in Y|`R by A2,A3,Def10;
hence thesis by XTUPLE_0:def
13;
end;
theorem
rng(Y|`R) c= Y by Th78;
theorem Th80:
Y|`R c= R by Def10;
theorem
rng(Y|`R) c= rng R by Th80,XTUPLE_0:
9;
theorem Th82:
rng(Y|`R) = rng R /\ Y
proof
rng(Y|`R) c= Y & rng(Y|`R) c= rng R by Th78;
hence rng(Y|`R) c= rng R /\ Y by XBOOLE_1:
19;
let y be object;
assume
A1: y in rng R /\ Y;
then y in rng R by XBOOLE_0:def
4;
then consider x being object 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,Def10;
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 Th82;
end;
theorem
(Y|`R)*P c= R*P by Th24,Th80;
theorem
P*(Y|`R) c= P*R by Th23,Th80;
theorem
Y|`R = R*(id Y)
proof
let x,y;
[x,y] in Y|`R iff y in Y & [x,y] in R by Def10;
hence thesis by Th43;
end;
theorem Th87:
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 Def10;
A3: [x,y] in R by A1,Def10;
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,Def10;
end;
theorem Th88:
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 Th1,Th87;
hence thesis by A1,XBOOLE_1:
1,
28;
end;
registration let R;
reduce rng R|`R to R;
reducibility by Th88;
end;
theorem
rng R|`R=R;
theorem Th90:
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 Def10;
A2: [x,y] in (Y /\ X)|`R iff [x,y] in R & y in Y /\ X by Def10;
[x,y] in Y|`(X|`R) iff [x,y] in X|`R & y in Y by Def10;
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 Th90;
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 Th90;
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 Th90;
end;
theorem Th94:
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 Def10;
hence thesis by A1,Def10;
end;
theorem Th95:
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 Def10;
hence thesis by A1,Def10;
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 Th94,Th95;
hence thesis;
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 Def10;
hence thesis by A1,A2,Def10;
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 Def10;
hence thesis by A1,A2,Def10;
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 Def10;
hence thesis by A1,A2,Def10;
end;
theorem
{}|`R = {};
theorem
Y|`{} = {}
by Def10;
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 Def10;
then consider a such that
A2: [x,a] in P and
A3: [a,y] in R by Def6;
y in Y by A1,Def10;
then [a,y] in Y|`R by A3,Def10;
hence [x,y] in P*(Y|`R) by A2,Def6;
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 Def6;
[a,y] in R by A5,Def10;
then
A6: [x,y] in P*R by A4,Def6;
y in Y by A5,Def10;
hence [x,y] in Y|`(P*R) by A6,Def10;
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 Def9;
[x,y] in (Y|`R) iff [x,y] in R & y in Y by Def10;
hence thesis by A1,Def9,Def10;
end;
:: IMAGE OF SET IN RELATION
definition
let R,X;
func R.:X -> set means
:Def11:
y in it iff ex x st [x,y] in R & x in X;
existence
proof
defpred Z[object] means ex x st [x,$
1] in R & x in X;
consider Y such that
A1: for y being object 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 be object;
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:
2;
end;
end;
theorem Th104:
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 Def11;
take x;
thus thesis by A1,XTUPLE_0:def
12;
end;
thus thesis by Def11;
end;
theorem Th105:
R.:X c= rng R
proof
let y be object;
assume y in R.:X;
then ex x st [x,y] in R & x in X by Def11;
hence thesis by XTUPLE_0:def
13;
end;
theorem
R.:X = R.:(dom R /\ X)
proof
for y being object holds y in R.:X iff y in R.:(dom R /\ X)
proof let y be object;
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 Th104;
x in dom R /\ X by A1,A3,XBOOLE_0:def
4;
hence thesis by A2,Def11;
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 Th104;
x in X by A5,XBOOLE_0:def
4;
hence thesis by A4,Def11;
end;
hence thesis by TARSKI:
2;
end;
theorem Th107:
R.:dom R = rng R
proof
thus R.:dom R c= rng R by Th105;
let y be object;
assume y in rng R;
then consider x being object 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,Def11;
end;
theorem
R.:X c= R.:(dom R)
proof
R.:X c= rng R by Th105;
hence thesis by Th107;
end;
theorem
rng(R|X) = R.:X
proof
for y being object holds y in rng(R|X) iff y in R.:X
proof let y be object;
thus y in rng(R|X) implies y in R.:X
proof
assume y in rng(R|X);
then consider x being object such that
A1: [x,y] in R|X by XTUPLE_0:def
13;
x in X & [x,y] in R by A1,Def9;
hence thesis by Def11;
end;
assume y in R.:X;
then consider x such that
A2: [x,y] in R & x in X by Def11;
[x,y] in R|X by A2,Def9;
hence thesis by XTUPLE_0:def
13;
end;
hence thesis by TARSKI:
2;
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 Def11;
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 Def11;
hence contradiction;
end;
end;
::$CT
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 object such that
A2: x in dom R and
A3: x in X by XBOOLE_0:
3;
ex y being object st [x,y] in R by A2,XTUPLE_0:def
12;
hence contradiction by A1,A2,A3,Th104;
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 Th104;
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;
then ex y being object st [x,y] in R by XTUPLE_0:def
12;
hence thesis by A1,A3,Th104;
end;
theorem
R.:(X \/ Y) = R.:X \/ R.:Y
proof
thus R.:(X \/ Y) c= R.:X \/ R.:Y
proof
let y be object;
assume y in R.:(X \/ Y);
then consider x such that
A1: [x,y] in R and
A2: x in X \/ Y by Def11;
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,Def11;
hence y in R.:X \/ R.:Y by XBOOLE_0:def
3;
end;
let y be object;
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 Def11;
x in X \/ Y by A5,XBOOLE_0:def
3;
hence y in R.:(X \/ Y) by A4,Def11;
end;
suppose y in R.:X;
then consider x such that
A6: [x,y] in R and
A7: x in X by Def11;
x in X \/ Y by A7,XBOOLE_0:def
3;
hence y in R.:(X \/ Y) by A6,Def11;
end;
end;
theorem
R.:(X /\ Y) c= R.:X /\ R.:Y
proof
let y be object;
assume y in R.:(X /\ Y);
then consider x such that
A1: [x,y] in R and
A2: x in X /\ Y by Def11;
x in Y by A2,XBOOLE_0:def
4;
then
A3: y in R.:Y by A1,Def11;
x in X by A2,XBOOLE_0:def
4;
then y in R.:X by A1,Def11;
hence thesis by A3,XBOOLE_0:def
4;
end;
theorem
R.:X \ R.:Y c= R.:(X \ Y)
proof
let y be object;
assume
A1: y in R.:X \ R.:Y;
then consider x such that
A2: [x,y] in R and
A3: x in X by Def11;
not y in R.:Y by A1,XBOOLE_0:def
5;
then not x in Y or not [x,y] in R by Def11;
then x in X \ Y by A2,A3,XBOOLE_0:def
5;
hence thesis by A2,Def11;
end;
theorem Th115:
X c= Y implies R.:X c= R.:Y
proof
assume
A1: X c= Y;
let y be object;
assume y in R.:X;
then ex x st [x,y] in R & x in X by Def11;
hence thesis by A1,Def11;
end;
theorem Th116:
P c= R implies P.:X c= R.:X
proof
assume
A1: P c= R;
let y be object;
assume y in P.:X;
then ex x st [x,y] in P & x in X by Def11;
hence thesis by A1,Def11;
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 Th115,Th116;
hence thesis;
end;
theorem
(P*R).:X = R.:(P.:X)
proof
for y being object holds y in (P*R).:X iff y in R.:(P.:X)
proof let y be object;
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 Def11;
consider z such that
A3: [x,z] in P and
A4: [z,y] in R by A1,Def6;
z in P.:X by A2,A3,Def11;
hence thesis by A4,Def11;
end;
assume y in R.:(P.:X);
then consider x such that
A5: [x,y] in R and
A6: x in P.:X by Def11;
consider z such that
A7: [z,x] in P and
A8: z in X by A6,Def11;
[z,y] in P*R by A5,A7,Def6;
hence thesis by A8,Def11;
end;
hence thesis by TARSKI:
2;
end;
theorem Th119:
rng(P*R) = R.:(rng P)
proof
for z being object holds z in rng(P*R) iff z in R.:(rng P)
proof let z be object;
thus z in rng(P*R) implies z in R.:(rng P)
proof
assume z in rng(P*R);
then consider x being object 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,Def6;
y in rng P by A2,XTUPLE_0:def
13;
hence thesis by A3,Def11;
end;
assume z in R.:(rng P);
then consider y such that
A4: [y,z] in R and
A5: y in rng P by Def11;
consider x being object such that
A6: [x,y] in P by A5,XTUPLE_0:def
13;
[x,z] in P*R by A4,A6,Def6;
hence thesis by XTUPLE_0:def
13;
end;
hence thesis by TARSKI:
2;
end;
theorem
(R|X).:Y c= R.:Y by Th53,Th116;
theorem Th121:
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 Th53,Th116;
let y be object;
assume y in R.:X;
then consider x1 be object such that
A2: [x1,y] in R and
A3: x1 in X by Def11;
ex x be object st [x,y] in R|Y & x in X
proof
take x1;
thus [x1,y] in R|Y by A1,A2,A3,Def9;
thus thesis by A3;
end;
hence thesis by Def11;
end;
theorem
(dom R) /\ X c= (R~).:(R.:X)
proof
let x be object;
assume
A1: x in (dom R) /\ X;
then x in dom R by XBOOLE_0:def
4;
then consider y being object such that
A2: [x,y] in R by XTUPLE_0:def
12;
A3: [y,x] in R~ by A2,Def5;
x in X by A1,XBOOLE_0:def
4;
then y in R.:X by A2,Def11;
hence thesis by A3,Def11;
end;
:: INVERSE IMAGE OF SET IN RELATION
definition
let R,Y;
func R"Y -> set means
:Def12:
x in it iff ex y st [x,y] in R & y in Y;
existence
proof
defpred Z[object] means ex y st [$
1,y] in R & y in Y;
consider X such that
A1: for x being object 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 be object;
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:
2;
end;
end;
theorem Th123:
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 Def12;
take y;
thus thesis by A1,XTUPLE_0:def
13;
end;
thus thesis by Def12;
end;
theorem Th124:
R"Y c= dom R
proof
let x be object;
assume x in R"Y;
then ex y st [x,y] in R & y in Y by Def12;
hence thesis by XTUPLE_0:def
12;
end;
theorem
R"Y = R"(rng R /\ Y)
proof
for x being object holds x in R"Y iff x in R"(rng R /\ Y)
proof let x be object;
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 Th123;
y in rng R /\ Y by A1,A3,XBOOLE_0:def
4;
hence thesis by A2,Def12;
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 Th123;
y in Y by A5,XBOOLE_0:def
4;
hence thesis by A4,Def12;
end;
hence thesis by TARSKI:
2;
end;
theorem Th126:
R"rng R = dom R
proof
thus R"rng R c= dom R by Th124;
let x be object;
assume x in dom R;
then consider y being object 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,Def12;
end;
theorem
R"Y c= R"rng R
proof
R"Y c= dom R by Th124;
hence thesis by Th126;
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 Def12;
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 Def12;
hence contradiction;
end;
end;
::$CT 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 (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland
:: This code can be distributed under the GNU General Public Licence
A2: y
in :: licenses,
or see
http://www.gnu.org/licenses/gpl.html and
XBOOLE_0:
3;
ex x
being object st [x,y]
in R
by A2,XTUPLE_0:def
13;
hence contradiction
by A1,A2,A3,Th123;
end;
A4:rng \Y ={;
assume not thesis;
then exy st
in xy] &y byTh123;
A4,XBOOLE_0:def
4;
end;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Y <> {} & Y c= rng R
implies R" < {}
proof
assume
A1: Y <> {}
and
re P,P,,RS Relation
cluster- like
for ofR
A3 rng R
by A1,;
then ex x ex R being Relationst
forxy
hence thesis by A1,A3,Th123;
end
R"(XA1:
forp object p
in p
in[A),(: &Q[]
proof
tR(X \ Y)cR" /RY
h
thesisjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for len
gth 19
letx be object;
(X/ ;
then consider y such that
A1: [x,y] end;
A2 X\ Y java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
:def3java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
thenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hence x in R"X \java.lang.StringIndexOutOfBoundsException: Range [22, 15) out of bounds for length 15
endA1:fora, holds[a,b] inPiff [,]in R;
letx be object;
assume
A3: x R" \ R";
per cases by A3,XBOOLE_0: end;
suppose in";
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
:[, inR and
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
coherence
hence R"X\ by A4,java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
end;
suppose x "X;
then consider y such that
A6: [x,y] cluster R\+\S- ljava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
A7:y nX Def12
yin X \/Y by XBOOLE_0:ef 3;
hence x in "( / ,ef12;
end;
in[ab]
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
"/Y c " \R"java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
proof
assume a,holdsab in java.lang.StringIndexOutOfBoundsException: Range [7, 34) out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 27
A1: [x rng R java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 28
inX/ byDef12;
inY A2,d4;
then
A3: x in R"Y by A1,Def12;
inXby XBOOLE_0d 4java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
thenx in X ,;
hence thesis by A3, roofletz be object;
end;
theorem
R"X \ R"Y c= R"(X \ Y)
proof
letx be object;
[z,b]= [x,y] by A2,TARSKI:def1
A1: hence thesisby TARSKI:def 1;
then consider y such that
A2: [x,y] in R and
A3:yin X by ;
not x in R"Y by A1,XBOOLE_0:def 5;
] in R byDef12;
then y in X \ Y by A2, end;
hence thesis by A2,Def12;
end;
theorem Th133thus in rng z yjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
X =Yimplies R"X c= R"Y
proof
assume
A1: X c= Y;
let x be object;
assume x in R"X;
then ex y st [x,y] in R & y in X by Def12;
hence thesis by A1,Def12;
end;
theorem Th134:
P c= R implies P"Y c= R"Y
proof
assume
A1: P c= R;
let x be object;
assume x in P"Y;
then ex y st [x,y] in P & y in Y by Def12;
hence thesis by A1,Def12;
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 Th133,Th134;
hence thesis;
end;
theorem
(P*R)"Y = P"(R"Y)
proof
for x being object holds x in (P*R)"Y iff x in P"(R"Y)
proof let x be object;
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 Def12;
consider z such that
A3: [x,z] in P and
A4: [z,y] in R by A1,Def6;
z in R"Y by A2,A4,Def12;
thesis ,;
end;
(RY;
then consider y such that
A5: [x,y] in P and
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
consider z assume z in dom Rjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
A7:
A8: z in Y by A6,Def12 encethesis by java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 35
[x,z in [zy] RTARSKIdef ;
hence thesis by A8,Def12bydef;
end
dobjectsuchthat
end;
theorem Th137:
PR "dom R)
let zbe object;
for being java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 59
object;
;
proof
assume java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
then
:[z,x]in P XTUPLE_0:def1;
consider that
A2: z]inPand
A3: [y,x]
y domR A3XTUPLE_0: 12
,java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
end;
A1: [a,b in;
then considery that
A4: [z,y] in P and
A5: y in dom R by Def12;
consider x being object such hence thesisby XBOOLE_0def3java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
then dom Pc dom R&rngPc rng R XTUPLE_0:8,9;
[z,x] in P* hence thesis bXBOOLE_1:;
hence theorem :
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 27
end;
theorem
r R \Yc= R~(Y
proof
letendjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
assume
A1: y in (rng R) /\ Y;
then y in rng R by XBOOLE_0:def 4;
then consider x being object such that
A2: [x,y]inRby :def13
A3: [,x]in R~ by A2,Def5;
encethesis byjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
then in RYby A2,Def12;
hence by Def12;
begin :: Addenda
definition
let R;
attr R is empty-yielding means
:Def13:
Rc= {{}java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
assume dom(R;
theorem
R is empty-yielding [x,u] in R by A2,Def5;
proof
thus R is empty
thenconsider x being object such that
assumex] R ,Def5;
A1: for X st X in rng R holds X = {};
let Y be object;
assume Y in rng R;
then Y = {} by A1;
hence thesis by TARSKI:def 1;
end;
:: from AMI_3
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 Th72
.= g|(A \/ B) by Th72;
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 Th71;
hence thesis;
end;
theorem
for f being Relation, X being set st X misses dom f holds f|X = {}
proof
be such
A1: X /\ dom f = {};
thus f|X = (f|dom f)|X
.= f|({} qua set) by A1,Th65
. {;
end;
:: from AMI_5
em
then x,y]P/ R)~ iff [,]inP &[,xin byXBOOLE_0:ef ;
proof
let, beRelation,AB be set;
ssume that
A1: A c= B hence thesisby XBOOLE_0:ef3;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
A3: A then[,]in P\ R) [,in P not[,] inR XBOOLE_0:ef ;
hence| (|)Aby
.= java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 4
nd;
:: missing, 2005.07.11, A.T.
theorem
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 12
proof
dom S R||om
.= R|(dom S /\ dom e;
.= Rassume
:: missing, 2005.11.13, A.T.
letPRjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
empty - empty-ielding forRelationjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
then beingsuch
let R be Relation z [,] [, Rby Def6;
Rempty;
hence rng R c= {{}};
letR emptyyieldingRelationjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
let X be set;
cluster R| x]in* by A3Def6;
coherence
proof
rng R java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
hence rng(R|X) c= {{}};
end;
zin P;
R|X is non emptythen java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 24
:: from EQREL_1 (Class), 2007.02.06
definition
let R be Relation, x P= R implies Q*P c= Q*R
A1:Pc=R;
R.:{x};
correctness;
end;
:: from YELLOW_3, 2007.06.13, A.T.
scheme
ExtensionalityR { A, B() -> Relation, P[object,object] }:
A() B)
rovided
1:for, b being object holds ab in A) iff Pab and
A2: theorem Th24:
proof
let y,be object;
thus [y,z] assume
assume [y,z] in B();assume [x,y] in P*R;
hence thesis by A1,A2;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
:: from SCMFSA6A, 2007.07.23, A.T.
theorem
dom (R | (dom R \ X)) = dom R \ X
proof
thus dom ( c implies* R*java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
.= ex z st xz inP & [z,] in Q by Def6
. X;
end
theorem
R X R| (domR \X)
proof
thus R | X = (R | dom R) | X
.= R | (A1 [,] inP
end;
:: missing, 2007.11.07, A.T.
theorem
dom [:X,Y:] c= X
proof
let x be object;
assume x in dom in P*Qjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
ex ybeing xy] in [:X,]by java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 64
hence java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 8
end;
theorem
rng [:X,Y:] hence [x,]in P( /Q) by A6,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 18
assume xi rng [:,:;
then ex y being object st [y,x] in [, Qby A2XBOOLE_0:def 4;
hence thesis A3:[y inPQ byA1,ef6;
end;
:: from FUNCOP_1, 2008.02.19, A.T.
rem
(PR \ P) c= *R \Q
proof
assume X <> {}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
then consider a being object such that
A1 a XbyXBOOLE_0:1;
assume Y > }java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
then consider b being object such that
A2: b in Y by hence ab in *R\Q)byA2,ef6;
A3: now
let java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
assume X
then[,]in[XY: A2,FMISC_1:;
hence ex y being object st [x,y] in [:X,Y:];
end
( being object t [,y] in[XY] implies in X by ZFMISC_1:87;
hence dom[: hence [a,bin R~*~by;
A4: now
let y be object;
assume y A2: [a,y] in R[,b by;
then [a [,] R by byDef5
hence ex abPR Def5
end;
abjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
henceA1 [ay]inP*Rand
end;
theorem
dom R = {} & dom ence a] P** by ,Def6;
theorem
rng considerx such
theorem
dom R = dom Q implies dom end;
proof
assume
omjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
thus dom( end;
.=java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 4
end;
theorem
rng QRS (Q)
assume
A1 rng R =rngQ;
thus rng(R*S) = S. end;
.= rng (Q*S) by A1,Th119;
end;
:: from RELSET_2 (R"x, generalized), 2008.07.16, A.T.
definition
let R be Relation, x be object;
func Coim(R,x) -> set equals
R"{x};
coherence;
end;
:: from NECKLACE, 2008.07.25, A.T.
registration
letRbe trivialRelation;
cluster domR > ;
coherence
proof
ez] R z,]{ D;
domR
then consider
[, in R XTUPLE_0def 12java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
end;
then consider b being object such that
A2: [y, field{ ={};
[x,a] }or { R = {};
encejava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 31
end;
end;
registration
let R be trivial Relation;
cluster rng R -> trivialjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
coherence
let xc java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
assume x in rng R;
then consider a being object - means :Def7:
A1: [a,x] in R by XTUPLE_0:def 13;
assume y in rng R;
then consider b being object 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;
:: comp. RFUNCT_2:34, CFCONT_1:31, 2008.08.07, A.T.
theorem
rng R c= (S|X) implies R*(S|X) = R*S
proof
assume
= S)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
take}
R*(S|X) c= R*S by Th23, end
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
assume [a,b] in R*S;
then cluster R*S empty;
A2: [ rnRS =Sjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
A3: [c,b]
c in rng R by A2,java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 10
then c Def8:
c] in Xby A3,;
hence thesis defpred Z[objectobject] means1$;
end;
:: from LATTICE2, 2008.09.14, A.T.
theorem
Q| | java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 31
red
assume Q|A
assume xin dom(X;
. then ex xy]in Xby XTUPLE_0def12
end;
:: new, 2009.01.21, A.T
definition
java.lang.StringIndexOutOfBoundsException: Range [5, 2) out of bounds for length 10
attr R is X-defined means
:Def16:
dom R c= X;
attr R is X-valuedthenconsider y being suchthat
:Def17:
ng R =X;
end;
Lm1:
{} is X-defined Y-valued
proof
thus dom{} c= X & rng{} c= Y;
end;
reducibili
let X,Y;
cluster X-defined Y-valued for Relationproof
existence
proof
take {};
thus thesis by Lm1;
end;
end;
:: from QC_LANG4, 2009.01.23, A.T
theorem
for set, being -valued
for being objectst y in Rholds y in D
proof
let D be set, R be D- assume
rng R c= D java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 10
hence thesis;
end;
:: new, 2009.02.07, A.T.
registration
let XA;
be -Relation
cluster R|Xjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 16
coherence
proof
RX =rng &rngR = by ,java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 60
hence rng(R|X) c= A;
end;:[,y] n idY by ef6;
end;
registration
A
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 30
cluster R| >A-efined djava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
coherence
proof
dom(R|X) c= dom R & dom R c= A ex [x,z] in id X & [z,y] in R by Def6;
hence dom(R|X end;
thus dom:java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
end;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
registration
letendjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
X>X-java.lang.StringIndexOutOfBoundsException: Range [36, 27) out of bounds for length 37
coherence;
end;
:: 2009.02.16, A.T.
let A java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cluster
coherence
proof
rng R c= A & rng(Sjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
hence rng(S*java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 4
end;
end;
n
A1 , xy Px in R [,]
let R be[y java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 55
cluster R*S -> A-defined;
coherence
proof
dom R c= A & dom(R*S) c= dom R by Def16,Th19;
hence dom(R*S) c= A;
end;
end;
:: 2009.02.16, A.T.
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 be object;
assume y in Im([:X,Y:],x);
then ex z st [z,y] in [:X,Y:] & z in {x} by Def11;
hence y in Y by ZFMISC_1:87;
end;
let y be object;
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,Def11;
end;
theorem Th159:
[x,y] in R iff y in Im(R,x)
proof
thus [x,y] in R implies y A2: xyin i [xy java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
proof
x in {x} by TARSKI:def 1;
hence thesisby Def11;
end
);
then ex z st [zend
hence [x,y] in R by TARSKI:def 1;
end;
theorem
x in dom R iff Im(R [x,]inR ;
proof
thus x in dom R implies Im(R,x) <> {}
proof hence thesis by A1,Def9,XTUPLE_0:def 12;
assume x in dom R;
then ex y being object st [x,y] in R by java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 40
enceR)>{ by Th159;
end;
assume Im(R,x) <> {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
then consider y being java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:y(,)by:def;
[x,y] in R by A1,Th159;
hence in dom by def 12java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
end;
theorem
{} is X-defined Y-valued by Lm1;
:: 2009.10.02, A.T.
registration
cluster empty -> non-empty for Relation;
coherence;
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 Def16;
dom S c= dom R by XTUPLE_0:8;
hence dom S c= X by A1;
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 Def17;
rng S c= rng R by XTUPLE_0:9;
hence rng S c= X by A1;
end;
end;
:: missing, 2010.01.02, A.T
theorem
X misses Y implies R|X|Y = {}
proof
assume X misses Y;
hence R|X|Y = R|({} qua set) by Th65
.= {};
end;
:: from AMISTD_3, 2010.01.10, A.T.
theorem
field {[x,x]} = {x}
proof
thus field {[x,x]} = {x,x} by Th11
.= {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 Def16;
hence R|X = R by Th62;
end;
end;
registration let Y; let R be Y-valued Relation;
reduce Y|`R to R;
reducibility
proof
rng R c= Y by Def17;
hence Y|`R = R by Th88;
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 Th70;
end;
:: missing, 2010.04.07, A.T.
theorem Th166:
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 Th62
.= R|(X\A) by Th74;
dom(R \ (R|hencejava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
R \ (R|A={ domRmisses java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
(R \ (R|A)) = dom R /\ (dom R \ A) by Th55
.= (dom R /\ dom R) \ A by XBOOLE_1:49
. dom\A
;
theorem
dom R \ dom
proof
thus dom R \ dom(R|A) = dom R x in X by :
.= dom R \ A by XBOOLE_1:47
.= dom(R \ (R|java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 10
end;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 14
dom R misses dom S implies R misses S
proof
assume
: missesdom S;
assume R meets S;
thenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
R|X = R /\ [:X,rng R:]
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 being object 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
=Y
dom R /\ X c= henceA3XBOOLE_0def4
A2 xy]P;
dom(java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
then java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
.= dom R /\ XR =[dom | java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 60
.= {} byTh62
hence (R \ R|java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 7
e;
theorem
X c= Y java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
for R being X-defined Relation holds [,y |X\Y x] x Yjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 61
proof assume
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 21
let R be Xjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
dom R c= X by java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
hence dom R c= java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
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 Def17;
hence rng R c= Y by A1;
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 Th70;
hence thesis;
end;
thus thesis by Def9;
end;
theorem Th175:
X R X,:]
proof
letjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
A1: R by:def;
dom R c= inR|byDef9
hence xyin |\R|by XBOOLE_05java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
hence thesis by A1;
end;
:: new, 20011.06.11, A.T.
theorem
dom(X|`R)
registration
let A,X;
let R x, iff Y xy ;
cluster X|`R -> A-defined;
coherence
proof
dom(X|`R) c= dom R & dom R c= A by Def16,Th80,XTUPLE_0:8;
(X|`)c ;
end;
end;
registration
let X,A;
let R be A- thesisby java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
`- valued
coherence
proof
(XR = R cA ,9;
hence rng(X|`R) c= A;
thus rng(X|`R) c= X by Th78;
;
end;
registration
let beempty set;
cluster-empty forX-efinedRelation;
coherence
proof let R be X-defined Relation;
dom R c= X by Def16;
hence thesis by XBOOLE_1:3;
end;
cluster -> empty for X-valued Relation;
coherence
proofRbe X- Relationjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
R= ;
hence thesis by XBOOLE_1:3;
end;
end;
:: from PNPROC_1, 2012.02.20, A.T.
theorem
for X,Y being set, P,R being Relation st X misses Y holds P|XA5:yin Yby :87java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
proof
let X,Y be set, P,R be Relation;
assume
A1 ;
A2: dom (P|X) = dom P /\ X by Th55;
dom (R|Y) = dom R /\ Y by Th55;
then dom (P|X) /\ dom (R|Y) = dom P /\ (X /\ (dom R /\ Y)) by A2,XBOOLE_1:16
.= dom P / A1A2,d;
.= {} by A1;
YR
by;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
theorem
for Y being set, R being RelationY|`|R |java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
proof
let Y be set, R be Relation;
let a,b be object;
assume
a]in|R;
then
A2: java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 23
A3: [a,b] in R by A1,Def10;
a R"A2Def12;
hence thesis by A3,Def9;
end;
theorem
beingRelation ,yst domf= x}&rngf = {y}
holds f = { [x,y] }
proof
let f be Relation, x, y;
A1: f c= [:dom f,rng f:] by Th1;
assume
A2: dom f = {x} & rng f = {y};
x in dom f by c P2
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 41
A3: [x,yy] in f by XTUPLE_0:def 12;
yy in rng f by A3,XTUPLE_0:def 13;
then [x,y] in f by A3,A2,TARSKI:def
hence thesis by A1,A2,ZFMISC_1:29,31;
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 56
registration
let X,Y;
sethoodof X-Y-alued
proof
[,]
let R be X-defined Y-valued Relation;
R c= [:X,Y:] by Th175;
hence thesis by ZFMISC_1:def 1;
end;
end;
registration
let R be non-empty Relation, A be set;
cluster R | A -> non-empty;
rng (R|A) c= rng R by Th64;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
end;