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
Model registry
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
Iris
stdpp
Commits
ca70af1d
Commit
ca70af1d
authored
3 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Fix `Params` of `from_option` to match with !276.
parent
e5ca47dd
No related branches found
No related tags found
No related merge requests found
Pipeline
#48513
passed
3 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/proper.v
+7
-0
7 additions, 0 deletions
tests/proper.v
theories/option.v
+1
-1
1 addition, 1 deletion
theories/option.v
with
8 additions
and
1 deletion
tests/proper.v
+
7
−
0
View file @
ca70af1d
...
...
@@ -23,6 +23,13 @@ Section tests.
Proof
.
solve_proper
.
Qed
.
End
tests
.
Global
Instance
from_option_proper_test1
`{
Equiv
A
}
{
B
}
(
R
:
relation
B
)
(
f
:
A
→
B
)
:
Proper
((
≡
)
==>
R
)
f
→
Proper
(
R
==>
(
≡
)
==>
R
)
(
from_option
f
)
.
Proof
.
apply
_
.
Qed
.
Global
Instance
from_option_proper_test2
`{
Equiv
A
}
{
B
}
(
R
:
relation
B
)
(
f
:
A
→
B
)
:
Proper
((
≡
)
==>
R
)
f
→
Proper
(
R
==>
(
≡
)
==>
R
)
(
from_option
f
)
.
Proof
.
solve_proper
.
Qed
.
Section
map_tests
.
Context
`{
FinMap
K
M
}
`{
Equiv
A
}
.
...
...
This diff is collapsed.
Click to expand it.
theories/option.v
+
1
−
1
View file @
ca70af1d
...
...
@@ -21,7 +21,7 @@ Proof. congruence. Qed.
(** The [from_option] is the eliminator for option. *)
Definition
from_option
{
A
B
}
(
f
:
A
→
B
)
(
y
:
B
)
(
mx
:
option
A
)
:
B
:=
match
mx
with
None
=>
y
|
Some
x
=>
f
x
end
.
Global
Instance
:
Params
(
@
from_option
)
3
:=
{}
.
Global
Instance
:
Params
(
@
from_option
)
2
:=
{}
.
Global
Arguments
from_option
{_
_}
_
_
!
_
/
:
assert
.
(** The eliminator with the identity function. *)
...
...
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