:: by Grzegorz Bancerek, Artur Korni\l owicz and Andrzej Trybulec

::

:: Received December 9, 2011

:: Copyright (c) 2011-2012 Association of Mizar Users

begin

definition
end;

:: deftheorem Dfx defines pair XTUPLE_0:def 1 :

for x being set holds

( x is pair iff ex x1, x2 being set st x = [x1,x2] );

for x being set holds

( x is pair iff ex x1, x2 being set st x = [x1,x2] );

Lx4: for x, y1, y2 being set st {x} = {y1,y2} holds

x = y1

proof end;

Lx5: for x, y1, y2 being set st {x} = {y1,y2} holds

y1 = y2

proof end;

Lx6: for x1, x2, y1, y2 being set holds

( not {x1,x2} = {y1,y2} or x1 = y1 or x1 = y2 )

proof end;

definition

let x be set ;

assume x is pair ;

then consider x1, x2 being set such that

A1: x = [x1,x2] by Dfx;

existence

ex b_{1} being set st

for y1, y2 being set st x = [y1,y2] holds

b_{1} = y1

for b_{1}, b_{2} being set st ( for y1, y2 being set st x = [y1,y2] holds

b_{1} = y1 ) & ( for y1, y2 being set st x = [y1,y2] holds

b_{2} = y1 ) holds

b_{1} = b_{2}

ex b_{1} being set st

for y1, y2 being set st x = [y1,y2] holds

b_{1} = y2

for b_{1}, b_{2} being set st ( for y1, y2 being set st x = [y1,y2] holds

b_{1} = y2 ) & ( for y1, y2 being set st x = [y1,y2] holds

b_{2} = y2 ) holds

b_{1} = b_{2}

end;
assume x is pair ;

then consider x1, x2 being set such that

A1: x = [x1,x2] by Dfx;

existence

ex b

for y1, y2 being set st x = [y1,y2] holds

b

proof end;

uniqueness for b

b

b

b

proof end;

existence ex b

for y1, y2 being set st x = [y1,y2] holds

b

proof end;

uniqueness for b

b

b

b

proof end;

:: deftheorem Def1 defines `1 XTUPLE_0:def 2 :

for x being set st x is pair holds

for b_{2} being set holds

( b_{2} = x `1 iff for y1, y2 being set st x = [y1,y2] holds

b_{2} = y1 );

for x being set st x is pair holds

for b

( b

b

:: deftheorem Def2 defines `2 XTUPLE_0:def 3 :

for x being set st x is pair holds

for b_{2} being set holds

( b_{2} = x `2 iff for y1, y2 being set st x = [y1,y2] holds

b_{2} = y2 );

for x being set st x is pair holds

for b

