Definition CanChoiceMixin f' (fK : cancel f f') :=
  PcanChoiceMixin (can_pcan fK).Definition sub_choiceMixin := PcanChoiceMixin (@valK T P sT).Definition sub_choiceClass := @Choice.Class sT (sub_eqMixin sT) sub_choiceMixin.Canonical sub_choiceType := Choice.Pack sub_choiceClass.Fact seq_choiceMixin : choiceMixin (seq T).Canonical seq_choiceType := Eval hnf in ChoiceType (seq T) seq_choiceMixin.Fact tagged_choiceMixin : choiceMixin {i : I & T_ i}.Canonical tagged_choiceType :=
  Eval hnf in ChoiceType {i : I & T_ i} tagged_choiceMixin.Fact nat_choiceMixin : choiceMixin nat.Canonical nat_choiceType := Eval hnf in ChoiceType nat nat_choiceMixin.Definition bool_choiceMixin := CanChoiceMixin oddb.Canonical bool_choiceType := Eval hnf in ChoiceType bool bool_choiceMixin.Definition unit_choiceMixin := CanChoiceMixin bool_of_unitK.Canonical unit_choiceType := Eval hnf in ChoiceType unit unit_choiceMixin.Definition option_choiceMixin T := CanChoiceMixin (@seq_of_optK T).Canonical option_choiceType T :=
  Eval hnf in ChoiceType (option T) (option_choiceMixin T).Definition sig_choiceMixin T (P : pred T) : choiceMixin {x | P x} :=
   sub_choiceMixin _.Canonical sig_choiceType T (P : pred T) :=
 Eval hnf in ChoiceType {x | P x} (sig_choiceMixin P).Definition prod_choiceMixin T1 T2 := CanChoiceMixin (@tag_of_pairK T1 T2).Canonical prod_choiceType T1 T2 :=
  Eval hnf in ChoiceType (T1 * T2) (prod_choiceMixin T1 T2).Definition sum_choiceMixin T1 T2 := PcanChoiceMixin (@opair_of_sumK T1 T2).Canonical sum_choiceType T1 T2 :=
  Eval hnf in ChoiceType (T1 + T2) (sum_choiceMixin T1 T2).Definition tree_choiceMixin T := PcanChoiceMixin (GenTree.codeK T).Canonical tree_choiceType T := ChoiceType (GenTree.tree T) (tree_choiceMixin T).Record mixin_of (T : Type) : Type := Mixin {
  pickle : T -> nat;
  unpickle : nat -> option T;
  pickleK : pcancel pickle unpickle
}.Record mixin_of (T : Type) : Type := Mixin {
  pickle : T -> nat;
  unpickle : nat -> option T;
  pickleK : pcancel pickle unpickle
}.Record mixin_of (T : Type) : Type := Mixin {
  pickle : T -> nat;
  unpickle : nat -> option T;
  pickleK : pcancel pickle unpickle
}.Record mixin_of (T : Type) : Type := Mixin {
  pickle : T -> nat;
  unpickle : nat -> option T;
  pickleK : pcancel pickle unpickle
}.Record mixin_of (T : Type) : Type := Mixin {
  pickle : T -> nat;
  unpickle : nat -> option T;
  pickleK : pcancel pickle unpickle
}.Definition EqMixin T m := PcanEqMixin (@pickleK T m).Definition ChoiceMixin T m := PcanChoiceMixin (@pickleK T m).Record class_of T := Class { base : Choice.class_of T; mixin : mixin_of T }.Record class_of T := Class { base : Choice.class_of T; mixin : mixin_of T }.Record class_of T := Class { base : Choice.class_of T; mixin : mixin_of T }.Record class_of T := Class { base : Choice.class_of T; mixin : mixin_of T }.Structure type : Type := Pack {sort : Type; _ : class_of sort}.Structure type : Type := Pack {sort : Type; _ : class_of sort}.Structure type : Type := Pack {sort : Type; _ : class_of sort}.Definition clone c of phant_id class c := @Pack T c.Definition eqType := @Equality.Pack cT xclass.Definition choiceType := @Choice.Pack cT xclass.Notation countType := type.Notation CountType T m := (@pack T m _ _ id).Notation CountMixin := Mixin.Notation CountChoiceMixin := ChoiceMixin.Definition unpickle T := Countable.unpickle (Countable.class T).Definition pickle T := Countable.pickle (Countable.class T).

Lemma pickle_invK : ocancel pickle_inv pickle.