Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tej Chajed
iris
Commits
0505dc66
Commit
0505dc66
authored
Feb 08, 2018
by
Robbert Krebbers
Browse files
Typeclass based conditional `TCIf P Q R` that does not backtrack on `P`.
parent
680e10eb
Changes
1
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
15 additions
and
0 deletions
+15
0
theories/proofmode/class_instances.v
theories/proofmode/class_instances.v
+15
0
No files found.
theories/proofmode/class_instances.v
View file @
0505dc66
...
...
@@ 5,6 +5,21 @@ From iris.base_logic Require Import big_op tactics.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
(* FIXME: Move to stdpp *)
(* A conditional at the type class level. Note that [TCIf P Q R] is not the same
as [TCOr (TCAnd P Q) R]: the latter will backtrack to [R] if it fails to
establish [R], i.e. does not have the behavior of a conditional. Furthermore,
note that [TCOr (TCAnd P Q) (TCAnd (TCNot P) R)] would not work; we generally
would not be able to proof the negation of [P]. *)
Inductive
TCIf
(
P
Q
R
:
Prop
)
:
=

TCIf_true
:
P
→
Q
→
TCIf
P
Q
R

TCIf_false
:
R
→
TCIf
P
Q
R
.
Existing
Class
TCIf
.
Hint
Extern
0
(
TCIf
_
_
_
)
=>
first
[
apply
TCIf_true
;
[
apply
_
]

apply
TCIf_false
]
:
typeclass_instances
.
Section
classes
.
Context
{
M
:
ucmraT
}.
Implicit
Types
P
Q
R
:
uPred
M
.
...
...
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