Synthesizing polynomial-time certificates #
Adapted from the cslib crypto branch: named certificates are tried before their implementations
are unfolded. fun_prop handles composition; Aesop chooses loop rules and uses local growth
contracts. Every rule proves the tidy machine predicate, with fixed machines and polynomial
bounds across all encoded inputs. A plain Turing.MultiTapeTM.ComputableInPolyTime goal is
reduced to the tidy predicate, and plain hypotheses are restated tidily, so plain statements use
the same search. Unknown algorithms still require certificates.
Main definitions #
polytime: prove a polynomial-time certificate using thePolyTimeAesop rule set.
References #
Adapted from Cslib/Tactic/PolyTime.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the existing tidy calculus.
Expose a negated guard to loop rules when compositional proof search needs their help.
Fix a raw bit list's encoding and expose the two growth cases before proof search.
Fix a framed list's encoding before proof search infers the element encoding.
Prove a polynomial-time certificate from known routines and controlled loop rules.