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
87eeafaf
Verified
Commit
87eeafaf
authored
2 years ago
by
Dorian Lesbre
Browse files
Options
Downloads
Patches
Plain Diff
Add Img class
parent
0727c134
No related branches found
No related tags found
1 merge request
!444
Add images (codomains) to finite maps
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stdpp/base.v
+10
-0
10 additions, 0 deletions
stdpp/base.v
with
10 additions
and
0 deletions
stdpp/base.v
+
10
−
0
View file @
87eeafaf
...
@@ -1342,6 +1342,16 @@ Global Instance: Params (@dom) 3 := {}.
...
@@ -1342,6 +1342,16 @@ Global Instance: Params (@dom) 3 := {}.
Global
Arguments
dom
:
clear
implicits
.
Global
Arguments
dom
:
clear
implicits
.
Global
Arguments
dom
{_
_
_}
!
_
/
:
simpl
nomatch
,
assert
.
Global
Arguments
dom
{_
_
_}
!
_
/
:
simpl
nomatch
,
assert
.
(** The function [img m] should yield the image/codomain of [m]. That is a finite
set of type [D] that contains the values that appear in [m].
[D] is an output of the typeclass, i.e., there can be only one instance per map
type [M]. *)
Class
Img
(
M
D
:
Type
)
:=
img
:
M
→
D
.
Global
Hint
Mode
Img
!
-
:
typeclass_instances
.
Global
Instance
:
Params
(
@
img
)
3
:=
{}
.
Global
Arguments
img
:
clear
implicits
.
Global
Arguments
img
{_
_
_}
!
_
/
:
simpl
nomatch
,
assert
.
(** The function [merge f m1 m2] should merge the maps [m1] and [m2] by
(** The function [merge f m1 m2] should merge the maps [m1] and [m2] by
constructing a new map whose value at key [k] is [f (m1 !! k) (m2 !! k)].*)
constructing a new map whose value at key [k] is [f (m1 !! k) (m2 !! k)].*)
Class
Merge
(
M
:
Type
→
Type
)
:=
Class
Merge
(
M
:
Type
→
Type
)
:=
...
...
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