Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
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
William Mansky
Iris
Commits
03eaffa3
Commit
03eaffa3
authored
2 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Make order in `si_logic` consistent: put `internal_eq` last.
parent
50b10db2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iris/si_logic/bi.v
+6
-5
6 additions, 5 deletions
iris/si_logic/bi.v
iris/si_logic/siprop.v
+32
-32
32 additions, 32 deletions
iris/si_logic/siprop.v
with
38 additions
and
37 deletions
iris/si_logic/bi.v
+
6
−
5
View file @
03eaffa3
...
...
@@ -202,9 +202,6 @@ Section restate.
Proof
.
by
rewrite
-
siprop
.
siProp_forall_unseal
.
Qed
.
Local
Lemma
siProp_exist_unseal
:
@
bi_exist
_
=
@
siprop
.
siProp_exist_def
.
Proof
.
by
rewrite
-
siprop
.
siProp_exist_unseal
.
Qed
.
Local
Lemma
siProp_internal_eq_unseal
:
@
internal_eq
_
_
=
@
siprop
.
siProp_internal_eq_def
.
Proof
.
by
rewrite
-
siprop
.
siProp_internal_eq_unseal
.
Qed
.
Local
Lemma
siProp_sep_unseal
:
bi_sep
=
@
siprop
.
siProp_and_def
.
Proof
.
by
rewrite
-
siprop
.
siProp_and_unseal
.
Qed
.
Local
Lemma
siProp_wand_unseal
:
bi_wand
=
@
siprop
.
siProp_impl_def
.
...
...
@@ -215,12 +212,16 @@ Section restate.
Proof
.
done
.
Qed
.
Local
Lemma
siProp_later_unseal
:
bi_later
=
@
siprop
.
siProp_later_def
.
Proof
.
by
rewrite
-
siprop
.
siProp_later_unseal
.
Qed
.
Local
Lemma
siProp_internal_eq_unseal
:
@
internal_eq
_
_
=
@
siprop
.
siProp_internal_eq_def
.
Proof
.
by
rewrite
-
siprop
.
siProp_internal_eq_unseal
.
Qed
.
Local
Definition
siProp_unseal
:=
(
siProp_emp_unseal
,
siProp_pure_unseal
,
siProp_and_unseal
,
siProp_or_unseal
,
siProp_impl_unseal
,
siProp_forall_unseal
,
siProp_exist_unseal
,
siProp_internal_eq_unseal
,
siProp_sep_unseal
,
siProp_wand_unseal
,
siProp_plainly_unseal
,
siProp_persistently_unseal
,
siProp_later_unseal
)
.
siProp_sep_unseal
,
siProp_wand_unseal
,
siProp_plainly_unseal
,
siProp_persistently_unseal
,
siProp_later_unseal
,
siProp_internal_eq_unseal
)
.
End
restate
.
(** The final unseal tactic that also unfolds the BI layer. *)
...
...
This diff is collapsed.
Click to expand it.
iris/si_logic/siprop.v
+
32
−
32
View file @
03eaffa3
...
...
@@ -103,14 +103,6 @@ Definition siProp_exist {A} := unseal siProp_exist_aux A.
Local
Definition
siProp_exist_unseal
:
@
siProp_exist
=
@
siProp_exist_def
:=
seal_eq
siProp_exist_aux
.
Local
Program
Definition
siProp_internal_eq_def
{
A
:
ofe
}
(
a1
a2
:
A
)
:
siProp
:=
{|
siProp_holds
n
:=
a1
≡
{
n
}
≡
a2
|}
.
Solve
Obligations
with
naive_solver
eauto
2
using
dist_le
.
Local
Definition
siProp_internal_eq_aux
:
seal
(
@
siProp_internal_eq_def
)
.
Proof
.
by
eexists
.
Qed
.
Definition
siProp_internal_eq
{
A
}
:=
unseal
siProp_internal_eq_aux
A
.
Local
Definition
siProp_internal_eq_unseal
:
@
siProp_internal_eq
=
@
siProp_internal_eq_def
:=
seal_eq
siProp_internal_eq_aux
.
Local
Program
Definition
siProp_later_def
(
P
:
siProp
)
:
siProp
:=
{|
siProp_holds
n
:=
match
n
return
_
with
0
=>
True
|
S
n'
=>
P
n'
end
|}
.
Next
Obligation
.
intros
P
[|
n1
]
[|
n2
];
eauto
using
siProp_closed
with
lia
.
Qed
.
...
...
@@ -119,6 +111,14 @@ Definition siProp_later := unseal siProp_later_aux.
Local
Definition
siProp_later_unseal
:
@
siProp_later
=
@
siProp_later_def
:=
seal_eq
siProp_later_aux
.
Local
Program
Definition
siProp_internal_eq_def
{
A
:
ofe
}
(
a1
a2
:
A
)
:
siProp
:=
{|
siProp_holds
n
:=
a1
≡
{
n
}
≡
a2
|}
.
Solve
Obligations
with
naive_solver
eauto
2
using
dist_le
.
Local
Definition
siProp_internal_eq_aux
:
seal
(
@
siProp_internal_eq_def
)
.
Proof
.
by
eexists
.
Qed
.
Definition
siProp_internal_eq
{
A
}
:=
unseal
siProp_internal_eq_aux
A
.
Local
Definition
siProp_internal_eq_unseal
:
@
siProp_internal_eq
=
@
siProp_internal_eq_def
:=
seal_eq
siProp_internal_eq_aux
.
(** Primitive logical rules.
These are not directly usable later because they do not refer to the BI
connectives. *)
...
...
@@ -126,7 +126,7 @@ Module siProp_primitive.
Local
Definition
siProp_unseal
:=
(
siProp_pure_unseal
,
siProp_and_unseal
,
siProp_or_unseal
,
siProp_impl_unseal
,
siProp_forall_unseal
,
siProp_exist_unseal
,
siProp_
in
ter
nal_eq
_unseal
,
siProp_
la
ter_unseal
)
.
siProp_
la
ter_unseal
,
siProp_
in
ter
nal_eq
_unseal
)
.
Ltac
unseal
:=
rewrite
!
siProp_unseal
/=.
Section
primitive
.
...
...
@@ -145,8 +145,8 @@ Section primitive.
(
siProp_forall
(
λ
x
,
.
.
(
siProp_forall
(
λ
y
,
P
%
I
))
..))
:
bi_scope
.
Notation
"∃ x .. y , P"
:=
(
siProp_exist
(
λ
x
,
.
.
(
siProp_exist
(
λ
y
,
P
%
I
))
..))
:
bi_scope
.
Notation
"x ≡ y"
:=
(
siProp_internal_eq
x
y
)
:
bi_scope
.
Notation
"▷ P"
:=
(
siProp_later
P
)
:
bi_scope
.
Notation
"x ≡ y"
:=
(
siProp_internal_eq
x
y
)
:
bi_scope
.
(** Below there follow the primitive laws for [siProp]. There are no derived laws
in this file. *)
...
...
@@ -257,28 +257,6 @@ Section primitive.
Lemma
exist_elim
{
A
}
(
Φ
:
A
→
siProp
)
Q
:
(
∀
a
,
Φ
a
⊢
Q
)
→
(
∃
a
,
Φ
a
)
⊢
Q
.
Proof
.
unseal
;
intros
HΨ
;
split
=>
n
[
a
?];
by
apply
HΨ
with
a
.
Qed
.
(** Equality *)
Lemma
internal_eq_refl
{
A
:
ofe
}
P
(
a
:
A
)
:
P
⊢
(
a
≡
a
)
.
Proof
.
unseal
;
by
split
=>
n
?
/=.
Qed
.
Lemma
internal_eq_rewrite
{
A
:
ofe
}
a
b
(
Ψ
:
A
→
siProp
)
:
NonExpansive
Ψ
→
a
≡
b
⊢
Ψ
a
→
Ψ
b
.
Proof
.
intros
Hnonexp
.
unseal
;
split
=>
n
Hab
n'
?
HΨ
.
eapply
Hnonexp
with
n
a
;
auto
.
Qed
.
Lemma
fun_ext
{
A
}
{
B
:
A
→
ofe
}
(
f
g
:
discrete_fun
B
)
:
(
∀
x
,
f
x
≡
g
x
)
⊢
f
≡
g
.
Proof
.
by
unseal
.
Qed
.
Lemma
sig_eq
{
A
:
ofe
}
(
P
:
A
→
Prop
)
(
x
y
:
sig
P
)
:
`
x
≡
`
y
⊢
x
≡
y
.
Proof
.
by
unseal
.
Qed
.
Lemma
discrete_eq_1
{
A
:
ofe
}
(
a
b
:
A
)
:
Discrete
a
→
a
≡
b
⊢
⌜
a
≡
b
⌝.
Proof
.
unseal
=>
?
.
split
=>
n
.
by
apply
(
discrete_iff
n
)
.
Qed
.
Lemma
prop_ext_2
P
Q
:
((
P
→
Q
)
∧
(
Q
→
P
))
⊢
P
≡
Q
.
Proof
.
unseal
;
split
=>
n
/=
HPQ
.
split
=>
n'
?
.
move
:
HPQ
=>
[]
/
(_
n'
)
?
/
(_
n'
)
.
naive_solver
.
Qed
.
(** Later *)
Lemma
later_eq_1
{
A
:
ofe
}
(
x
y
:
A
)
:
Next
x
≡
Next
y
⊢
▷
(
x
≡
y
)
.
Proof
.
...
...
@@ -307,6 +285,28 @@ Section primitive.
intros
[|
n'
]
?;
eauto
using
siProp_closed
with
lia
.
Qed
.
(** Equality *)
Lemma
internal_eq_refl
{
A
:
ofe
}
P
(
a
:
A
)
:
P
⊢
(
a
≡
a
)
.
Proof
.
unseal
;
by
split
=>
n
?
/=.
Qed
.
Lemma
internal_eq_rewrite
{
A
:
ofe
}
a
b
(
Ψ
:
A
→
siProp
)
:
NonExpansive
Ψ
→
a
≡
b
⊢
Ψ
a
→
Ψ
b
.
Proof
.
intros
Hnonexp
.
unseal
;
split
=>
n
Hab
n'
?
HΨ
.
eapply
Hnonexp
with
n
a
;
auto
.
Qed
.
Lemma
fun_ext
{
A
}
{
B
:
A
→
ofe
}
(
f
g
:
discrete_fun
B
)
:
(
∀
x
,
f
x
≡
g
x
)
⊢
f
≡
g
.
Proof
.
by
unseal
.
Qed
.
Lemma
sig_eq
{
A
:
ofe
}
(
P
:
A
→
Prop
)
(
x
y
:
sig
P
)
:
`
x
≡
`
y
⊢
x
≡
y
.
Proof
.
by
unseal
.
Qed
.
Lemma
discrete_eq_1
{
A
:
ofe
}
(
a
b
:
A
)
:
Discrete
a
→
a
≡
b
⊢
⌜
a
≡
b
⌝.
Proof
.
unseal
=>
?
.
split
=>
n
.
by
apply
(
discrete_iff
n
)
.
Qed
.
Lemma
prop_ext_2
P
Q
:
((
P
→
Q
)
∧
(
Q
→
P
))
⊢
P
≡
Q
.
Proof
.
unseal
;
split
=>
n
/=
HPQ
.
split
=>
n'
?
.
move
:
HPQ
=>
[]
/
(_
n'
)
?
/
(_
n'
)
.
naive_solver
.
Qed
.
(** Consistency/soundness statement *)
Lemma
pure_soundness
φ
:
(
True
⊢
⌜
φ
⌝
)
→
φ
.
Proof
.
unseal
=>
-
[
H
]
.
by
apply
(
H
0
)
.
Qed
.
...
...
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