Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tej Chajed
iris
Commits
55eee5a6
Commit
55eee5a6
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
introduce a notion of disjoint namespaces, and prove a few lemmas about it
parent
df372f81
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program_logic/invariants.v
+34
-8
34 additions, 8 deletions
program_logic/invariants.v
with
34 additions
and
8 deletions
program_logic/invariants.v
+
34
−
8
View file @
55eee5a6
...
...
@@ -30,16 +30,42 @@ Proof.
Qed
.
Lemma
ndot_nclose
`{
Countable
A
}
N
x
:
encode
(
ndot
N
x
)
∈
nclose
N
.
Proof
.
apply
nclose_subseteq
with
x
,
encode_nclose
.
Qed
.
Lemma
nclose_disjoint
`{
Countable
A
}
N
(
x
y
:
A
)
:
x
≠
y
→
nclose
(
ndot
N
x
)
∩
nclose
(
ndot
N
y
)
=
∅.
Definition
ndisj
(
N1
N2
:
namespace
)
:=
∃
N1'
N2'
,
N1'
`
suffix_of
`
N1
∧
N2'
`
suffix_of
`
N2
∧
length
N1'
=
length
N2'
∧
N1'
≠
N2'
.
Global
Instance
ndisj_comm
:
Comm
iff
ndisj
.
Proof
.
intros
N1
N2
.
rewrite
/
ndisj
;
naive_solver
.
Qed
.
Lemma
ndot_ne_disj
`{
Countable
A
}
N
(
x
y
:
A
)
:
x
≠
y
→
ndisj
(
ndot
N
x
)
(
ndot
N
y
)
.
Proof
.
intros
Hxy
.
exists
(
ndot
N
x
),
(
ndot
N
y
)
.
split_ands
;
try
done
;
[]
.
by
apply
not_inj2_2
.
Qed
.
Lemma
ndot_preserve_disj_l
`{
Countable
A
}
N1
N2
(
x
:
A
)
:
ndisj
N1
N2
→
ndisj
(
ndot
N1
x
)
N2
.
Proof
.
intros
(
N1'
&
N2'
&
Hpr1
&
Hpr2
&
Hl
&
Hne
)
.
exists
N1'
,
N2'
.
split_ands
;
try
done
;
[]
.
by
apply
suffix_of_cons_r
.
Qed
.
Lemma
ndot_preserve_disj_r
`{
Countable
A
}
N1
N2
(
x
:
A
)
:
ndisj
N1
N2
→
ndisj
N1
(
ndot
N2
x
)
.
Proof
.
rewrite
!
[
ndisj
N1
_]
comm
.
apply
ndot_preserve_disj_l
.
Qed
.
Lemma
ndisj_disjoint
N1
N2
:
ndisj
N1
N2
→
nclose
N1
∩
nclose
N2
=
∅.
Proof
.
intros
Hxy
;
apply
elem_of_equiv_empty_L
=>
p
;
unfold
nclose
,
ndot
.
intros
(
N1'
&
N2'
&
[
N1''
Hpr1
]
&
[
N2''
Hpr2
]
&
Hl
&
Hne
)
.
subst
N1
N2
.
apply
elem_of_equiv_empty_L
=>
p
;
unfold
nclose
.
rewrite
elem_of_intersection
!
elem_coPset_suffixes
;
intros
[[
q
->
]
[
q'
Hq
]]
.
apply
Hxy
,
(
inj
encode
),
(
inj
encode_nat
);
revert
Hq
.
rewrite
!
(
list_encode_cons
(
encode
_))
.
rewrite
!
(
assoc_L
_)
(
inj_iff
(
++
_)
%
positive
)
/=.
generalize
(
encode_nat
(
encode
y
))
.
induction
(
encode_nat
(
encode
x
));
intros
[|?]
?;
f_equal'
;
naive_solver
.
rewrite
!
list_encode_app
!
assoc
in
Hq
.
apply
Hne
.
eapply
list_encode_suffix_eq
;
done
.
Qed
.
Local
Hint
Resolve
nclose_subseteq
ndot_nclose
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment