@@ -74,15 +74,15 @@ module Lists where
74
74
hiding (downFrom; Tree; leaf; node; merge)
75
75
```
76
76
77
- #### Exercise ` reverse-++-distrib ` (practice) ( recommended)
77
+ #### Exercise ` reverse-++-distrib ` (recommended)
78
78
79
79
Show that the reverse of one list appended to another is the
80
80
reverse of the second appended to the reverse of the first:
81
81
82
82
reverse (xs ++ ys) ≡ reverse ys ++ reverse xs
83
83
84
84
85
- #### Exercise ` reverse-involutive ` (practice) ( recommended)
85
+ #### Exercise ` reverse-involutive ` (recommended)
86
86
87
87
A function is an _ involution_ if when applied twice it acts
88
88
as the identity function. Show that reverse is an involution:
@@ -129,7 +129,7 @@ Define a suitable map operator over trees:
129
129
-- Your code goes here
130
130
```
131
131
132
- #### Exercise ` product ` (practice) (was recommended)
132
+ #### Exercise ` product ` (recommended)
133
133
134
134
Use fold to define a function to find the product of a list of numbers.
135
135
For example:
@@ -140,7 +140,7 @@ For example:
140
140
-- Your code goes here
141
141
```
142
142
143
- #### Exercise ` foldr-++ ` (practice) (was recommended)
143
+ #### Exercise ` foldr-++ ` (recommended)
144
144
145
145
Show that fold and append are related as follows:
146
146
@@ -196,7 +196,7 @@ Demonstrate an analogue of `map-is-foldr` for the type of trees.
196
196
-- Your code goes here
197
197
```
198
198
199
- #### Exercise ` sum-downFrom ` (practice) (was stretch)
199
+ #### Exercise ` sum-downFrom ` (stretch)
200
200
201
201
Define a function that counts down as follows:
202
202
``` agda
@@ -241,7 +241,7 @@ Show that if `_⊗_` and `e` form a monoid, then `foldr _⊗_ e` and
241
241
```
242
242
243
243
244
- #### Exercise ` Any-++-⇔ ` (practice) (was recommended)
244
+ #### Exercise ` Any-++-⇔ ` (recommended)
245
245
246
246
Prove a result similar to ` All-++-⇔ ` , but with ` Any ` in place of ` All ` , and a suitable
247
247
replacement for ` _×_ ` . As a consequence, demonstrate an equivalence relating
@@ -251,15 +251,15 @@ replacement for `_×_`. As a consequence, demonstrate an equivalence relating
251
251
-- Your code goes here
252
252
```
253
253
254
- #### Exercise ` All-++-≃ ` (practice) (was stretch)
254
+ #### Exercise ` All-++-≃ ` (stretch)
255
255
256
256
Show that the equivalence ` All-++-⇔ ` can be extended to an isomorphism.
257
257
258
258
``` agda
259
259
-- Your code goes here
260
260
```
261
261
262
- #### Exercise ` ¬Any⇔All¬ ` (practice) (was recommended)
262
+ #### Exercise ` ¬Any⇔All¬ ` (recommended)
263
263
264
264
Show that ` Any ` and ` All ` satisfy a version of De Morgan's Law:
265
265
@@ -280,7 +280,7 @@ If so, prove; if not, explain why.
280
280
-- Your code goes here
281
281
```
282
282
283
- #### Exercise ` ¬Any≃All¬ ` (practice) (was stretch)
283
+ #### Exercise ` ¬Any≃All¬ ` (stretch)
284
284
285
285
Show that the equivalence ` ¬Any⇔All¬ ` can be extended to an isomorphism.
286
286
You will need to use extensionality.
@@ -307,7 +307,7 @@ Show that `Any P xs` is isomorphic to `∃[ x ] (x ∈ xs × P x)`.
307
307
```
308
308
309
309
310
- #### Exercise ` Any? ` (practice) (was stretch)
310
+ #### Exercise ` Any? ` (stretch)
311
311
312
312
Just as ` All ` has analogues ` all ` and ` All? ` which determine whether a
313
313
predicate holds for every element of a list, so does ` Any ` have
@@ -319,7 +319,7 @@ for some element of a list. Give their definitions.
319
319
```
320
320
321
321
322
- #### Exercise ` split ` (practice) (was stretch)
322
+ #### Exercise ` split ` (stretch)
323
323
324
324
The relation ` merge ` holds when two lists merge to give a third list.
325
325
``` agda
@@ -382,8 +382,7 @@ module Lambda where
382
382
open import Data.String using (String; _≟_)
383
383
open import Data.Unit using (tt)
384
384
open import Relation.Nullary using (Dec; yes; no; ¬_)
385
- open import Relation.Nullary.Decidable using (False; toWitnessFalse)
386
- open import Relation.Nullary.Negation using (¬?)
385
+ open import Relation.Nullary.Decidable using (False; toWitnessFalse; ¬?)
387
386
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl)
388
387
```
389
388
0 commit comments