End  Safety_Explicity_Safety.
Section Csafe_Safety.
Context (finit_branch_kstep:(forall x : kstate,
finite_on_x
(possible_image
(fun (x0 : kstate) (y : schedule) (x' : kstate) =>
exists y' : schedule, kstep x0 y x' y') valid x))).

(* Specifications: *)
Lemma finite_state_preservation:
forall P0 P' : SST kstate,
konig.finite P0 -> SST_step kstate schedule kstep valid P0 P' -> konig.finite P'.
Lemma csafe_safety_trick:
forall tr tp m,
(forall U : schedule, valid (tr, tp,m) U) ->
(forall (n : nat) U, csafe (U, tr, tp) m n) ->
forall U : schedule, safe kstate schedule kstep valid (tr,tp,m) U.
Lemma csafe_safety:
forall tr tp m,
(forall (n : nat) U, valid (tr, tp,m) U -> csafe (U, tr, tp) m n) ->
forall U : schedule, valid (tr, tp,m) U -> safe kstate schedule kstep valid (tr,tp,m) U.
Lemma safety_csafe_trick:
forall tr tp m,
(forall U : schedule, valid (tr, tp,m) U) ->
(forall U : schedule, safe kstate schedule kstep valid (tr,tp,m) U) ->
(forall (n : nat) U, csafe (U, tr, tp) m n).
Lemma safety_csafe:
forall tr tp m,
(forall U : schedule, valid (tr, tp,m) U -> safe kstate schedule kstep valid (tr,tp,m) U) ->
(forall (n : nat) U, valid (tr, tp,m) U -> csafe (U, tr, tp) m n).
Lemma csafe_explicit_safety:
forall tr tp m,
(forall (n : nat) U, valid (tr, tp,m) U -> csafe (U, tr, tp) m n) ->
forall U, valid (tr, tp,m) U -> explicit_safety U tr tp m.
Lemma explicit_safety_csafe:
forall tr tp m,
(forall U : schedule, valid (tr, tp,m) U -> explicit_safety U tr tp m) ->
(forall (n : nat) U, valid (tr, tp,m) U -> csafe (U, tr, tp) m n).
Lemma csafe_explicit_safety':
forall tr tp m,
(forall U : schedule, valid (tr, tp,m) U) ->
(forall (n : nat) U, csafe (U, tr, tp) m n) ->
forall U : schedule, explicit_safety U tr tp m.
Lemma explicit_safety_csafe':
forall tr tp m,
(forall U : schedule, valid (tr, tp,m) U) ->
(forall U : schedule, explicit_safety U tr tp m) ->
(forall (n : nat) U, csafe (U, tr, tp) m n).