Documentation
Projects
.
Kolakoski
.
Bounds
Search
return to top
source
Imports
Init
Projects.Kolakoski.Basic
Imported by
Kolakoski
.
KolIter
.
mem_of_length_eq_three
Kolakoski
.
KolIter
.
mem_of_three_le_length
Kolakoski
.
KolIter
.
sum_eq_length_add_count_two
Kolakoski
.
KolIter
.
lb_count
Kolakoski
.
lb_f₁
Kolakoski
.
lb_length_f₁
Kolakoski
.
lb_sum_f₁
Kolakoski
.
KolIter
.
of_mem
Kolakoski
.
KolIter
.
length_eq_count_add_count
Kolakoski
.
KolIter
.
count_eq_sub
Kolakoski
.
KolIter
.
count_three_sub_eq_sub
Kolakoski
.
KolIter
.
length_eq_count_add_count_of
Kolakoski
.
KolIter
.
ub_count
Kolakoski
.
KolIter
.
sum_f₁_add_le_of_le
Kolakoski
.
KolIter
.
add_two_sum_le_f₁
Kolakoski
.
KolIter
.
succ_sum_lt_f₁
Kolakoski
.
KolIter
.
sum_lt_sum_f₁
Kolakoski
.
KolIter
.
sum_le_sum_f₁
Kolakoski
.
self_lt_length_f₁
Kolakoski
.
lt_length_f₂_same
Kolakoski
.
KolIter
.
getElem_eq_getElem_iff
Kolakoski
.
KolIter
.
getElem_eq_getElem_iff_simp
Kolakoski
.
getElem_f₂
Kolakoski
.
kolakoski₁_eq_getElem_f₁
Kolakoski
.
KolIter
.
not_replicate_three_infix
Kolakoski
.
KolIter
.
not_infix_pat_aaa
source
theorem
Kolakoski
.
KolIter
.
mem_of_length_eq_three
{
xs
ys
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
=
1
∨
c
=
2
)
(
h₁
:
ys
.
length
=
3
)
(
h₂
:
ys
<:+:
xs
)
:
c
∈
ys
source
theorem
Kolakoski
.
KolIter
.
mem_of_three_le_length
{
xs
ys
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
=
1
∨
c
=
2
)
(
h₁
:
3
≤
ys
.
length
)
(
h₂
:
ys
<:+:
xs
)
:
c
∈
ys
source
theorem
Kolakoski
.
KolIter
.
sum_eq_length_add_count_two
{
xs
:
List
ℕ
}
[
h
:
KolIter
xs
]
:
xs
.
sum
=
xs
.
length
+
List.count
2
xs
source
theorem
Kolakoski
.
KolIter
.
lb_count
{
xs
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
=
1
∨
c
=
2
)
:
xs
.
length
/
3
≤
List.count
c
xs
source
theorem
Kolakoski
.
lb_f₁
{
n
:
ℕ
}
:
(
7
/
6
)
^
(
n
-
1
)
≤
↑
(
f₁
^[
n
]
[
1
,
2
]
)
.
length
∧
(
7
/
6
)
^
n
≤
↑
(
f₁
^[
n
]
[
1
,
2
]
)
.
sum
source
theorem
Kolakoski
.
lb_length_f₁
{
n
:
ℕ
}
:
(
7
/
6
)
^
(
n
-
1
)
≤
↑
(
f₁
^[
n
]
[
1
,
2
]
)
.
length
source
theorem
Kolakoski
.
lb_sum_f₁
{
n
:
ℕ
}
:
(
7
/
6
)
^
n
≤
↑
(
f₁
^[
n
]
[
1
,
2
]
)
.
sum
source
theorem
Kolakoski
.
KolIter
.
of_mem
{
xs
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
∈
xs
)
:
c
=
1
∨
c
=
2
source
theorem
Kolakoski
.
KolIter
.
length_eq_count_add_count
{
xs
:
List
ℕ
}
[
h
:
KolIter
xs
]
:
xs
.
length
=
List.count
1
xs
+
List.count
2
xs
source
theorem
Kolakoski
.
KolIter
.
count_eq_sub
{
xs
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
=
1
∨
c
=
2
)
:
List.count
c
xs
=
xs
.
length
-
List.count
(
3
-
c
)
xs
source
theorem
Kolakoski
.
KolIter
.
count_three_sub_eq_sub
{
xs
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
=
1
∨
c
=
2
)
:
List.count
(
3
-
c
)
xs
=
xs
.
length
-
List.count
c
xs
source
theorem
Kolakoski
.
KolIter
.
length_eq_count_add_count_of
{
xs
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
=
1
∨
c
=
2
)
:
xs
.
length
=
List.count
c
xs
+
List.count
(
3
-
c
)
xs
source
theorem
Kolakoski
.
KolIter
.
ub_count
{
xs
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
(
hc
:
c
=
1
∨
c
=
2
)
:
List.count
c
xs
≤
xs
.
length
*
2
/
3
+
1
source
theorem
Kolakoski
.
KolIter
.
sum_f₁_add_le_of_le
{
xs
ys
:
List
ℕ
}
[
h₁
:
KolIter
xs
]
[
h₂
:
KolIter
ys
]
(
h
:
xs
.
length
≤
ys
.
length
)
:
(
f₁
xs
)
.
sum
+
ys
.
sum
≤
(
f₁
ys
)
.
sum
+
xs
.
sum
source
theorem
Kolakoski
.
KolIter
.
add_two_sum_le_f₁
{
xs
:
List
ℕ
}
[
h
:
KolIter
xs
]
:
xs
.
sum
+
2
≤
(
f₁
xs
)
.
sum
source
theorem
Kolakoski
.
KolIter
.
succ_sum_lt_f₁
{
xs
:
List
ℕ
}
[
h
:
KolIter
xs
]
:
xs
.
sum
+
1
<
(
f₁
xs
)
.
sum
source
@[simp]
theorem
Kolakoski
.
KolIter
.
sum_lt_sum_f₁
{
xs
:
List
ℕ
}
[
h
:
KolIter
xs
]
:
xs
.
sum
<
(
f₁
xs
)
.
sum
source
@[simp]
theorem
Kolakoski
.
KolIter
.
sum_le_sum_f₁
{
xs
:
List
ℕ
}
[
h
:
KolIter
xs
]
:
xs
.
sum
≤
(
f₁
xs
)
.
sum
source
@[simp]
theorem
Kolakoski
.
self_lt_length_f₁
{
n
:
ℕ
}
:
n
<
(
f₁
^[
n
]
[
1
,
2
]
)
.
length
source
@[simp]
theorem
Kolakoski
.
lt_length_f₂_same
{
n
:
ℕ
}
:
n
<
(
f₂
[
1
,
2
]
(
n
+
1
) (
n
+
1
))
.
length
source
theorem
Kolakoski
.
KolIter
.
getElem_eq_getElem_iff
{
xs
ys
:
List
ℕ
}
{
i
:
ℕ
}
[
hx
:
KolIter
xs
]
[
hy
:
KolIter
ys
]
{
hh₁
:
i
<
xs
.
length
}
{
hh₂
:
i
<
ys
.
length
}
:
xs
[
i
]
=
ys
[
i
]
source
@[simp]
theorem
Kolakoski
.
KolIter
.
getElem_eq_getElem_iff_simp
{
xs
ys
:
List
ℕ
}
{
i
:
ℕ
}
[
hx
:
KolIter
xs
]
[
hy
:
KolIter
ys
]
{
hh₁
:
i
<
xs
.
length
}
{
hh₂
:
i
<
ys
.
length
}
:
xs
[
i
]
=
ys
[
i
]
↔
True
source
@[simp]
theorem
Kolakoski
.
getElem_f₂
{
n
m
i
:
ℕ
}
{
hh
:
i
<
(
f₂
[
1
,
2
]
n
m
)
.
length
}
:
(
f₂
[
1
,
2
]
n
m
)
[
i
]
=
(
f₁
^[
i
]
[
1
,
2
]
)
[
i
]
source
theorem
Kolakoski
.
kolakoski₁_eq_getElem_f₁
{
i
:
ℕ
}
:
kolakoski₁
i
=
(
f₁
^[
i
]
[
1
,
2
]
)
[
i
]
source
theorem
Kolakoski
.
KolIter
.
not_replicate_three_infix
{
xs
:
List
ℕ
}
{
c
:
ℕ
}
[
h
:
KolIter
xs
]
:
¬
List.replicate
3
c
<:+:
xs
source
@[simp]
theorem
Kolakoski
.
KolIter
.
not_infix_pat_aaa
{
xs
:
List
ℕ
}
{
a
:
ℕ
}
[
h
:
KolIter
xs
]
:
¬
[
a
,
a
,
a
]
<:+:
xs