Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thibaut Pérami
stdpp
Commits
db05f07d
Commit
db05f07d
authored
1 year ago
by
Thibaut Pérami
Browse files
Options
Downloads
Patches
Plain Diff
Allow patterns and type annotations in propset notation
parent
32edabf7
No related branches found
No related tags found
No related merge requests found
Pipeline
#91425
canceled
1 year ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
stdpp/propset.v
+1
-1
1 addition, 1 deletion
stdpp/propset.v
tests/propset.ref
+0
-0
0 additions, 0 deletions
tests/propset.ref
tests/propset.v
+10
-0
10 additions, 0 deletions
tests/propset.v
with
11 additions
and
1 deletion
stdpp/propset.v
+
1
−
1
View file @
db05f07d
...
...
@@ -7,7 +7,7 @@ Add Printing Constructor propset.
Global
Arguments
PropSet
{_}
_
:
assert
.
Global
Arguments
propset_car
{_}
_
_
:
assert
.
Notation
"{[ x | P ]}"
:=
(
PropSet
(
λ
x
,
P
))
(
at
level
1
,
format
"{[ x | P ]}"
)
:
stdpp_scope
.
(
at
level
1
,
x
at
level
200
as
pattern
,
format
"{[ x | P ]}"
)
:
stdpp_scope
.
Global
Instance
propset_elem_of
{
A
}
:
ElemOf
A
(
propset
A
)
:=
λ
x
X
,
propset_car
X
x
.
...
...
This diff is collapsed.
Click to expand it.
tests/propset.ref
0 → 100644
+
0
−
0
View file @
db05f07d
This diff is collapsed.
Click to expand it.
tests/propset.v
0 → 100644
+
10
−
0
View file @
db05f07d
From
stdpp
Require
Import
propset
.
Lemma
diagonal
:
{[
(
a
,
b
)
:
nat
*
nat
|
a
=
b
]}
≡
(
λ
x
,
(
x
,
x
))
<$>
⊤
.
Proof
.
set_unfold
.
intros
[]
.
naive_solver
.
Qed
.
Lemma
diagonal2
:
{[
(
a
,
b
)
|
a
=@
{
nat
}
b
]}
≡
{[
x
|
x
.
1
=
x
.
2
]}
.
Proof
.
set_unfold
.
intros
[]
.
naive_solver
.
Qed
.
Lemma
simple_pattern_does_not_match
:
{[
x
:
nat
|
x
=
x
]}
=
PropSet
(
λ
x
,
x
=
x
)
.
Proof
.
exact
eq_refl
.
Qed
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment