Relation chain #
This file provides basic results about list.chain
(definition in data.list.defs
).
A list [a₂, ..., aₙ]
is a chain
starting at a₁
with respect to the relation r
if r a₁ a₂
and r a₂ a₃
and ... and r aₙ₋₁ aₙ
. We write it chain r a₁ [a₂, ..., aₙ]
.
A graph-specialized version is in development and will hopefully be added under combinatorics.
sometime soon.
If l₁ l₂
and l₃
are lists and l₁ ++ l₂
and l₂ ++ l₃
both satisfy
chain' R
, then so does l₁ ++ l₂ ++ l₃
provided l₂ ≠ []
If a
and b
are related by the reflexive transitive closure of r
, then there is a r
-chain
starting from a
and ending on b
.
The converse of relation_refl_trans_gen_of_exists_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 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
. The converse of exists_chain_of_relation_refl_trans_gen
.