{A A' B B' : Type} (f : A <-> A') (g : B <-> B') : A + B <-> A' + B' := (functor_sum (fst f) (fst g), functor_sum (snd f) (snd g)). Global Instance isequiv_unfunctor_sum_l {A A' B B' : Type} (h : A + B <~> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) : IsEquiv (unfunctor_sum_l h Ha). Proof. simple refine (isequiv_adjointify _ _ _ _). - refine (unfunctor_sum_l h^-1 _); intros a'. remember (h^-1 (inl a')) as x eqn:p. destruct x as [a|b]. + exact tt. + apply moveL_equiv_M in p. elim (p^ # (Hb b)). - intros a'. refine (unfunctor_sum_l_compose _ _ _ _ _ @ _). refine (path_sum_inl B' _). refine (unfunctor_sum_l_beta _ _ _ @ _). apply eisretr. - intros a. refine (unfunctor_sum_l_compose _ _ _ _ _ @ _). refine (path_sum_inl B _). refine (unfunctor_sum_l_beta (h^-1 o h) _ a @ _). apply eissect. Defined.
Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool.