File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1015,15 +1015,13 @@ Now suppose that we want to convince Idris of the (rather obvious) fact that
1015
1015
the proofs we did with \idr{sillyfun} above, it is natural to start the proof
1016
1016
like this:
1017
1017
1018
- \t odo[inline]{Make this \idr{total}, or at least describe why it's not in its
1019
- current implementation. Should we introduce \idr{Decidable.Equality} here?}
1020
-
1021
- > partial
1022
1018
> sillyfun1_odd : (n : Nat) -> sillyfun1 n = True -> oddb n = True
1023
- > sillyfun1_odd n prf with (beq_nat n 3)
1024
- > sillyfun1_odd (S (S (S Z))) Refl | True = Refl
1025
- > sillyfun1_odd n prf | False with (beq_nat n 5)
1026
- > sillyfun1_odd (S (S (S (S (S Z))))) Refl | False | True = Refl
1019
+ > sillyfun1_odd n prf with (beq_nat n 3) proof eq3
1020
+ > sillyfun1_odd n Refl | True =
1021
+ > rewrite beq_nat_true (sym eq3) {n} {m=3} in Refl
1022
+ > sillyfun1_odd n prf | False with (beq_nat n 5) proof eq5
1023
+ > sillyfun1_odd n Refl | False | True =
1024
+ > rewrite beq_nat_true (sym eq5) {n} {m=5} in Refl
1027
1025
> sillyfun1_odd n prf | False | False = absurd prf
1028
1026
1029
1027
\t odo[inline]{Edit the following, since \idr{with} works fine here as well}
You can’t perform that action at this time.
0 commit comments