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
Adam
stdpp
Commits
71db0675
Commit
71db0675
authored
1 year ago
by
Thibaut Pérami
Committed by
Robbert Krebbers
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add fin notations
parent
592f728f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
stdpp/fin.v
+4
-6
4 additions, 6 deletions
stdpp/fin.v
with
6 additions
and
6 deletions
CHANGELOG.md
+
2
−
0
View file @
71db0675
...
@@ -67,6 +67,8 @@ longer supported by this release.
...
@@ -67,6 +67,8 @@ longer supported by this release.
(
`map_fold`
used to be derived from
`map_to_list`
.) This makes it possible to
(
`map_fold`
used to be derived from
`map_to_list`
.) This makes it possible to
use
`map_fold`
in nested-recursive definitions on maps. For example,
use
`map_fold`
in nested-recursive definitions on maps. For example,
`Fixpoint f (t : gtest) := let 'GTest ts := t in map_fold (λ _ t', plus (f t')) 1 ts`
.
`Fixpoint f (t : gtest) := let 'GTest ts := t in map_fold (λ _ t', plus (f t')) 1 ts`
.
-
Make
`fin`
number literal notations work with numbers above 10. (by Thibaut
Pérami)
The following
`sed`
script should perform most of the renaming
The following
`sed`
script should perform most of the renaming
(on macOS, replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
).
(on macOS, replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
).
...
...
This diff is collapsed.
Click to expand it.
stdpp/fin.v
+
4
−
6
View file @
71db0675
...
@@ -19,12 +19,10 @@ Declare Scope fin_scope.
...
@@ -19,12 +19,10 @@ Declare Scope fin_scope.
Delimit
Scope
fin_scope
with
fin
.
Delimit
Scope
fin_scope
with
fin
.
Global
Arguments
Fin
.
FS
_
_
%
fin
:
assert
.
Global
Arguments
Fin
.
FS
_
_
%
fin
:
assert
.
Notation
"0"
:=
Fin
.
F1
:
fin_scope
.
Notation
"1"
:=
(
FS
0
)
:
fin_scope
.
(** Allow any non-negative number literal to be parsed as a [fin]. For example
Notation
"2"
:=
(
FS
1
)
:
fin_scope
.
Notation
"3"
:=
(
FS
2
)
:
fin_scope
.
[42%fin : fin 64], or [42%fin : fin _], or [42%fin : fin (43 + _)]. *)
Notation
"4"
:=
(
FS
3
)
:
fin_scope
.
Notation
"5"
:=
(
FS
4
)
:
fin_scope
.
Number
Notation
fin
Nat
.
of_num_uint
Nat
.
to_num_uint
(
via
nat
Notation
"6"
:=
(
FS
5
)
:
fin_scope
.
Notation
"7"
:=
(
FS
6
)
:
fin_scope
.
mapping
[[
Fin
.
F1
]
=>
O
,
[
Fin
.
FS
]
=>
S
])
:
fin_scope
.
Notation
"8"
:=
(
FS
7
)
:
fin_scope
.
Notation
"9"
:=
(
FS
8
)
:
fin_scope
.
Notation
"10"
:=
(
FS
9
)
:
fin_scope
.
Fixpoint
fin_to_nat
{
n
}
(
i
:
fin
n
)
:
nat
:=
Fixpoint
fin_to_nat
{
n
}
(
i
:
fin
n
)
:
nat
:=
match
i
with
0
%
fin
=>
0
|
FS
i
=>
S
(
fin_to_nat
i
)
end
.
match
i
with
0
%
fin
=>
0
|
FS
i
=>
S
(
fin_to_nat
i
)
end
.
...
...
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