Skip to content

Commit 36f956e

Browse files
committed
IndProp: fix minor formatting issues
1 parent 8497604 commit 36f956e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/IndProp.lidr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,18 @@ When checking argument n to IndType.Wrong_ev:
104104
Nat (Expected type)
105105
```
106106

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}}
109109

110110
("Parameter" here is Idris jargon for an argument on the left of the colon in an
111111
Inductive definition; "index" is used to refer to arguments on the right of the
112112
colon.)
113113

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...
119119

120120
> ev_4 : Ev 4
121121
> 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
10131013
an explicit equality:
10141014

10151015
```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),
10171017
s1 =~ re' ->
10181018
re' = Star re ->
10191019
s2 =~ Star re ->
@@ -1035,7 +1035,7 @@ context. Here's how we can use it to show the above result:
10351035
```coq
10361036
Abort.
10371037

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),
10391039
s1 =~ Star re ->
10401040
s2 =~ Star re ->
10411041
s1 ++ s2 =~ Star re.
@@ -1075,7 +1075,7 @@ Star re', which results from the equality generated by remember.
10751075

10761076
- (* MStarApp *)
10771077
inversion Heqre'. rewrite H0 in IH2, Hmatch1.
1078-
intros s2 H1. rewrite app_assoc.
1078+
intros s2 H1. rewrite <- app_assoc.
10791079
apply MStarApp.
10801080
+ apply Hmatch1.
10811081
+ apply IH2.
@@ -1266,8 +1266,8 @@ the second).
12661266
> beq_natP : Reflect (n = m) (beq_nat n m)
12671267
> beq_natP {n} {m} = iff_reflect $ iff_sym $ beq_nat_true_iff n m
12681268

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}}
12711271

12721272
The new proof of \idr{filter_not_empty_In} now goes as follows. Notice how the
12731273
calls to destruct and apply are combined into a single call to destruct.

0 commit comments

Comments
 (0)