Finite case analysis within asymptotic bounds #
A computed key of a fixed finite type selects one of finitely many branches, each of which
receives the original input. The dispatch chains Turing.MultiTapeTM.ComputableInO.ite over an
enumeration of the key type, testing the key against each value; since the enumeration is fixed,
its length only affects the hidden constant. Neither the key nor the result type needs an
inhabitant. The same chaining gives the disjunction of a fixed finite list of computed Booleans.
Main results #
Turing.MultiTapeTM.ComputableInO.finite_cases: dispatch on a computed finite key, within the key's bounds plus a common branch bound.Turing.MultiTapeTM.ComputableInO.list_any: the disjunction of a fixed finite list of computed Booleans, within their common bound.
A computed key of a fixed finite type selects a branch on the original input, within the key's bounds plus a common bound for the branches. This also handles an empty key type (and hence an empty input type).
The disjunction of a fixed finite list of computed Booleans, within their common bounds. The time bound also charges the input length, which pays for the constant answer of the empty list.