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
1f545953
Commit
1f545953
authored
11 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add "as ident(H)" to the "case_bool_decide" tactic.
parent
7f96ed53
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/decidable.v
+7
-3
7 additions, 3 deletions
theories/decidable.v
with
7 additions
and
3 deletions
theories/decidable.v
+
7
−
3
View file @
1f545953
...
...
@@ -75,6 +75,8 @@ Notation cast_if_and S1 S2 := (if S1 then cast_if S2 else right _).
Notation
cast_if_and3
S1
S2
S3
:=
(
if
S1
then
cast_if_and
S2
S3
else
right
_)
.
Notation
cast_if_and4
S1
S2
S3
S4
:=
(
if
S1
then
cast_if_and3
S2
S3
S4
else
right
_)
.
Notation
cast_if_and5
S1
S2
S3
S4
S5
:=
(
if
S1
then
cast_if_and4
S2
S3
S4
S5
else
right
_)
.
Notation
cast_if_or
S1
S2
:=
(
if
S1
then
left
_
else
cast_if
S2
)
.
Notation
cast_if_or3
S1
S2
S3
:=
(
if
S1
then
left
_
else
cast_if_or
S2
S3
)
.
Notation
cast_if_not_or
S1
S2
:=
(
if
S1
then
cast_if
S2
else
left
_)
.
...
...
@@ -87,13 +89,15 @@ Definition bool_decide (P : Prop) {dec : Decision P} : bool :=
Lemma
bool_decide_reflect
P
`{
dec
:
Decision
P
}
:
reflect
P
(
bool_decide
P
)
.
Proof
.
unfold
bool_decide
.
destruct
dec
.
by
left
.
by
right
.
Qed
.
Ltac
case_bool_decide
:=
Tactic
Notation
"case_bool_decide"
"as"
ident
(
Hd
)
:=
match
goal
with
|
H
:
context
[
@
bool_decide
?P
?dec
]
|
-
_
=>
destruct_decide
(
@
bool_decide_reflect
P
dec
)
destruct_decide
(
@
bool_decide_reflect
P
dec
)
as
Hd
|
|
-
context
[
@
bool_decide
?P
?dec
]
=>
destruct_decide
(
@
bool_decide_reflect
P
dec
)
destruct_decide
(
@
bool_decide_reflect
P
dec
)
as
Hd
end
.
Tactic
Notation
"case_bool_decide"
:=
let
H
:=
fresh
in
case_bool_decide
as
H
.
Lemma
bool_decide_unpack
(
P
:
Prop
)
{
dec
:
Decision
P
}
:
bool_decide
P
→
P
.
Proof
.
unfold
bool_decide
.
by
destruct
dec
.
Qed
.
...
...
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