@@ -350,19 +350,21 @@ word within a compound word is capitalized except for the first word.
350
350
351
351
#### Functions and relations over specific datatypes
352
352
353
- * When defining a new relation over a datatype
354
- (e.g. ` Data.List.Relation.Binary.Pointwise ` )
355
- it is often common to define how to introduce and eliminate that
356
- relation over various simple functions (e.g. ` map ` ) over that datatype:
353
+ * When defining a new relation ` P ` over a datatype ` X ` in ` Data.X.Relation ` module
354
+ it is often common to define how to introduce and eliminate that relation
355
+ with respect to various functions. Suppose you have a function ` f ` , then
356
+ - ` f⁺ ` is a lemma of the form ` Precondition -> P(f) `
357
+ - ` f⁻ ` is a lemma of the form ` P(f) -> Postcondition `
358
+ The logic behind the name is that ⁺ makes f appear in the conclusion while
359
+ makes it disappear from the hypothesis.
360
+
361
+ For example in ` Data.List.Relation.Binary.Pointwise ` we have ` map⁺ ` to show
362
+ how the ` map ` function may be introduced and ` map⁻ ` to show how it may be
363
+ eliminated:
357
364
``` agda
358
- map⁺ : Pointwise (λ a b → R (f a) (g b)) as bs →
359
- Pointwise R (map f as) (map g bs)
360
-
361
- map⁻ : Pointwise R (map f as) (map g bs) →
362
- Pointwise (λ a b → R (f a) (g b)) as bs
365
+ map⁺ : Pointwise (λ a b → R (f a) (g b)) as bs → Pointwise R (map f as) (map g bs)
366
+ map⁻ : Pointwise R (map f as) (map g bs) → Pointwise (λ a b → R (f a) (g b)) as bs
363
367
```
364
- Such elimination and introduction proofs are called the name of the
365
- function superscripted with either a ` + ` or ` - ` accordingly.
366
368
367
369
#### Keywords
368
370
0 commit comments