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 an
r
-chain starting from a
and ending on b
.
The converse of relationReflTransGen_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_relationReflTransGen
.
In this section, we consider the type of r
-decreasing chains (List.Chain' (flip r)
)
equipped with lexicographic order List.Lex r
.
The type of r
-decreasing chains
Equations
- List.chains r = { l : List α // List.Chain' (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.
Equations
- (_ : IsWellFounded (List.chains r) (List.lex_chains r)) = (_ : IsWellFounded (List.chains r) (List.lex_chains r))