From a7ee334efc0e23137cdd69854b74a79d5762027e Mon Sep 17 00:00:00 2001
From: Robbert Krebbers <mail@robbertkrebbers.nl>
Date: Thu, 21 Feb 2019 11:16:46 +0100
Subject: [PATCH] =?UTF-8?q?Support=20`=5F=20=E2=88=88=20=5F=20=E2=8A=8E=20?=
 =?UTF-8?q?=5F=20`=20in=20`set=5Fsolver`.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 theories/gmultiset.v | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/theories/gmultiset.v b/theories/gmultiset.v
index 5bc6b2ed..9ca8a767 100644
--- a/theories/gmultiset.v
+++ b/theories/gmultiset.v
@@ -126,6 +126,14 @@ Qed.
 Global Instance gmultiset_elem_of_dec : RelDecision (∈@{gmultiset A}).
 Proof. refine (λ x X, cast_if (decide (0 < multiplicity x X))); done. Defined.
 
+Global Instance set_unfold_gmultiset_disj_union x X Y P Q :
+  SetUnfold (x ∈ X) P → SetUnfold (x ∈ Y) Q → SetUnfold (x ∈ X ⊎ Y) (P ∨ Q).
+Proof.
+  intros ??; constructor.
+  rewrite <-(set_unfold (x ∈ X) P), <-(set_unfold (x ∈ Y) Q).
+  rewrite !elem_of_multiplicity, multiplicity_disj_union. lia.
+Qed.
+
 (* Algebraic laws *)
 (** For union *)
 Global Instance gmultiset_union_comm : Comm (=@{gmultiset A}) (∪).
-- 
GitLab