Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
Model registry
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
Iris
stdpp
Commits
e6b5e0c9
There was a problem fetching the pipeline metadata.
Commit
e6b5e0c9
authored
7 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add non backtracking `TCIf` type class.
parent
0c5d54ab
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/base.v
+14
-0
14 additions, 0 deletions
theories/base.v
with
14 additions
and
0 deletions
theories/base.v
+
14
−
0
View file @
e6b5e0c9
...
...
@@ -62,6 +62,20 @@ of this type class. *)
Class
NoBackTrack
(
P
:
Prop
)
:=
{
no_backtrack
:
P
}
.
Hint
Extern
0
(
NoBackTrack
_)
=>
constructor
;
apply
_
:
typeclass_instances
.
(* 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
.
(** * Typeclass opaque definitions *)
(** The constant [tc_opaque] is used to make definitions opaque for just type
class search. Note that [simpl] is set up to always unfold [tc_opaque]. *)
...
...
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