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
d5b53680
Commit
d5b53680
authored
3 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Plain Diff
Merge branch 'robbert/mapset_universe' into 'master'
Avoid universe bumps of `gset`/`mapset` (fixes
#134
) Closes
#134
See merge request
!370
parents
56558ffb
1a421790
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
tests/universes.ref
+4
-0
4 additions, 0 deletions
tests/universes.ref
tests/universes.v
+7
-0
7 additions, 0 deletions
tests/universes.v
theories/mapset.v
+8
-2
8 additions, 2 deletions
theories/mapset.v
with
23 additions
and
2 deletions
CHANGELOG.md
+
4
−
0
View file @
d5b53680
This file lists "large-ish" changes to the std++ Coq library, but not every
API-breaking change is listed.
## std++ master
-
Make sure that
`gset`
and
`mapset`
do not bump the universe.
## std++ 1.7.0 (2022-01-22)
Coq 8.15 is newly supported by this release, and Coq 8.11 to 8.14 remain
...
...
This diff is collapsed.
Click to expand it.
tests/universes.ref
0 → 100644
+
4
−
0
View file @
d5b53680
gmap Z Z : Set
: Set
gset Z : Set
: Set
This diff is collapsed.
Click to expand it.
tests/universes.v
0 → 100644
+
7
−
0
View file @
d5b53680
From
stdpp
Require
Import
gmap
.
(** Make sure that [gmap] and [gset] do not bump the universe. Since [Z : Set],
the types [gmap Z Z] and [gset Z] should have universe [Set] too. *)
Check
(
gmap
Z
Z
:
Set
)
.
Check
(
gset
Z
:
Set
)
.
This diff is collapsed.
Click to expand it.
theories/mapset.v
+
8
−
2
View file @
d5b53680
...
...
@@ -8,8 +8,14 @@ From stdpp Require Import options.
locally (or things moved out of sections) as no default works well enough. *)
Unset
Default
Proof
Using
.
Record
mapset
(
M
:
Type
→
Type
)
:
Type
:=
Mapset
{
mapset_car
:
M
(
unit
:
Type
)
}
.
(** Given a type of maps [M : Type → Type], we construct sets as [M ()], i.e.,
maps with unit values. To avoid unnecessary universe constraints, we first
define [mapset' Munit] with [Munit : Type] as a record, and then [mapset M] with
[M : Type → Type] as a notation. See [tests/universes.v] for a test case that
fails otherwise. *)
Record
mapset'
(
Munit
:
Type
)
:
Type
:=
Mapset
{
mapset_car
:
Munit
}
.
Notation
mapset
M
:=
(
mapset'
(
M
unit
))
.
Global
Arguments
Mapset
{_}
_
:
assert
.
Global
Arguments
mapset_car
{_}
_
:
assert
.
...
...
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