3
Types Summer School 2007
17
Learn more about Agda on the Agda wiki:
19
http://www.cs.chalmers.se/~ulfn/Agda
21
This is where you find the exercises for the afternoon.
30
Expressions (types and terms)
35
id₁ : (A : Set) -> A -> A
38
id₂ : (A : Set) -> A -> A
39
id₂ = \ A x -> id₁ A (id₁ A x)
43
compose : (A B C : Set) -> (B -> C) -> (A -> B) -> A -> C
44
compose = \(A B C : Set) f g x -> f (g x)
46
compose' : (A B : Set)(C : B -> Set)
47
(f : (x : B) -> C x)(g : A -> B) ->
49
compose' = \A B C f g x -> f (g x)
58
id₃ : {A : Set} -> A -> A
61
id₄ : {A : Set} -> A -> A
62
id₄ = \ x -> (id₃ (id₃ x))
64
id₆ : {A : Set} -> A -> A