Lm1:
for x, y being set holds rng <*x,y*> = {x,y}
Lm2:
for x, y, z being set holds rng <*x,y,z*> = {x,y,z}
theorem Th21:
for
p1,
p2,
p3 being
set holds
p1 .. <*p1,p2,p3*> = 1
theorem Th22:
for
p1,
p2,
p3 being
set st
p1 <> p2 holds
p2 .. <*p1,p2,p3*> = 2
theorem Th23:
for
p1,
p2,
p3 being
set st
p1 <> p3 &
p2 <> p3 holds
p3 .. <*p1,p2,p3*> = 3
Lm3:
for i being Nat
for D being non empty set
for p being Element of D
for f being FinSequence of D st p in rng f & p .. f > i holds
i + (p .. (f /^ i)) = p .. f
theorem Th117:
for
f being
FinSequence for
k1,
k2 being
Nat st 1
<= k1 &
k1 <= len f & 1
<= k2 &
k2 <= len f holds
(
(mid (f,k1,k2)) . 1
= f . k1 & (
k1 <= k2 implies (
len (mid (f,k1,k2)) = (k2 -' k1) + 1 & ( for
i being
Nat st 1
<= i &
i <= len (mid (f,k1,k2)) holds
(mid (f,k1,k2)) . i = f . ((i + k1) -' 1) ) ) ) & (
k1 > k2 implies (
len (mid (f,k1,k2)) = (k1 -' k2) + 1 & ( for
i being
Nat st 1
<= i &
i <= len (mid (f,k1,k2)) holds
(mid (f,k1,k2)) . i = f . ((k1 -' i) + 1) ) ) ) )
theorem Th121:
for
f being
FinSequence for
k1,
k2,
i being
Nat st 1
<= k1 &
k1 <= k2 &
k2 <= len f & 1
<= i & (
i <= (k2 -' k1) + 1 or
i <= (k2 - k1) + 1 or
i <= (k2 + 1) - k1 ) holds
(
(mid (f,k1,k2)) . i = f . ((i + k1) -' 1) &
(mid (f,k1,k2)) . i = f . ((i -' 1) + k1) &
(mid (f,k1,k2)) . i = f . ((i + k1) - 1) &
(mid (f,k1,k2)) . i = f . ((i - 1) + k1) )
Th126:
for D being non empty set
for f being FinSequence of D
for k1, k2 being Nat st k1 < k2 & k1 in dom f holds
mid (f,k1,k2) = <*(f . k1)*> ^ (mid (f,(k1 + 1),k2))
theorem Th1:
for
m,
k,
n being
Nat holds
( (
m + 1
<= k &
k <= n ) iff ex
i being
Nat st
(
m <= i &
i < n &
k = i + 1 ) )
Lm1:
for m, n being Nat
for F being finite set st F = { k where k is Nat : ( m <= k & k <= m + n ) } holds
card F = n + 1
theorem
for
m,
n,
l being
Nat st 1
<= l &
l <= n holds
(Sgm { kk where kk is Nat : ( m + 1 <= kk & kk <= m + n ) } ) . l = m + l
Lm2:
for p being FinSequence
for m, n being Nat st 1 <= m & m <= n + 1 & n <= len p holds
( (len ((m,n) -cut p)) + m = n + 1 & ( for i being Nat st i < len ((m,n) -cut p) holds
((m,n) -cut p) . (i + 1) = p . (m + i) ) )
then Lm4:
<*1,2*> is TwoValued
by Lm3;
Lm5:
now for i being Nat st 1 <= i & i + 1 <= len <*1,2*> holds
<*1,2*> . i <> <*1,2*> . (i + 1)
let i be
Nat;
( 1 <= i & i + 1 <= len <*1,2*> implies <*1,2*> . i <> <*1,2*> . (i + 1) )set p =
<*1,2*>;
assume that A1:
1
<= i
and A2:
i + 1
<= len <*1,2*>
;
<*1,2*> . i <> <*1,2*> . (i + 1)
i + 1
<= 1
+ 1
by A2, FINSEQ_1:44;
then
i <= 1
by XREAL_1:6;
then A3:
i = 1
by A1, XXREAL_0:1;
then
<*1,2*> . i = 1
by FINSEQ_1:44;
hence
<*1,2*> . i <> <*1,2*> . (i + 1)
by A3, FINSEQ_1:44;
verum
end;
Lm6:
<*1,2*> is Alternating
by Lm5;
NAT27:
for i, j being Nat st j < i holds
(i -' (j + 1)) + 1 = i -' j