Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| notes:composition-of-functors-is-a-functor [2026/11/26 21:39] – Change to markdown syntax sam | notes:composition-of-functors-is-a-functor [2026/11/26 21:44] (current) – Fix footnotes sam | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| The functor laws are stated in terms of an equality between terms, so we will first need to define a notion of equality. | The functor laws are stated in terms of an equality between terms, so we will first need to define a notion of equality. | ||
| - | As I understand it, the following definition is the same as defined in Agda's standard library, except it is not polymorphic in the `Level` of its arguments.[^levels] | + | As I understand it, the following definition is the same as defined in Agda's standard library, except it is not polymorphic in the `Level` of its arguments.((Levels are a mechanism to avoid statements of the form `Set : Set`, since that would imply that the set of all types is itself a type, which is a paradox. Instead, we have that `Set : Set₁`, and `Set₁ : Set₂`, and so on. To avoid defining all of our functions multiple times, one for each *universe* in which the type is used, Agda has *universe polymorphism*, |
| ```agda | ```agda | ||
| Line 23: | Line 23: | ||
| ``` | ``` | ||
| - | In other words, given a type, `A`, and an object of that type, called `x`, produce evidence that `x` is equivalent to `x`, called `x ≡ x`, with type `Set`.[^plfa] | + | In other words, given a type, `A`, and an object of that type, called `x`, produce evidence that `x` is equivalent to `x`, called `x ≡ x`, with type `Set`.(([PLFA](https:// |
| ## Transitivity of Equality | ## Transitivity of Equality | ||
| Line 53: | Line 53: | ||
| Eliminating `refl`, as above, produces evidence that `x ≡ y`. The introduction `refl` produces `f x ≡ f x`, which can be unified with `f x ≡ f y` under the knowledge that `x ≡ y`. | Eliminating `refl`, as above, produces evidence that `x ≡ y`. The introduction `refl` produces `f x ≡ f x`, which can be unified with `f x ≡ f y` under the knowledge that `x ≡ y`. | ||
| - | The following equivalence reasoning module is taken directly from PLFA:[^plfa] | + | The following equivalence reasoning module is taken directly from PLFA: |
| ```agda | ```agda | ||
| Line 210: | Line 210: | ||
| ``` | ``` | ||
| - | ## Shortcuts: | + | ## Shortcuts |
| * `C-c C-l`: (Re)load file. | * `C-c C-l`: (Re)load file. | ||
| * `C-c C-,`: Show goal and context. | * `C-c C-,`: Show goal and context. | ||
| Line 219: | Line 219: | ||
| * [More](https:// | * [More](https:// | ||
| - | [^levels] Levels are a mechanism to avoid statements of the form `Set : Set`, since that would imply that the set of all types is itself a type, which is a paradox. Instead, we have that `Set : Set₁`, and `Set₁ : Set₂`, and so on. To avoid defining all of our functions multiple times, one for each *universe* in which the type is used, Agda has *universe polymorphism*, | + | ## Other references |
| - | + | | |
| - | [^agda-sort-system] [Agda Sort System](https:// | + | |
| - | + | ||
| - | [^plfa] [PLFA](https:// | + | |
| - | + | ||
| - | [^fta-in-agda] | + | |