Library prosa.analysis.definitions.carry_in
Consider any type of tasks ...
... and any type of jobs associated with these tasks, where each
job has an arrival time and a cost.
Consider any arrival sequence of such jobs with consistent arrivals ...
Variable arr_seq : arrival_sequence Job.
Hypothesis H_arrival_times_are_consistent : consistent_arrival_times arr_seq.
Hypothesis H_arrival_times_are_consistent : consistent_arrival_times arr_seq.
... and the resultant schedule.
There is no carry-in at time t iff every job (regardless of priority)
from the arrival sequence released before t has completed by that time.
Definition no_carry_in (t : instant) :=
∀ j_o,
arrives_in arr_seq j_o →
arrived_before j_o t →
completed_by sched j_o t.
∀ j_o,
arrives_in arr_seq j_o →
arrived_before j_o t →
completed_by sched j_o t.
Conversely, there exists a carry-in job if any earlier-arrived job is
still incomplete.
Definition exists_carry_in (t : instant) :=
has (fun j ⇒ ~~ completed_by sched j t) (arrivals_before arr_seq t).
has (fun j ⇒ ~~ completed_by sched j t) (arrivals_before arr_seq t).
We connect the Boolean search to the propositional condition via reflection.