Definition maybe_choice' {X : UU} (e : maybe X) : coprod (∑ x:X, e = just x) (e = nothing). Proof. destruct e as [x | u]. - apply ii1. exists x; reflexivity. - apply ii2. now induction u. Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.Combinatorics.Maybe. Require Import UniMath.Combinatorics.StandardFiniteSets. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.RigsAndRings.