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
RefinedC
Commits
aa80dd32
Commit
aa80dd32
authored
Oct 18, 2021
by
Michael Sammler
Browse files
allow vm_compute_hint to return option
parent
7695877b
Pipeline
#55445
passed with stage
in 30 minutes and 24 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
theories/lithium/classes.v
View file @
aa80dd32
...
@@ -53,9 +53,8 @@ Typeclasses Opaque destruct_hint.
...
@@ -53,9 +53,8 @@ Typeclasses Opaque destruct_hint.
Arguments
destruct_hint
:
simpl
never
.
Arguments
destruct_hint
:
simpl
never
.
(** * [vm_compute_hint] *)
(** * [vm_compute_hint] *)
Definition
vm_compute_hint
{
A
B
C
}
(
f
:
A
→
B
)
(
x
:
A
)
(
T
:
B
→
C
)
:
C
:
=
Definition
vm_compute_hint
{
Σ
A
B
}
(
f
:
A
→
option
B
)
(
x
:
A
)
(
T
:
B
→
iProp
Σ
)
:
iProp
Σ
:
=
T
(
f
x
).
∃
y
,
⌜
f
x
=
Some
y
⌝
∗
T
y
.
Typeclasses
Opaque
vm_compute_hint
.
Arguments
vm_compute_hint
:
simpl
never
.
Arguments
vm_compute_hint
:
simpl
never
.
(** * [RelatedTo] *)
(** * [RelatedTo] *)
...
...
theories/lithium/infrastructure.v
View file @
aa80dd32
...
@@ -38,6 +38,10 @@ Class CheckOwnInContext {Σ} (P : iProp Σ) : Prop := { check_own_in_context : T
...
@@ -38,6 +38,10 @@ Class CheckOwnInContext {Σ} (P : iProp Σ) : Prop := { check_own_in_context : T
Class
FastDone
(
P
:
Prop
)
:
Prop
:
=
fast_done_proof
:
P
.
Class
FastDone
(
P
:
Prop
)
:
Prop
:
=
fast_done_proof
:
P
.
Global
Hint
Extern
1
(
FastDone
?P
)
=>
(
change
P
;
fast_done
)
:
typeclass_instances
.
Global
Hint
Extern
1
(
FastDone
?P
)
=>
(
change
P
;
fast_done
)
:
typeclass_instances
.
(** ** [TCDone] *)
Class
TCDone
(
P
:
Prop
)
:
Prop
:
=
done_proof
:
P
.
Global
Hint
Extern
1
(
TCDone
?P
)
=>
(
change
P
;
done
)
:
typeclass_instances
.
(** ** [CanSolve]
(** ** [CanSolve]
Requires the user to provide a general purpose [can_solve_tac] (see tactics.v)
Requires the user to provide a general purpose [can_solve_tac] (see tactics.v)
which should try hard to solve this goal. *)
which should try hard to solve this goal. *)
...
...
theories/lithium/interpreter.v
View file @
aa80dd32
...
@@ -28,11 +28,15 @@ Section coq_tactics.
...
@@ -28,11 +28,15 @@ Section coq_tactics.
(
P1
-
∗
P2
)
→
envs_entails
Δ
(
P1
∗
T
)
→
envs_entails
Δ
(
P2
∗
T
).
(
P1
-
∗
P2
)
→
envs_entails
Δ
(
P1
∗
T
)
→
envs_entails
Δ
(
P2
∗
T
).
Proof
.
by
rewrite
envs_entails_eq
=>
->
HP
.
Qed
.
Proof
.
by
rewrite
envs_entails_eq
=>
->
HP
.
Qed
.
Lemma
tac_vm_compute_hint
{
A
B
}
Δ
(
f
:
A
→
B
)
a
(
Q
:
B
→
iProp
Σ
)
x
:
Lemma
tac_vm_compute_hint
{
A
B
}
Δ
(
f
:
A
→
option
B
)
a
(
Q
:
B
→
iProp
Σ
)
x
:
(
∀
y
,
x
=
y
→
f
a
=
y
)
→
(
∀
y
,
Some
x
=
y
→
f
a
=
y
)
→
envs_entails
Δ
(
Q
x
)
→
envs_entails
Δ
(
Q
x
)
→
envs_entails
Δ
(
vm_compute_hint
f
a
Q
).
envs_entails
Δ
(
vm_compute_hint
f
a
Q
).
Proof
.
naive_solver
.
Qed
.
Proof
.
rewrite
envs_entails_eq
.
intros
?
HQ
.
etrans
;
[
done
|].
etrans
;
[
|
apply
:
bi
.
exist_intro
].
iIntros
"$ !%"
.
naive_solver
.
Qed
.
Lemma
tac_protected_eq_app
{
A
}
(
f
:
A
→
Prop
)
a
:
Lemma
tac_protected_eq_app
{
A
}
(
f
:
A
→
Prop
)
a
:
f
a
→
f
(
protected
a
).
f
a
→
f
(
protected
a
).
...
...
theories/lithium/simpl_instances.v
View file @
aa80dd32
...
@@ -82,6 +82,11 @@ Proof. destruct b; done. Qed.
...
@@ -82,6 +82,11 @@ Proof. destruct b; done. Qed.
Global
Instance
simpl_negb_false
b
:
SimplBothRel
(=)
(
negb
b
)
false
(
b
=
true
).
Global
Instance
simpl_negb_false
b
:
SimplBothRel
(=)
(
negb
b
)
false
(
b
=
true
).
Proof
.
destruct
b
;
done
.
Qed
.
Proof
.
destruct
b
;
done
.
Qed
.
Global
Instance
simpl_eqb_true
b1
b2
:
SimplBothRel
(=)
(
eqb
b1
b2
)
true
(
b1
=
b2
).
Proof
.
destruct
b1
,
b2
;
done
.
Qed
.
Global
Instance
simpl_eqb_false
b1
b2
:
SimplBothRel
(=)
(
eqb
b1
b2
)
false
(
b1
=
negb
b2
).
Proof
.
destruct
b1
,
b2
;
done
.
Qed
.
Global
Instance
simpl_min_glb_nat
n1
n2
m
:
SimplBoth
(
m
≤
n1
`
min
`
n2
)%
nat
(
m
≤
n1
∧
m
≤
n2
)%
nat
.
Global
Instance
simpl_min_glb_nat
n1
n2
m
:
SimplBoth
(
m
≤
n1
`
min
`
n2
)%
nat
(
m
≤
n1
∧
m
≤
n2
)%
nat
.
Proof
.
rewrite
/
SimplBoth
.
lia
.
Qed
.
Proof
.
rewrite
/
SimplBoth
.
lia
.
Qed
.
Global
Instance
simpl_min_glb
n1
n2
m
:
SimplBoth
(
m
≤
n1
`
min
`
n2
)
(
m
≤
n1
∧
m
≤
n2
).
Global
Instance
simpl_min_glb
n1
n2
m
:
SimplBoth
(
m
≤
n1
`
min
`
n2
)
(
m
≤
n1
∧
m
≤
n2
).
...
...
Write
Preview
Markdown
is supported
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