:: by Edmund Woronowicz

::

:: Received April 14, 1989

:: Copyright (c) 1990-2018 Association of Mizar Users

registration
end;

registration

let X, Y be set ;

coherence

for b_{1} being Relation of X,Y holds

( b_{1} is X -defined & b_{1} is Y -valued )

end;
coherence

for b

( b

proof end;

definition

let X, Y be set ;

let R be Relation of X,Y;

let Z be set ;

( R c= Z iff for x being Element of X

for y being Element of Y st [x,y] in R holds

[x,y] in Z )

end;
let R be Relation of X,Y;

let Z be set ;

:: original: c=

redefine pred R c= Z means :: RELSET_1:def 1

for x being Element of X

for y being Element of Y st [x,y] in R holds

[x,y] in Z;

compatibility redefine pred R c= Z means :: RELSET_1:def 1

for x being Element of X

for y being Element of Y st [x,y] in R holds

[x,y] in Z;

( R c= Z iff for x being Element of X

for y being Element of Y st [x,y] in R holds

[x,y] in Z )

proof end;

:: deftheorem defines c= RELSET_1:def 1 :

for X, Y being set

for R being Relation of X,Y

for Z being set holds

( R c= Z iff for x being Element of X

for y being Element of Y st [x,y] in R holds

[x,y] in Z );

for X, Y being set

for R being Relation of X,Y

for Z being set holds

( R c= Z iff for x being Element of X

for y being Element of Y st [x,y] in R holds

[x,y] in Z );

definition

let X, Y be set ;

let P, R be Relation of X,Y;

( P = R iff for x being Element of X

for y being Element of Y holds

( [x,y] in P iff [x,y] in R ) )

end;
let P, R be Relation of X,Y;

:: original: =

redefine pred P = R means :: RELSET_1:def 2

for x being Element of X

for y being Element of Y holds

( [x,y] in P iff [x,y] in R );

compatibility redefine pred P = R means :: RELSET_1:def 2

for x being Element of X

for y being Element of Y holds

( [x,y] in P iff [x,y] in R );

( P = R iff for x being Element of X

for y being Element of Y holds

( [x,y] in P iff [x,y] in R ) )

proof end;

:: deftheorem defines = RELSET_1:def 2 :

for X, Y being set

for P, R being Relation of X,Y holds

( P = R iff for x being Element of X

for y being Element of Y holds

( [x,y] in P iff [x,y] in R ) );

for X, Y being set

for P, R being Relation of X,Y holds

( P = R iff for x being Element of X

for y being Element of Y holds

( [x,y] in P iff [x,y] in R ) );

theorem :: RELSET_1:1

for A, X, Y being set

for R being Relation of X,Y st A c= R holds

A is Relation of X,Y by XBOOLE_1:1;

for R being Relation of X,Y st A c= R holds

A is Relation of X,Y by XBOOLE_1:1;

theorem :: RELSET_1:2

for X, Y being set

for a being object

for R being Relation of X,Y st a in R holds

ex x, y being object st

( a = [x,y] & x in X & y in Y )

for a being object

for R being Relation of X,Y st a in R holds

ex x, y being object st

( a = [x,y] & x in X & y in Y )

proof end;

theorem :: RELSET_1:3

theorem :: RELSET_1:7

for X, X1, Y, Y1 being set

for R being Relation of X,Y st X c= X1 & Y c= Y1 holds

R is Relation of X1,Y1

for R being Relation of X,Y st X c= X1 & Y c= Y1 holds

R is Relation of X1,Y1

proof end;

registration
end;

registration

let X be set ;

let R be X -defined Relation;

let S be Relation;

coherence

R /\ S is X -defined

R \ S is X -defined ;

end;
let R be X -defined Relation;

let S be Relation;

coherence

R /\ S is X -defined

proof end;

coherence R \ S is X -defined ;

registration
end;

registration

let X be set ;

let R be X -valued Relation;

let S be Relation;

coherence

R /\ S is X -valued

R \ S is X -valued ;

end;
let R be X -valued Relation;

let S be Relation;

coherence

R /\ S is X -valued

proof end;

coherence R \ S is X -valued ;

definition

let X be set ;

let R be X -defined Relation;

:: original: dom

redefine func dom R -> Subset of X;

coherence

dom R is Subset of X by RELAT_1:def 18;

end;
let R be X -defined Relation;

:: original: dom

redefine func dom R -> Subset of X;

coherence

dom R is Subset of X by RELAT_1:def 18;

definition

let X be set ;

let R be X -valued Relation;

:: original: rng

redefine func rng R -> Subset of X;

coherence

rng R is Subset of X by RELAT_1:def 19;

end;
let R be X -valued Relation;

:: original: rng

redefine func rng R -> Subset of X;

coherence

rng R is Subset of X by RELAT_1:def 19;

theorem :: RELSET_1:9

for X, Y being set

for R being Relation of X,Y holds

( ( for x being object st x in X holds

ex y being object st [x,y] in R ) iff dom R = X )

for R being Relation of X,Y holds

( ( for x being object st x in X holds

ex y being object st [x,y] in R ) iff dom R = X )

proof end;

theorem :: RELSET_1:10

for X, Y being set

for R being Relation of X,Y holds

( ( for y being object st y in Y holds

ex x being object st [x,y] in R ) iff rng R = Y )

for R being Relation of X,Y holds

( ( for y being object st y in Y holds

ex x being object st [x,y] in R ) iff rng R = Y )

proof end;

definition

let X, Y be set ;

let R be Relation of X,Y;

:: original: ~

redefine func R ~ -> Relation of Y,X;

coherence

R ~ is Relation of Y,X

end;
let R be Relation of X,Y;

:: original: ~

redefine func R ~ -> Relation of Y,X;

coherence

R ~ is Relation of Y,X

proof end;

definition

let X, Y1, Y2, Z be set ;

let P be Relation of X,Y1;

let R be Relation of Y2,Z;

:: original: *

redefine func P * R -> Relation of X,Z;

coherence

P * R is Relation of X,Z

end;
let P be Relation of X,Y1;

let R be Relation of Y2,Z;

:: original: *

redefine func P * R -> Relation of X,Z;

coherence

P * R is Relation of X,Z

proof end;

registration

let A be empty set ;

let B be set ;

coherence

for b_{1} being Relation of A,B holds b_{1} is empty
;

coherence

for b_{1} being Relation of B,A holds b_{1} is empty
;

end;
let B be set ;

coherence

for b

coherence

for b

theorem :: RELSET_1:16

theorem :: RELSET_1:17

definition

let X, Y be set ;

let R be Relation of X,Y;

let A be set ;

:: original: |

redefine func R | A -> Relation of X,Y;

coherence

R | A is Relation of X,Y

end;
let R be Relation of X,Y;

let A be set ;

:: original: |

redefine func R | A -> Relation of X,Y;

coherence

R | A is Relation of X,Y

proof end;

definition

let X, Y, B be set ;

let R be Relation of X,Y;

:: original: |`

redefine func B |` R -> Relation of X,Y;

coherence

B |` R is Relation of X,Y

end;
let R be Relation of X,Y;

:: original: |`

redefine func B |` R -> Relation of X,Y;

coherence

B |` R is Relation of X,Y

proof end;

definition

let X, Y be set ;

let R be Relation of X,Y;

let A be set ;

:: original: .:

redefine func R .: A -> Subset of Y;

coherence

R .: A is Subset of Y

redefine func R " A -> Subset of X;

coherence

R " A is Subset of X

end;
let R be Relation of X,Y;

let A be set ;

:: original: .:

redefine func R .: A -> Subset of Y;

coherence

R .: A is Subset of Y

proof end;

:: original: "redefine func R " A -> Subset of X;

coherence

R " A is Subset of X

proof end;

theorem :: RELSET_1:23

for X, Y being set

for R being Relation of X,Y holds

( R .: (R " Y) = rng R & R " (R .: X) = dom R )

for R being Relation of X,Y holds

( R .: (R " Y) = rng R & R " (R .: X) = dom R )

proof end;

:: Relation on a set

registration
end;

theorem :: RELSET_1:24

for D, E being non empty set

for R being Relation of D,E

for x being Element of D holds

( x in dom R iff ex y being Element of E st [x,y] in R )

for R being Relation of D,E

for x being Element of D holds

( x in dom R iff ex y being Element of E st [x,y] in R )

proof end;

theorem :: RELSET_1:25

for D, E being non empty set

for R being Relation of D,E

for y being object holds

( y in rng R iff ex x being Element of D st [x,y] in R )

for R being Relation of D,E

for y being object holds

( y in rng R iff ex x being Element of D st [x,y] in R )

proof end;

theorem :: RELSET_1:26

for D, E being non empty set

for R being Relation of D,E st dom R <> {} holds

ex y being Element of E st y in rng R

for R being Relation of D,E st dom R <> {} holds

ex y being Element of E st y in rng R

proof end;

theorem :: RELSET_1:27

for D, E being non empty set

for R being Relation of D,E st rng R <> {} holds

ex x being Element of D st x in dom R

for R being Relation of D,E st rng R <> {} holds

ex x being Element of D st x in dom R

proof end;

theorem :: RELSET_1:28

for D, E, F being non empty set

for P being Relation of D,E

for R being Relation of E,F

for x, z being object holds

( [x,z] in P * R iff ex y being Element of E st

( [x,y] in P & [y,z] in R ) )

for P being Relation of D,E

for R being Relation of E,F

for x, z being object holds

( [x,z] in P * R iff ex y being Element of E st

( [x,y] in P & [y,z] in R ) )

proof end;

theorem :: RELSET_1:29

for D, D1, E being non empty set

for R being Relation of D,E

for y being Element of E holds

( y in R .: D1 iff ex x being Element of D st

( [x,y] in R & x in D1 ) )

for R being Relation of D,E

for y being Element of E holds

( y in R .: D1 iff ex x being Element of D st

( [x,y] in R & x in D1 ) )

proof end;

theorem :: RELSET_1:30

for D, D2, E being non empty set

for R being Relation of D,E

for x being Element of D holds

( x in R " D2 iff ex y being Element of E st

( [x,y] in R & y in D2 ) )

for R being Relation of D,E

for x being Element of D holds

( x in R " D2 iff ex y being Element of E st

( [x,y] in R & y in D2 ) )

proof end;

:: missing, 2006.11.04, A.T.

theorem :: RELSET_1:31

for N being set

for 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

for 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 end;

:: from AMI_3, 2007.06.13, A.T. (generalized)

scheme :: RELSET_1:sch 4

Sch4{ F_{1}() -> set , F_{2}() -> set , P_{1}[ set , set ], F_{3}() -> Relation of F_{1}(),F_{2}(), F_{4}() -> Relation of F_{1}(),F_{2}() } :

provided

Sch4{ F

provided

A1:
for p being Element of F_{1}()

for q being Element of F_{2}() holds

( [p,q] in F_{3}() iff P_{1}[p,q] )
and

A2: for p being Element of F_{1}()

for q being Element of F_{2}() holds

( [p,q] in F_{4}() iff P_{1}[p,q] )

for q being Element of F

( [p,q] in F

A2: for p being Element of F

for q being Element of F

( [p,q] in F

proof end;

:: missing, 2007.06.14, A.T.

registration
end;

registration
end;

:: missing, 2008.04.30, A.T.

:: missing, 2008.09.15, A.T.

registration

let R be non empty Relation;

let Y be non empty Subset of (dom R);

coherence

not R | Y is empty

end;
let Y be non empty Subset of (dom R);

coherence

not R | Y is empty

proof end;

registration

let R be non empty Relation;

let Y be non empty Subset of (dom R);

coherence

not R .: Y is empty

end;
let Y be non empty Subset of (dom R);

coherence

not R .: Y is empty

proof end;

:: missing, 2008.11.29 A.T.

registration
end;

:: RELATION AS A SUBSET OF CARTESIAN PRODUCT OF TWO SETS

:: _____________________________________________________