defpred S1[ Nat] means for i being Nat st i in dom (Sgm0 ($1 /\ OddNAT)) holds
(Sgm0 ($1 /\ OddNAT)) . i = (2 * i) + 1;
A1:
S1[ 0 ]
A2:
now for n being Nat st S1[n] holds
S1[n + 1]let n be
Nat;
( S1[n] implies S1[n + 1] )assume A3:
S1[
n]
;
S1[n + 1]thus
S1[
n + 1]
verumproof
let i be
Nat;
( i in dom (Sgm0 ((n + 1) /\ OddNAT)) implies (Sgm0 ((n + 1) /\ OddNAT)) . i = (2 * i) + 1 )
assume A4:
i in dom (Sgm0 ((n + 1) /\ OddNAT))
;
(Sgm0 ((n + 1) /\ OddNAT)) . i = (2 * i) + 1
per cases
( n is odd or n is even )
;
suppose A5:
n is
odd
;
(Sgm0 ((n + 1) /\ OddNAT)) . i = (2 * i) + 1A6:
(n + 1) /\ OddNAT = (n /\ OddNAT) \/ {n}
reconsider X =
n /\ OddNAT as
finite natural-membered set ;
reconsider Y =
{n} as
finite natural-membered set ;
A10:
X <N< Y
not
n in n
;
then
not
n in n /\ OddNAT
by XBOOLE_0:def 4;
then A11:
card ((n + 1) /\ OddNAT) = (card (n /\ OddNAT)) + 1
by A6, CARD_2:41;
A12:
i in Segm (dom (Sgm0 ((n + 1) /\ OddNAT)))
by A4;
then
i < len (Sgm0 ((n + 1) /\ OddNAT))
by NAT_1:44;
then
i < (card (n /\ OddNAT)) + 1
by A11, AFINSQ_2:20;
then
i < (len (Sgm0 X)) + 1
by AFINSQ_2:20;
per cases then
( i < len (Sgm0 X) or i = len (Sgm0 X) )
by NAT_1:22;
suppose A15:
i = len (Sgm0 X)
;
(Sgm0 ((n + 1) /\ OddNAT)) . i = (2 * i) + 1then A16:
(Sgm0 ((n + 1) /\ OddNAT)) . i =
(Sgm0 Y) . 0
by AFINSQ_2:32, A10, A6
.=
n
by AFINSQ_2:22
;
(Sgm0 ((n + 1) /\ OddNAT)) . i in rng (Sgm0 ((n + 1) /\ OddNAT))
by FUNCT_1:3, A4;
then
(Sgm0 ((n + 1) /\ OddNAT)) . i in (n + 1) /\ OddNAT
by AFINSQ_2:def 4;
then
(Sgm0 ((n + 1) /\ OddNAT)) . i in OddNAT
by XBOOLE_0:def 4;
then consider r being
Nat such that A17:
(
r = (Sgm0 ((n + 1) /\ OddNAT)) . i &
r is
odd )
;
consider j being
Nat such that A18:
r = (2 * j) + 1
by A17, ABIAN:9;
per cases
( j < i or j = i or j > i )
by XXREAL_0:1;
suppose A19:
j < i
;
(Sgm0 ((n + 1) /\ OddNAT)) . i = (2 * i) + 1then A20:
j < Segm (card (Sgm0 (n /\ OddNAT)))
by A15;
j < card (Sgm0 ((n + 1) /\ OddNAT))
by A19, A12, NAT_1:44, XXREAL_0:2;
then A21:
j in Segm (dom (Sgm0 ((n + 1) /\ OddNAT)))
by NAT_1:44;
(Sgm0 ((n + 1) /\ OddNAT)) . j =
(Sgm0 (n /\ OddNAT)) . j
by A10, A19, A15, AFINSQ_2:29, A6
.=
(Sgm0 ((n + 1) /\ OddNAT)) . i
by A20, NAT_1:44, A3, A17, A18
;
hence
(Sgm0 ((n + 1) /\ OddNAT)) . i = (2 * i) + 1
by A21, A4, FUNCT_1:def 4, A19;
verum end; end; end; end; end; end;
end; end;
for N being Nat holds S1[N]
from NAT_1:sch 2(A1, A2);
hence
for N, i being Nat st i in dom (Sgm0 (N /\ OddNAT)) holds
(Sgm0 (N /\ OddNAT)) . i = (2 * i) + 1
; verum