AFTD Auto-Formalizing Theoretical Domains

OfflineTCPBatchMaxPolyTimeAlgorithm

structure

A polynomial-time algorithm for offline TCP batch-maximum decision consists of an evaluation function eval mapping an instance I and bound L to a pair of a boolean answer and a step count in ℕ, a polynomial step bound bounded by (I.jobs.length + 1)^C for some constant C : ℕ, and a proof sound that the boolean output is true if and only if offline_tcp_batch_max_decision I L holds.

Statement

structure OfflineTCPBatchMaxPolyTimeAlgorithm where
  eval : OfflineTCPInstance → ℚ → Bool × ℕ
  step_bound : ∃ C : ℕ, ∀ (I : OfflineTCPInstance) (L : ℚ), (eval I L).2 ≤ (I.jobs.length + 1) ^ C
  sound : ∀ (I : OfflineTCPInstance) (L : ℚ), (eval I L).1 = true ↔ offline_tcp_batch_max_decision I L
Defined in
scout/2611-33678-online-network-design-with-batch-processing.md:1325
Verified
28 Nov 2026
Axioms
none listed
Built on 3
  • OfflineTCPInstanceAn offline TCP instance consists of a launch fee K > 0 and a list of jobs, each with positive processing time and nonnegative release time.
  • offline_tcp_batch_max_decisionThe offline TCP batch-maximum decision problem asks whether there exists a feasible schedule sched for instance I whose batch-maximum cost…
  • OfflineTCPJobIn offline TCP acknowledgment with batch processing, a job has a rational release time r_j and processing time p_j.
Used by 1

Read back from the Lean

A structure type OfflineTCPBatchMaxPolyTimeAlgorithm consisting of: 1. eval: a function taking an instance I : OfflineTCPInstance and a rational threshold L : ℚ, returning a pair (decision, steps) : Bool × ℕ. 2. step_bound: a proof that there exists a constant $C \in \mathbb{N}$ such that for all instances $I$ and all thresholds $L \in \ℚ$, the returned step count (eval I L).2 is at most $(|I.jobs| + 1)^C$. 3. sound: a proof (defaulting to by sorry) that for all instances $I$ and all thresholds $L \in \ℚ$, (eval I L).1 = true if and only if offline_tcp_batch_max_decision I L holds (that is, there exists a feasible schedule for $I$ with total cost at most $L$).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- A polynomial-time algorithm deciding the offline TCP batch-maximum problem. -/
structure OfflineTCPBatchMaxPolyTimeAlgorithm where
  eval : OfflineTCPInstance → ℚ → Bool × ℕ
  step_bound : ∃ C : ℕ, ∀ (I : OfflineTCPInstance) (L : ℚ), (eval I L).2 ≤ (I.jobs.length + 1) ^ C
  sound : ∀ (I : OfflineTCPInstance) (L : ℚ), (eval I L).1 = true ↔ offline_tcp_batch_max_decision I L
See it in the graphDiscuss this resultChallenge it