thus
PairFunc is one-to-one
:: according to FUNCT_2:def 4 :: thesis: PairFunc is onto proof
now let nm1,
nm2 be
set ;
:: thesis: ( nm1 in [:NAT ,NAT :] & nm2 in [:NAT ,NAT :] & PairFunc . nm1 = PairFunc . nm2 implies nm1 = nm2 )assume A1:
(
nm1 in [:NAT ,NAT :] &
nm2 in [:NAT ,NAT :] &
PairFunc . nm1 = PairFunc . nm2 )
;
:: thesis: nm1 = nm2then consider n1,
m1 being
set such that A2:
(
n1 in NAT &
m1 in NAT &
[n1,m1] = nm1 )
by ZFMISC_1:def 2;
consider n2,
m2 being
set such that A3:
(
n2 in NAT &
m2 in NAT &
[n2,m2] = nm2 )
by A1, ZFMISC_1:def 2;
reconsider n1 =
n1,
n2 =
n2,
m1 =
m1,
m2 =
m2 as
Element of
NAT by A2, A3;
(
((2 |^ n1) * ((2 * m1) + 1)) - 1
= PairFunc . nm1 &
((2 |^ n2) * ((2 * m2) + 1)) - 1
= PairFunc . nm2 )
by A2, A3, Def1;
then
(
n1 = n2 &
m1 = m2 )
by A1, CARD_4:52;
hence
nm1 = nm2
by A2, A3;
:: thesis: verum end;
hence
PairFunc is
one-to-one
by FUNCT_2:25;
:: thesis: verum
end;
thus
PairFunc is onto
:: thesis: verum