Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
stdpp
Commits
be15c746
Commit
be15c746
authored
Jun 14, 2019
by
Robbert Krebbers
Browse files
Add lemma `vec_to_list_replicate`.
parent
c8dbb063
Pipeline
#17512
passed with stage
in 8 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
theories/vector.v
View file @
be15c746
...
...
@@ -260,6 +260,10 @@ with value [x]. *)
Fixpoint
vreplicate
{
A
}
(
n
:
nat
)
(
x
:
A
)
:
vec
A
n
:
=
match
n
with
0
=>
[#]
|
S
n
=>
x
:::
vreplicate
n
x
end
.
Lemma
vec_to_list_replicate
{
A
}
n
(
x
:
A
)
:
vec_to_list
(
vreplicate
n
x
)
=
replicate
n
x
.
Proof
.
induction
n
;
by
f_equal
/=.
Qed
.
(* Vectors can be inhabited. *)
Global
Instance
vec_0_inhabited
T
:
Inhabited
(
vec
T
0
)
:
=
populate
[#].
Global
Instance
vec_inhabited
`
{
Inhabited
T
}
n
:
Inhabited
(
vec
T
n
)
:
=
...
...
Robbert Krebbers
@robbertkrebbers
mentioned in merge request
iris!267 (merged)
·
Jun 14, 2019
mentioned in merge request
iris!267 (merged)
mentioned in merge request iris!267
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment