Fact display_set : unit -> unit.Notation "f @: A" := (imset f A) (at level 24) : abstract_set_scope.Notation set0 := (@bottom (display_set _) _).Notation setT := (@top (display_set _) _).Notation setU := (@join (display_set _) _).Notation setI := (@meet (display_set _) _).Notation setD := (@sub (display_set _) _).Notation setC := (@compl (display_set _) _).Notation "~: x"    := (setC x).Notation "x \proper y" := (\proper%set x y) : bool_scope.Ltac EqualityPack cT xclass xT :=
  match type of Equality.Pack with
  | forall sort : Type, Equality.mixin_of sort -> eqType =>
    (* mathcomp.dev *)
    exact (@Equality.Pack cT xclass)
  | _ =>
    (* mathcomp <= 1.7 *)
    exact (@Equality.Pack cT xclass xT)
  end.Ltac ChoicePack cT xclass xT :=
  match type of Choice.Pack with
  | forall sort : Type, Choice.class_of sort -> choiceType =>
    (* mathcomp.dev *)
    exact (@Choice.Pack cT xclass)
  | _ =>
    (* mathcomp <= 1.7 *)
    exact (@Choice.Pack cT xclass xT)
  end.Implicit Types (X Y : elementType).Record class_of d (set : elementType -> Type) := Class {
  base  : forall X, @Order.CBLattice.class_of (display_set d) (set X);
  mixin : mixin_of (fun X => Order.CBLattice.Pack (base X) (set X))
}.Record class_of d (set : elementType -> Type) := Class {
  base  : forall X, @Order.CBLattice.class_of (display_set d) (set X);
  mixin : mixin_of (fun X => Order.CBLattice.Pack (base X) (set X))
}.Record class_of d (set : elementType -> Type) := Class {
  base  : forall X, @Order.CBLattice.class_of (display_set d) (set X);
  mixin : mixin_of (fun X => Order.CBLattice.Pack (base X) (set X))
}.Record class_of d (set : elementType -> Type) := Class {
  base  : forall X, @Order.CBLattice.class_of (display_set d) (set X);
  mixin : mixin_of (fun X => Order.CBLattice.Pack (base X) (set X))
}.Structure type d := Pack { sort ; _ : class_of d sort;
                         _ : elementType -> Type }.Structure type d := Pack { sort ; _ : class_of d sort;
                         _ : elementType -> Type }.Structure type d := Pack { sort ; _ : class_of d sort;
                         _ : elementType -> Type }.Notation xclass := (@class _ eqType_of_elementType _ cT : class_of eqType_of_elementType _ xset).Notation type := (type eqType_of_elementType).Local Notation ddisp := (display_set disp).Definition eqType := ltac:(EqualityPack (cT X) ((@class _ eqType_of_elementType _ cT : class_of eqType_of_elementType _ xset) X) (xset X)).Definition choiceType := ltac:(ChoicePack (cT X) ((@class _ eqType_of_elementType _ cT : class_of eqType_of_elementType _ xset) X) (xset X)).Definition porderType :=
 @Order.POrder.Pack ddisp (cT X) (xclass X) (xset X).Definition latticeType :=
  @Order.Lattice.Pack ddisp (cT X) (xclass X) (xset X).Definition blatticeType :=
  @Order.BLattice.Pack ddisp (cT X) (xclass X) (xset X).Definition cblatticeType :=
  @Order.CBLattice.Pack ddisp (cT X) (xclass X) (xset X).Notation semisetType  := type.Notation semisetMixin := mixin_of.Notation SemisetMixin := Mixin.Notation "[ 'semisetType' 'of' set 'for' cset 'with' disp ]" :=
  (@clone _ _ set _ cset disp _ (unit_irrelevance _ _) id)
  (at level 0, format "[ 'semisetType'  'of'  set  'for'  cset  'with'  disp ]") : form_scope.Definition setfun := Semiset.funsort (Semiset.class set).Definition fun_of_setfun X Y (f : setfun X Y) : X -> Y :=
  @Semiset.fun_of_funsort _ _ _ _ (Semiset.class set) _ _ f.Definition memset : set X -> X -> bool :=
  @Semiset.memset _ _ _ _ (Semiset.class set) _.Definition set1 : X -> set X :=
  @Semiset.set1 _ _ _ _ (Semiset.class set) _.Definition imset : setfun set X Y -> set X -> set Y:=
  @Semiset.imset _ _ _ _ (Semiset.class set) _ _.Canonical set_predType := Eval hnf in mkPredType memset.Implicit Types (x : X) (y : Y) (A : set X) (B : set Y) (f : setfun set X Y).

Lemma set1_inj : injective (@set1 _ _ _ set X).