Take operations on tuples #
We define the take
operation on n
-tuples, which restricts a tuple to its first m
elements.
theorem
Fin.take_addCases_left
{n n' : ℕ}
{motive : Fin (n + n') → Sort u_2}
(m : ℕ)
(h : m ≤ n)
(u : (i : Fin n) → motive (castAdd n' i))
(v : (i : Fin n') → motive (natAdd n i))
:
Taking the first m ≤ n
elements of an addCases u v
, where u
is a n
-tuple, is the same as
taking the first m
elements of u
.
theorem
Fin.take_addCases_right
{n n' : ℕ}
{motive : Fin (n + n') → Sort u_2}
(m : ℕ)
(h : m ≤ n')
(u : (i : Fin n) → motive (castAdd n' i))
(v : (i : Fin n') → motive (natAdd n i))
:
Taking the first n + m
elements of an addCases u v
, where v
is a n'
-tuple and m ≤ n'
,
is the same as appending u
with the first m
elements of v
.