( b

b

registration
end;

registration
end;

begin

:: deftheorem Dfy defines triple XTUPLE_0:def 5 :

for x being set holds

( x is triple iff ex x1, x2, x3 being set st x = [x1,x2,x3] );

for x being set holds

( x is triple iff ex x1, x2, x3 being set st x = [x1,x2,x3] );

registration
end;

theorem Th3: :: XTUPLE_0:3

for x1, x2, x3, y1, y2, y3 being set st [x1,x2,x3] = [y1,y2,y3] holds

( x1 = y1 & x2 = y2 & x3 = y3 )

( x1 = y1 & x2 = y2 & x3 = y3 )

proof end;

registration

existence

ex b_{1} being set st b_{1} is triple

for b_{1} being set st b_{1} is triple holds

b_{1} is pair

end;
ex b

proof end;

coherence for b

b

proof end;

registration

let x1, x2, x3 be set ;

reducibility

[x1,x2,x3] `1_3 = x1

[x1,x2,x3] `2_3 = x2

[x1,x2,x3] `3_3 = x3

end;
reducibility

[x1,x2,x3] `1_3 = x1

proof end;

reducibility [x1,x2,x3] `2_3 = x2

proof end;

reducibility [x1,x2,x3] `3_3 = x3

proof end;

begin

:: deftheorem defines [ XTUPLE_0:def 8 :

for x1, x2, x3, x4 being set holds [x1,x2,x3,x4] = [[x1,x2,x3],x4];

for x1, x2, x3, x4 being set holds [x1,x2,x3,x4] = [[x1,x2,x3],x4];

:: deftheorem Dfz defines quadruple XTUPLE_0:def 9 :

for x being set holds

( x is quadruple iff ex x1, x2, x3, x4 being set st x = [x1,x2,x3,x4] );

for x being set holds

( x is quadruple iff ex x1, x2, x3, x4 being set st x = [x1,x2,x3,x4] );

theorem :: XTUPLE_0:5

for x1, x2, x3, x4, y1, y2, y3, y4 being set st [x1,x2,x3,x4] = [y1,y2,y3,y4] holds

( x1 = y1 & x2 = y2 & x3 = y3 & x4 = y4 )

( x1 = y1 & x2 = y2 & x3 = y3 & x4 = y4 )

proof end;

registration

existence

ex b_{1} being set st b_{1} is quadruple

for b_{1} being set st b_{1} is quadruple holds

b_{1} is triple

end;
ex b

proof end;

coherence for b

b

proof end;

registration

let x1, x2, x3, x4 be set ;

reducibility

[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

end;
reducibility

[x1,x2,x3,x4] `1_4 = x1

proof end;

reducibility [x1,x2,x3,x4] `2_4 = x2

proof end;

reducibility [x1,x2,x3,x4] `3_4 = x3

proof end;

reducibility [x1,x2,x3,x4] `4_4 = x4

proof end;

registration
end;

:: Preliminaries

:: Projections

definition

let X be set ;

ex b_{1} being set st

for x being set holds

( x in b_{1} iff ex y being set st [x,y] in X )

for b_{1}, b_{2} being set st ( for x being set holds

( x in b_{1} iff ex y being set st [x,y] in X ) ) & ( for x being set holds

( x in b_{2} iff ex y being set st [x,y] in X ) ) holds

b_{1} = b_{2}

ex b_{1} being set st

for x being set holds

( x in b_{1} iff ex y being set st [y,x] in X )

for b_{1}, b_{2} being set st ( for x being set holds

( x in b_{1} iff ex y being set st [y,x] in X ) ) & ( for x being set holds

( x in b_{2} iff ex y being set st [y,x] in X ) ) holds

b_{1} = b_{2}

end;
func proj1 X -> set means :Def4: :: XTUPLE_0:def 12

for x being set holds

( x in it iff ex y being set st [x,y] in X );

existence for x being set holds

( x in it iff ex y being set st [x,y] in X );

ex b

for x being set holds

( x in b

proof end;

uniqueness for b

( x in b

( x in b

b

proof end;

func proj2 X -> set means :Def5: :: XTUPLE_0:def 13

for x being set holds

( x in it iff ex y being set st [y,x] in X );

existence for x being set holds

( x in it iff ex y being set st [y,x] in X );

ex b

for x being set holds

( x in b

proof end;

uniqueness for b

( x in b

( x in b

b

proof end;

:: deftheorem Def4 defines proj1 XTUPLE_0:def 12 :

for X, b_{2} being set holds

( b_{2} = proj1 X iff for x being set holds

( x in b_{2} iff ex y being set st [x,y] in X ) );

for X, b

( b

( x in b

:: deftheorem Def5 defines proj2 XTUPLE_0:def 13 :

for X, b_{2} being set holds

( b_{2} = proj2 X iff for x being set holds

( x in b_{2} iff ex y being set st [y,x] in X ) );

for X, b

( b

( x in b

definition
end;

definition
end;

:: deftheorem defines proj1_4 XTUPLE_0:def 16 :

for X being set holds proj1_4 X = proj1 (proj1_3 X);

for X being set holds proj1_4 X = proj1 (proj1_3 X);

:: deftheorem defines proj2_4 XTUPLE_0:def 17 :

for X being set holds proj2_4 X = proj2 (proj1_3 X);

for X being set holds proj2_4 X = proj2 (proj1_3 X);

theorem :: XTUPLE_0:22

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

a = b

proof end;

begin

registration
end;

registration
end;