Marginis #
/- We formally verify the method known as recursive backtracking for a monotone predicate P and another predicate Q at the leaves. -/
A vector of length L monus k, thought of as a possible suffix for a word of length L in which the first k bits are unspecified For example, a Gap 10 10 has length 10 - 10.
[This is a rewrite to replace by induction by match with.]
The number of strings satisfying P ∧ Q, where
P is a monotone predicate and Q is a predicate at the leaves.
Equations
Instances For
Simplifying a gap defined by a vacuous ite involving num_by_backtracking.
Writing num_by_backtracking as a sum of values of itself.
Two vectors are equal if they have the same length and one is a suffix of the other.
If x and y have w as a prefix and are of the same length as w, then x=y.
If some sets are disjoint, then the cardinality of their union is the sum of their cardinalities.
Verifies recursive backtracking for b-ary trees with monotone predicates P,
with a non-monotone Q at the leaves.
Gap has decidable equality.
The lists with a given suffix satisfying conditions P (recursively) and Q.
Equations
Instances For
those_with_suffix as a union of its own values.
Gap is a fintype.
If w has full length and doesn't satisfy P ∧ Q, then none of its extensions
(of the same length) do either.
If w satisfies a predicate then the set of its extensions of the same length
that do the same is {w}.
satisfy_and_have_suffix is as advertised.