Skip to content
Snippets Groups Projects
Commit 8b17ca72 authored by Ralf Jung's avatar Ralf Jung
Browse files

Merge branch 'robbert/issue_139' into 'master'

Set `Hint Mode` for `FinSet`.

Closes #139

See merge request iris/stdpp!379
parents ebb89887 54a2f992
No related branches found
No related tags found
1 merge request!379Set `Hint Mode` for `FinSet`.
Pipeline #65930 passed
...@@ -18,6 +18,8 @@ Coq 8.11 is no longer supported. ...@@ -18,6 +18,8 @@ Coq 8.11 is no longer supported.
- Rename "unsealing" lemmas from `_eq` to `_unseal`. This affects `ndot_eq` and - Rename "unsealing" lemmas from `_eq` to `_unseal`. This affects `ndot_eq` and
`nclose_eq`. These unsealing lemmas are internal, so in principle you should `nclose_eq`. These unsealing lemmas are internal, so in principle you should
not rely on them. not rely on them.
- Declare `Hint Mode` for `FinSet A C` so that `C` is input, and `A` is output
(i.e., inferred from `C`).
## std++ 1.7.0 (2022-01-22) ## std++ 1.7.0 (2022-01-22)
......
...@@ -82,3 +82,10 @@ Proof. ...@@ -82,3 +82,10 @@ Proof.
Fail progress simplify_eq. Fail progress simplify_eq.
done. done.
Qed. Qed.
(** Test case for issue #139 *)
Lemma test_issue_139 (m : gmap nat nat) : x, x dom m.
Proof.
destruct (exist_fresh (dom m)); eauto.
Qed.
...@@ -1468,6 +1468,8 @@ Class FinSet A C `{ElemOf A C, Empty C, Singleton A C, Union C, ...@@ -1468,6 +1468,8 @@ Class FinSet A C `{ElemOf A C, Empty C, Singleton A C, Union C,
elem_of_elements (X : C) x : x elements X x X; elem_of_elements (X : C) x : x elements X x X;
NoDup_elements (X : C) : NoDup (elements X) NoDup_elements (X : C) : NoDup (elements X)
}. }.
Global Hint Mode FinSet - ! - - - - - - - - : typeclass_instances.
Class Size C := size: C nat. Class Size C := size: C nat.
Global Hint Mode Size ! : typeclass_instances. Global Hint Mode Size ! : typeclass_instances.
Global Arguments size {_ _} !_ / : simpl nomatch, assert. Global Arguments size {_ _} !_ / : simpl nomatch, assert.
......
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