Library prosa.analysis.facts.behavior.schedule
Schedules
Consider any type of jobs, ...
... and any type of processor state.
We observe that a job is scheduled in a given processor state exactly if it
occurs in the list of jobs scheduled in that state. That is, the predicate
scheduled_in and the enumeration jobs_scheduled_in agree.
Lemma jobs_scheduled_in_iff :
∀ (j : Job) (s : PState),
scheduled_in j s = (j \in jobs_scheduled_in s).
Proof.
move⇒ j s; apply/idP/idP.
- move⇒ /existsP[c /eqP ON].
by rewrite /jobs_scheduled_in mem_pmap -ON map_f ?mem_enum.
- rewrite /jobs_scheduled_in mem_pmap ⇒ /mapP[c _ EQ].
by apply/existsP; ∃ c; rewrite /scheduled_on -EQ.
Qed.
End ScheduledJobs.
∀ (j : Job) (s : PState),
scheduled_in j s = (j \in jobs_scheduled_in s).
Proof.
move⇒ j s; apply/idP/idP.
- move⇒ /existsP[c /eqP ON].
by rewrite /jobs_scheduled_in mem_pmap -ON map_f ?mem_enum.
- rewrite /jobs_scheduled_in mem_pmap ⇒ /mapP[c _ EQ].
by apply/existsP; ∃ c; rewrite /scheduled_on -EQ.
Qed.
End ScheduledJobs.