Induction principles for lists #
Induction principle from the right for lists: if a property holds for the empty list, and
for l ++ [a]
if it holds for l
, then it holds for all lists. The principle is given for
a Sort
-valued predicate, i.e., it can also be used to construct data.
Equations
Instances For
Bidirectional induction principle for lists: if a property holds for the empty list, the
singleton list, and a :: (l ++ [b])
from l
, then it holds for all lists. This can be used to
prove statements about palindromes. The principle is given for a Sort
-valued predicate, i.e., it
can also be used to construct data.
Equations
Instances For
A dependent recursion principle for nonempty lists. Useful for dealing with
operations like List.head
which are not defined on the empty list.
Equations
Instances For
A dependent recursion principle for nonempty lists. Useful for dealing with
operations like List.head
which are not defined on the empty list.
Same as List.recNeNil
, with a more convenient argument order.