|
1 | 1 | = Logic : Logic in Idris
|
2 | 2 |
|
| 3 | +> module Logic |
| 4 | + |
3 | 5 | > import Basics
|
4 | 6 |
|
5 | 7 | > %hide Basics.Numbers.pred
|
@@ -210,6 +212,7 @@ $\square$
|
210 | 212 |
|
211 | 213 | === Disjunction
|
212 | 214 |
|
| 215 | +\todo[inline]{Make syntax synonyms for \idr{(,)} and \idr{Either}?} |
213 | 216 |
|
214 | 217 | Another important connective is the _disjunction_, or _logical or_ of two
|
215 | 218 | propositions: \idr{a `Either` b} is true when either \idr{a} or \idr{b} is. The
|
@@ -440,6 +443,8 @@ $\square$
|
440 | 443 |
|
441 | 444 | $\square$
|
442 | 445 |
|
| 446 | +\todo[inline]{Edit the rest of the section. What to do with Setoids? We could |
| 447 | +probably just use profunctors here} |
443 | 448 |
|
444 | 449 | Some of Idris's tactics treat iff statements specially, avoiding the need for
|
445 | 450 | some low-level proof-state manipulation. In particular, rewrite and reflexivity
|
@@ -829,6 +834,8 @@ However, we can add functional extensionality to Idris's core logic using the
|
829 | 834 | > functional_extensionality = really_believe_me
|
830 | 835 |
|
831 | 836 | Using \idr{really_believe_me} has the same effect as stating a theorem and
|
| 837 | +skipping its proof using a hole, but it alerts the reader (and type checker) |
| 838 | +that this isn't just something we're going to come back and fill in later! |
832 | 839 |
|
833 | 840 | We can now invoke functional extensionality in proofs:
|
834 | 841 |
|
@@ -1137,8 +1144,8 @@ the value of \idr{b}.
|
1137 | 1144 | \todo[inline]{Remove when a release with
|
1138 | 1145 | https://github.com/idris-lang/Idris-dev/pull/3925 happens}
|
1139 | 1146 |
|
1140 |
| - Uninhabited (False = True) where |
1141 |
| - uninhabited Refl impossible |
| 1147 | +> Uninhabited (False = True) where |
| 1148 | +> uninhabited Refl impossible |
1142 | 1149 |
|
1143 | 1150 | > restricted_excluded_middle : (p <-> b = True) -> p `Either` Not p
|
1144 | 1151 | > restricted_excluded_middle {b = True} (_, bp) = Left $ bp Refl
|
|
0 commit comments