The Lumenary · Darasa la 9–12
Composition
Jina: ______________________
Tarehe: ______________________
Utajifunza
- Compute composites and state their domain and codomain
- Show by example that composition is not commutative
- Prove that composition is associative and that identity functions are neutral
- Prove that composites of injections (surjections, bijections) are injections (surjections, bijections)
- Describe sets and functions as a first example of a category
- 1.
Let and . Compute .
- 2.
If and , what are the domain and codomain of ?
- A.
- B.
- C.
- 3.
Let and . Compute .
- 4.
Suppose is injective. Which of these must be true? (Choose all that apply.)
- A. is injective
- B. is injective
- C. is surjective
- 5.
In Lean,
comp_associs proved byrfl. What does that tell us?- A.Both sides unfold, by definition, to the same function
fun x => h (g (f x)). - B.Lean checked associativity on many examples.
- C.Associativity is an axiom in Lean.
- A.Both sides unfold, by definition, to the same function
- 6.
Finite functions can be stored as dictionaries. Write
compose(g, f)returning a dictionary for (applyffirst!). You may assume every value offis a key ofg.Kikokotozi — Mazoezi