Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sophie Quinton
rt-proofs
Commits
74126db1
Commit
74126db1
authored
Aug 29, 2016
by
Felipe Cerqueira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more notation for map/filter
parent
df6ebb50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
util/notation.v
util/notation.v
+7
-2
No files found.
util/notation.v
View file @
74126db1
...
...
@@ -90,10 +90,15 @@ Notation "\max_ ( ( m , n ) <- r | P ) F" :=
(
\
max_
(
i
<-
r
|
(
let
'
(
m
,
n
)
:
=
i
in
P
))
(
let
'
(
m
,
n
)
:
=
i
in
F
))
:
nat_scope
.
Notation
"[ '
seq
' ( x , y ) <- s | C ]"
:
=
Notation
"[ '
pairs
' ( x , y ) <- s | C ]"
:
=
(
filter
(
fun
i
=>
let
'
(
x
,
y
)
:
=
i
in
C
%
B
)
s
)
(
at
level
0
,
x
at
level
99
,
format
"[ '[hv' 'seq' ( x , y ) <- s '/ ' | C ] ']'"
)
:
seq_scope
.
format
"[ '[hv' 'pairs' ( x , y ) <- s '/ ' | C ] ']'"
)
:
seq_scope
.
Notation
"[ 'pairs' ( E , F ) | x <- s ]"
:
=
(
map
(
fun
y
=>
((
fun
x1
=>
let
x
:
=
x1
in
E
)
y
,
(
fun
x2
=>
let
x
:
=
x2
in
F
)
y
))
s
)
(
at
level
0
,
E
at
level
1
,
F
at
level
1
,
format
"[ '[hv' 'pairs' ( E , F ) | x <- s ] ']'"
)
:
seq_scope
.
(* In case we use an (option list T), we can define membership
without having to match the option type. *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment