Skip to content

Commit 5b3184c

Browse files
authored
Fix use of headers (#1162)
1 parent 5c5fbe6 commit 5b3184c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1462
-1458
lines changed

.markdownlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
default: true
2-
MD001: false
32
MD004: false
43
MD007: false
54
MD012: false
65
MD013: false
76
MD022: false
87
MD024: false
8+
MD025: false
99
MD030: false
1010
MD032: false
1111
MD033: false

courses/TSPL/2019/Assignment1.lagda.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ permalink : /TSPL/2019/Assignment1/
77
module Assignment1 where
88
```
99

10-
## YOUR NAME AND EMAIL GOES HERE
10+
# YOUR NAME AND EMAIL GOES HERE
1111

12-
## Introduction
12+
# Introduction
1313

1414
You must do _all_ the exercises labelled "(recommended)".
1515

@@ -28,7 +28,7 @@ Please ensure your files execute correctly under Agda!
2828

2929

3030

31-
## Good Scholarly Practice.
31+
# Good Scholarly Practice.
3232

3333
Please remember the University requirement as
3434
regards all assessed work. Details about this can be found at:
@@ -43,7 +43,7 @@ yourself, or your group in the case of group practicals).
4343

4444

4545

46-
## Imports
46+
# Imports
4747

4848
```agda
4949
import Relation.Binary.PropositionalEquality as Eq
@@ -55,24 +55,24 @@ open import Data.Nat.Properties using (+-assoc; +-identityʳ; +-suc; +-comm;
5555
open import plfa.part1.Relations using (_<_; z<s; s<s; zero; suc; even; odd)
5656
```
5757

58-
## Naturals
58+
# Naturals
5959

60-
#### Exercise `seven` (practice) {#seven}
60+
### Exercise `seven` (practice) {#seven}
6161

6262
Write out `7` in longhand.
6363

6464

65-
#### Exercise `+-example` (practice) {#plus-example}
65+
### Exercise `+-example` (practice) {#plus-example}
6666

6767
Compute `3 + 4`, writing out your reasoning as a chain of equations.
6868

6969

70-
#### Exercise `*-example` (practice) {#times-example}
70+
### Exercise `*-example` (practice) {#times-example}
7171

7272
Compute `3 * 4`, writing out your reasoning as a chain of equations.
7373

7474

75-
#### Exercise `_^_` (recommended) {#power}
75+
### Exercise `_^_` (recommended) {#power}
7676

7777
Define exponentiation, which is given by the following equations.
7878

@@ -82,12 +82,12 @@ Define exponentiation, which is given by the following equations.
8282
Check that `3 ^ 4` is `81`.
8383

8484

85-
#### Exercise `∸-examples` (recommended) {#monus-examples}
85+
### Exercise `∸-examples` (recommended) {#monus-examples}
8686

8787
Compute `5 ∸ 3` and `3 ∸ 5`, writing out your reasoning as a chain of equations.
8888

8989

90-
#### Exercise `Bin` (stretch) {#Bin}
90+
### Exercise `Bin` (stretch) {#Bin}
9191

9292
A more efficient representation of natural numbers uses a binary
9393
rather than a unary system. We represent a number as a bitstring.
@@ -134,9 +134,9 @@ For the former, choose the bitstring to have no leading zeros if it
134134
represents a positive natural, and represent zero by `x0 nil`.
135135
Confirm that these both give the correct answer for zero through four.
136136

137-
## Induction
137+
# Induction
138138

139-
#### Exercise `operators` (practice) {#operators}
139+
### Exercise `operators` (practice) {#operators}
140140

141141
Give another example of a pair of operators that have an identity
142142
and are associative, commutative, and distribute over one another.
@@ -145,14 +145,14 @@ Give an example of an operator that has an identity and is
145145
associative but is not commutative.
146146

147147

148-
#### Exercise `finite-+-assoc` (stretch) {#finite-plus-assoc}
148+
### Exercise `finite-+-assoc` (stretch) {#finite-plus-assoc}
149149

150150
Write out what is known about associativity of addition on each of the first four
151151
days using a finite story of creation, as
152152
[earlier][plfa.Naturals#finite-creation]
153153

154154

155-
#### Exercise `+-swap` (recommended) {#plus-swap}
155+
### Exercise `+-swap` (recommended) {#plus-swap}
156156

157157
Show
158158

@@ -166,23 +166,23 @@ the following function from the standard library:
166166
sym : ∀ {m n : ℕ} → m ≡ n → n ≡ m
167167

168168

169-
#### Exercise `*-distrib-+` (recommended) {#times-distrib-plus}
169+
### Exercise `*-distrib-+` (recommended) {#times-distrib-plus}
170170

171171
Show multiplication distributes over addition, that is,
172172

173173
(m + n) * p ≡ m * p + n * p
174174

175175
for all naturals `m`, `n`, and `p`.
176176

177-
#### Exercise `*-assoc` (recommended) {#times-assoc}
177+
### Exercise `*-assoc` (recommended) {#times-assoc}
178178

179179
Show multiplication is associative, that is,
180180

181181
(m * n) * p ≡ m * (n * p)
182182

183183
for all naturals `m`, `n`, and `p`.
184184

185-
#### Exercise `*-comm` (practice) {#times-comm}
185+
### Exercise `*-comm` (practice) {#times-comm}
186186

187187
Show multiplication is commutative, that is,
188188

@@ -191,23 +191,23 @@ Show multiplication is commutative, that is,
191191
for all naturals `m` and `n`. As with commutativity of addition,
192192
you will need to formulate and prove suitable lemmas.
193193

194-
#### Exercise `0∸n≡0` (practice) {#zero-monus}
194+
### Exercise `0∸n≡0` (practice) {#zero-monus}
195195

196196
Show
197197

198198
zero ∸ n ≡ zero
199199

200200
for all naturals `n`. Did your proof require induction?
201201

202-
#### Exercise `∸-+-assoc` (practice) {#monus-plus-assoc}
202+
### Exercise `∸-+-assoc` (practice) {#monus-plus-assoc}
203203

204204
Show that monus associates with addition, that is,
205205

206206
m ∸ n ∸ p ≡ m ∸ (n + p)
207207

208208
for all naturals `m`, `n`, and `p`.
209209

210-
#### Exercise `Bin-laws` (stretch) {#Bin-laws}
210+
### Exercise `Bin-laws` (stretch) {#Bin-laws}
211211

212212
Recall that
213213
Exercise [Bin][plfa.Naturals#Bin]
@@ -228,32 +228,32 @@ over bitstrings.
228228
For each law: if it holds, prove; if not, give a counterexample.
229229

230230

231-
## Relations
231+
# Relations
232232

233233

234-
#### Exercise `orderings` (practice) {#orderings}
234+
### Exercise `orderings` (practice) {#orderings}
235235

236236
Give an example of a preorder that is not a partial order.
237237

238238
Give an example of a partial order that is not a preorder.
239239

240240

241-
#### Exercise `≤-antisym-cases` (practice) {#leq-antisym-cases}
241+
### Exercise `≤-antisym-cases` (practice) {#leq-antisym-cases}
242242

243243
The above proof omits cases where one argument is `z≤n` and one
244244
argument is `s≤s`. Why is it ok to omit them?
245245

246246

247-
#### Exercise `*-mono-≤` (stretch)
247+
### Exercise `*-mono-≤` (stretch)
248248

249249
Show that multiplication is monotonic with regard to inequality.
250250

251251

252-
#### Exercise `<-trans` (recommended) {#less-trans}
252+
### Exercise `<-trans` (recommended) {#less-trans}
253253

254254
Show that strict inequality is transitive.
255255

256-
#### Exercise `trichotomy` (practice) {#trichotomy}
256+
### Exercise `trichotomy` (practice) {#trichotomy}
257257

258258
Show that strict inequality satisfies a weak version of trichotomy, in
259259
the sense that for any `m` and `n` that one of the following holds:
@@ -266,26 +266,26 @@ similar to that used for totality.
266266
(We will show that the three cases are exclusive after we introduce
267267
[negation][plfa.Negation].)
268268

269-
#### Exercise `+-mono-<` {#plus-mono-less}
269+
### Exercise `+-mono-<` {#plus-mono-less}
270270

271271
Show that addition is monotonic with respect to strict inequality.
272272
As with inequality, some additional definitions may be required.
273273

274-
#### Exercise `≤-iff-<` (recommended) {#leq-iff-less}
274+
### Exercise `≤-iff-<` (recommended) {#leq-iff-less}
275275

276276
Show that `suc m ≤ n` implies `m < n`, and conversely.
277277

278-
#### Exercise `<-trans-revisited` (practice) {#less-trans-revisited}
278+
### Exercise `<-trans-revisited` (practice) {#less-trans-revisited}
279279

280280
Give an alternative proof that strict inequality is transitive,
281281
using the relating between strict inequality and inequality and
282282
the fact that inequality is transitive.
283283

284-
#### Exercise `o+o≡e` (stretch) {#odd-plus-odd}
284+
### Exercise `o+o≡e` (stretch) {#odd-plus-odd}
285285

286286
Show that the sum of two odd numbers is even.
287287

288-
#### Exercise `Bin-predicates` (stretch) {#Bin-predicates}
288+
### Exercise `Bin-predicates` (stretch) {#Bin-predicates}
289289

290290
Recall that
291291
Exercise [Bin][plfa.Naturals#Bin]

0 commit comments

Comments
 (0)