A B (x : { b : Bool & if b then A else B }) : A + B := match x with | (true; a) => inl a | (false; b) => inr b end. Global Instance isequiv_sig_of_sum A B : IsEquiv (@sig_of_sum A B) | 0. Proof. apply (isequiv_adjointify (@sig_of_sum A B) (@ A B)). - intros [[] ?]; exact idpath. - intros []; exact idpath. Defined.
Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool.