Skip to content
Snippets Groups Projects
Commit a7ee334e authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Support `_ ∈ _ ⊎ _ ` in `set_solver`.

parent 453f5e30
No related branches found
No related tags found
No related merge requests found
...@@ -126,6 +126,14 @@ Qed. ...@@ -126,6 +126,14 @@ Qed.
Global Instance gmultiset_elem_of_dec : RelDecision (∈@{gmultiset A}). Global Instance gmultiset_elem_of_dec : RelDecision (∈@{gmultiset A}).
Proof. refine (λ x X, cast_if (decide (0 < multiplicity x X))); done. Defined. 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 *) (* Algebraic laws *)
(** For union *) (** For union *)
Global Instance gmultiset_union_comm : Comm (=@{gmultiset A}) (). Global Instance gmultiset_union_comm : Comm (=@{gmultiset A}) ().
......
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