Back to index

Chapter 5. Induction - Exercises

module Chapter5.Exercises where

open import Chapter5.Book public

-- Exercise 5.4.
ind𝟚 : (E : 𝟚  𝒰 𝒾)  (E  × E )  ((b : 𝟚)  E b)
ind𝟚 E (e₀ , e₁)  = e₀
ind𝟚 E (e₀ , e₁)  = e₁

𝟚-ind-isequiv : (E : 𝟚  𝒰 𝒾)
               isEquiv (ind𝟚 E)
𝟚-ind-isequiv E = invs⇒equivs (ind𝟚 E) (map⁻¹ , ε , η)
 where
  map⁻¹ = λ f  (f  , f )
  ε : (ind𝟚 E)  map⁻¹  id
  ε f = funext (ind𝟚  -  (ind𝟚 E  map⁻¹) f -  f -)
         (refl _ , refl _))
  η : map⁻¹  (ind𝟚 E)  id
  η (e₀ , e₁) = refl _