added universe polymorphism to Equality

This commit is contained in:
wadler 2018-03-27 16:14:04 -03:00
parent f7ec2acef5
commit 6e6c4a9bc2
3 changed files with 4 additions and 2 deletions

View file

@ -400,7 +400,7 @@ Nonetheless, rewrite is a vital part of the Agda toolkit,
as earlier examples have shown. as earlier examples have shown.
## Extensionality {!#extensionality} ## Extensionality {#extensionality}
Extensionality asserts that they only way to distinguish functions is Extensionality asserts that they only way to distinguish functions is
by applying them; if two functions applied to the same argument always by applying them; if two functions applied to the same argument always
@ -624,3 +624,4 @@ This chapter uses the following unicode.
⟩ U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET (\>) ⟩ U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET (\>)
∎ U+220E END OF PROOF (\qed) ∎ U+220E END OF PROOF (\qed)
≐ U+2250 APPROACHES THE LIMIT (\.=) ≐ U+2250 APPROACHES THE LIMIT (\.=)
U+2113 SCRIPT SMALL L (\ell)

View file

@ -17,6 +17,7 @@ distributivity.
import Relation.Binary.PropositionalEquality as Eq import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; trans; cong; cong-app) open Eq using (_≡_; refl; sym; trans; cong; cong-app)
open Eq.≡-Reasoning open Eq.≡-Reasoning
open Level
\end{code} \end{code}
## Function composition ## Function composition

View file

@ -851,7 +851,7 @@ replacement for `_×_`. As a consequence, demonstrate an isomorphism relating
### Exercise (`¬Any≃All¬`) ### Exercise (`¬Any≃All¬`)
We first generalise composition to arbitrary levels, using First generalise composition to arbitrary levels, using
[universe polymorphism][unipoly]. [universe polymorphism][unipoly].
\begin{code} \begin{code}
_∘_ : ∀ {ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set ℓ₁} {B : Set ℓ₂} {C : Set ℓ₃} → (B → C) → (A → B) → A → C _∘_ : ∀ {ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set ℓ₁} {B : Set ℓ₂} {C : Set ℓ₃} → (B → C) → (A → B) → A → C