Built with Alectryon, running Coq+SerAPI v8.15.0+0.15.0. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
Notation"[ rel _ _ | _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ : _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ & _ | _ ]" was already used
in scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ & _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]
Notation"_ + _" was already used in scope nat_scope.
[notation-overridden,parsing]
Notation"_ - _" was already used in scope nat_scope.
[notation-overridden,parsing]
Notation"_ <= _" was already used in scope nat_scope.
[notation-overridden,parsing]
Notation"_ < _" was already used in scope nat_scope.
[notation-overridden,parsing]
Notation"_ >= _" was already used in scope nat_scope.
[notation-overridden,parsing]
Notation"_ > _" was already used in scope nat_scope.
[notation-overridden,parsing]
Notation"_ <= _ <= _" was already used in scope
nat_scope. [notation-overridden,parsing]
Notation"_ < _ <= _" was already used in scope
nat_scope. [notation-overridden,parsing]
Notation"_ <= _ < _" was already used in scope
nat_scope. [notation-overridden,parsing]
Notation"_ < _ < _" was already used in scope
nat_scope. [notation-overridden,parsing]
Notation"_ * _" was already used in scope nat_scope.
[notation-overridden,parsing]
Notation"[ rel _ _ | _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ : _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ & _ | _ ]" was already used
in scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ & _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ | _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ : _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ & _ | _ ]" was already used
in scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ & _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]
Notation"[ rel _ _ in _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]
(** * Lemmas about Workload of Sets of Jobs *)(** In this file, we establish basic facts about the workload of sets of jobs. *)SectionWorkloadFacts.(** Consider any type of tasks ... *)Context {Task : TaskType}.Context `{TaskCost Task}.(** ... and any type of jobs associated with these tasks. *)Context {Job : JobType}.Context `{JobTask Job Task}.Context `{JobArrival Job}.Context `{JobCost Job}.(** Further, consider any job arrival sequence. *)Variablearr_seq : arrival_sequence Job.(** For simplicity, let's define a local name. *)Letarrivals_between := arrivals_between arr_seq.(** We observe that the cumulative workload of all jobs arriving in a time interval <<[t1, t2)>> and respecting a predicate [P] can be split into two parts. *)
\sum_(j <- arrival_sequence.arrivals_between arr_seq
t1 t2 | P j) job_cost j =
\sum_(j <- arrival_sequence.arrivals_between arr_seq
t1 t | P j) job_cost j +
\sum_(j <- arrival_sequence.arrivals_between arr_seq t
t2 | P j) job_cost j
byrewrite (arrivals_between_cat _ _ t) // big_cat.Qed.(** Consider a job [j] ... *)Variablej : Job.(** ... and a duplicate-free sequence of jobs [jobs]. *)Variablejobs : seq Job.HypothesisH_jobs_uniq : uniq jobs.(** Further, assume that [j] is contained in [jobs]. *)HypothesisH_j_in_jobs : j \in jobs.(** To help with rewriting, we prove that the workload of [jobs] minus the job cost of [j] is equal to the workload of all jobs except [j]. To define the workload of all jobs, since [workload_of_jobs] expects a predicate, we use [predT], which is the always-true predicate. *)
\sum_(i <- rem (T:=Job) j jobs | (i
\in rem (T:=Job) j
jobs) &&
(i != j)) job_cost i =
\sum_(i <- rem (T:=Job) j jobs | (i
\in rem (T:=Job) j
jobs) &&
true) job_cost i
byrewrite EQUAL mem_rem_uniqF in INjobs.Qed.(** In this section, we prove the relation between two different ways of constraining [workload_of_jobs] to only those jobs that arrive prior to a given time. *)SectionSubset.(** Assume that arrival times are consistent and that arrivals are unique. *)HypothesisH_consistent_arrival_times : consistent_arrival_times arr_seq.HypothesisH_arr_seq_is_a_set : arrival_sequence_uniq arr_seq.(** Consider a time interval <<[t1, t2)>> and a time instant [t]. *)Variablet1t2t : instant.HypothesisH_t1_le_t2 : t1 <= t2.(** Let [P] be an arbitrary predicate on jobs. *)VariableP : pred Job.(** Consider the window <<[t1,t2)>>. We prove that the total workload of the jobs arriving in this window before some [t] is the same as the workload of the jobs arriving in <<[t1,t)>>. Note that we only require [t1] to be less-or-equal than [t2]. Consequently, the interval <<[t1,t)>> may be empty. *)
\sum_(i <- [seq i <- arrivals_between t1 t2
| i \in arrivals_between t1 t2
& (job_arrival i <= t) && P i])
job_cost i <=
\sum_(i <- [seq x <- arrivals_between t1 (t + ε)
| P x]) job_cost i