Relation chain #
This file provides basic results about List.IsChain from Batteries.
A list [a₁, a₂, ..., aₙ] satisfies 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.cons.
Alias of List.isChain_cons.
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₂ ≠ []
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.
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.
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 a non-empty r-chain, its head and last element are related by the
reflexive transitive closure of r.
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.
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
Instances For
The lexicographic order on the r-decreasing chains
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.