Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stdpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
stdpp
Commits
50b9555d
Commit
50b9555d
authored
Dec 19, 2016
by
Ralf Jung
Committed by
Robbert Krebbers
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add decide_left, decide_right
parent
cab3033b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
theories/decidable.v
theories/decidable.v
+5
-0
No files found.
theories/decidable.v
View file @
50b9555d
...
...
@@ -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
)
:
=
...
...
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