A single transitive step r⁺ a b can be expanded to a list of reducts l,
ending in b, such that List.Chain r a l.
trans_chain' chooses a list that has the properties given by trans_chain.
Equations
Instances For
The list returned by trans_chain' has the properties given by trans_chain.
trans_chain' h is nonempty.
An infinite r⁺-reduction sequence can be turned into an infinite
sequence of lists of reducts, as given by trans_chain'.
Equations
Instances For
Each of the lists in inf_trans_lists f hf is nonempty.
Starting at list no. list_idx, get the elem_idxth element, going to the next
list if elem_idx ≥ (l_seq list_idx).length.
This definition is largely due to Edward van de Meent on the Lean Zulip.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If x := aux l_seq hne (m + 1) k, i.e. the kth element starting from list
m + 1, we can get the same element starting from the previous list m by
adding some n, which is the length of list m.
An extension of aux_skip; we can get the kth element starting from list m + i
by starting from list m and getting the k + nth element, where n is the
sum of the lengths of the intermediate lists.
If f is an infinite transitive reduction sequence, each element > 0 appears
as the last element of the n - 1th list in the sequence generated by aux ....
By aux_skip_i, aux_elem' can be modified to prove each element of f is
reachable from the first list. Given that aux _ _ 0 is the basis of our
eventual sequence, this essentially proves that all elements in f (except f 0)
appear in the expanded sequence.
We form our expanded sequence by starting with f 0, and then continuing with
all reducts of f 0 in the infinite transitive sequence, as generated by aux.
Equations
- Thesis.InfReductionSeq.seq f hf 0 = f 0
- Thesis.InfReductionSeq.seq f hf n.succ = Thesis.InfReductionSeq.aux (Thesis.InfReductionSeq.inf_trans_lists f hf) ⋯ 0 n
Instances For
seq contains all elements of the infinite transitive sequence.
seq f hf forms an infinite r-reduction sequence.
Any infinite r⁺-reduction sequence has a corresponding infinite r-reduction sequence, which contains all of the elements of the transitive sequence and starts with the same element.
We call an infinite reduction sequence degenerate if, from some point onwards, it only contains steps from one element to itself.
Instances For
From some index n we step to a next index choose (htsg n) + 1, which is the
end of a transitive step.
Equations
- Thesis.InfReductionSeq.trans_idx_step hf htsg n = Classical.choose ⋯ + 1
Instances For
By iterating trans_idx_step, we can generate a sequence of indices into f
which represent all transitive steps in f.
Equations
- Thesis.InfReductionSeq.trans_idxs hf htsg n = (Thesis.InfReductionSeq.trans_idx_step hf htsg)^[n] 0
Instances For
We form the sequence by getting the element at each index given by trans_idxs
Equations
- Thesis.InfReductionSeq.trans_seq hf htsg n = f (Thesis.InfReductionSeq.trans_idxs hf htsg n)
Instances For
Taking a step from index k yields an index greater than k.
Doing an extra iteration of trans_idx_step yields a larger index.
For all n, there is an element of trans_idxs that is larger than n.
If n is inbetween trans_idxs f hgs k and trans_idxs f hgs (k + 1),
then f n must be equal to f (trans_idxs f hgs k). Hence f n is an
element of trans_seq f hgs.
All n are sandwiched by two subsequent elements in trans_idxs f hgs.
Combining this lemma with trans_idxs_inbetween above yields the proof
that trans_seq f hgs contains all elements of f.
trans_seq f hgs is an infinite r⁺-reduction sequence.
trans_seq f hgs contains all elements of f.
If hf is not degenerate, there must be an infinite r-reduction
sequence which contains all elements of f and starts with f 0.
This lemma first translates hf to an infinite r⁺-reduction sequence, and
then uses the techniques for transitive reduction sequences developed above.
If the infinite r∗-reduction sequence is degenerate, there must be some finite r∗-reduction sequence which contains all of the elements of the infinite r∗-reduction sequence, and starts with the same element.
We can flatten a finite r∗-reduction sequence, by round-tripping through
the inductive ReductionSeq definition.
A statement that is "obvious" when written down in a pen-and-paper proof, but which is non-trivial to formalize:
If we have an infinite r∗-reduction sequence
a₀ ->* a₁ ->* a₂ ...
there must be some (finite or infinite) reduction sequence
a₀ -> ... -> a₁ -> ... -> a₂ -> ...