let n be non empty Nat; (n + 1) -BinarySequence (2 to_power n) = (0* n) ^ <*TRUE *>
0* n in BOOLEAN *
by Th5;
then A1:
0* n is FinSequence of BOOLEAN
by FINSEQ_1:def 11;
len (0* n) = n
by FINSEQ_1:def 18;
then reconsider 0n = 0* n as Tuple of n, BOOLEAN by A1, FINSEQ_2:110;
now let i be
Nat;
( i in Seg (n + 1) implies ((n + 1) -BinarySequence (2 to_power n)) . i = (0n ^ <*TRUE *>) . i )assume A2:
i in Seg (n + 1)
;
((n + 1) -BinarySequence (2 to_power n)) . i = (0n ^ <*TRUE *>) . inow per cases
( i in Seg n or i = n + 1 )
by A2, FINSEQ_2:8;
suppose A3:
i in Seg n
;
((n + 1) -BinarySequence (2 to_power n)) . i = (0n ^ <*TRUE *>) . ithen A4:
i >= 1
by FINSEQ_1:3;
i <= n + 1
by A2, FINSEQ_1:3;
then
i - 1
<= (n + 1) - 1
by XREAL_1:11;
then A5:
i -' 1
<= (n + 1) - 1
by A4, XREAL_1:235;
n =
(n - (i -' 1)) + (i -' 1)
.=
(n -' (i -' 1)) + (i -' 1)
by A5, XREAL_1:235
;
then A6:
2
to_power n = (2 to_power (n -' (i -' 1))) * (2 to_power (i -' 1))
by POWER:32;
i in Seg (len 0n)
by A3, FINSEQ_1:def 18;
then A7:
i in dom 0n
by FINSEQ_1:def 3;
n >= i
by A3, FINSEQ_1:3;
then
n + 1
> i
by NAT_1:13;
then
n > i - 1
by XREAL_1:21;
then
n - (i - 1) > 0
by XREAL_1:52;
then
n - (i -' 1) > 0
by A4, XREAL_1:235;
then
n -' (i -' 1) > 0
by A5, XREAL_1:235;
then consider n1 being
Nat such that A8:
n -' (i -' 1) = n1 + 1
by NAT_1:6;
reconsider n1 =
n1 as
Nat ;
A9: 2
to_power (n -' (i -' 1)) =
(2 to_power n1) * (2 to_power 1)
by A8, POWER:32
.=
(2 to_power n1) * 2
by POWER:30
;
2
to_power (i -' 1) > 0
by POWER:39;
then A10:
((2 to_power n) div (2 to_power (i -' 1))) mod 2 =
(2 to_power (n -' (i -' 1))) mod 2
by A6, NAT_D:20
.=
0
by A9, NAT_D:13
;
i in Seg (len ((n + 1) -BinarySequence (2 to_power n)))
by A2, FINSEQ_1:def 18;
then
i in dom ((n + 1) -BinarySequence (2 to_power n))
by FINSEQ_1:def 3;
hence ((n + 1) -BinarySequence (2 to_power n)) . i =
((n + 1) -BinarySequence (2 to_power n)) /. i
by PARTFUN1:def 8
.=
IFEQ (((2 to_power n) div (2 to_power (i -' 1))) mod 2),
0 ,
FALSE ,
TRUE
by A2, Def1
.=
0
by A10, FUNCOP_1:def 8
.=
0n . i
by A3, FUNCOP_1:13
.=
(0n ^ <*TRUE *>) . i
by A7, FINSEQ_1:def 7
;
verum end; end; end; hence
((n + 1) -BinarySequence (2 to_power n)) . i = (0n ^ <*TRUE *>) . i
;
verum end;
hence
(n + 1) -BinarySequence (2 to_power n) = (0* n) ^ <*TRUE *>
by FINSEQ_2:139; verum