Parameterized option elimination with retained input #
Option elimination retains the original input for the selected handler. The construction tests
the tag and, on the some branch, computes the option again to extract its payload. Its bounds
explicitly charge both computations, input retention, and the selected handler. Linear native
tag extraction, payload extraction, and pairing costs are absorbed by the native calculus.
The bounds are asymptotic expressions with existential machine constants, not exact step counts.
No inhabitance assumption is imposed on the payload type. The public BigO.Option entry point
registers the rule for fun_prop; option_match_to_elim brings an option match into its form.
Main results #
Turing.MultiTapeTM.ComputableInO.optionElimWithInput: selected-branch time and space bounds for option elimination retaining the original input.
References #
Uses Christian Reitwiessner's native degree/resource calculus. Polynomial-time option elimination lifts this resource certificate, preserving independent time and space bounds.
Eliminate an option while retaining the input. The conservative bound charges two option
computations even on the none branch; it charges only the selected handler.