Library prosa.implementation.facts.extrapolated_arrival_curve
From mathcomp Require Export ssreflect ssrbool eqtype ssrnat div seq path fintype bigop.
Require Export prosa.behavior.time.
Require Export prosa.util.all.
Require Export prosa.implementation.definitions.extrapolated_arrival_curve.
Require Export prosa.behavior.time.
Require Export prosa.util.all.
Require Export prosa.implementation.definitions.extrapolated_arrival_curve.
In this file, we prove basic properties of the arrival-curve
prefix and the extrapolated_arrival_curve function.
We start with basic facts about the relations ltn_steps and leq_steps.
We show that the relation ltn_steps is transitive.
Next, we show that the relation leq_steps is reflexive...
... and transitive.
In the following section, we prove a few properties of
arrival-curve prefixes assuming that there are no infinite
arrivals and that the list of steps is sorted according to the
leq_steps relation.
Consider an arbitrary leq-sorted arrival-curve prefix without
infinite arrivals.
Variable ac_prefix : ArrivalCurvePrefix.
Hypothesis H_sorted_leq : sorted_leq_steps ac_prefix.
Hypothesis H_no_inf_arrivals : no_inf_arrivals ac_prefix.
Hypothesis H_sorted_leq : sorted_leq_steps ac_prefix.
Hypothesis H_no_inf_arrivals : no_inf_arrivals ac_prefix.
We prove that value_at is monotone with respect to the relation ≤.
Next, we prove a correctness claim stating that if value_at
makes a step at time instant t + ε (that is, value_at t <
value_at (t + ε)), then steps_of ac_prefix contains a step
(t + ε, v) for some v.
Lemma value_at_change_is_in_steps_of :
∀ t,
value_at ac_prefix t < value_at ac_prefix (t + ε) →
∃ v, (t + ε, v) \in steps_of ac_prefix.
End ArrivalCurvePrefixSortedLeq.
(* In the next section, we make the stronger assumption that
arrival-curve prefixes are sorted according to the ltn_steps
relation. *)
Section ArrivalCurvePrefixSortedLtn.
∀ t,
value_at ac_prefix t < value_at ac_prefix (t + ε) →
∃ v, (t + ε, v) \in steps_of ac_prefix.
End ArrivalCurvePrefixSortedLeq.
(* In the next section, we make the stronger assumption that
arrival-curve prefixes are sorted according to the ltn_steps
relation. *)
Section ArrivalCurvePrefixSortedLtn.
Consider an arbitrary ltn-sorted arrival-curve prefix without
infinite arrivals.
Variable ac_prefix : ArrivalCurvePrefix.
Hypothesis H_sorted_ltn : sorted_ltn_steps ac_prefix. (* Stronger assumption. *)
Hypothesis H_no_inf_arrivals : no_inf_arrivals ac_prefix.
Hypothesis H_sorted_ltn : sorted_ltn_steps ac_prefix. (* Stronger assumption. *)
Hypothesis H_no_inf_arrivals : no_inf_arrivals ac_prefix.
We show that functions steps_of and step_at are consistent.
That is, if a pair (t, v) is in steps of ac_prefix, then
step_at t is equal to (t, v).
Lemma step_at_agrees_with_steps_of :
∀ t v, (t, v) \in steps_of ac_prefix → step_at ac_prefix t = (t, v).
End ArrivalCurvePrefixSortedLtn.
∀ t v, (t, v) \in steps_of ac_prefix → step_at ac_prefix t = (t, v).
End ArrivalCurvePrefixSortedLtn.
In this section, we prove a few basic properties of
extrapolated_arrival_curve function, such as (1) monotonicity of
extrapolated_arrival_curve or (2) implications of the fact that
extrapolated_arrival_curve makes a step at time t + ε.
Consider an arbitrary leq-sorted arrival-curve prefix without infinite arrivals.
Variable ac_prefix : ArrivalCurvePrefix.
Hypothesis H_positive : positive_horizon ac_prefix.
Hypothesis H_sorted_leq : sorted_leq_steps ac_prefix.
Hypothesis H_positive : positive_horizon ac_prefix.
Hypothesis H_sorted_leq : sorted_leq_steps ac_prefix.
We show that extrapolated_arrival_curve is monotone.