defpred S1[ Nat] means ex f being non-empty increasing FinSequence of NAT st
( dom f = Seg ($1 + 1) & ( for i being Nat st i in dom f holds
f . i is triangular ) & f is with_all_coprime_terms );
A1:
S1[ 0 ]
A2:
for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be
Nat;
( S1[k] implies S1[k + 1] )
assume
S1[
k]
;
S1[k + 1]
then consider f being
non-empty increasing FinSequence of
NAT such that B1:
(
dom f = Seg (k + 1) & ( for
i being
Nat st
i in dom f holds
f . i is
triangular ) &
f is
with_all_coprime_terms )
;
reconsider ff =
f as
FinSequence of
NAT ;
J1:
len ff = k + 1
by B1, FINSEQ_1:def 3;
set a =
Product ff;
reconsider a =
Product ff as
Nat ;
G1:
a,
a + 1
are_coprime
;
G2:
a,
(2 * a) + 1
are_coprime
by Coprime21;
reconsider T =
(((2 * a) + 1) * (((2 * a) + 1) + 1)) / 2 as
Element of
NAT by ORDINAL1:def 12;
we:
ex
k being
Nat st
T = Triangle k
J2:
((2 * a) + 1) * (a + 1) = T
;
for
i being
Nat holds
( not
i in dom ff or not
ff . i = 0 )
by FUNCT_1:def 9;
then WC:
Product ff <> 0
by RVSUM_1:103;
k + 1
>= 1
by NAT_1:12;
then
f . (k + 1) divides a
by B1, INT_4:32, FINSEQ_1:1;
then WV:
f . (k + 1) <= a
by WC, NAT_D:7;
1
* (a + 1) < T
by J2, WC, NAT_1:16, XREAL_1:68;
then
a < T
by NAT_1:16, XXREAL_0:2;
then ZO:
T > f . (k + 1)
by WV, XXREAL_0:2;
cd:
((2 * a) + 1) * (a + 1),
a are_coprime
by WC, G1, G2, EULER_1:14;
set fg =
ff ^ <*T*>;
C1:
dom (ff ^ <*T*>) =
Seg ((len ff) + (len <*T*>))
by FINSEQ_1:def 7
.=
Seg ((k + 1) + 1)
by J1, FINSEQ_1:39
;
for
i being
Nat st
i in dom ff holds
ff . i < T
then reconsider fg =
ff ^ <*T*> as
increasing FinSequence of
NAT by ConcatIsIncreasing;
v1:
Seg ((k + 1) + 1) = (Seg (k + 1)) \/ {((k + 1) + 1)}
by FINSEQ_1:9;
GD:
fg . 1
<> 0
T1:
for
i being
Nat st
i in dom fg holds
(
fg . i is
triangular & not
fg . i is
empty )
for
i being
object st
i in dom fg holds
not
fg . i is
empty
by T1;
then reconsider fg =
fg as
non-empty increasing FinSequence of
NAT by FUNCT_1:def 9;
for
i,
j being
Nat st
i in dom fg &
j in dom fg &
i <> j holds
fg . i,
fg . j are_coprime
proof
let i,
j be
Nat;
( i in dom fg & j in dom fg & i <> j implies fg . i,fg . j are_coprime )
assume Z1:
(
i in dom fg &
j in dom fg &
i <> j )
;
fg . i,fg . j are_coprime
per cases
( ( i in dom ff & j in dom ff ) or ( i in dom ff & not j in dom ff ) or ( not i in dom ff & j in dom ff ) or ( not i in dom ff & not j in dom ff ) )
;
suppose Z2:
(
i in dom ff & not
j in dom ff )
;
fg . i,fg . j are_coprime then
(
i in Seg (k + 1) &
j in {((k + 1) + 1)} )
by B1, v1, Z1, C1, XBOOLE_0:def 3;
then Y9:
j = (len ff) + 1
by J1, TARSKI:def 1;
ff . i,
T are_coprime
by cd, CoprimeDivides, Z2, INT_4:32;
hence
fg . i,
fg . j are_coprime
by Y9, Z2, FINSEQ_1:def 7;
verum end; suppose Z2:
( not
i in dom ff &
j in dom ff )
;
fg . i,fg . j are_coprime then
(
j in Seg (k + 1) &
i in {((k + 1) + 1)} )
by B1, v1, Z1, C1, XBOOLE_0:def 3;
then Y1:
i = (len ff) + 1
by J1, TARSKI:def 1;
ff . j,
T are_coprime
by cd, CoprimeDivides, Z2, INT_4:32;
hence
fg . i,
fg . j are_coprime
by Y1, Z2, FINSEQ_1:def 7;
verum end; end;
end;
then
(
dom fg = Seg ((k + 1) + 1) & ( for
i being
Nat st
i in dom fg holds
fg . i is
triangular ) &
fg is
with_all_coprime_terms )
by C1, T1, INT_6:def 2;
hence
S1[
k + 1]
;
verum
end;
A3:
for n being Nat holds S1[n]
from NAT_1:sch 2(A1, A2);
let n be Nat; ex f being non-empty increasing FinSequence of NAT st
( dom f = Seg (n + 1) & ( for i being Nat st i in dom f holds
f . i is triangular ) & f is with_all_coprime_terms )
consider f being non-empty increasing FinSequence of NAT such that
JJ:
( dom f = Seg (n + 1) & ( for i being Nat st i in dom f holds
f . i is triangular ) & f is with_all_coprime_terms )
by A3;
take
f
; ( dom f = Seg (n + 1) & ( for i being Nat st i in dom f holds
f . i is triangular ) & f is with_all_coprime_terms )
thus
( dom f = Seg (n + 1) & ( for i being Nat st i in dom f holds
f . i is triangular ) & f is with_all_coprime_terms )
by JJ; verum