Commit a5cc6b86 authored by Felipe Cerqueira's avatar Felipe Cerqueira

Clean-up Vbase tactics

parent 266c9014
...@@ -238,8 +238,7 @@ Module ResponseTimeIterationEDF. ...@@ -238,8 +238,7 @@ Module ResponseTimeIterationEDF.
Proof. Proof.
intros l; unfold all_le; rewrite eq_refl andTb. intros l; unfold all_le; rewrite eq_refl andTb.
destruct l; first by done. destruct l; first by done.
apply/(zipP (fun x y => snd x <= snd y)); try (by ins). by apply/(zipP (fun x y => snd x <= snd y)).
by ins; apply leqnn.
Qed. Qed.
(* ... and transitive. *) (* ... and transitive. *)
...@@ -507,7 +506,6 @@ Module ResponseTimeIterationEDF. ...@@ -507,7 +506,6 @@ Module ResponseTimeIterationEDF.
try (by done); try (by done);
[ by apply all_le_reflexive [ by apply all_le_reflexive
| by apply all_le_transitive | by apply all_le_transitive
| by apply leqnSn
| by apply bertogna_edf_comp_iteration_preserves_order | by apply bertogna_edf_comp_iteration_preserves_order
| by apply bertogna_edf_comp_iteration_preserves_minimum]. | by apply bertogna_edf_comp_iteration_preserves_minimum].
Qed. Qed.
......
...@@ -402,8 +402,7 @@ Module ResponseTimeIterationFP. ...@@ -402,8 +402,7 @@ Module ResponseTimeIterationFP.
{ {
apply leq_trans with (n := W task_cost task_period i R x1); first by apply geq_minl. apply leq_trans with (n := W task_cost task_period i R x1); first by apply geq_minl.
exploit (VALID i); [by rewrite mem_rcons in_cons IN orbT | ins; des]. exploit (VALID i); [by rewrite mem_rcons in_cons IN orbT | ins; des].
by apply W_monotonic; try (by ins); by apply W_monotonic; try by ins; apply GE_COST.
[by apply GE_COST | by apply leqnn].
} }
{ {
apply leq_trans with (n := x1 - task_cost tsk + 1); first by apply geq_minr. apply leq_trans with (n := x1 - task_cost tsk + 1); first by apply geq_minr.
......
...@@ -497,9 +497,8 @@ Module InterferenceBoundEDF. ...@@ -497,9 +497,8 @@ Module InterferenceBoundEDF.
by apply job_interference_seq_le_service. by apply job_interference_seq_le_service.
} }
unfold service_during. unfold service_during.
rewrite -> cumulative_service_after_job_rt_zero with (job_cost0 := job_cost) rewrite -> cumulative_service_after_job_rt_zero with
(R := R_k); (job_cost0 := job_cost) (R := R_k); try (by done).
try (by done); last by apply leqnn.
rewrite addn0; apply extend_sum; first by apply leqnn. rewrite addn0; apply extend_sum; first by apply leqnn.
by rewrite leq_add2l; apply H_R_k_le_deadline. by rewrite leq_add2l; apply H_R_k_le_deadline.
} }
...@@ -515,8 +514,8 @@ Module InterferenceBoundEDF. ...@@ -515,8 +514,8 @@ Module InterferenceBoundEDF.
by apply job_interference_seq_le_service. by apply job_interference_seq_le_service.
} }
unfold service_during. unfold service_during.
rewrite -> cumulative_service_after_job_rt_zero with (job_cost0 := job_cost) (R:=R_k); rewrite -> cumulative_service_after_job_rt_zero with
try (by done); last by apply leqnn. (job_cost0 := job_cost) (R:=R_k); try (by done).
rewrite addn0. rewrite addn0.
apply leq_trans with (n := (\sum_(t1 <= t < a_fst + R_k) 1) + apply leq_trans with (n := (\sum_(t1 <= t < a_fst + R_k) 1) +
\sum_(a_fst + R_k <= t < a_fst + D_k) 1). \sum_(a_fst + R_k <= t < a_fst + D_k) 1).
...@@ -800,9 +799,9 @@ Module InterferenceBoundEDF. ...@@ -800,9 +799,9 @@ Module InterferenceBoundEDF.
by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins. by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins.
by destruct sorted_jobs; ins. by destruct sorted_jobs; ins.
by rewrite sort_uniq -/interfering_jobs filter_uniq // undup_uniq. by rewrite sort_uniq -/interfering_jobs filter_uniq // undup_uniq.
by move: INnth INnth0 => /eqP INnth /eqP INnth0; rewrite INnth INnth0. by rewrite INnth INnth0.
} }
by rewrite subh3 // addnC; move: INnth => /eqP INnth; rewrite -INnth. by rewrite subh3 // addnC -INnth.
Qed. Qed.
(* Using the lemma above, we prove that the ratio n_k is at least the number of (* Using the lemma above, we prove that the ratio n_k is at least the number of
...@@ -875,8 +874,7 @@ Module InterferenceBoundEDF. ...@@ -875,8 +874,7 @@ Module InterferenceBoundEDF.
rename H_many_jobs into NUM, H_at_least_two_jobs into SIZE. rename H_many_jobs into NUM, H_at_least_two_jobs into SIZE.
have NK := interference_bound_edf_n_k_covers_middle_jobs_plus_one. have NK := interference_bound_edf_n_k_covers_middle_jobs_plus_one.
move: NK; rewrite leq_eqVlt orbC; move => /orP NK; des; move: NK; rewrite leq_eqVlt orbC; move => /orP NK; des;
first by rewrite SIZE ltnS leqNgt NK in NUM. [by rewrite SIZE ltnS leqNgt NK in NUM | by done].
by move: NK => /eqP NK; rewrite NK.
Qed. Qed.
(* After proving the bounds of the middle and last jobs, we do the same for (* After proving the bounds of the middle and last jobs, we do the same for
......
...@@ -78,7 +78,7 @@ Module WorkloadBound. ...@@ -78,7 +78,7 @@ Module WorkloadBound.
rewrite leq_eqVlt in LTp; move: LTp => /orP LTp; des; rewrite leq_eqVlt in LTp; move: LTp => /orP LTp; des;
last by rewrite ltnS in LTp; apply (leq_trans H_period_positive) in LTp. last by rewrite ltnS in LTp; apply (leq_trans H_period_positive) in LTp.
{ {
move: LTp => /eqP LTp; rewrite LTp 2!modn1 2!divn1. rewrite LTp 2!modn1 2!divn1.
rewrite leq_add2l leq_mul2r; apply/orP; right. rewrite leq_add2l leq_mul2r; apply/orP; right.
by rewrite leq_sub2r // leq_add2l. by rewrite leq_sub2r // leq_add2l.
} }
...@@ -253,7 +253,7 @@ Module WorkloadBound. ...@@ -253,7 +253,7 @@ Module WorkloadBound.
Proof. Proof.
intros j_i LTi. intros j_i LTi.
rewrite -workload_bound_job_in_same_sequence mem_filter in LTi; des. rewrite -workload_bound_job_in_same_sequence mem_filter in LTi; des.
repeat split; [by apply/eqP | | by done]. repeat split; [by done | | by done].
unfold jobs_scheduled_between in *; rewrite mem_undup in LTi0. unfold jobs_scheduled_between in *; rewrite mem_undup in LTi0.
apply mem_bigcat_nat_exists in LTi0; des. apply mem_bigcat_nat_exists in LTi0; des.
rewrite mem_scheduled_jobs_eq_scheduled in LTi0. rewrite mem_scheduled_jobs_eq_scheduled in LTi0.
...@@ -432,8 +432,7 @@ Module WorkloadBound. ...@@ -432,8 +432,7 @@ Module WorkloadBound.
[| by apply workload_bound_response_time_of_first_job_inside_interval [| by apply workload_bound_response_time_of_first_job_inside_interval
| by apply ltnW]. | by apply ltnW].
rewrite -{2}[\sum_(_ <= _ < _) _]addn0 /= leq_add2l leqn0; apply/eqP. rewrite -{2}[\sum_(_ <= _ < _) _]addn0 /= leq_add2l leqn0; apply/eqP.
apply (cumulative_service_after_job_rt_zero job_cost) with (R := R_tsk); apply (cumulative_service_after_job_rt_zero job_cost) with (R := R_tsk); try (by done).
try (by done); last by apply leqnn.
apply H_response_time_bound; last by done. apply H_response_time_bound; last by done.
exploit workload_bound_all_jobs_from_tsk. exploit workload_bound_all_jobs_from_tsk.
by apply mem_nth; instantiate (1 := 0); rewrite H_at_least_two_jobs. by apply mem_nth; instantiate (1 := 0); rewrite H_at_least_two_jobs.
...@@ -544,9 +543,9 @@ Module WorkloadBound. ...@@ -544,9 +543,9 @@ Module WorkloadBound.
by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins. by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins.
by destruct sorted_jobs; ins. by destruct sorted_jobs; ins.
by rewrite sort_uniq -/scheduled_jobs filter_uniq // undup_uniq. by rewrite sort_uniq -/scheduled_jobs filter_uniq // undup_uniq.
by move: INnth INnth0 => /eqP INnth /eqP INnth0; rewrite INnth INnth0. by rewrite INnth INnth0.
} }
by rewrite subh3 // addnC; move: INnth => /eqP INnth; rewrite -INnth. by rewrite subh3 // addnC -INnth.
Qed. Qed.
(* Prove that n_k is at least the number of the middle jobs *) (* Prove that n_k is at least the number of the middle jobs *)
......
...@@ -292,8 +292,7 @@ Module ResponseTimeIterationEDF. ...@@ -292,8 +292,7 @@ Module ResponseTimeIterationEDF.
Proof. Proof.
intros l; unfold all_le; rewrite eq_refl andTb. intros l; unfold all_le; rewrite eq_refl andTb.
destruct l; first by done. destruct l; first by done.
apply/(zipP (fun x y => snd x <= snd y)); try (by ins). by apply/(zipP (fun x y => snd x <= snd y)).
by ins; apply leqnn.
Qed. Qed.
(* ... and transitive. *) (* ... and transitive. *)
...@@ -562,7 +561,6 @@ Module ResponseTimeIterationEDF. ...@@ -562,7 +561,6 @@ Module ResponseTimeIterationEDF.
try (by done); try (by done);
[ by apply all_le_reflexive [ by apply all_le_reflexive
| by apply all_le_transitive | by apply all_le_transitive
| by apply leqnSn
| by apply bertogna_edf_comp_iteration_preserves_order | by apply bertogna_edf_comp_iteration_preserves_order
| by apply bertogna_edf_comp_iteration_preserves_minimum]. | by apply bertogna_edf_comp_iteration_preserves_minimum].
Qed. Qed.
......
...@@ -407,8 +407,7 @@ Module ResponseTimeIterationFP. ...@@ -407,8 +407,7 @@ Module ResponseTimeIterationFP.
apply leq_trans with (n := W_jitter task_cost task_period task_jitter i R x1); apply leq_trans with (n := W_jitter task_cost task_period task_jitter i R x1);
first by apply geq_minl. first by apply geq_minl.
exploit (VALID i); first by rewrite mem_rcons in_cons; apply/orP; right. exploit (VALID i); first by rewrite mem_rcons in_cons; apply/orP; right.
by ins; des; apply W_monotonic; try (by ins); by ins; des; apply W_monotonic; try (by ins); apply GE_COST.
[by apply GE_COST | by apply leqnn].
} }
{ {
apply leq_trans with (n := x1 - task_cost tsk + 1); first by apply geq_minr. apply leq_trans with (n := x1 - task_cost tsk + 1); first by apply geq_minr.
......
...@@ -527,8 +527,8 @@ Module InterferenceBoundEDFJitter. ...@@ -527,8 +527,8 @@ Module InterferenceBoundEDFJitter.
unfold service_during. unfold service_during.
rewrite -> cumulative_service_after_job_rt_zero with (job_cost0 := job_cost) rewrite -> cumulative_service_after_job_rt_zero with (job_cost0 := job_cost)
(R := J_k + R_k); (R := J_k + R_k);
try (by done); rewrite ?addnA //; last by apply leqnn. rewrite ?addnA //.
rewrite addn0; apply extend_sum; first by apply leqnn. rewrite addn0; apply extend_sum; first by done.
rewrite -addnA leq_add2l. rewrite -addnA leq_add2l.
by apply H_R_k_le_deadline. by apply H_R_k_le_deadline.
} }
...@@ -552,7 +552,7 @@ Module InterferenceBoundEDFJitter. ...@@ -552,7 +552,7 @@ Module InterferenceBoundEDFJitter.
} }
unfold service_during. unfold service_during.
rewrite -> cumulative_service_after_job_rt_zero with (job_cost0 := job_cost) (R:=J_k + R_k); rewrite -> cumulative_service_after_job_rt_zero with (job_cost0 := job_cost) (R:=J_k + R_k);
try (by done); rewrite ?addnA //; last by apply leqnn. rewrite ?addnA //.
rewrite addn0. rewrite addn0.
apply leq_trans with (n := (\sum_(a_i <= t < a_fst + J_k + R_k) 1) + apply leq_trans with (n := (\sum_(a_i <= t < a_fst + J_k + R_k) 1) +
\sum_(a_fst + J_k + R_k <= t < a_fst + D_k) 1). \sum_(a_fst + J_k + R_k <= t < a_fst + D_k) 1).
...@@ -884,9 +884,9 @@ Module InterferenceBoundEDFJitter. ...@@ -884,9 +884,9 @@ Module InterferenceBoundEDFJitter.
by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins. by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins.
by destruct sorted_jobs; ins. by destruct sorted_jobs; ins.
by rewrite sort_uniq -/interfering_jobs filter_uniq // undup_uniq. by rewrite sort_uniq -/interfering_jobs filter_uniq // undup_uniq.
by move: INnth INnth0 => /eqP INnth /eqP INnth0; rewrite INnth INnth0. by rewrite INnth INnth0.
} }
by rewrite subh3 // addnC; move: INnth => /eqP INnth; rewrite -INnth. by rewrite subh3 // addnC -INnth.
Qed. Qed.
(* Using the lemma above, we prove that the ratio n_k is at least the number of (* Using the lemma above, we prove that the ratio n_k is at least the number of
...@@ -964,7 +964,7 @@ Module InterferenceBoundEDFJitter. ...@@ -964,7 +964,7 @@ Module InterferenceBoundEDFJitter.
have NK := interference_bound_edf_n_k_covers_middle_jobs_plus_one. have NK := interference_bound_edf_n_k_covers_middle_jobs_plus_one.
move: NK; rewrite leq_eqVlt orbC; move => /orP NK; des; move: NK; rewrite leq_eqVlt orbC; move => /orP NK; des;
first by rewrite SIZE ltnS leqNgt NK in NUM. first by rewrite SIZE ltnS leqNgt NK in NUM.
by move: NK => /eqP NK; rewrite NK. by rewrite NK.
Qed. Qed.
(* After proving the bounds of the middle and last jobs, we do the same for (* After proving the bounds of the middle and last jobs, we do the same for
......
...@@ -79,7 +79,7 @@ Module WorkloadBoundJitter. ...@@ -79,7 +79,7 @@ Module WorkloadBoundJitter.
rewrite leq_eqVlt in LTp; move: LTp => /orP LTp; des; rewrite leq_eqVlt in LTp; move: LTp => /orP LTp; des;
last by rewrite ltnS in LTp; apply (leq_trans H_period_positive) in LTp. last by rewrite ltnS in LTp; apply (leq_trans H_period_positive) in LTp.
{ {
move: LTp => /eqP LTp; rewrite LTp 2!modn1 2!divn1. rewrite LTp 2!modn1 2!divn1.
rewrite leq_add2l leq_mul2r; apply/orP; right. rewrite leq_add2l leq_mul2r; apply/orP; right.
by rewrite leq_sub2r // leq_add2l. by rewrite leq_sub2r // leq_add2l.
} }
...@@ -257,7 +257,7 @@ Module WorkloadBoundJitter. ...@@ -257,7 +257,7 @@ Module WorkloadBoundJitter.
Proof. Proof.
intros j_i LTi. intros j_i LTi.
rewrite -workload_bound_job_in_same_sequence mem_filter in LTi; des. rewrite -workload_bound_job_in_same_sequence mem_filter in LTi; des.
repeat split; [by apply/eqP | | by done]. repeat split; [by done | | by done].
unfold jobs_scheduled_between in *; rewrite mem_undup in LTi0. unfold jobs_scheduled_between in *; rewrite mem_undup in LTi0.
apply mem_bigcat_nat_exists in LTi0; des. apply mem_bigcat_nat_exists in LTi0; des.
rewrite mem_scheduled_jobs_eq_scheduled in LTi0. rewrite mem_scheduled_jobs_eq_scheduled in LTi0.
...@@ -562,9 +562,9 @@ Module WorkloadBoundJitter. ...@@ -562,9 +562,9 @@ Module WorkloadBoundJitter.
by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins. by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins.
by destruct sorted_jobs; ins. by destruct sorted_jobs; ins.
by rewrite sort_uniq -/scheduled_jobs filter_uniq // undup_uniq. by rewrite sort_uniq -/scheduled_jobs filter_uniq // undup_uniq.
by move: INnth INnth0 => /eqP INnth /eqP INnth0; rewrite INnth INnth0. by rewrite INnth INnth0.
} }
by rewrite subh3 // addnC; move: INnth => /eqP INnth; rewrite -INnth. by rewrite subh3 // addnC -INnth.
Qed. Qed.
(* Prove that n_k is at least the number of the middle jobs *) (* Prove that n_k is at least the number of the middle jobs *)
......
...@@ -239,8 +239,7 @@ Module ResponseTimeIterationEDF. ...@@ -239,8 +239,7 @@ Module ResponseTimeIterationEDF.
Proof. Proof.
intros l; unfold all_le; rewrite eq_refl andTb. intros l; unfold all_le; rewrite eq_refl andTb.
destruct l; first by done. destruct l; first by done.
apply/(zipP (fun x y => snd x <= snd y)); try (by ins). by apply/(zipP (fun x y => snd x <= snd y)).
by ins; apply leqnn.
Qed. Qed.
(* ... and transitive. *) (* ... and transitive. *)
...@@ -508,7 +507,6 @@ Module ResponseTimeIterationEDF. ...@@ -508,7 +507,6 @@ Module ResponseTimeIterationEDF.
try (by done); try (by done);
[ by apply all_le_reflexive [ by apply all_le_reflexive
| by apply all_le_transitive | by apply all_le_transitive
| by apply leqnSn
| by apply bertogna_edf_comp_iteration_preserves_order | by apply bertogna_edf_comp_iteration_preserves_order
| by apply bertogna_edf_comp_iteration_preserves_minimum]. | by apply bertogna_edf_comp_iteration_preserves_minimum].
Qed. Qed.
......
...@@ -618,9 +618,9 @@ Module InterferenceBoundEDF. ...@@ -618,9 +618,9 @@ Module InterferenceBoundEDF.
by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins. by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins.
by destruct sorted_jobs; ins. by destruct sorted_jobs; ins.
by rewrite sort_uniq -/interfering_jobs filter_uniq // undup_uniq. by rewrite sort_uniq -/interfering_jobs filter_uniq // undup_uniq.
by move: INnth INnth0 => /eqP INnth /eqP INnth0; rewrite INnth INnth0. by rewrite INnth INnth0.
} }
by rewrite subh3 // addnC; move: INnth => /eqP INnth; rewrite -INnth. by rewrite subh3 // addnC -INnth.
Qed. Qed.
Lemma interference_bound_edf_slack_le_delta: Lemma interference_bound_edf_slack_le_delta:
......
...@@ -186,7 +186,7 @@ Module WorkloadBound. ...@@ -186,7 +186,7 @@ Module WorkloadBound.
Proof. Proof.
intros j_i LTi. intros j_i LTi.
rewrite -workload_bound_job_in_same_sequence mem_filter in LTi; des. rewrite -workload_bound_job_in_same_sequence mem_filter in LTi; des.
repeat split; [by apply/eqP | | by done]. repeat split; [by done | | by done].
unfold jobs_scheduled_between in *; rewrite mem_undup in LTi0. unfold jobs_scheduled_between in *; rewrite mem_undup in LTi0.
apply mem_bigcat_nat_exists in LTi0; des. apply mem_bigcat_nat_exists in LTi0; des.
rewrite mem_scheduled_jobs_eq_scheduled in LTi0. rewrite mem_scheduled_jobs_eq_scheduled in LTi0.
...@@ -396,9 +396,9 @@ Module WorkloadBound. ...@@ -396,9 +396,9 @@ Module WorkloadBound.
by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins. by apply ltn_trans with (n := (size sorted_jobs).-1); destruct sorted_jobs; ins.
by destruct sorted_jobs; ins. by destruct sorted_jobs; ins.
by rewrite sort_uniq -/scheduled_jobs filter_uniq // undup_uniq. by rewrite sort_uniq -/scheduled_jobs filter_uniq // undup_uniq.
by move: INnth INnth0 => /eqP INnth /eqP INnth0; rewrite INnth INnth0. by rewrite INnth INnth0.
} }
by rewrite subh3 // addnC; move: INnth => /eqP INnth; rewrite -INnth. by rewrite subh3 // addnC -INnth.
Qed. Qed.
(* Next, we prove that n_k covers every scheduled job, ... *) (* Next, we prove that n_k covers every scheduled job, ... *)
......
...@@ -75,25 +75,25 @@ Module ConcreteArrivalSequence. ...@@ -75,25 +75,25 @@ Module ConcreteArrivalSequence.
unfold arrives_at, arr_seq, periodic_arrival_sequence in *. unfold arrives_at, arr_seq, periodic_arrival_sequence in *.
rewrite 2!mem_pmap in ARR ARR'. rewrite 2!mem_pmap in ARR ARR'.
move: ARR ARR' => /mapP [tsk_j INj SOMEj] /mapP [tsk_j' INj' SOMEj']. move: ARR ARR' => /mapP [tsk_j INj SOMEj] /mapP [tsk_j' INj' SOMEj'].
unfold add_job in *; desf; simpl in *; subst. unfold add_job in SOMEj, SOMEj'; desf; simpl in *;
clear INj'. move: Heq0 Heq => /dvdnP [k DIV] /dvdnP [k' DIV'].
move: Heq Heq0 => /dvdnP DIV' /dvdnP DIV; des.
rewrite DIV DIV' -mulSnr.
rewrite leq_eqVlt in LE; move: LE => /orP [/eqP EQ | LESS].
{ {
move: DIFF => /orP [/eqP CASE1 | /eqP CASE2]. rewrite DIV DIV' -mulSnr.
- by exfalso; apply CASE1; repeat f_equal. rewrite leq_eqVlt in LE; move: LE => /orP [/eqP EQ | LESS].
- by rewrite EQ in CASE2. {
exfalso; move: DIFF => /negP DIFF; apply DIFF.
by subst; rewrite EQ.
}
subst; rewrite leq_mul2r; apply/orP; right.
by rewrite ltn_mul2r in LESS; move: LESS => /andP [_ LT].
} }
rewrite leq_mul2r; apply/orP; right.
rewrite ltn_neqAle; apply/andP; split.
{ {
apply/eqP; red; intro EQ; subst. assert (LT: arr < arr'). by rewrite ltn_neqAle; apply/andP.
by rewrite ltnn in LESS. clear LE DIFF; subst tsk_j' arr arr'.
rewrite ltn_mul2r in LT; move: LT => /andP [_ LT].
by apply leq_trans with (n := k.+1 * task_period tsk_j);
[by rewrite mulSnr | by rewrite leq_mul2r; apply/orP; right].
} }
rewrite leqNgt; apply/negP; red; intro LT.
rewrite ltnNge in LESS; move: LESS => /negP LESS; apply LESS.
by subst; rewrite leq_mul2r; apply/orP; right; apply ltnW.
Qed. Qed.
(* ... and if the task set has no duplicates, the same applies to (* ... and if the task set has no duplicates, the same applies to
......
...@@ -75,25 +75,25 @@ Module ConcreteArrivalSequence. ...@@ -75,25 +75,25 @@ Module ConcreteArrivalSequence.
unfold arrives_at, arr_seq, periodic_arrival_sequence in *. unfold arrives_at, arr_seq, periodic_arrival_sequence in *.
rewrite 2!mem_pmap in ARR ARR'. rewrite 2!mem_pmap in ARR ARR'.
move: ARR ARR' => /mapP [tsk_j INj SOMEj] /mapP [tsk_j' INj' SOMEj']. move: ARR ARR' => /mapP [tsk_j INj SOMEj] /mapP [tsk_j' INj' SOMEj'].
unfold add_job in *; desf; simpl in *; subst. unfold add_job in SOMEj, SOMEj'; desf; simpl in *;
clear INj'. move: Heq0 Heq => /dvdnP [k DIV] /dvdnP [k' DIV'].
move: Heq Heq0 => /dvdnP DIV' /dvdnP DIV; des.
rewrite DIV DIV' -mulSnr.
rewrite leq_eqVlt in LE; move: LE => /orP [/eqP EQ | LESS].
{ {
move: DIFF => /orP [/eqP CASE1 | /eqP CASE2]. rewrite DIV DIV' -mulSnr.
- by exfalso; apply CASE1; repeat f_equal. rewrite leq_eqVlt in LE; move: LE => /orP [/eqP EQ | LESS].
- by rewrite EQ in CASE2. {
exfalso; move: DIFF => /negP DIFF; apply DIFF.
by subst; rewrite EQ.
}
subst; rewrite leq_mul2r; apply/orP; right.
by rewrite ltn_mul2r in LESS; move: LESS => /andP [_ LT].
} }
rewrite leq_mul2r; apply/orP; right.
rewrite ltn_neqAle; apply/andP; split.
{ {
apply/eqP; red; intro EQ; subst. assert (LT: arr < arr'). by rewrite ltn_neqAle; apply/andP.
by rewrite ltnn in LESS. clear LE DIFF; subst tsk_j' arr arr'.
rewrite ltn_mul2r in LT; move: LT => /andP [_ LT].
by apply leq_trans with (n := k.+1 * task_period tsk_j);
[by rewrite mulSnr | by rewrite leq_mul2r; apply/orP; right].
} }
rewrite leqNgt; apply/negP; red; intro LT.
rewrite ltnNge in LESS; move: LESS => /negP LESS; apply LESS.
by subst; rewrite leq_mul2r; apply/orP; right; apply ltnW.
Qed. Qed.
(* ... and if the task set has no duplicates, the same applies to (* ... and if the task set has no duplicates, the same applies to
......
...@@ -100,9 +100,6 @@ Module ArrivalSequence. ...@@ -100,9 +100,6 @@ Module ArrivalSequence.
if (j \in arr_seq t) is true then if (j \in arr_seq t) is true then
Some (Build_JobIn arr_seq j t _) Some (Build_JobIn arr_seq j t _)
else None. else None.
Next Obligation.
by done.
Qed.
(* Now we define the list of JobIn that arrive at time t as the partial (* Now we define the list of JobIn that arrive at time t as the partial
map of is_JobIn. *) map of is_JobIn. *)
......
...@@ -244,7 +244,7 @@ Module Interference. ...@@ -244,7 +244,7 @@ Module Interference.
rewrite big_mkcond (bigD1_seq j0) /=; last by rewrite undup_uniq. rewrite big_mkcond (bigD1_seq j0) /=; last by rewrite undup_uniq.
{ {
rewrite -addn1 addnC; apply leq_add; last by done. rewrite -addn1 addnC; apply leq_add; last by done.
rewrite EQtsk0 eq_refl BACK andTb. rewrite EQtsk0 BACK andTb.
apply eq_leq; symmetry; apply/eqP; rewrite eqb1. apply eq_leq; symmetry; apply/eqP; rewrite eqb1.
unfold scheduled, scheduled_on. unfold scheduled, scheduled_on.
by apply/exists_inP; exists x; [by done | by rewrite SCHED]. by apply/exists_inP; exists x; [by done | by rewrite SCHED].
...@@ -252,7 +252,7 @@ Module Interference. ...@@ -252,7 +252,7 @@ Module Interference.
{ {
unfold jobs_scheduled_between. unfold jobs_scheduled_between.
rewrite mem_undup. rewrite mem_undup.
apply mem_bigcat_nat with (j := t); first by done. apply mem_bigcat_nat with (j := t); first by auto.
unfold jobs_scheduled_at. unfold jobs_scheduled_at.
apply mem_bigcat_ord with (j := x); first by apply ltn_ord. apply mem_bigcat_ord with (j := x); first by apply ltn_ord.
by unfold make_sequence; rewrite SCHED mem_seq1 eq_refl. by unfold make_sequence; rewrite SCHED mem_seq1 eq_refl.
......
...@@ -175,26 +175,24 @@ Module Interference. ...@@ -175,26 +175,24 @@ Module Interference.
} }
rewrite big_mkcond (bigD1_seq j0) /=; last by rewrite undup_uniq. rewrite big_mkcond (bigD1_seq j0) /=; last by rewrite undup_uniq.
{ {
rewrite EQtsk0 eq_refl BACK SCHEDULED andbT big_mkcond. rewrite EQtsk0 BACK SCHEDULED andbT big_mkcond.
rewrite (eq_bigr (fun x => 0)); rewrite (eq_bigr (fun x => 0));
first by rewrite big_const_seq iter_addn mul0n addn0 addn0. first by rewrite big_const_seq iter_addn mul0n addn0 addn0.
intros j1 _; desf; [rewrite andTb | by done]. intros j1 _; desf; try by done.
apply/eqP; rewrite eqb0; apply/negP; unfold not; intro SCHEDULED'. apply/eqP; rewrite eqb0; apply/negP; unfold not; intro SCHEDULED'.
exploit (H_no_intratask_parallelism j0 j1 t); try (by done). exploit (H_no_intratask_parallelism j0 j1 t); try by eauto.
by move: Heq0 => /eqP EQtsk; rewrite EQtsk.
by intros EQj; rewrite EQj eq_refl in Heq.
} }
{ {
rewrite mem_undup. rewrite mem_undup.
apply mem_bigcat_nat with (j := t); first by done. apply mem_bigcat_nat with (j := t); first by auto.
apply mem_bigcat_ord with (j := x); first by apply ltn_ord. apply mem_bigcat_ord with (j := x); first by apply ltn_ord.
by rewrite SCHED mem_seq1 eq_refl. by rewrite SCHED mem_seq1.
} }
} }
{ {
rewrite big_mkcond (eq_bigr (fun x => 0)); rewrite big_mkcond (eq_bigr (fun x => 0));
first by rewrite big_const_seq iter_addn mul0n addn0. first by rewrite big_const_seq iter_addn mul0n addn0.
intros i _; desf. intros i _; desf; rewrite // ?BACK ?andFb //.
unfold task_is_scheduled in BACK. unfold task_is_scheduled in BACK.
apply negbT in BACK; rewrite negb_exists in BACK. apply negbT in BACK; rewrite negb_exists in BACK.
move: BACK => /forallP BACK. move: BACK => /forallP BACK.
...@@ -206,7 +204,7 @@ Module Interference. ...@@ -206,7 +204,7 @@ Module Interference.
unfold schedules_job_of_tsk in BACK; unfold scheduled_on. unfold schedules_job_of_tsk in BACK; unfold scheduled_on.
destruct (sched x t) eqn:SCHED; last by ins. destruct (sched x t) eqn:SCHED; last by ins.
apply/negP; unfold not; move => /eqP BUG; inversion BUG; subst. apply/negP; unfold not; move => /eqP BUG; inversion BUG; subst.
by move: Heq => /eqP Heq; rewrite Heq eq_refl in BACK. by move: BACK => /negP BACK; apply BACK.
} }
by rewrite NOTSCHED andbF. by rewrite NOTSCHED andbF.
}