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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Simon Spies
stdpp
Commits
3db8e2f7
Commit
3db8e2f7
authored
Jun 30, 2019
by
Ralf Jung
Committed by
Robbert
Jun 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add invserses of bool_decide_{true,false}
parent
3b8eed3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
theories/decidable.v
theories/decidable.v
+19
-4
No files found.
theories/decidable.v
View file @
3db8e2f7
...
@@ -112,14 +112,29 @@ Proof. rewrite bool_decide_spec; trivial. Qed.
...
@@ -112,14 +112,29 @@ Proof. rewrite bool_decide_spec; trivial. Qed.
Lemma
bool_decide_pack
(
P
:
Prop
)
{
dec
:
Decision
P
}
:
P
→
bool_decide
P
.
Lemma
bool_decide_pack
(
P
:
Prop
)
{
dec
:
Decision
P
}
:
P
→
bool_decide
P
.
Proof
.
rewrite
bool_decide_spec
;
trivial
.
Qed
.
Proof
.
rewrite
bool_decide_spec
;
trivial
.
Qed
.
Hint
Resolve
bool_decide_pack
:
core
.
Hint
Resolve
bool_decide_pack
:
core
.
Lemma
bool_decide_true
(
P
:
Prop
)
`
{
Decision
P
}
:
P
→
bool_decide
P
=
true
.
Proof
.
case_bool_decide
;
tauto
.
Qed
.
Lemma
bool_decide_eq_true
(
P
:
Prop
)
`
{
Decision
P
}
:
bool_decide
P
=
true
↔
P
.
Lemma
bool_decide_false
(
P
:
Prop
)
`
{
Decision
P
}
:
¬
P
→
bool_decide
P
=
false
.
Proof
.
case_bool_decide
;
intuition
discriminate
.
Qed
.
Proof
.
case_bool_decide
;
tauto
.
Qed
.
Lemma
bool_decide_eq_false
(
P
:
Prop
)
`
{
Decision
P
}
:
bool_decide
P
=
false
↔
¬
P
.
Proof
.
case_bool_decide
;
intuition
discriminate
.
Qed
.
Lemma
bool_decide_iff
(
P
Q
:
Prop
)
`
{
Decision
P
,
Decision
Q
}
:
Lemma
bool_decide_iff
(
P
Q
:
Prop
)
`
{
Decision
P
,
Decision
Q
}
:
(
P
↔
Q
)
→
bool_decide
P
=
bool_decide
Q
.
(
P
↔
Q
)
→
bool_decide
P
=
bool_decide
Q
.
Proof
.
repeat
case_bool_decide
;
tauto
.
Qed
.
Proof
.
repeat
case_bool_decide
;
tauto
.
Qed
.
Lemma
bool_decide_eq_true_1
P
`
{!
Decision
P
}
:
bool_decide
P
=
true
→
P
.
Proof
.
apply
bool_decide_eq_true
.
Qed
.
Lemma
bool_decide_eq_true_2
P
`
{!
Decision
P
}
:
P
→
bool_decide
P
=
true
.
Proof
.
apply
bool_decide_eq_true
.
Qed
.
Lemma
bool_decide_eq_false_1
P
`
{!
Decision
P
}
:
bool_decide
P
=
false
→
¬
P
.
Proof
.
apply
bool_decide_eq_false
.
Qed
.
Lemma
bool_decide_eq_false_2
P
`
{!
Decision
P
}
:
¬
P
→
bool_decide
P
=
false
.
Proof
.
apply
bool_decide_eq_false
.
Qed
.
(** Backwards compatibility notations. *)
Notation
bool_decide_true
:
=
bool_decide_eq_true_2
.
Notation
bool_decide_false
:
=
bool_decide_eq_false_2
.
(** * Decidable Sigma types *)
(** * Decidable Sigma types *)
(** Leibniz equality on Sigma types requires the equipped proofs to be
(** Leibniz equality on Sigma types requires the equipped proofs to be
equal as Coq does not support proof irrelevance. For decidable we
equal as Coq does not support proof irrelevance. For decidable we
...
...
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