2014-10-31 06:24:09 +00:00
|
|
|
import logic algebra.category.basic
|
2014-10-31 05:22:04 +00:00
|
|
|
open eq eq.ops category functor natural_transformation
|
|
|
|
|
|
|
|
|
2014-10-31 07:55:19 +00:00
|
|
|
variables {obC obD : Type} {C : category obC} {D : category obD} {F G H : C ⇒ D}
|
2014-10-31 05:22:04 +00:00
|
|
|
protected definition compose2 (η : G ⟹ H) (θ : F ⟹ G) : F ⟹ H :=
|
|
|
|
natural_transformation.mk
|
|
|
|
(λ a, η a ∘ θ a)
|
|
|
|
(λ a b f, calc
|
|
|
|
H f ∘ (η a ∘ θ a) = (H f ∘ η a) ∘ θ a : assoc
|
2014-10-31 07:55:19 +00:00
|
|
|
... = (η b ∘ G f) ∘ θ a : naturality η f
|
2014-10-31 06:24:09 +00:00
|
|
|
... = η b ∘ (G f ∘ θ a) : assoc
|
2014-10-31 07:55:19 +00:00
|
|
|
... = η b ∘ (θ b ∘ F f) : naturality θ f
|
2014-10-31 05:22:04 +00:00
|
|
|
... = (η b ∘ θ b) ∘ F f : assoc)
|
2014-10-31 06:24:09 +00:00
|
|
|
|
|
|
|
theorem tst (a b c : num) (H₁ : ∀ x, b = x) (H₂ : c = b) : a = c :=
|
|
|
|
calc a = b : H₁
|
|
|
|
... = c : H₂
|