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
5062a5fc
Commit
5062a5fc
authored
3 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
remove Z.of_nat coercion entirely in std++ (but we'll add it in Iris for now)
parent
91fae00c
No related branches found
No related tags found
1 merge request
!257
make Z.of_nat not a coercion inside std++
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
theories/hashset.v
+2
-2
2 additions, 2 deletions
theories/hashset.v
theories/prelude.v
+0
-4
0 additions, 4 deletions
theories/prelude.v
with
3 additions
and
6 deletions
CHANGELOG.md
+
1
−
0
View file @
5062a5fc
...
...
@@ -18,6 +18,7 @@ API-breaking change is listed.
+
Add lemmas for
`∈`
and
`∉`
specific for multisets, since the set lemmas no
longer work for multisets.
-
Make
`Qc_of_Z'`
not an implicit coercion (from
`Z`
to
`Qc`
) any more.
-
Make
`Z.of_nat'`
not an implicit coercion (from
`nat`
to
`Z`
) any more.
## std++ 1.5.0
...
...
This diff is collapsed.
Click to expand it.
theories/hashset.v
+
2
−
2
View file @
5062a5fc
...
...
@@ -126,7 +126,7 @@ Definition remove_dups_fast (l : list A) : list A :=
|
[]
=>
[]
|
[
x
]
=>
[
x
]
|
_
=>
let
n
:
Z
:=
length
l
in
let
n
:
Z
:=
Z
.
of_nat
(
length
l
)
in
elements
(
foldr
(
λ
x
,
({[
x
]}
∪.
))
∅
l
:
hashset
(
λ
x
,
hash
x
`
mod
`
(
2
*
n
))
%
Z
)
end
.
...
...
@@ -134,7 +134,7 @@ Lemma elem_of_remove_dups_fast l x : x ∈ remove_dups_fast l ↔ x ∈ l.
Proof
.
destruct
l
as
[|
x1
[|
x2
l
]];
try
reflexivity
.
unfold
remove_dups_fast
;
generalize
(
x1
::
x2
::
l
);
clear
l
;
intros
l
.
generalize
(
λ
x
,
hash
x
`
mod
`
(
2
*
length
l
))
%
Z
;
intros
f
.
generalize
(
λ
x
,
hash
x
`
mod
`
(
2
*
Z
.
of_nat
(
length
l
))
)
%
Z
;
intros
f
.
rewrite
elem_of_elements
;
split
.
-
revert
x
.
induction
l
as
[|
y
l
IH
];
intros
x
;
simpl
.
{
by
rewrite
elem_of_empty
.
}
...
...
This diff is collapsed.
Click to expand it.
theories/prelude.v
+
0
−
4
View file @
5062a5fc
...
...
@@ -13,7 +13,3 @@ From stdpp Require Export
list_numbers
lexico
.
From
stdpp
Require
Import
options
.
(** We are phasing out this coercion inside std++, but currently
keep it enabled for users to ensure backwards compatibility. *)
Coercion
Z
.
of_nat
:
nat
>->
Z
.
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