Record mixin_of (T : Type) := Mixin {
  mx_leq : T -> T -> Prop;
  _ : forall x, mx_leq x x;
  _ : forall x y, mx_leq x y -> mx_leq y x -> x = y;
  _ : forall x y z, mx_leq x y -> mx_leq y z -> mx_leq x z}.Record mixin_of (T : Type) := Mixin {
  mx_leq : T -> T -> Prop;
  _ : forall x, mx_leq x x;
  _ : forall x y, mx_leq x y -> mx_leq y x -> x = y;
  _ : forall x y z, mx_leq x y -> mx_leq y z -> mx_leq x z}.Record mixin_of (T : Type) := Mixin {
  mx_leq : T -> T -> Prop;
  _ : forall x, mx_leq x x;
  _ : forall x y, mx_leq x y -> mx_leq y x -> x = y;
  _ : forall x y z, mx_leq x y -> mx_leq y z -> mx_leq x z}.Record class_of T := Class {mixin : mixin_of T}.Record class_of T := Class {mixin : mixin_of T}.Record class_of T := Class {mixin : mixin_of T}.Structure type : Type := Pack {sort : Type; _ : class_of sort; _ : Type}.Structure type : Type := Pack {sort : Type; _ : class_of sort; _ : Type}.Structure type : Type := Pack {sort : Type; _ : class_of sort; _ : Type}.Definition clone c of phant_id class c := @Pack T c T.Definition leq := mx_leq (mixin class).Notation poset := Poset.type.Notation PosetMixin := Poset.Mixin.Notation Poset T m := (@pack T _ m id).Notation "[ 'poset' 'of' T 'for' cT ]" := (@clone T cT _ id)
  (at level 0, format "[ 'poset'  'of'  T  'for'  cT ]") : form_scope.Notation "[ 'poset' 'of' T ]" := (@clone T _ _ id)
  (at level 0, format "[ 'poset'  'of'  T ]") : form_scope.Notation "x <== y" := (Poset.leq x y) (at level 70).Add Parametric Relation (T : poset) : T (@Poset.leq T)
  reflexivity proved by (@poset_refl _)
  transitivity proved by (fun x y => @poset_trans _ y x) as poset_rel.

Lemma sub_asym x y : sub_leq x y -> sub_leq y x -> x = y.