let n0 be non zero Nat; Sum (Euler_phi | (NatDivisors n0)) = n0
( dom Euler_phi = NAT & rng Euler_phi c= REAL )
by FUNCT_2:def 1;
then reconsider EU9 = Euler_phi as sequence of REAL by FUNCT_2:2;
set X = Seg n0;
defpred S1[ set , set ] means $2 = { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & $1 in NatDivisors n0 & h = $1 & i gcd n0 = n0 / h ) } ;
A1:
dom Euler_phi = NAT
by FUNCT_2:def 1;
A2:
for k being Nat st k in Seg n0 holds
ex x being Element of bool (Seg n0) st S1[k,x]
consider fp being FinSequence of bool (Seg n0) such that
A3:
( dom fp = Seg n0 & ( for k being Nat st k in Seg n0 holds
S1[k,fp . k] ) )
from FINSEQ_1:sch 5(A2);
A4:
NatDivisors n0 c= Seg n0
by MOEBIUS1:40;
then A5:
rng (Sgm (NatDivisors n0)) c= dom fp
by A3, FINSEQ_1:def 14;
then A6:
rng (Sgm (NatDivisors n0)) c= dom (Card fp)
by CARD_3:def 2;
then reconsider f1 = (Card fp) * (Sgm (NatDivisors n0)) as FinSequence of NAT by Th9;
A7:
NatDivisors n0 c= dom fp
by A3, MOEBIUS1:40;
A8: dom ((Card fp) * (Sgm (NatDivisors n0))) =
dom (Sgm (NatDivisors n0))
by A6, RELAT_1:27
.=
dom (Euler_phi * (Sgm (NatDivisors n0)))
by A5, A1, RELAT_1:27, XBOOLE_1:1
;
for k being Element of NAT st k in dom ((Card fp) * (Sgm (NatDivisors n0))) holds
((Card fp) * (Sgm (NatDivisors n0))) . k = (Euler_phi * (Sgm (NatDivisors n0))) . k
proof
let k be
Element of
NAT ;
( k in dom ((Card fp) * (Sgm (NatDivisors n0))) implies ((Card fp) * (Sgm (NatDivisors n0))) . k = (Euler_phi * (Sgm (NatDivisors n0))) . k )
set k9 =
(Sgm (NatDivisors n0)) . k;
set Y =
{ l where l is Element of NAT : ( (Sgm (NatDivisors n0)) . k,l are_coprime & l >= 1 & l <= (Sgm (NatDivisors n0)) . k ) } ;
set Z =
{ i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) } ;
deffunc H1(
Nat)
-> set =
($1 * n0) / ((Sgm (NatDivisors n0)) . k);
A9:
for
x being
object st
x in { l where l is Element of NAT : ( (Sgm (NatDivisors n0)) . k,l are_coprime & l >= 1 & l <= (Sgm (NatDivisors n0)) . k ) } holds
x in NAT
assume A10:
k in dom ((Card fp) * (Sgm (NatDivisors n0)))
;
((Card fp) * (Sgm (NatDivisors n0))) . k = (Euler_phi * (Sgm (NatDivisors n0))) . k
then
k in dom (Sgm (NatDivisors n0))
by FUNCT_1:11;
then
(Sgm (NatDivisors n0)) . k in rng (Sgm (NatDivisors n0))
by FUNCT_1:3;
then A11:
(Sgm (NatDivisors n0)) . k in NatDivisors n0
by FINSEQ_1:def 14;
then A12:
1
<= (Sgm (NatDivisors n0)) . k
by A3, A7, FINSEQ_1:1;
(Sgm (NatDivisors n0)) . k,1
are_coprime
by WSIERP_1:9;
then
1
in { l where l is Element of NAT : ( (Sgm (NatDivisors n0)) . k,l are_coprime & l >= 1 & l <= (Sgm (NatDivisors n0)) . k ) }
by A12;
then reconsider Y =
{ l where l is Element of NAT : ( (Sgm (NatDivisors n0)) . k,l are_coprime & l >= 1 & l <= (Sgm (NatDivisors n0)) . k ) } as non
empty Subset of
NAT by A9, TARSKI:def 3;
consider f being
Function such that A13:
(
dom f = Y & ( for
d being
Element of
Y holds
f . d = H1(
d) ) )
from FUNCT_1:sch 4();
for
y being
object holds
(
y in rng f iff
y in { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) } )
proof
let y be
object ;
( y in rng f iff y in { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) } )
hereby ( y in { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) } implies y in rng f )
assume
y in rng f
;
y in { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) } then consider x being
object such that A14:
x in dom f
and A15:
y = f . x
by FUNCT_1:def 3;
reconsider x =
x as
Element of
Y by A13, A14;
A16:
0 < (Sgm (NatDivisors n0)) . k
by A11;
(Sgm (NatDivisors n0)) . k divides n0
by A11, MOEBIUS1:39;
then consider j being
Nat such that A17:
n0 = ((Sgm (NatDivisors n0)) . k) * j
by NAT_D:def 3;
y =
H1(
x)
by A13, A15
.=
x * (n0 / ((Sgm (NatDivisors n0)) . k))
by XCMPLX_1:74
;
then A18:
y =
x * (j / (((Sgm (NatDivisors n0)) . k) / ((Sgm (NatDivisors n0)) . k)))
by A17, XCMPLX_1:77
.=
x * (j / 1)
by A16, XCMPLX_1:60
.=
x * j
;
then reconsider i =
y as
Element of
NAT by ORDINAL1:def 12;
x in Y
;
then consider l being
Element of
NAT such that A19:
x = l
and A20:
(Sgm (NatDivisors n0)) . k,
l are_coprime
and A21:
l >= 1
and A22:
l <= (Sgm (NatDivisors n0)) . k
;
A23:
x * j <= ((Sgm (NatDivisors n0)) . k) * j
by A19, A22, XREAL_1:64;
j <> 0
by A17;
then
j + 1
> 0 + 1
by XREAL_1:6;
then
1
<= j
by NAT_1:13;
then
1
* 1
<= x * j
by A19, A21, XREAL_1:66;
then A24:
i in Seg n0
by A17, A18, A23;
A25:
((Sgm (NatDivisors n0)) . k) gcd l = 1
by A20, INT_2:def 3;
n0 / ((Sgm (NatDivisors n0)) . k) =
j / (((Sgm (NatDivisors n0)) . k) / ((Sgm (NatDivisors n0)) . k))
by A17, XCMPLX_1:77
.=
j / 1
by A16, XCMPLX_1:60
;
then
i gcd n0 = n0 / ((Sgm (NatDivisors n0)) . k)
by A19, A17, A18, A25, EULER_1:5;
hence
y in { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) }
by A11, A24;
verum
end;
assume
y in { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) }
;
y in rng f
then consider i being
Element of
NAT such that A26:
i = y
and A27:
ex
h being
Nat st
(
i in Seg n0 &
(Sgm (NatDivisors n0)) . k in NatDivisors n0 &
h = (Sgm (NatDivisors n0)) . k &
i gcd n0 = n0 / h )
;
i gcd n0 divides i
by INT_2:def 2;
then consider x being
Nat such that A28:
i = (i gcd n0) * x
by NAT_D:def 3;
A29:
y = (x * n0) / ((Sgm (NatDivisors n0)) . k)
by A26, A27, A28, XCMPLX_1:74;
reconsider x =
x as
Element of
NAT by ORDINAL1:def 12;
A30:
(Sgm (NatDivisors n0)) . k <> 0
by A27;
A31:
((Sgm (NatDivisors n0)) . k) * (i gcd n0) =
n0 / (((Sgm (NatDivisors n0)) . k) / ((Sgm (NatDivisors n0)) . k))
by A27, XCMPLX_1:81
.=
n0 / 1
by A30, XCMPLX_1:60
;
then A32:
(Sgm (NatDivisors n0)) . k,
x are_coprime
by A27, A28, EULER_1:6;
x <> 0
by A27, A28, FINSEQ_1:1;
then
x + 1
> 0 + 1
by XREAL_1:6;
then A33:
x >= 1
by NAT_1:13;
i <= n0
by A27, FINSEQ_1:1;
then
x <= (Sgm (NatDivisors n0)) . k
by A27, A28, A31, XREAL_1:68;
then
x in dom f
by A13, A32, A33;
then reconsider x =
x as
Element of
Y by A13;
y = f . x
by A13, A29;
hence
y in rng f
by A13, FUNCT_1:def 3;
verum
end;
then A34:
rng f = { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) }
by TARSKI:2;
for
x1,
x2 being
object st
x1 in dom f &
x2 in dom f &
f . x1 = f . x2 holds
x1 = x2
then
f is
one-to-one
by FUNCT_1:def 4;
then A37:
Y,
{ i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) } are_equipotent
by A13, A34, WELLORD2:def 4;
fp . ((Sgm (NatDivisors n0)) . k) = { i where i is Element of NAT : ex h being Nat st
( i in Seg n0 & (Sgm (NatDivisors n0)) . k in NatDivisors n0 & h = (Sgm (NatDivisors n0)) . k & i gcd n0 = n0 / h ) }
by A3, A7, A11;
then
card (fp . ((Sgm (NatDivisors n0)) . k)) = card Y
by A37, CARD_1:5;
then
(Card fp) . ((Sgm (NatDivisors n0)) . k) = Euler ((Sgm (NatDivisors n0)) . k)
by A7, A11, CARD_3:def 2;
then A38:
(Card fp) . ((Sgm (NatDivisors n0)) . k) = Euler_phi . ((Sgm (NatDivisors n0)) . k)
by Def7;
((Card fp) * (Sgm (NatDivisors n0))) . k = (Card fp) . ((Sgm (NatDivisors n0)) . k)
by A10, FUNCT_1:12;
hence
((Card fp) * (Sgm (NatDivisors n0))) . k = (Euler_phi * (Sgm (NatDivisors n0))) . k
by A8, A10, A38, FUNCT_1:12;
verum
end;
then A39:
(Card fp) * (Sgm (NatDivisors n0)) = Euler_phi * (Sgm (NatDivisors n0))
by A8, PARTFUN1:5;
set k = len fp;
A40: Func_Seq (Euler_phi,(Sgm (NatDivisors n0))) =
Euler_phi * (Sgm (NatDivisors n0))
by BHSP_5:def 4
.=
Func_Seq (EU9,(Sgm (NatDivisors n0)))
by BHSP_5:def 4
;
A41:
for x being object holds
( x in NatDivisors n0 iff ( x in Seg n0 & not x in (Card fp) " {0} ) )
proof
reconsider y =
0 as
Element of
NAT ;
let x be
object ;
( x in NatDivisors n0 iff ( x in Seg n0 & not x in (Card fp) " {0} ) )
A42:
y in {0}
by TARSKI:def 1;
hereby ( x in Seg n0 & not x in (Card fp) " {0} implies x in NatDivisors n0 )
assume A43:
x in NatDivisors n0
;
( x in Seg n0 & not x in (Card fp) " {0} )then reconsider k =
x as
Element of
NAT ;
thus
x in Seg n0
by A4, A43;
not x in (Card fp) " {0}assume
x in (Card fp) " {0}
;
contradictionthen consider y being
object such that A44:
(
[x,y] in Card fp &
y in {0} )
by RELAT_1:def 14;
(
y = 0 &
y = (Card fp) . x )
by A44, FUNCT_1:1, TARSKI:def 1;
then
card (fp . x) = {}
by A3, A4, A43, CARD_3:def 2;
then A45:
fp . x = {}
;
k divides n0
by A43, MOEBIUS1:39;
then consider i being
Nat such that A46:
n0 = k * i
by NAT_D:def 3;
i <> 0
by A46;
then
0 + 1
< i + 1
by XREAL_1:6;
then A47:
1
<= i
by NAT_1:13;
A48:
i divides n0
by A46, NAT_D:def 3;
then
i <= n0
by NAT_D:7;
then A49:
i in Seg n0
by A47;
A50:
k <> 0
by A46;
n0 = k * (i gcd n0)
by A46, A48, NEWTON:49;
then n0 / k =
(i gcd n0) * (k / k)
by XCMPLX_1:74
.=
(i gcd n0) * 1
by A50, XCMPLX_1:60
;
then
i in { i9 where i9 is Element of NAT : ex h being Nat st
( i9 in Seg n0 & k in NatDivisors n0 & h = k & i9 gcd n0 = n0 / h ) }
by A43, A49;
hence
contradiction
by A3, A4, A43, A45;
verum
end;
assume A51:
x in Seg n0
;
( x in (Card fp) " {0} or x in NatDivisors n0 )
then reconsider k =
x as
Element of
NAT ;
A52:
fp . k = { i9 where i9 is Element of NAT : ex h being Nat st
( i9 in Seg n0 & k in NatDivisors n0 & h = k & i9 gcd n0 = n0 / h ) }
by A3, A51;
assume A53:
not
x in (Card fp) " {0}
;
x in NatDivisors n0
assume A54:
not
x in NatDivisors n0
;
contradiction
fp . k = {}
then A56:
y = (Card fp) . x
by A3, A51, CARD_1:27, CARD_3:def 2;
x in dom (Card fp)
by A3, A51, CARD_3:def 2;
then
[k,y] in Card fp
by A56, FUNCT_1:1;
hence
contradiction
by A53, A42, RELSET_1:30;
verum
end;
reconsider f29 = Card fp as FinSequence of REAL by Th13;
reconsider f19 = f1 as FinSequence of REAL by Th13;
Seg n0 = dom (Card fp)
by A3, CARD_3:def 2;
then
f19 = f29 - {0}
by A41, XBOOLE_0:def 5;
then A58:
Sum f19 = Sum f29
by Th12;
A59:
for d, e being Nat st d in dom fp & e in dom fp & d <> e holds
fp . d misses fp . e
A65:
for x being object holds
( x in union (rng fp) iff x in Seg n0 )
card (union (rng fp)) = Sum (Card fp)
by A59, INT_5:48;
then A76:
card (Seg n0) = Sum (Card fp)
by A65, TARSKI:2;
card (Seg n0) = card n0
by FINSEQ_1:55;
then
n0 = Sum (Card fp)
by A76;
then
Sum (Func_Seq (Euler_phi,(Sgm (NatDivisors n0)))) = n0
by A58, A39, BHSP_5:def 4;
hence
Sum (Euler_phi | (NatDivisors n0)) = n0
by A40, Th24; verum