Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
transfinite
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
Iris
transfinite
Commits
48123f29
Commit
48123f29
authored
4 months ago
by
Simon Spies
Browse files
Options
Downloads
Patches
Plain Diff
derive some more rules
parent
11a85c86
No related branches found
No related tags found
No related merge requests found
Pipeline
#112129
passed
4 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/examples/refinements/derived.v
+34
-2
34 additions, 2 deletions
theories/examples/refinements/derived.v
with
34 additions
and
2 deletions
theories/examples/refinements/derived.v
+
34
−
2
View file @
48123f29
...
@@ -21,6 +21,29 @@ Section derived.
...
@@ -21,6 +21,29 @@ Section derived.
Notation
"'|==>src' P"
:=
(
weak_src_update
⊤
P
)
%
I
(
at
level
99
)
:
stdpp_scope
.
Notation
"'|==>src' P"
:=
(
weak_src_update
⊤
P
)
%
I
(
at
level
99
)
:
stdpp_scope
.
Lemma
Conseq
(
e
:
expr
)
P
P'
Q
Q'
:
(
P
⊢
P'
)
→
(
∀
v
,
Q'
v
⊢
Q
v
)
→
({{
P'
}}
e
{{
v
,
Q'
v
}}
⊢
{{
P
}}
e
{{
v
,
Q
v
}})
%
I
.
Proof
.
iIntros
(
He1
He2
)
"#Hh"
.
iModIntro
.
rewrite
He1
.
iIntros
"HP Hna"
.
iApply
(
rwp_wand
with
"(Hh HP Hna)"
)
.
iIntros
(
v
)
"[$ HQ]"
.
rewrite
He2
//.
Qed
.
Lemma
HoareExists
{
X
}
(
e
:
expr
)
P
Q
:
(
∀
x
,
{{
P
x
}}
e
{{
v
,
Q
v
}})
⊢
{{
∃
x
:
X
,
P
x
}}
e
{{
v
,
Q
v
}}
%
I
.
Proof
.
iIntros
"#H !>"
.
iDestruct
1
as
(
x
)
"HP"
.
iApply
(
"H"
with
"HP"
)
.
Qed
.
Lemma
HoarePure
(
e
:
expr
)
φ
P
Q
:
(
P
⊢
⌜
φ
⌝
)
→
(
⌜
φ
⌝
-∗
{{
P
}}
e
{{
v
,
Q
v
}})
⊢
{{
P
}}
e
{{
v
,
Q
v
}}
%
I
.
Proof
.
iIntros
(
Hent
)
"#H !> HP"
.
iDestruct
(
Hent
with
"HP"
)
as
%
Hent'
.
iApply
(
"H"
with
"[//] HP"
)
.
Qed
.
Lemma
Value
(
v
:
val
):
(
⊢
{{
True
}}
v
{{
w
,
⌜
v
=
w
⌝
}})
%
I
.
Lemma
Value
(
v
:
val
):
(
⊢
{{
True
}}
v
{{
w
,
⌜
v
=
w
⌝
}})
%
I
.
Proof
.
Proof
.
iIntros
"!> _ $"
.
by
iApply
rwp_value
.
iIntros
"!> _ $"
.
by
iApply
rwp_value
.
...
@@ -112,8 +135,8 @@ Section derived.
...
@@ -112,8 +135,8 @@ Section derived.
Qed
.
Qed
.
Lemma
HoareLöb
X
P
Q
e
:
Lemma
HoareLöb
X
P
Q
e
:
(
∀
x
:
X
,
{{
P
x
∗
▷
(
∀
x
,
{{
P
x
}}
e
{{
v
,
Q
x
v
}})}}
e
{{
v
,
Q
x
v
}})
(
∀
x
:
X
,
{{
P
x
∗
▷
(
∀
x
,
{{
P
x
}}
e
x
{{
v
,
Q
x
v
}})}}
e
x
{{
v
,
Q
x
v
}})
⊢
∀
x
,
{{
P
x
}}
e
{{
v
,
Q
x
v
}}
.
⊢
∀
x
,
{{
P
x
}}
e
x
{{
v
,
Q
x
v
}}
.
Proof
.
Proof
.
iIntros
"#H"
.
iApply
bi
.
löb
.
iIntros
"#H"
.
iApply
bi
.
löb
.
iIntros
"#H1"
(
x
)
.
iIntros
"#H1"
(
x
)
.
...
@@ -121,6 +144,15 @@ Section derived.
...
@@ -121,6 +144,15 @@ Section derived.
iFrame
"#"
.
iFrame
.
iFrame
"#"
.
iFrame
.
Qed
.
Qed
.
Lemma
HoareLöbNoArgs
P
Q
e
:
({{
P
∗
▷
({{
P
}}
e
{{
v
,
Q
v
}})}}
e
{{
v
,
Q
v
}})
⊢
{{
P
}}
e
{{
v
,
Q
v
}}
.
Proof
.
iIntros
"#H"
.
iApply
bi
.
löb
.
iIntros
"#H1"
.
iModIntro
.
iIntros
"HP"
.
iApply
"H"
.
iFrame
"#"
.
iFrame
.
Qed
.
(* Extended Refinement Program Logic of Transfinite Iris *)
(* Extended Refinement Program Logic of Transfinite Iris *)
Lemma
value_tgt_tpr
(
v
:
val
):
(
⊢
{{
True
}}
v
{{
w
,
⌜
v
=
w
⌝
}})
%
I
.
Lemma
value_tgt_tpr
(
v
:
val
):
(
⊢
{{
True
}}
v
{{
w
,
⌜
v
=
w
⌝
}})
%
I
.
...
...
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