Commit bd6ca353 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Fix projection-no-head-constant warning and clean up proofs.

parent 815cabab
Pipeline #3015 passed with stage
in 9 minutes and 57 seconds
...@@ -430,66 +430,51 @@ Arguments STS {_} _. ...@@ -430,66 +430,51 @@ Arguments STS {_} _.
Arguments prim_step {_} _ _. Arguments prim_step {_} _ _.
Notation states sts := (set (state sts)). Notation states sts := (set (state sts)).
Canonical sts_notok (sts : stsT) : sts.stsT := Definition stsT_token := Empty_set.
sts.STS (token:=Empty_set) (@prim_step sts) (λ _, ). Definition stsT_tok {sts : stsT} (_ : state sts) : set stsT_token := .
Section sts. Canonical Structure sts_notok (sts : stsT) : sts.stsT :=
Context {sts : stsT}. sts.STS (@prim_step sts) stsT_tok.
Implicit Types s : state sts. Coercion sts_notok.sts_notok : sts_notok.stsT >-> sts.stsT.
Implicit Types S : states sts.
Notation prim_steps := (rtc prim_step). Section sts.
Context {sts : stsT}.
Implicit Types s : state sts.
Implicit Types S : states sts.
Lemma sts_step s1 s2 : Notation prim_steps := (rtc prim_step).
prim_step s1 s2 sts.step (s1, ) (s2, ).
Proof.
intros. split; set_solver.
Qed.
Lemma sts_steps s1 s2 : Lemma sts_step s1 s2 : prim_step s1 s2 sts.step (s1, ) (s2, ).
prim_steps s1 s2 sts.steps (s1, ) (s2, ). Proof. intros. split; set_solver. Qed.
Proof.
induction 1; eauto using sts_step, rtc_refl, rtc_l.
Qed.
Lemma frame_prim_step T s1 s2 : Lemma sts_steps s1 s2 : prim_steps s1 s2 sts.steps (s1, ) (s2, ).
sts.frame_step T s1 s2 prim_step s1 s2. Proof. induction 1; eauto using sts_step, rtc_refl, rtc_l. Qed.
Proof.
inversion 1 as [??? Hstep]. inversion_clear Hstep. done.
Qed.
Lemma prim_frame_step T s1 s2 : Lemma frame_prim_step T s1 s2 : sts.frame_step T s1 s2 prim_step s1 s2.
prim_step s1 s2 sts.frame_step T s1 s2. Proof. inversion 1 as [??? Hstep]. by inversion_clear Hstep. Qed.
Proof.
intros Hstep. apply sts.Frame_step with ; first set_solver.
by apply sts_step.
Qed.
Lemma mk_closed S : Lemma prim_frame_step T s1 s2 : prim_step s1 s2 sts.frame_step T s1 s2.
( s1 s2, s1 S prim_step s1 s2 s2 S) sts.closed S . Proof.
Proof. intros Hstep. apply sts.Frame_step with ; first set_solver.
intros ?. constructor; first by set_solver. by apply sts_step.
intros ????. eauto using frame_prim_step. Qed.
Qed.
Lemma mk_closed S :
( s1 s2, s1 S prim_step s1 s2 s2 S) sts.closed S .
Proof. intros ?. constructor; [by set_solver|eauto using frame_prim_step]. Qed.
End sts. End sts.
Notation steps := (rtc prim_step).
End sts_notok. End sts_notok.
Coercion sts_notok.sts_notok : sts_notok.stsT >-> sts.stsT.
Notation sts_notokT := sts_notok.stsT. Notation sts_notokT := sts_notok.stsT.
Notation STS_NoTok := sts_notok.STS. Notation STS_NoTok := sts_notok.STS.
Section sts_notokRA. Section sts_notokRA.
Import sts_notok. Context {sts : sts_notokT}.
Context {sts : sts_notokT}. Import sts_notok.
Implicit Types s : state sts. Implicit Types s : state sts.
Implicit Types S : states sts. Implicit Types S : states sts.
Lemma sts_notok_update_auth s1 s2 : Lemma sts_notok_update_auth s1 s2 :
rtc prim_step s1 s2 sts_auth s1 ~~> sts_auth s2 . rtc prim_step s1 s2 sts_auth s1 ~~> sts_auth s2 .
Proof. Proof. intros. by apply sts_update_auth, sts_steps. Qed.
intros. by apply sts_update_auth, sts_steps.
Qed.
End sts_notokRA. End sts_notokRA.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment