let n be Nat; :: thesis: ( n > 0 implies card the InternalRel of (Necklace n) = 2 * (n - 1) )
assume A1:
n > 0
; :: thesis: card the InternalRel of (Necklace n) = 2 * (n - 1)
then A2:
n >= 0 + 1
by NAT_1:13;
deffunc H1( Element of NAT ) -> Element of NAT = $1;
deffunc H2( Element of NAT ) -> Element of NAT = $1 + 1;
defpred S1[ Element of NAT ] means $1 + 1 < n;
set A = { [i,(i + 1)] where i is Element of NAT : i + 1 < n } ;
set B = { [H2(i),H1(i)] where i is Element of NAT : S1[i] } ;
A3:
the InternalRel of (Necklace n) = { [i,(i + 1)] where i is Element of NAT : i + 1 < n } \/ { [H2(i),H1(i)] where i is Element of NAT : S1[i] }
by Th19;
{ [i,(i + 1)] where i is Element of NAT : i + 1 < n } = the InternalRel of (n -SuccRelStr )
by Def7;
then A4:
card { [i,(i + 1)] where i is Element of NAT : i + 1 < n } = n - 1
by A1, Th17;
A5:
card { [H2(i),H1(i)] where i is Element of NAT : S1[i] } = n - 1
by A1, Th27;
{ [i,(i + 1)] where i is Element of NAT : i + 1 < n } is Relation-like
then reconsider A = { [i,(i + 1)] where i is Element of NAT : i + 1 < n } as Relation ;
A6:
A = { [H1(i),H2(i)] where i is Element of NAT : S1[i] }
;
A7:
A ~ = { [H2(i),H1(i)] where i is Element of NAT : S1[i] }
from NECKLACE:sch 1(A6);
A8:
A misses { [H2(i),H1(i)] where i is Element of NAT : S1[i] }
proof
assume
A meets { [H2(i),H1(i)] where i is Element of NAT : S1[i] }
;
:: thesis: contradiction
then consider x being
set such that A9:
x in A
and A10:
x in { [H2(i),H1(i)] where i is Element of NAT : S1[i] }
by XBOOLE_0:3;
consider y,
z being
set such that A11:
x = [y,z]
by A9, RELAT_1:def 1;
A12:
[z,y] in A
by A7, A10, A11, RELAT_1:def 7;
consider i being
Element of
NAT such that A13:
(
[y,z] = [i,(i + 1)] &
i + 1
< n )
by A9, A11;
A14:
(
y = i &
z = i + 1 )
by A13, ZFMISC_1:33;
consider j being
Element of
NAT such that A15:
(
[z,y] = [j,(j + 1)] &
j + 1
< n )
by A12;
(
z = j &
y = j + 1 )
by A15, ZFMISC_1:33;
hence
contradiction
by A14;
:: thesis: verum
end;
A16:
n -' 1 = n - 1
by A2, XREAL_1:235;
card the InternalRel of (Necklace n) =
(card (n - 1)) +` (card (n - 1))
by A3, A4, A5, A8, CARD_2:48
.=
card ((n -' 1) + (n -' 1))
by A16, CARD_2:51
.=
2 * (n - 1)
by A16, CARD_1:def 5
;
hence
card the InternalRel of (Necklace n) = 2 * (n - 1)
; :: thesis: verum