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
Simon Spies
stdpp
Commits
1a21e908
Commit
1a21e908
authored
Jun 30, 2018
by
Robbert Krebbers
Browse files
Lemma list_insert_id.
parent
29e2f606
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/list.v
View file @
1a21e908
...
...
@@ -521,6 +521,9 @@ Qed.
Lemma
list_insert_commute
l
i
j
x
y
:
i
≠
j
→
<[
i
:
=
x
]>(<[
j
:
=
y
]>
l
)
=
<[
j
:
=
y
]>(<[
i
:
=
x
]>
l
).
Proof
.
revert
i
j
.
by
induction
l
;
intros
[|?]
[|?]
?
;
f_equal
/=
;
auto
.
Qed
.
Lemma
list_insert_id
l
i
x
:
l
!!
i
=
Some
x
→
<[
i
:
=
x
]>
l
=
l
.
Proof
.
revert
i
.
induction
l
;
intros
[|
i
]
[=]
;
f_equal
/=
;
auto
.
Qed
.
Lemma
list_lookup_other
l
i
x
:
length
l
≠
1
→
l
!!
i
=
Some
x
→
∃
j
y
,
j
≠
i
∧
l
!!
j
=
Some
y
.
Proof
.
...
...
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