Definition CountMixin := EnumMixin count_enumP.Record class_of T := Class {
  base : Choice.class_of T;
  mixin : mixin_of (Equality.Pack base)
}.Record class_of T := Class {
  base : Choice.class_of T;
  mixin : mixin_of (Equality.Pack base)
}.Record class_of T := Class {
  base : Choice.class_of T;
  mixin : mixin_of (Equality.Pack base)
}.Record class_of T := Class {
  base : Choice.class_of T;
  mixin : mixin_of (Equality.Pack base)
}.Definition base2 T c := Countable.Class (@base T c) (mixin_base (mixin c)).Structure type : Type := Pack {sort; _ : class_of sort}.Structure type : Type := Pack {sort; _ : class_of sort}.Structure type : Type := Pack {sort; _ : class_of sort}.Definition clone c of phant_id class c := @Pack T c.Notation xclass := (class : class_of xT).Definition eqType := @Equality.Pack cT xclass.Definition choiceType := @Choice.Pack cT xclass.Definition countType := @Countable.Pack cT (base2 xclass).Notation finType := type.Notation FinType T m := (@pack T _ m _ _ id _ id).Notation FinMixin := EnumMixin.Notation UniqFinMixin := UniqMixin.(* This assumes that T has a subCountType structure over a type that  *)
(* has a finType structure.                                           *)
Notation "[ 'finMixin' 'of' T 'by' <: ]" :=
    (SubFinMixin_for (Phant T) (erefl _))
  (at level 0, format "[ 'finMixin'  'of'  T  'by'  <: ]") : form_scope.Definition enum cT := mixin_enum (class cT).Definition enumDef := erefl enum.Notation enum A := (enum_mem (mem A)).Canonical finEnum_unlock := Unlockable Finite.EnumDef.enumDef.(* Workaround for the silly syntactic uniformity restriction on coercions;    *)
(* this avoids a cross-dependency between finset.v and prime.v for the        *)
(* definition of the \pi(A) notation.                                         *)
Definition fin_pred_sort (T : finType) (pT : predType T) := pred_sort pT.Identity Coercion pred_sort_of_fin : fin_pred_sort >-> pred_sort.Definition enum_mem T (mA : mem_pred _) := filter mA (Finite.enum T).Definition pick (T : finType) (P : pred T) := ohead (enum P).Definition pick_true T (x : T) := true.(* We lock the definitions of card and subset to mitigate divergence of the   *)
(* Coq term comparison algorithm.                                             *)

Local Notation card_type := (forall T : finType, mem_pred T -> nat).Local Notation card_def := (fun T mA => size (enum_mem mA)).Definition card : card_type := card_def.Definition cardEdef := erefl card.Canonical card_unlock := Unlockable cardEdef.(* A is at level 99 to allow the notation #|G : H| in groups. *)
Notation "#| A |" := (card (mem A))
  (at level 0, A at level 99, format "#| A |") : nat_scope.Variant quantified := Quantified of bool.Variant quantified := Quantified of bool.Notation "''I_' n" := (ordinal n)
  (at level 8, n at level 2, format "''I_' n").Implicit Types (B : quantified) (x y : T).(* The first redundant argument protects the notation from  Coq's K-term      *)
(* display kludge; the second protects it from simpl and /=.                  *)
Definition ex B x y := B.Definition disjoint T (A B : mem_pred _) := @pred0b T (predI A B).Notation "A \proper B" := (proper (mem A) (mem B))
  (at level 70, no associativity) : bool_scope.Local Notation subset_type := (forall (T : finType) (A B : mem_pred T), bool).Local Notation subset_def := (fun T A B => pred0b (predD A B)).Definition subset : subset_type := subset_def.Definition subsetEdef := erefl subset.Canonical subset_unlock := Unlockable subsetEdef.Definition proper T A B := @subset T A B && ~~ subset B A.Implicit Type A : pred T.Implicit Types x y : T.Implicit Type s : seq T.

Lemma eq_proper A B : A =i B -> proper (mem A) =1 proper (mem B).