Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Olivier Laurent
stdpp
Commits
432120a3
Commit
432120a3
authored
May 01, 2020
by
Robbert Krebbers
Browse files
Merge branch 'ascii-countable' into 'master'
Add Countable instance for Ascii.ascii See merge request
iris/stdpp!154
parents
9b75ffdf
bb75eecc
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
432120a3
...
...
@@ -11,6 +11,7 @@ API-breaking change is listed.
exported by the prelude. This is a breaking change if one only
imports
`list.v`
, but not the prelude.
-
Rename
`drop_insert`
into
`drop_insert_gt`
and add
`drop_insert_le`
.
-
Added
`Countable`
instance for
`Ascii.ascii`
.
## std++ 1.3 (released 2020-03-18)
...
...
theories/strings.v
View file @
432120a3
...
...
@@ -115,3 +115,7 @@ Program Instance string_countable : Countable string := {|
encode
:
=
string_to_pos
;
decode
p
:
=
Some
(
string_of_pos
p
)
|}.
Solve
Obligations
with
naive_solver
eauto
using
string_of_to_pos
with
f_equal
.
Lemma
ascii_of_to_digits
a
:
ascii_of_digits
(
ascii_to_digits
a
)
=
a
.
Proof
.
by
destruct
a
as
[[][][][][][][][]].
Qed
.
Instance
ascii_countable
:
Countable
ascii
:
=
inj_countable'
ascii_to_digits
ascii_of_digits
ascii_of_to_digits
.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment