Skip to content
Snippets Groups Projects
Commit a5fa9833 authored by Jonas Kastberg's avatar Jonas Kastberg
Browse files

Added associativity rules for append subtyping

parent 3ade9b42
No related branches found
No related tags found
No related merge requests found
Pipeline #26772 passed
......@@ -105,6 +105,8 @@ Section Propers.
Proof. solve_proper. Qed.
Global Instance lsty_app_proper : Proper (() ==> () ==> ()) (@lsty_app Σ).
Proof. apply ne_proper_2, _. Qed.
Global Instance lsty_app_assoc : Assoc () (@lsty_app Σ).
Proof. intros s1 s2 s3. rewrite /lsty_app. by rewrite iProto_app_assoc. Qed.
  • Robbert Krebbers @robbertkrebbers ·
    Owner

    Don't use instances, but use the projection, so assoc instead of iProto_app_assoc.

  • Please register or sign in to reply
End Propers.
Notation "'END'" := lsty_end : lsty_scope.
......
......@@ -224,7 +224,7 @@ Section subtype.
iApply iProto_le_send; simpl.
iIntros (x) ">H !>"; iDestruct "H" as %Hsome.
iExists x. iSplit=> //. iSplit.
- iNext.
- iNext.
iDestruct (big_sepM2_forall with "H1") as "[% _]".
iPureIntro. naive_solver.
- iNext.
......@@ -292,6 +292,14 @@ Section subtype.
(S11 <++> S12) <s: (S21 <++> S22).
Proof. iIntros "#H1 #H2 !>". by iApply iProto_le_app. Qed.
Lemma lsty_le_app_assoc_l S1 S2 S3 :
((S1 <++> S2) <++> S3) <s: (S1 <++> (S2 <++> S3)).
Proof. rewrite lsty_app_assoc. iApply lsty_le_refl. Qed.
Lemma lsty_le_app_assoc_r S1 S2 S3 :
((S1 <++> S2) <++> S3) <s: (S1 <++> (S2 <++> S3)).
Proof. rewrite lsty_app_assoc. iApply lsty_le_refl. Qed.
Lemma lsty_le_dual S1 S2 : S2 <s: S1 -∗ lsty_dual S1 <s: lsty_dual S2.
Proof. iIntros "#H !>". by iApply iProto_le_dual. Qed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment