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
3e72f509
Commit
3e72f509
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Iris namespaces.
parent
a89818de
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
iris/namespace.v
+33
-0
33 additions, 0 deletions
iris/namespace.v
with
33 additions
and
0 deletions
iris/namespace.v
0 → 100644
+
33
−
0
View file @
3e72f509
Require
Export
modures
.
base
prelude
.
countable
prelude
.
co_pset
.
Definition
namespace
:=
list
positive
.
Definition
nnil
:
namespace
:=
nil
.
Definition
ndot
`{
Countable
A
}
(
I
:
namespace
)
(
x
:
A
)
:
namespace
:=
encode
x
::
I
.
Definition
nclose
(
I
:
namespace
)
:
coPset
:=
coPset_suffixes
(
encode
I
)
.
Instance
ndot_injective
`{
Countable
A
}
:
Injective2
(
=
)
(
=
)
(
=
)
(
@
ndot
A
_
_)
.
Proof
.
by
intros
I1
x1
I2
x2
?;
simplify_equality
.
Qed
.
Lemma
nclose_nnil
:
nclose
nnil
=
coPset_all
.
Proof
.
by
apply
(
sig_eq_pi
_)
.
Qed
.
Lemma
encode_nclose
I
:
encode
I
∈
nclose
I
.
Proof
.
by
apply
elem_coPset_suffixes
;
exists
xH
;
rewrite
(
left_id_L
_
_)
.
Qed
.
Lemma
nclose_subseteq
`{
Countable
A
}
I
x
:
nclose
(
ndot
I
x
)
⊆
nclose
I
.
Proof
.
intros
p
;
rewrite
/
nclose
!
elem_coPset_suffixes
;
intros
[
q
->
]
.
destruct
(
list_encode_suffix
I
(
ndot
I
x
))
as
[
q'
?];
[
by
exists
[
encode
x
]|]
.
by
exists
(
q
++
q'
)
%
positive
;
rewrite
<-
(
associative_L
_);
f_equal
.
Qed
.
Lemma
ndot_nclose
`{
Countable
A
}
I
x
:
encode
(
ndot
I
x
)
∈
nclose
I
.
Proof
.
apply
nclose_subseteq
with
x
,
encode_nclose
.
Qed
.
Lemma
nclose_disjoint
`{
Countable
A
}
I
(
x
y
:
A
)
:
x
≠
y
→
nclose
(
ndot
I
x
)
∩
nclose
(
ndot
I
y
)
=
∅.
Proof
.
intros
Hxy
;
apply
elem_of_equiv_empty_L
=>
p
;
unfold
nclose
,
ndot
.
rewrite
elem_of_intersection
!
elem_coPset_suffixes
;
intros
[[
q
->
]
[
q'
Hq
]]
.
apply
Hxy
,
(
injective
encode
),
(
injective
encode_nat
);
revert
Hq
.
rewrite
!
(
list_encode_cons
(
encode
_))
.
rewrite
!
(
associative_L
_)
(
injective_iff
(
++
_)
%
positive
)
/=.
generalize
(
encode_nat
(
encode
y
))
.
induction
(
encode_nat
(
encode
x
));
intros
[|?]
?;
f_equal'
;
naive_solver
.
Qed
.
\ No newline at end of file
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