begin
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}
begin
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,
p3,
p2 being
set st
p1 <> p3 &
p2 <> p3 holds
p3 .. <*p1,p2,p3*> = 3
begin
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
begin
begin
begin
theorem Th118:
for
D being non
empty set for
f being
FinSequence of
D for
k1,
k2 being
Element of
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
Element of
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
Element of
NAT st 1
<= i &
i <= len (mid (f,k1,k2)) holds
(mid (f,k1,k2)) . i = f . ((k1 -' i) + 1) ) ) ) )
theorem Th122:
for
D being non
empty set for
f being
FinSequence of
D for
k1,
k2,
i being
Element of
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) )