-
Notifications
You must be signed in to change notification settings - Fork 247
Add proofs on truth value #2418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
03492f0
to
0ab729a
Compare
(I've simplified the proofs, but the statements remain unchanged) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the one name choice, this is great.
611898d
to
1785813
Compare
Adds a handful of properties that prove the truth value of a decidable: - `Relation.Nullary.Decidable`: - `does-≡`: decidables over the same type have the same truth value - `does-⇔`: generalization of `does-≡` to mutually implied types - `Relation.Unary.Properties`: - `≐?`: generalization of `Decidable.map` to predicates (if two predicates are equivalent, one is decidable if the other is) - `does-≡`: generalization of `does-≡` to predicates - `does-≐`: generalization of `does-⇔` to predicates
Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
1785813
to
f4b88e3
Compare
@JacquesCarette are you willing to approve now? |
does-≡ : (a? b? : Dec A) → does a? ≡ does b? | ||
``` | ||
|
||
* In `Relation.Nullary.Properties`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We missed this (copy/paste error?) during review: should be Relation.Unary.Properties
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice spot! Any chance of a quick PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds a handful of "congruence" proofs on the truth value of a decidable, and also
≐?
:Relation.Nullary.Decidable
:does-≡
: decidables over the same type have the same truth valuedoes-⇔
: generalization ofdoes-≡
to mutually implied typesRelation.Unary.Properties
:≐?
: generalization ofDecidable.map
to predicates (if two predicates are equivalent, one is decidable if the other is)does-≡
: generalization ofdoes-≡
to predicatesdoes-≐
: generalization ofdoes-⇔
to predicatesUsing these, together with the definitions in
Decidable.Core
, one can prove the effect of type operations on truth value. For example, proving thatDec (¬ A)
andDec A
have negated truth values can be done asdoes-≡ ¬a? (¬? a?)
. Same with×
/∧
and⊎
/∨
.