Relation chain #
This file provides basic results about List.IsChain
from betteries.
A list [a₁, a₂, ..., aₙ]
satifies IsChain
with respect to the relation r
if r a₁ a₂
and r a₂ a₃
and ... and r aₙ₋₁ aₙ
. We write it IsChain r [a₁, a₂, ..., aₙ]
.
A graph-specialized version is in development and will hopefully be added under combinatorics.
sometime soon.
Alias of List.isChain_nil
.
Alias of List.isChain_singleton
.
Alias of List.IsChain.cons_cons
.
If a
relates to b
and b::l
is a chain, then a :: b :: l
is also a chain.
Equations
Instances For
Alias of List.IsChain.cons_cons
.
If a
relates to b
and b::l
is a chain, then a :: b :: l
is also a chain.
Equations
Instances For
Alias of List.IsChain.iff
.
Alias of List.IsChain.imp
.
Alias of List.IsChain.iff
.
Alias of List.isChain_pair
.
Alias of List.isChain_pair
.
Alias of List.isChain_isInfix
.
Alias of List.isChain_cons_append_cons_cons
.
Alias of List.isChain_append_cons_cons
.
Alias of List.isChain_of_isChain_map
.
Alias of List.isChain_map_of_isChain
.
Alias of List.isChain_cons_of_isChain_cons_map
.
Alias of List.isChain_cons_map_of_isChain_cons
.
Alias of List.isChain_cons_pmap_of_isChain_cons
.
Alias of List.isChain_cons_of_isChain_cons_pmap
.
Alias of List.IsChain.pairwise
.
Alias of List.Pairwise.isChain
.
Alias of List.isChain_iff_pairwise
.
Alias of List.isChain_iff_pairwise
.
Alias of List.IsChain.sublist
.
Alias of List.IsChain.sublist
.
Alias of List.IsChain.rel_cons
.
Alias of List.IsChain.tail
.
Alias of List.IsChain.rel_head
.
Alias of List.IsChain.rel_head?
.
Alias of List.IsChain.left_of_append
.
Alias of List.IsChain.right_of_append
.
Alias of List.IsChain.infix
.
Alias of List.IsChain.suffix
.
Alias of List.IsChain.prefix
.
Alias of List.IsChain.drop
.
Alias of List.IsChain.dropLast
.
Alias of List.IsChain.take
.
Alias of List.isChain_cons_iff_get
.
Alias of List.IsChain.append_overlap
.
If l₁ l₂
and l₃
are lists and l₁ ++ l₂
and l₂ ++ l₃
both satisfy
IsChain R
, then so does l₁ ++ l₂ ++ l₃
provided l₂ ≠ []
Alias of List.isChain_flatten
.
If a
and b
are related by the reflexive transitive closure of r
, then there is an
r
-chain starting from a
and ending on b
.
Alias of List.exists_isChain_cons_of_relationReflTransGen
.
If a
and b
are related by the reflexive transitive closure of r
, then there is an
r
-chain starting from a
and ending on b
.
If a
and b
are related by the reflexive transitive closure of r
, then there is an
r
-chain starting from a
and ending on b
.
Given a chain l
, such that a predicate p
holds for its head if it is nonempty,
and if r x y → p x → p y
, then the predicate is true everywhere in the chain.
That is, we can propagate the predicate down the chain.
Alias of List.IsChain.induction
.
Given a chain l
, such that a predicate p
holds for its head if it is nonempty,
and if r x y → p x → p y
, then the predicate is true everywhere in the chain.
That is, we can propagate the predicate down the chain.
Given a chain from a
to b
, and a predicate true at a
, if r x y → p x → p y
then
the predicate is true everywhere in the chain.
That is, we can propagate the predicate down the chain.
Alias of List.IsChain.cons_induction
.
Given a chain from a
to b
, and a predicate true at a
, if r x y → p x → p y
then
the predicate is true everywhere in the chain.
That is, we can propagate the predicate down the chain.
Given a chain from a
to b
, and a predicate true at b
, if r x y → p y → p x
then
the predicate is true everywhere in the chain and at a
.
That is, we can propagate the predicate up the chain.
Given a chain from a
to b
, and a predicate true at b
, if r x y → p y → p x
then
the predicate is true everywhere in the chain and at a
.
That is, we can propagate the predicate up the chain.
Alias of List.IsChain.backwards_cons_induction
.
Given a chain from a
to b
, and a predicate true at b
, if r x y → p y → p x
then
the predicate is true at a
.
That is, we can propagate the predicate all the way up the chain.
Alias of List.IsChain.backwards_cons_induction_head
.
Given a chain from a
to b
, and a predicate true at b
, if r x y → p y → p x
then
the predicate is true at a
.
That is, we can propagate the predicate all the way up the chain.
If there is an r
-chain starting from a
and ending at b
, then a
and b
are related by the
reflexive transitive closure of r
.
Alias of List.relationReflTransGen_of_exists_isChain_cons
.
If there is an r
-chain starting from a
and ending at b
, then a
and b
are related by the
reflexive transitive closure of r
.
Alias of List.IsChain.cons_of_le
.
Alias of List.isChain_replicate_of_rel
.
In this section, we consider the type of r
-decreasing chains (List.IsChain (flip r)
)
equipped with lexicographic order List.Lex r
.
The type of r
-decreasing chains
Equations
- List.chains r = { l : List α // List.IsChain (flip r) l }
Instances For
The lexicographic order on the r
-decreasing chains
Equations
- List.lex_chains r l m = List.Lex r ↑l ↑m
Instances For
If an r
-decreasing chain l
is empty or its head is accessible by r
, then
l
is accessible by the lexicographic order List.Lex r
.
If r
is well-founded, the lexicographic order on r
-decreasing chains is also.