Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
stdpp
Commits
cb021200
Commit
cb021200
authored
Mar 15, 2017
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inhabit vectors
parent
db2da9af
Pipeline
#4062
passed with stage
in 2 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
theories/vector.v
theories/vector.v
+10
-0
No files found.
theories/vector.v
View file @
cb021200
...
...
@@ -355,3 +355,13 @@ Proof.
Qed
.
Lemma
vlookup_insert_self
{
A
n
}
i
(
v
:
vec
A
n
)
:
vinsert
i
(
v
!!!
i
)
v
=
v
.
Proof
.
by
induction
v
;
inv_fin
i
;
intros
;
f_equal
/=.
Qed
.
(* Vectors can be inhabited. *)
Global
Instance
vec_nil_inh
T
:
Inhabited
(
vec
T
0
)
:
=
populate
[#].
Global
Instance
vec_inh
T
n
:
Inhabited
T
→
Inhabited
(
vec
T
n
).
Proof
.
intros
HT
.
induction
n
;
[
apply
_
|].
destruct
IHn
as
[
v
].
destruct
HT
as
[
x
].
exact
(
populate
(
x
:::
v
)).
Qed
.
Write
Preview
Markdown
is supported
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