AFTD Auto-Formalizing Theoretical Domains

offline_tcp_batch_max_cost

def

The batch-maximum cost of a schedule sched for an offline TCP instance I is the sum over all batches i of I.launchFee plus the maximum over all jobs j in batch i of (sched.launch i - I.jobs[j].release + I.jobs[j].processing).

Statement

def offline_tcp_batch_max_cost (I : OfflineTCPInstance) (sched : OfflineTCPSchedule I.jobs.length) : ℚ
Defined in
scout/2611-33678-online-network-design-with-batch-processing.md:499
Verified
28 Nov 2026
Axioms
none listed
Built on 4
  • 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.
  • OfflineTCPScheduleA schedule for n jobs is parameterized by n : ℕ and consists of a natural number m (the number of batches), a surjective assignment…
  • offline_tcp_batch_jobsFor a schedule sched on n jobs and a batch index i : Fin sched.m, offline_tcp_batch_jobs sched i is the finset of all job indices j : Fin…
  • OfflineTCPJobIn offline TCP acknowledgment with batch processing, a job has a rational release time r_j and processing time p_j.
Used by 1
  • 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…

Read back from the Lean

This declaration defines the function offline_tcp_batch_max_cost, which computes a rational value from an offline TCP problem instance I and a schedule sched for the jobs in I. Specifically, given: - an instance I : OfflineTCPInstance, containing a rational launch fee I.launchFee and a list of jobs I.jobs (each with rational release and processing times), and - a schedule sched : OfflineTCPSchedule I.jobs.length, specifying a number of batches sched.m, a surjective job-to-batch assignment sched.batch : Fin I.jobs.length → Fin sched.m, and a launch time sched.launch : Fin sched.m → ℚ for each batch, the function returns the sum over all batch indices i : Fin sched.m of: I.launchFee plus the maximum, over all jobs j : Fin I.jobs.length assigned to batch i (i.e., sched.batch j = i), of: (sched.launch i - I.jobs[j].release + I.jobs[j].processing).

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

/-- The batch-maximum cost of an offline TCP schedule. -/
def offline_tcp_batch_max_cost (I : OfflineTCPInstance) (sched : OfflineTCPSchedule I.jobs.length) : ℚ := ∑ i : Fin sched.m,
    (I.launchFee + (offline_tcp_batch_jobs sched i).sup'
      (by
        obtain ⟨j, hj⟩ := sched.batch_surj i
        exact ⟨j, Finset.mem_filter.mpr ⟨Finset.mem_univ j, hj⟩⟩)
      (fun j => sched.launch i - I.jobs[j].release + I.jobs[j].processing))
See it in the graphDiscuss this resultChallenge it