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. Plain and internal tidy goals use separate rules, with fixed machines and polynomial
bounds across all encoded inputs. Plain search applies plain statements directly; it does not
lower a goal or restate its hypotheses tidily. 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; deterministic search consumes the canonical
plain calculus.
Prepend a computed bit with both intermediate raw encodings fixed for the tactic.
Append computed framed lists with their element encoding fixed for the tactic.
Prepend a computed element to a framed list with its element encoding fixed.
Retain Aesop's local application alternatives and priority, excluding only rules which would
start raw search from a plain goal. Adapted from Aesop.BuiltinRules.applyHyps (Jannis Limperg).
Instances For
Reuse only global classification answers across one invocation. Rule tables, certificate lookup, matching and local evidence are not projected or cached by this wrapper.
Instances For
Apply the deterministic boundary using the current tables and scoped classification memo. Explicit raw construction entries and all named-certificate metadata retain their old policy.
Instances For
Shared compositional backend with a fresh alias-aware raw-premise boundary. The standard assumption discharger and ordinary transition depth are retained; callers keep their step limit. Consumers can reuse the same boundary for nested plain deterministic goals.
Instances For
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.
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.
The plain iteration rule retains the same constant additive growth contract.
Prove a polynomial-time certificate from known routines and controlled loop rules.