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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Simon Gregersen
stdpp
Commits
b130764f
Commit
b130764f
authored
5 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Set `Hint Mode` for logical `TCX` type classes.
parent
f70ecc5c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
theories/base.v
+16
-0
16 additions, 0 deletions
theories/base.v
with
18 additions
and
0 deletions
CHANGELOG.md
+
2
−
0
View file @
b130764f
...
@@ -28,6 +28,8 @@ API-breaking change is listed.
...
@@ -28,6 +28,8 @@ API-breaking change is listed.
`destruct_or`
now handles
`False`
while
`destruct_and`
handles
`True`
,
`destruct_or`
now handles
`False`
while
`destruct_and`
handles
`True`
,
as the respective units of disjunction and conjunction.
as the respective units of disjunction and conjunction.
-
Add tactic
`set_unfold in H`
.
-
Add tactic
`set_unfold in H`
.
-
Set
`Hint Mode`
for
`TCAnd`
,
`TCOr`
,
`TCForall`
,
`TCForall2`
,
`TCElemOf`
,
`TCEq`
, and
`TCDiag`
.
## std++ 1.2.1 (released 2019-08-29)
## std++ 1.2.1 (released 2019-08-29)
...
...
This diff is collapsed.
Click to expand it.
theories/base.v
+
16
−
0
View file @
b130764f
...
@@ -106,10 +106,12 @@ Inductive TCOr (P1 P2 : Prop) : Prop :=
...
@@ -106,10 +106,12 @@ Inductive TCOr (P1 P2 : Prop) : Prop :=
Existing
Class
TCOr
.
Existing
Class
TCOr
.
Existing
Instance
TCOr_l
|
9
.
Existing
Instance
TCOr_l
|
9
.
Existing
Instance
TCOr_r
|
10
.
Existing
Instance
TCOr_r
|
10
.
Hint
Mode
TCOr
!
!
:
typeclass_instances
.
Inductive
TCAnd
(
P1
P2
:
Prop
)
:
Prop
:=
TCAnd_intro
:
P1
→
P2
→
TCAnd
P1
P2
.
Inductive
TCAnd
(
P1
P2
:
Prop
)
:
Prop
:=
TCAnd_intro
:
P1
→
P2
→
TCAnd
P1
P2
.
Existing
Class
TCAnd
.
Existing
Class
TCAnd
.
Existing
Instance
TCAnd_intro
.
Existing
Instance
TCAnd_intro
.
Hint
Mode
TCAnd
!
!
:
typeclass_instances
.
Inductive
TCTrue
:
Prop
:=
TCTrue_intro
:
TCTrue
.
Inductive
TCTrue
:
Prop
:=
TCTrue_intro
:
TCTrue
.
Existing
Class
TCTrue
.
Existing
Class
TCTrue
.
...
@@ -121,7 +123,11 @@ Inductive TCForall {A} (P : A → Prop) : list A → Prop :=
...
@@ -121,7 +123,11 @@ Inductive TCForall {A} (P : A → Prop) : list A → Prop :=
Existing
Class
TCForall
.
Existing
Class
TCForall
.
Existing
Instance
TCForall_nil
.
Existing
Instance
TCForall_nil
.
Existing
Instance
TCForall_cons
.
Existing
Instance
TCForall_cons
.
Hint
Mode
TCForall
!
!
!
:
typeclass_instances
.
(** The class [TCForall2 P l k] is commonly used to transform an input list [l]
into an output list [k], or the converse. Therefore there are two modes, either
[l] input and [k] output, or [k] input and [l] input. *)
Inductive
TCForall2
{
A
B
}
(
P
:
A
→
B
→
Prop
)
:
list
A
→
list
B
→
Prop
:=
Inductive
TCForall2
{
A
B
}
(
P
:
A
→
B
→
Prop
)
:
list
A
→
list
B
→
Prop
:=
|
TCForall2_nil
:
TCForall2
P
[]
[]
|
TCForall2_nil
:
TCForall2
P
[]
[]
|
TCForall2_cons
x
y
xs
ys
:
|
TCForall2_cons
x
y
xs
ys
:
...
@@ -129,6 +135,8 @@ Inductive TCForall2 {A B} (P : A → B → Prop) : list A → list B → Prop :=
...
@@ -129,6 +135,8 @@ Inductive TCForall2 {A B} (P : A → B → Prop) : list A → list B → Prop :=
Existing
Class
TCForall2
.
Existing
Class
TCForall2
.
Existing
Instance
TCForall2_nil
.
Existing
Instance
TCForall2_nil
.
Existing
Instance
TCForall2_cons
.
Existing
Instance
TCForall2_cons
.
Hint
Mode
TCForall2
!
!
!
!
-
:
typeclass_instances
.
Hint
Mode
TCForall2
!
!
!
-
!
:
typeclass_instances
.
Inductive
TCElemOf
{
A
}
(
x
:
A
)
:
list
A
→
Prop
:=
Inductive
TCElemOf
{
A
}
(
x
:
A
)
:
list
A
→
Prop
:=
|
TCElemOf_here
xs
:
TCElemOf
x
(
x
::
xs
)
|
TCElemOf_here
xs
:
TCElemOf
x
(
x
::
xs
)
...
@@ -136,15 +144,23 @@ Inductive TCElemOf {A} (x : A) : list A → Prop :=
...
@@ -136,15 +144,23 @@ Inductive TCElemOf {A} (x : A) : list A → Prop :=
Existing
Class
TCElemOf
.
Existing
Class
TCElemOf
.
Existing
Instance
TCElemOf_here
.
Existing
Instance
TCElemOf_here
.
Existing
Instance
TCElemOf_further
.
Existing
Instance
TCElemOf_further
.
Hint
Mode
TCElemOf
!
!
!
:
typeclass_instances
.
(** Similarly to [TCForall2], we declare the modes of [TCEq x y] in both
directions, i.e., either [x] input and [y] output, or [y] input and [x]
output. *)
Inductive
TCEq
{
A
}
(
x
:
A
)
:
A
→
Prop
:=
TCEq_refl
:
TCEq
x
x
.
Inductive
TCEq
{
A
}
(
x
:
A
)
:
A
→
Prop
:=
TCEq_refl
:
TCEq
x
x
.
Existing
Class
TCEq
.
Existing
Class
TCEq
.
Existing
Instance
TCEq_refl
.
Existing
Instance
TCEq_refl
.
Hint
Mode
TCEq
!
!
-
:
typeclass_instances
.
Hint
Mode
TCEq
!
-
!
:
typeclass_instances
.
Inductive
TCDiag
{
A
}
(
C
:
A
→
Prop
)
:
A
→
A
→
Prop
:=
Inductive
TCDiag
{
A
}
(
C
:
A
→
Prop
)
:
A
→
A
→
Prop
:=
|
TCDiag_diag
x
:
C
x
→
TCDiag
C
x
x
.
|
TCDiag_diag
x
:
C
x
→
TCDiag
C
x
x
.
Existing
Class
TCDiag
.
Existing
Class
TCDiag
.
Existing
Instance
TCDiag_diag
.
Existing
Instance
TCDiag_diag
.
Hint
Mode
TCDiag
!
!
!
-
:
typeclass_instances
.
Hint
Mode
TCDiag
!
!
-
!
:
typeclass_instances
.
(** Given a proposition [P] that is a type class, [tc_to_bool P] will return
(** Given a proposition [P] that is a type class, [tc_to_bool P] will return
[true] iff there is an instance of [P]. It is often useful in Ltac programming,
[true] iff there is an instance of [P]. It is often useful in Ltac programming,
...
...
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