Problem-owned specifications and submission certificates #
A track publishes one Problem and a requested bound. A submission supplies
only code and a proof for those fixed parameters. In particular, input
encoding, legal word widths, the size measure, and the observable answer are
not fields of the submission.
This is a specification boundary, not a security mechanism: the problem author
still has to choose an honest encoding and size measure. The general judgments
in Complexity.Computability.Ram.Time.Basic remain useful without these packaging conventions.
Concrete budgets work for finite and infinite domains alike. The asymptotic track additionally requires legal inputs of arbitrarily large size, so a threshold cannot discard its entire domain.
The legal input family contains arbitrarily large problem sizes. Word width may grow with the input; one fixed finite width is usually insufficient.
Equations
Instances For
A size-bounded problem is perfectly suitable for concrete budgets, but cannot be presented as an unbounded asymptotic problem.
Equations
- s.Correct = Ram.UniformCorrect s.code p.encode p.admissible p.post
Instances For
Equations
- s.Within bound = Ram.UniformTimeBound s.code p.encode p.admissible p.size p.post bound
Instances For
A concrete-budget submission, including termination and the answer on every legal input. Both the problem and required budget are fixed parameters.
- verified : self.Within bound
Instances For
The certificate exposes the same actual-machine judgment used by runners and the compiler; there is no separate evaluator or source-level cost table.
Equations
- c.weaken h = { toSubmission := c.toSubmission, verified := ⋯ }
Instances For
An asymptotic task must establish that its legal size parameter really tends to infinity somewhere, rather than using a finite benchmark domain.
- admissible : ℕ → Input → Prop
- unbounded : self.Unbounded
Instances For
Total correctness holds even below the asymptotic threshold. The growing legal input family is supplied by the problem, never by the submission.
- verified : UniformBigO self.code p.encode p.admissible p.size p.post growth
Instances For
Reuse a proved concrete bound without reproving functional correctness.
Equations
- Ram.AsymptoticCertificate.ofBound c hc hb = { toSubmission := c.toSubmission, verified := ⋯ }
Instances For
Use mathlib's asymptotic analysis of a proved machine bound directly.
Equations
- Ram.AsymptoticCertificate.ofIsBigO c hO = { toSubmission := c.toSubmission, verified := ⋯ }
Instances For
Even the halt instruction costs one transition from the initial running state. This lower bound is independent of the problem's postcondition.
On a genuinely unbounded legal domain, O(0) cannot be certified by
choosing a threshold beyond all inputs: some legal input crosses every one.