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
Iris
Commits
75bbf7a2
Commit
75bbf7a2
authored
Jan 23, 2020
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'stronger_list_core_id' into 'master'
Add a stronger version of `list_core_id`. See merge request
!361
parents
b73c677c
d6dbed9e
Pipeline
#23151
passed with stage
in 32 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
theories/algebra/list.v
theories/algebra/list.v
+8
-3
No files found.
theories/algebra/list.v
View file @
75bbf7a2
...
...
@@ -296,12 +296,17 @@ Section cmra.
by
apply
cmra_discrete_valid
.
Qed
.
Global
Instance
list_core_id
l
:
(
∀
x
:
A
,
CoreId
x
)
→
CoreId
l
.
Lemma
list_core_id
'
l
:
(
∀
x
,
x
∈
l
→
CoreId
x
)
→
CoreId
l
.
Proof
.
intros
?
;
constructor
;
apply
list_equiv_lookup
=>
i
.
by
rewrite
list_lookup_core
(
core_id_core
(
l
!!
i
)).
intros
Hyp
.
constructor
.
apply
list_equiv_lookup
=>
i
.
rewrite
list_lookup_core
.
destruct
(
l
!!
i
)
eqn
:
E
;
last
done
.
by
eapply
Hyp
,
elem_of_list_lookup_2
.
Qed
.
Global
Instance
list_core_id
l
:
(
∀
x
:
A
,
CoreId
x
)
→
CoreId
l
.
Proof
.
intros
Hyp
;
by
apply
list_core_id'
.
Qed
.
(** Internalized properties *)
Lemma
list_equivI
{
M
}
l1
l2
:
l1
≡
l2
⊣
⊢
@{
uPredI
M
}
∀
i
,
l1
!!
i
≡
l2
!!
i
.
Proof
.
uPred
.
unseal
;
constructor
=>
n
x
?.
apply
list_dist_lookup
.
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