Skip to content

Commit

Permalink
Weaken assumption of set_add lemmas to EqDecision (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmmoore authored Dec 8, 2023
1 parent 90fa9a6 commit ee2e270
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions theories/Lib/ListSetExtras.v
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Proof.
by apply elem_of_cons in H0 as []; [| inversion H0].
Qed.

Lemma filter_set_add `{StrictlyComparable X} P
Lemma filter_set_add `{EqDecision X} P
`{forall (x : X), Decision (P x)} :
forall (l : list X) x, ~ P x ->
filter P l = filter P (set_add x l).
Expand All @@ -273,7 +273,7 @@ Proof.
by destruct (decide (P hd)); rewrite <- IHl.
Qed.

Lemma set_add_ignore `{StrictlyComparable X} :
Lemma set_add_ignore `{EqDecision X} :
forall (l : list X) (x : X),
x ∈ l ->
set_add x l = l.
Expand Down

0 comments on commit ee2e270

Please # to comment.