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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Gregory Malecha
stdpp
Commits
4b73a5c1
Commit
4b73a5c1
authored
7 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Use `stdpp_scope` for all notations.
parent
b9ef84b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
theories/base.v
+145
-145
145 additions, 145 deletions
theories/base.v
theories/fin_maps.v
+3
-3
3 additions, 3 deletions
theories/fin_maps.v
theories/list.v
+19
-19
19 additions, 19 deletions
theories/list.v
theories/set.v
+1
-1
1 addition, 1 deletion
theories/set.v
theories/strings.v
+1
-1
1 addition, 1 deletion
theories/strings.v
with
169 additions
and
169 deletions
theories/base.v
+
145
−
145
View file @
4b73a5c1
This diff is collapsed.
Click to expand it.
theories/fin_maps.v
+
3
−
3
View file @
4b73a5c1
...
...
@@ -92,10 +92,10 @@ Definition map_included `{∀ A, Lookup K A (M A)} {A}
(
R
:
relation
A
)
:
relation
(
M
A
)
:=
map_relation
R
(
λ
_,
False
)
(
λ
_,
True
)
.
Definition
map_disjoint
`{
∀
A
,
Lookup
K
A
(
M
A
)}
{
A
}
:
relation
(
M
A
)
:=
map_relation
(
λ
_
_,
False
)
(
λ
_,
True
)
(
λ
_,
True
)
.
Infix
"##ₘ"
:=
map_disjoint
(
at
level
70
)
:
C
_scope
.
Infix
"##ₘ"
:=
map_disjoint
(
at
level
70
)
:
stdpp
_scope
.
Hint
Extern
0
(_
##
ₘ
_)
=>
symmetry
;
eassumption
.
Notation
"( m ##ₘ.)"
:=
(
map_disjoint
m
)
(
only
parsing
)
:
C
_scope
.
Notation
"(.##ₘ m )"
:=
(
λ
m2
,
m2
##
ₘ
m
)
(
only
parsing
)
:
C
_scope
.
Notation
"( m ##ₘ.)"
:=
(
map_disjoint
m
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"(.##ₘ m )"
:=
(
λ
m2
,
m2
##
ₘ
m
)
(
only
parsing
)
:
stdpp
_scope
.
Instance
map_subseteq
`{
∀
A
,
Lookup
K
A
(
M
A
)}
{
A
}
:
SubsetEq
(
M
A
)
:=
map_included
(
=
)
.
...
...
This diff is collapsed.
Click to expand it.
theories/list.v
+
19
−
19
View file @
4b73a5c1
...
...
@@ -30,21 +30,21 @@ Arguments Permutation {_} _ _ : assert.
Arguments
Forall_cons
{_}
_
_
_
_
_
:
assert
.
Remove
Hints
Permutation_cons
:
typeclass_instances
.
Notation
"(::)"
:=
cons
(
only
parsing
)
:
C
_scope
.
Notation
"( x ::)"
:=
(
cons
x
)
(
only
parsing
)
:
C
_scope
.
Notation
"(:: l )"
:=
(
λ
x
,
cons
x
l
)
(
only
parsing
)
:
C
_scope
.
Notation
"(++)"
:=
app
(
only
parsing
)
:
C
_scope
.
Notation
"( l ++)"
:=
(
app
l
)
(
only
parsing
)
:
C
_scope
.
Notation
"(++ k )"
:=
(
λ
l
,
app
l
k
)
(
only
parsing
)
:
C
_scope
.
Infix
"≡ₚ"
:=
Permutation
(
at
level
70
,
no
associativity
)
:
C
_scope
.
Notation
"(≡ₚ)"
:=
Permutation
(
only
parsing
)
:
C
_scope
.
Notation
"( x ≡ₚ)"
:=
(
Permutation
x
)
(
only
parsing
)
:
C
_scope
.
Notation
"(≡ₚ x )"
:=
(
λ
y
,
y
≡
ₚ
x
)
(
only
parsing
)
:
C
_scope
.
Notation
"(≢ₚ)"
:=
(
λ
x
y
,
¬
x
≡
ₚ
y
)
(
only
parsing
)
:
C
_scope
.
Notation
"x ≢ₚ y"
:=
(
¬
x
≡
ₚ
y
)
(
at
level
70
,
no
associativity
)
:
C
_scope
.
Notation
"( x ≢ₚ)"
:=
(
λ
y
,
x
≢
ₚ
y
)
(
only
parsing
)
:
C
_scope
.
Notation
"(≢ₚ x )"
:=
(
λ
y
,
y
≢
ₚ
x
)
(
only
parsing
)
:
C
_scope
.
Notation
"(::)"
:=
cons
(
only
parsing
)
:
stdpp
_scope
.
Notation
"( x ::)"
:=
(
cons
x
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"(:: l )"
:=
(
λ
x
,
cons
x
l
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"(++)"
:=
app
(
only
parsing
)
:
stdpp
_scope
.
Notation
"( l ++)"
:=
(
app
l
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"(++ k )"
:=
(
λ
l
,
app
l
k
)
(
only
parsing
)
:
stdpp
_scope
.
Infix
"≡ₚ"
:=
Permutation
(
at
level
70
,
no
associativity
)
:
stdpp
_scope
.
Notation
"(≡ₚ)"
:=
Permutation
(
only
parsing
)
:
stdpp
_scope
.
Notation
"( x ≡ₚ)"
:=
(
Permutation
x
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"(≡ₚ x )"
:=
(
λ
y
,
y
≡
ₚ
x
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"(≢ₚ)"
:=
(
λ
x
y
,
¬
x
≡
ₚ
y
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"x ≢ₚ y"
:=
(
¬
x
≡
ₚ
y
)
(
at
level
70
,
no
associativity
)
:
stdpp
_scope
.
Notation
"( x ≢ₚ)"
:=
(
λ
y
,
x
≢
ₚ
y
)
(
only
parsing
)
:
stdpp
_scope
.
Notation
"(≢ₚ x )"
:=
(
λ
y
,
y
≢
ₚ
x
)
(
only
parsing
)
:
stdpp
_scope
.
Instance
maybe_cons
{
A
}
:
Maybe2
(
@
cons
A
)
:=
λ
l
,
match
l
with
x
::
l
=>
Some
(
x
,
l
)
|
_
=>
None
end
.
...
...
@@ -240,8 +240,8 @@ Fixpoint permutations {A} (l : list A) : list (list A) :=
The predicate [prefix] holds if the first list is a prefix of the second. *)
Definition
suffix
{
A
}
:
relation
(
list
A
)
:=
λ
l1
l2
,
∃
k
,
l2
=
k
++
l1
.
Definition
prefix
{
A
}
:
relation
(
list
A
)
:=
λ
l1
l2
,
∃
k
,
l2
=
l1
++
k
.
Infix
"`suffix_of`"
:=
suffix
(
at
level
70
)
:
C
_scope
.
Infix
"`prefix_of`"
:=
prefix
(
at
level
70
)
:
C
_scope
.
Infix
"`suffix_of`"
:=
suffix
(
at
level
70
)
:
stdpp
_scope
.
Infix
"`prefix_of`"
:=
prefix
(
at
level
70
)
:
stdpp
_scope
.
Hint
Extern
0
(_
`
prefix_of
`
_)
=>
reflexivity
.
Hint
Extern
0
(_
`
suffix_of
`
_)
=>
reflexivity
.
...
...
@@ -271,7 +271,7 @@ Inductive sublist {A} : relation (list A) :=
|
sublist_nil
:
sublist
[]
[]
|
sublist_skip
x
l1
l2
:
sublist
l1
l2
→
sublist
(
x
::
l1
)
(
x
::
l2
)
|
sublist_cons
x
l1
l2
:
sublist
l1
l2
→
sublist
l1
(
x
::
l2
)
.
Infix
"`sublist_of`"
:=
sublist
(
at
level
70
)
:
C
_scope
.
Infix
"`sublist_of`"
:=
sublist
(
at
level
70
)
:
stdpp
_scope
.
Hint
Extern
0
(_
`
sublist_of
`
_)
=>
reflexivity
.
(** A list [l2] submseteq a list [l1] if [l2] is obtained by removing elements
...
...
@@ -282,7 +282,7 @@ Inductive submseteq {A} : relation (list A) :=
|
submseteq_swap
x
y
l
:
submseteq
(
y
::
x
::
l
)
(
x
::
y
::
l
)
|
submseteq_cons
x
l1
l2
:
submseteq
l1
l2
→
submseteq
l1
(
x
::
l2
)
|
submseteq_trans
l1
l2
l3
:
submseteq
l1
l2
→
submseteq
l2
l3
→
submseteq
l1
l3
.
Infix
"⊆+"
:=
submseteq
(
at
level
70
)
:
C
_scope
.
Infix
"⊆+"
:=
submseteq
(
at
level
70
)
:
stdpp
_scope
.
Hint
Extern
0
(_
⊆+
_)
=>
reflexivity
.
(** Removes [x] from the list [l]. The function returns a [Some] when the
...
...
This diff is collapsed.
Click to expand it.
theories/set.v
+
1
−
1
View file @
4b73a5c1
...
...
@@ -9,7 +9,7 @@ Add Printing Constructor set.
Arguments
mkSet
{_}
_
:
assert
.
Arguments
set_car
{_}
_
_
:
assert
.
Notation
"{[ x | P ]}"
:=
(
mkSet
(
λ
x
,
P
))
(
at
level
1
,
format
"{[ x | P ]}"
)
:
C
_scope
.
(
at
level
1
,
format
"{[ x | P ]}"
)
:
stdpp
_scope
.
Instance
set_elem_of
{
A
}
:
ElemOf
A
(
set
A
)
:=
λ
x
X
,
set_car
X
x
.
...
...
This diff is collapsed.
Click to expand it.
theories/strings.v
+
1
−
1
View file @
4b73a5c1
...
...
@@ -13,7 +13,7 @@ Notation length := List.length.
(** * Fix scopes *)
Open
Scope
string_scope
.
Open
Scope
list_scope
.
Infix
"+:+"
:=
String
.
append
(
at
level
60
,
right
associativity
)
:
C
_scope
.
Infix
"+:+"
:=
String
.
append
(
at
level
60
,
right
associativity
)
:
stdpp
_scope
.
Arguments
String
.
append
:
simpl
never
.
(** * Decision of equality *)
...
...
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