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
Iris
transfinite
Commits
de760be0
Commit
de760be0
authored
Jul 03, 2019
by
Robbert Krebbers
Browse files
Stronger local update for multisets that entails the old ones.
parent
1519c178
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/algebra/gmultiset.v
View file @
de760be0
...
...
@@ -61,19 +61,22 @@ Section gmultiset.
Lemma
gmultiset_update
X
Y
:
X
~~>
Y
.
Proof
.
done
.
Qed
.
Lemma
gmultiset_local_update
_alloc
X
Y
X'
:
(
X
,
Y
)
~l
~>
(
X
⊎
X'
,
Y
⊎
X
'
).
Lemma
gmultiset_local_update
X
Y
X'
Y'
:
X
⊎
Y'
=
X'
⊎
Y
→
(
X
,
Y
)
~l
~>
(
X
'
,
Y
'
).
Proof
.
rewrite
local_update_unital_discrete
=>
Z'
_
/
leibniz_equiv_iff
->.
split
.
done
.
rewrite
!
gmultiset_op_disj_union
.
by
rewrite
-!
assoc
(
comm
_
Z'
X'
).
intros
HXY
.
rewrite
local_update_unital_discrete
=>
Z'
_
.
intros
->%
leibniz_equiv
.
split
;
first
done
.
apply
leibniz_equiv_iff
,
(
inj
(
⊎
Y
)).
rewrite
-
HXY
!
gmultiset_op_disj_union
.
by
rewrite
-(
comm_L
_
Y
)
(
comm_L
_
Y'
)
assoc_L
.
Qed
.
Lemma
gmultiset_local_update_alloc
X
Y
X'
:
(
X
,
Y
)
~l
~>
(
X
⊎
X'
,
Y
⊎
X'
).
Proof
.
apply
gmultiset_local_update
.
by
rewrite
(
comm_L
_
Y
)
assoc_L
.
Qed
.
Lemma
gmultiset_local_update_dealloc
X
Y
X'
:
X'
⊆
X
→
X'
⊆
Y
→
(
X
,
Y
)
~l
~>
(
X
∖
X'
,
Y
∖
X'
).
Proof
.
intros
->%
gmultiset_disj_union_difference
->%
gmultiset_disj_union_difference
.
rewrite
local_update_unital_discrete
=>
Z'
_
/
leibniz_equiv_iff
->.
split
.
done
.
rewrite
!
gmultiset_op_disj_union
=>
x
.
apply
gmultiset_local_update
.
apply
gmultiset_eq
=>
x
.
repeat
(
rewrite
multiplicity_difference
||
rewrite
multiplicity_disj_union
).
lia
.
Qed
.
...
...
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