@@ -104,18 +104,18 @@ When checking argument n to IndType.Wrong_ev:
104
104
Nat (Expected type)
105
105
`` `
106
106
107
- \ todo[inline]{Edit the explanation, it works fine if you remove the first ` n -> `
108
- in ` Wrong_ev_SS` }
107
+ \ todo[inline]{Edit the explanation, it works fine if you remove the first \ idr{ n -> }
108
+ in \ idr{ Wrong_ev_SS } }
109
109
110
110
(" Parameter" here is Idris jargon for an argument on the left of the colon in an
111
111
Inductive definition; " index" is used to refer to arguments on the right of the
112
112
colon. )
113
113
114
- We can think of the definition of \ idr{Ev } as defining a Idris property \ idr{ Ev
115
- : Nat -> Type }, together with theorems \ idr{Ev_0 : Ev Z} and \idr{ Ev_SS : n ->
116
- Ev n -> Ev (S (S n))}. Such "constructor theorems" have the same status as
117
- proven theorems. In particular, we can apply rule names as functions to each
118
- other to prove \ idr{Ev } for particular numbers...
114
+ We can think of the definition of \ idr{Ev } as defining a Idris property
115
+ \ idr{ Ev : Nat -> Type }, together with theorems \idr{Ev_0 : Ev Z} and
116
+ \ idr{ Ev_SS : n -> Ev n -> Ev (S (S n))}. Such "constructor theorems" have the
117
+ same status as proven theorems. In particular, we can apply rule names as
118
+ functions to each other to prove \ idr{Ev } for particular numbers...
119
119
120
120
> ev_4 : Ev 4
121
121
> ev_4 = Ev_SS {n= 2 } $ Ev_SS {n= 0 } Ev_0
@@ -1013,7 +1013,7 @@ We can solve this problem by generalizing over the problematic expressions with
1013
1013
an explicit equality:
1014
1014
1015
1015
```coq
1016
- Lemma star_app : ∀ T (s1 s2 : list T ) (re re' : Reg_exp T ),
1016
+ Lemma star_app : forall T (s1 s2 : list T ) (re re' : Reg_exp T ),
1017
1017
s1 =~ re' ->
1018
1018
re' = Star re ->
1019
1019
s2 =~ Star re ->
@@ -1035,7 +1035,7 @@ context. Here's how we can use it to show the above result:
1035
1035
```coq
1036
1036
Abort.
1037
1037
1038
- Lemma star_app : ∀ T (s1 s2 : list T ) (re : Reg_exp T ),
1038
+ Lemma star_app : forall T (s1 s2 : list T ) (re : Reg_exp T ),
1039
1039
s1 =~ Star re ->
1040
1040
s2 =~ Star re ->
1041
1041
s1 ++ s2 =~ Star re .
@@ -1075,7 +1075,7 @@ Star re', which results from the equality generated by remember.
1075
1075
1076
1076
- (* MStarApp *)
1077
1077
inversion Heqre' . rewrite H0 in IH2 , Hmatch1.
1078
- intros s2 H1. rewrite ← app_assoc.
1078
+ intros s2 H1. rewrite <- app_assoc.
1079
1079
apply MStarApp .
1080
1080
+ apply Hmatch1 .
1081
1081
+ apply IH2 .
@@ -1266,8 +1266,8 @@ the second).
1266
1266
> beq_natP : Reflect (n = m) (beq_nat n m)
1267
1267
> beq_natP {n} {m} = iff_reflect $ iff_sym $ beq_nat_true_iff n m
1268
1268
1269
- \todo[inline]{Edit - we basically trade the invocation of ` beq_nat_true` in
1270
- ` Left` for an indirect rewrite in ` Right` }
1269
+ \todo[inline]{Edit - we basically trade the invocation of \idr{ beq_nat_true} in
1270
+ \idr{ Left} for an indirect rewrite in \idr{ Right} }
1271
1271
1272
1272
The new proof of \idr{filter_not_empty_In} now goes as follows . Notice how the
1273
1273
calls to destruct and apply are combined into a single call to destruct.
0 commit comments