Commit 649c6e79 authored by Robbert Krebbers's avatar Robbert Krebbers

Stronger local update for multisets that entails the old ones.

parent a18865f7
...@@ -61,19 +61,22 @@ Section gmultiset. ...@@ -61,19 +61,22 @@ Section gmultiset.
Lemma gmultiset_update X Y : X ~~> Y. Lemma gmultiset_update X Y : X ~~> Y.
Proof. done. Qed. Proof. done. Qed.
Lemma gmultiset_local_update_alloc X Y X' : (X,Y) ~l~> (X X', Y X'). Lemma gmultiset_local_update X Y X' Y' : X Y' = X' Y (X,Y) ~l~> (X', Y').
Proof. Proof.
rewrite local_update_unital_discrete=> Z' _ /leibniz_equiv_iff->. intros HXY. rewrite local_update_unital_discrete=> Z' _. intros ->%leibniz_equiv.
split. done. rewrite !gmultiset_op_disj_union. split; first done. apply leibniz_equiv_iff, (inj ( Y)).
by rewrite -!assoc (comm _ Z' X'). rewrite -HXY !gmultiset_op_disj_union.
by rewrite -(comm_L _ Y) (comm_L _ Y') assoc_L.
Qed. Qed.
Lemma gmultiset_local_update_alloc X Y X' : (X,Y) ~l~> (X X', Y X').
Proof. apply gmultiset_local_update. by rewrite (comm_L _ Y) assoc_L. Qed.
Lemma gmultiset_local_update_dealloc X Y X' : Lemma gmultiset_local_update_dealloc X Y X' :
X' X X' Y (X,Y) ~l~> (X X', Y X'). X' X X' Y (X,Y) ~l~> (X X', Y X').
Proof. Proof.
intros ->%gmultiset_disj_union_difference ->%gmultiset_disj_union_difference. intros ->%gmultiset_disj_union_difference ->%gmultiset_disj_union_difference.
rewrite local_update_unital_discrete=> Z' _ /leibniz_equiv_iff->. apply gmultiset_local_update. apply gmultiset_eq=> x.
split. done. rewrite !gmultiset_op_disj_union=> x.
repeat (rewrite multiplicity_difference || rewrite multiplicity_disj_union). repeat (rewrite multiplicity_difference || rewrite multiplicity_disj_union).
lia. lia.
Qed. Qed.
......
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