Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
Model registry
Operate
Environments
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
Michael Sammler
iris-coq
Commits
1c9e8581
Commit
1c9e8581
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add decide_left, decide_right
parent
2e3a9be0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/prelude/decidable.v
+5
-0
5 additions, 0 deletions
theories/prelude/decidable.v
with
5 additions
and
0 deletions
theories/prelude/decidable.v
+
5
−
0
View file @
1c9e8581
...
...
@@ -36,6 +36,11 @@ Lemma decide_iff {A} P Q `{Decision P, Decision Q} (x y : A) :
(
P
↔
Q
)
→
(
if
decide
P
then
x
else
y
)
=
(
if
decide
Q
then
x
else
y
)
.
Proof
.
intros
[??]
.
destruct
(
decide
P
),
(
decide
Q
);
tauto
.
Qed
.
Lemma
decide_left
`{
Decision
P
,
!
ProofIrrel
P
}
(
HP
:
P
)
:
decide
P
=
left
HP
.
Proof
.
destruct
(
decide
P
)
as
[?|?];
[|
contradiction
]
.
f_equal
.
apply
proof_irrel
.
Qed
.
Lemma
decide_right
`{
Decision
P
}
`{
!
ProofIrrel
(
¬
P
)}
(
HP
:
¬
P
)
:
decide
P
=
right
HP
.
Proof
.
destruct
(
decide
P
)
as
[?|?];
[
contradiction
|]
.
f_equal
.
apply
proof_irrel
.
Qed
.
(** The tactic [destruct_decide] destructs a sumbool [dec]. If one of the
components is double negated, it will try to remove the double negation. *)
Tactic
Notation
"destruct_decide"
constr
(
dec
)
"as"
ident
(
H
)
:=
...
...
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