Library MonadVM.Comparable

File generated by rocq-of-ocaml
Require Import RocqOfOCaml.RocqOfOCaml.
Require Import RocqOfOCaml.Settings.

Require MonadVM.Map.
Require MonadVM.Option.

Require Import MonadVM.Support.Variants.
Require MonadVM.Support.CryptoBlake2.
Require Import RocqOfOCaml.Opaque.
Local Ltac _rocq_witness_type typ :=
  let typ := eval hnf in typ in
  lazymatch typ with
  | list ?a ⇒ let a := _rocq_witness_type a in constr:(list a)
  | option ?a ⇒ let a := _rocq_witness_type a in constr:(option a)
  | prod ?a ?b ⇒ let a := _rocq_witness_type a in
      let b := _rocq_witness_type b in constr:(prod a b)
  | sum ?a ?b ⇒ let a := _rocq_witness_type a in
      let b := _rocq_witness_type b in constr:(sum a b)
  | ?a → ?b ⇒ let a := _rocq_witness_type a in
      let b := _rocq_witness_type b in constr:(a → b)
  | _ ⇒ typ
  end.
Module Make.
  Class FArgs {T_t : Set} := {
    T : MonadVM.Map.OrderedType (t := T_t);
  }.
  Arguments Build_FArgs {_}.

  Definition comparison_op `{_fargs : FArgs}
    (int_cmp : int → int → bool) (x_value : T.(MonadVM.Map.OrderedType.t))
    (y_value : T.(MonadVM.Map.OrderedType.t)) : bool :=
    int_cmp (T.(MonadVM.Map.OrderedType.compare) x_value y_value) 0.

  Definition op_lt `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool :=
    comparison_op Z.ltb.

  Definition op_lteq `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool :=
    comparison_op Z.leb.

  Definition op_eq `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool :=
    comparison_op Z.eqb.

  Definition op_gteq `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool :=
    comparison_op Z.geb.

  Definition op_gt `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool :=
    comparison_op Z.gtb.

  Definition op_ltgt `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool :=
    comparison_op RocqOfOCaml.OCamlInt.not_equal.

  Definition equal `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool :=
    op_eq.

  Definition compare `{_fargs : FArgs}
    : T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → int :=
    T.(MonadVM.Map.OrderedType.compare).

  Definition max `{_fargs : FArgs}
    (x_value : T.(MonadVM.Map.OrderedType.t))
    (y_value : T.(MonadVM.Map.OrderedType.t)) : T.(MonadVM.Map.OrderedType.t) :=
    if op_lt x_value y_value then
      y_value
    else
      x_value.

  Definition min `{_fargs : FArgs}
    (x_value : T.(MonadVM.Map.OrderedType.t))
    (y_value : T.(MonadVM.Map.OrderedType.t)) : T.(MonadVM.Map.OrderedType.t) :=
    if op_lt x_value y_value then
      x_value
    else
      y_value.

  Definition _Set `{_fargs : FArgs} := RocqOfOCaml.OCamlSet.Make T.

  Module Map.
    Definition MonadVM_Map_Make_include `{_fargs : FArgs} := MonadVM.Map.Make T.

Inclusion of the module MonadVM_Map_Make_include
    Definition key `{_fargs : FArgs} :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.key).

    Definition t `{_fargs : FArgs} (a : Set) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.t) a.

    Definition empty `{_fargs : FArgs} {a : Set} : t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.empty).

    Definition add `{_fargs : FArgs} {a : Set} : key → a → t a → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.add).

    Definition add_to_list `{_fargs : FArgs} {a : Set} :
      key → a → t (list a) → t (list a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.add_to_list).

    Definition update `{_fargs : FArgs} {a : Set} :
      key → (option a → option a) → t a → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.update).

    Definition singleton `{_fargs : FArgs} {a : Set} : key → a → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.singleton).

    Definition remove `{_fargs : FArgs} {a : Set} : key → t a → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.remove).

    Definition merge `{_fargs : FArgs} {a b c : Set} :
      (key → option a → option b → option c) → t a → t b → t c :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.merge).

    Definition union `{_fargs : FArgs} {a : Set} :
      (key → a → a → option a) → t a → t a → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.union).

    Definition cardinal `{_fargs : FArgs} {a : Set} : t a → int :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.cardinal).

    Definition bindings `{_fargs : FArgs} {a : Set} : t a → list (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.bindings).

    Definition min_binding `{_fargs : FArgs} {a : Set}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((key × a)%type
        )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ))
      : t a → key × a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.min_binding)
        (_rocq_fallback_arg_0).

    Definition min_binding_opt `{_fargs : FArgs} {a : Set} :
      t a → option (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.min_binding_opt).

    Definition max_binding `{_fargs : FArgs} {a : Set}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((key × a)%type
        )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ))
      : t a → key × a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.max_binding)
        (_rocq_fallback_arg_0).

    Definition max_binding_opt `{_fargs : FArgs} {a : Set} :
      t a → option (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.max_binding_opt).

    Definition choose `{_fargs : FArgs} {a : Set}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((key × a)%type
        )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ))
      : t a → key × a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.choose) (_rocq_fallback_arg_0).

    Definition choose_opt `{_fargs : FArgs} {a : Set} : t a → option (key × a)
      := MonadVM_Map_Make_include.(MonadVM.Map.S.choose_opt).

    Definition find `{_fargs : FArgs} {a : Set}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((a)%type
        )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ))
      : key → t a → a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.find) (_rocq_fallback_arg_0).

    Definition find_opt `{_fargs : FArgs} {a : Set} : key → t a → option a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.find_opt).

    Definition find_first `{_fargs : FArgs} {a : Set}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((key × a)%type
        )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ))
      : (key → bool) → t a → key × a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.find_first) (_rocq_fallback_arg_0).

    Definition find_first_opt `{_fargs : FArgs} {a : Set} :
      (key → bool) → t a → option (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.find_first_opt).

    Definition find_last `{_fargs : FArgs} {a : Set}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((key × a)%type
        )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ))
      : (key → bool) → t a → key × a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.find_last) (_rocq_fallback_arg_0).

    Definition find_last_opt `{_fargs : FArgs} {a : Set} :
      (key → bool) → t a → option (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.find_last_opt).

    Definition iter `{_fargs : FArgs} {a : Set} :
      (key → a → unit) → t a → unit :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.iter).

    Definition fold `{_fargs : FArgs} {a acc : Set} :
      (key → a → acc → acc) → t a → acc → acc :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.fold).

    Definition map `{_fargs : FArgs} {a b : Set} : (a → b) → t a → t b :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.map).

    Definition mapi `{_fargs : FArgs} {a b : Set} :
      (key → a → b) → t a → t b :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.mapi).

    Definition filter `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → t a → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.filter).

    Definition filter_map `{_fargs : FArgs} {a b : Set} :
      (key → a → option b) → t a → t b :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.filter_map).

    Definition partition `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → t a → t a × t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.partition).

    Definition split `{_fargs : FArgs} {a : Set} :
      key → t a → t a × option a × t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.split).

    Definition is_empty `{_fargs : FArgs} {a : Set} : t a → bool :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.is_empty).

    Definition is_singleton `{_fargs : FArgs} {a : Set} : t a → bool :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.is_singleton).

    Definition mem `{_fargs : FArgs} {a : Set} : key → t a → bool :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.mem).

    Definition equal `{_fargs : FArgs} {a : Set} :
      (a → a → bool) → t a → t a → bool :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.equal).

    Definition compare `{_fargs : FArgs} {a : Set} :
      (a → a → int) → t a → t a → int :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.compare).

    Definition for_all `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → t a → bool :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.for_all).

    Definition _exists `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → t a → bool :=
      MonadVM_Map_Make_include.(MonadVM.Map.S._exists).

    Definition to_list `{_fargs : FArgs} {a : Set} : t a → list (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.to_list).

    Definition of_list `{_fargs : FArgs} {a : Set} : list (key × a) → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.of_list).

    Definition to_seq `{_fargs : FArgs} {a : Set} :
      t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.to_seq).

    Definition to_rev_seq `{_fargs : FArgs} {a : Set} :
      t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.to_rev_seq).

    Definition to_seq_from `{_fargs : FArgs} {a : Set} :
      key → t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.to_seq_from).

    Definition add_seq `{_fargs : FArgs} {a : Set} :
      RocqOfOCaml.OCamlSeq.t (key × a) → t a → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.add_seq).

    Definition of_seq `{_fargs : FArgs} {a : Set} :
      RocqOfOCaml.OCamlSeq.t (key × a) → t a :=
      MonadVM_Map_Make_include.(MonadVM.Map.S.of_seq).

    Definition _at `{_fargs : FArgs} {v : Set} : key → Lens.t (t v) (option v)
      := MonadVM_Map_Make_include.(MonadVM.Map.S._at).

    Definition keys `{_fargs : FArgs} {a : Set} (map : t a)
      : _Set.(RocqOfOCaml.OCamlSet.S.t) :=
      _Set.(RocqOfOCaml.OCamlSet.S.of_seq)
        (RocqOfOCaml.OCamlSeq.map
          (fun (function_parameter : key × a) ⇒
            let '(k_value, _) := function_parameter in
            k_value) (to_seq map)).

    Definition difference `{_fargs : FArgs} {a d : Set}
      (diff : option a → option a → option d) (self : t a) (other : t a)
      : t d :=
      of_seq
        (RocqOfOCaml.OCamlSeq.filter_map
          (fun (key : key) ⇒
            let v_self := find_opt key self in
            let v_other := find_opt key other in
            MonadVM.Option.map (fun (d_value : d) ⇒ (key, d_value))
              (diff v_self v_other))
          (_Set.(RocqOfOCaml.OCamlSet.S.to_seq)
            (_Set.(RocqOfOCaml.OCamlSet.S.union) (keys self) (keys other)))).
  End Map.

  Module Make_result.
    Record signature `{_fargs : FArgs} {Set_t : Set} {Map_t : Set → Set} : Type
      := {
      comparison_op :
        (int → int → bool) → T.(MonadVM.Map.OrderedType.t) →
        T.(MonadVM.Map.OrderedType.t) → bool;
      op_lt :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool;
      op_lteq :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool;
      op_eq :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool;
      op_gteq :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool;
      op_gt :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool;
      op_ltgt :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool;
      equal :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → bool;
      compare :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) → int;
      max :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) →
        T.(MonadVM.Map.OrderedType.t);
      min :
        T.(MonadVM.Map.OrderedType.t) → T.(MonadVM.Map.OrderedType.t) →
        T.(MonadVM.Map.OrderedType.t);
      _Set :
        RocqOfOCaml.OCamlSet.S (elt := T.(MonadVM.Map.OrderedType.t))
          (t := Set_t);
      Map_key := T.(MonadVM.Map.OrderedType.t);
      Map_t := Map_t;
      Map_empty : ∀ {a : Set} , Map_t a;
      Map_add : ∀ {a : Set} , Map_key → a → Map_t a → Map_t a;
      Map_add_to_list :
        ∀ {a : Set} , Map_key → a → Map_t (list a) → Map_t (list a);
      Map_update :
        ∀ {a : Set} ,
          Map_key → (option a → option a) → Map_t a → Map_t a;
      Map_singleton : ∀ {a : Set} , Map_key → a → Map_t a;
      Map_remove : ∀ {a : Set} , Map_key → Map_t a → Map_t a;
      Map_merge :
        ∀ {a b c : Set} ,
          (Map_key → option a → option b → option c) → Map_t a → Map_t b →
          Map_t c;
      Map_union :
        ∀ {a : Set} ,
          (Map_key → a → a → option a) → Map_t a → Map_t a → Map_t a;
      Map_cardinal : ∀ {a : Set} , Map_t a → int;
      Map_bindings : ∀ {a : Set} , Map_t a → list (Map_key × a);
      Map_min_binding :
        ∀ {a : Set}
          (_rocq_fallback_arg_0 :
            ltac:(let typ := constr:(ltac:(first [unshelve refine ((T.(MonadVM.Map.OrderedType.t)
              × a)%type
            )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ)),
          Map_t a → Map_key × a;
      Map_min_binding_opt : ∀ {a : Set} , Map_t a → option (Map_key × a);
      Map_max_binding :
        ∀ {a : Set}
          (_rocq_fallback_arg_0 :
            ltac:(let typ := constr:(ltac:(first [unshelve refine ((T.(MonadVM.Map.OrderedType.t)
              × a)%type
            )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ)),
          Map_t a → Map_key × a;
      Map_max_binding_opt : ∀ {a : Set} , Map_t a → option (Map_key × a);
      Map_choose :
        ∀ {a : Set}
          (_rocq_fallback_arg_0 :
            ltac:(let typ := constr:(ltac:(first [unshelve refine ((T.(MonadVM.Map.OrderedType.t)
              × a)%type
            )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ)),
          Map_t a → Map_key × a;
      Map_choose_opt : ∀ {a : Set} , Map_t a → option (Map_key × a);
      Map_find :
        ∀ {a : Set}
          (_rocq_fallback_arg_0 :
            ltac:(let typ := constr:(ltac:(first [unshelve refine ((a)%type
            )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ)),
          Map_key → Map_t a → a;
      Map_find_opt : ∀ {a : Set} , Map_key → Map_t a → option a;
      Map_find_first :
        ∀ {a : Set}
          (_rocq_fallback_arg_0 :
            ltac:(let typ := constr:(ltac:(first [unshelve refine ((T.(MonadVM.Map.OrderedType.t)
              × a)%type
            )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ)),
          (Map_key → bool) → Map_t a → Map_key × a;
      Map_find_first_opt :
        ∀ {a : Set} , (Map_key → bool) → Map_t a → option (Map_key × a);
      Map_find_last :
        ∀ {a : Set}
          (_rocq_fallback_arg_0 :
            ltac:(let typ := constr:(ltac:(first [unshelve refine ((T.(MonadVM.Map.OrderedType.t)
              × a)%type
            )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ)),
          (Map_key → bool) → Map_t a → Map_key × a;
      Map_find_last_opt :
        ∀ {a : Set} , (Map_key → bool) → Map_t a → option (Map_key × a);
      Map_iter : ∀ {a : Set} , (Map_key → a → unit) → Map_t a → unit;
      Map_fold :
        ∀ {a acc : Set} ,
          (Map_key → a → acc → acc) → Map_t a → acc → acc;
      Map_map : ∀ {a b : Set} , (a → b) → Map_t a → Map_t b;
      Map_mapi : ∀ {a b : Set} , (Map_key → a → b) → Map_t a → Map_t b;
      Map_filter :
        ∀ {a : Set} , (Map_key → a → bool) → Map_t a → Map_t a;
      Map_filter_map :
        ∀ {a b : Set} , (Map_key → a → option b) → Map_t a → Map_t b;
      Map_partition :
        ∀ {a : Set} ,
          (Map_key → a → bool) → Map_t a → Map_t a × Map_t a;
      Map_split :
        ∀ {a : Set} , Map_key → Map_t a → Map_t a × option a × Map_t a;
      Map_is_empty : ∀ {a : Set} , Map_t a → bool;
      Map_is_singleton : ∀ {a : Set} , Map_t a → bool;
      Map_mem : ∀ {a : Set} , Map_key → Map_t a → bool;
      Map_equal :
        ∀ {a : Set} , (a → a → bool) → Map_t a → Map_t a → bool;
      Map_compare :
        ∀ {a : Set} , (a → a → int) → Map_t a → Map_t a → int;
      Map_for_all :
        ∀ {a : Set} , (Map_key → a → bool) → Map_t a → bool;
      Map_exists : ∀ {a : Set} , (Map_key → a → bool) → Map_t a → bool;
      Map_to_list : ∀ {a : Set} , Map_t a → list (Map_key × a);
      Map_of_list : ∀ {a : Set} , list (Map_key × a) → Map_t a;
      Map_to_seq :
        ∀ {a : Set} , Map_t a → RocqOfOCaml.OCamlSeq.t (Map_key × a);
      Map_to_rev_seq :
        ∀ {a : Set} , Map_t a → RocqOfOCaml.OCamlSeq.t (Map_key × a);
      Map_to_seq_from :
        ∀ {a : Set} ,
          Map_key → Map_t a → RocqOfOCaml.OCamlSeq.t (Map_key × a);
      Map_add_seq :
        ∀ {a : Set} ,
          RocqOfOCaml.OCamlSeq.t (Map_key × a) → Map_t a → Map_t a;
      Map_of_seq :
        ∀ {a : Set} , RocqOfOCaml.OCamlSeq.t (Map_key × a) → Map_t a;
      Map_at : ∀ {v : Set} , Map_key → Lens.t (Map_t v) (option v);
      Map_keys : ∀ {a : Set} , Map_t a → Set_t;
      Map_difference :
        ∀ {a d : Set} ,
          (option a → option a → option d) → Map_t a → Map_t a → Map_t d;
      Set_t := Set_t;
    }.
  End Make_result.
  Definition Make_result `{_fargs : FArgs} := @Make_result.signature _ _.
  Arguments Make_result {_ _ _ _}.

  Definition functor `{_fargs : FArgs} :Make_result (Set_t := _) (Map_t := _) :=
    {|
      Make_result.comparison_op := comparison_op;
      Make_result.op_lt := op_lt;
      Make_result.op_lteq := op_lteq;
      Make_result.op_eq := op_eq;
      Make_result.op_gteq := op_gteq;
      Make_result.op_gt := op_gt;
      Make_result.op_ltgt := op_ltgt;
      Make_result.equal := equal;
      Make_result.compare := compare;
      Make_result.max := max;
      Make_result.min := min;
      Make_result._Set := _Set;
      Make_result.Map_empty _rocq_argument_0 := ltac:(first [exact (Map.empty
        ) | exact (Map.empty _) | first [unshelve refine (Map.empty
        ) | unshelve refine (Map.empty
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_add _rocq_argument_0 := ltac:(first [exact (Map.add
        ) | exact (Map.add _) | first [unshelve refine (Map.add
        ) | unshelve refine (Map.add
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_add_to_list _rocq_argument_0 :=
        ltac:(first [exact (Map.add_to_list ) | exact (Map.add_to_list
        _) | first [unshelve refine (Map.add_to_list
        ) | unshelve refine (Map.add_to_list
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_update _rocq_argument_0 := ltac:(first [exact (Map.update
        ) | exact (Map.update _) | first [unshelve refine (Map.update
        ) | unshelve refine (Map.update
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_singleton _rocq_argument_0 :=
        ltac:(first [exact (Map.singleton ) | exact (Map.singleton
        _) | first [unshelve refine (Map.singleton
        ) | unshelve refine (Map.singleton
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_remove _rocq_argument_0 := ltac:(first [exact (Map.remove
        ) | exact (Map.remove _) | first [unshelve refine (Map.remove
        ) | unshelve refine (Map.remove
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_merge _rocq_argument_0 _rocq_argument_1 _rocq_argument_2
      := ltac:(first [exact (Map.merge ) | exact (Map.merge
        _) | exact (Map.merge _ _) | exact (Map.merge _ _
        _) | first [unshelve refine (Map.merge ) | unshelve refine (Map.merge
        _rocq_argument_0) | unshelve refine (Map.merge _rocq_argument_0
        _rocq_argument_1) | unshelve refine (Map.merge _rocq_argument_0
        _rocq_argument_1
        _rocq_argument_2)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | exact _rocq_argument_1 | exact
        _rocq_argument_2 | eassumption | typeclasses eauto]]);
      Make_result.Map_union _rocq_argument_0 := ltac:(first [exact (Map.union
        ) | exact (Map.union _) | first [unshelve refine (Map.union
        ) | unshelve refine (Map.union
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_cardinal _rocq_argument_0 :=
        ltac:(first [exact (Map.cardinal ) | exact (Map.cardinal
        _) | first [unshelve refine (Map.cardinal
        ) | unshelve refine (Map.cardinal
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_bindings _rocq_argument_0 :=
        ltac:(first [exact (Map.bindings ) | exact (Map.bindings
        _) | first [unshelve refine (Map.bindings
        ) | unshelve refine (Map.bindings
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_min_binding _rocq_argument_0 _rocq_witness_0 :=
        ltac:(first [unshelve refine (Map.min_binding
        _rocq_witness_0) | unshelve refine (Map.min_binding _rocq_argument_0
        _rocq_witness_0) | unshelve refine (Map.min_binding
        ) | unshelve refine (Map.min_binding
        _rocq_argument_0) | let value := uconstr:(Map.min_binding) in RocqOfOCaml.Opaque.supply_witnesses value ltac:(first [exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto])]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]);
      Make_result.Map_min_binding_opt _rocq_argument_0 :=
        ltac:(first [exact (Map.min_binding_opt ) | exact (Map.min_binding_opt
        _) | first [unshelve refine (Map.min_binding_opt
        ) | unshelve refine (Map.min_binding_opt
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_max_binding _rocq_argument_0 _rocq_witness_0 :=
        ltac:(first [unshelve refine (Map.max_binding
        _rocq_witness_0) | unshelve refine (Map.max_binding _rocq_argument_0
        _rocq_witness_0) | unshelve refine (Map.max_binding
        ) | unshelve refine (Map.max_binding
        _rocq_argument_0) | let value := uconstr:(Map.max_binding) in RocqOfOCaml.Opaque.supply_witnesses value ltac:(first [exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto])]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]);
      Make_result.Map_max_binding_opt _rocq_argument_0 :=
        ltac:(first [exact (Map.max_binding_opt ) | exact (Map.max_binding_opt
        _) | first [unshelve refine (Map.max_binding_opt
        ) | unshelve refine (Map.max_binding_opt
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_choose _rocq_argument_0 _rocq_witness_0 :=
        ltac:(first [unshelve refine (Map.choose
        _rocq_witness_0) | unshelve refine (Map.choose _rocq_argument_0
        _rocq_witness_0) | unshelve refine (Map.choose
        ) | unshelve refine (Map.choose
        _rocq_argument_0) | let value := uconstr:(Map.choose) in RocqOfOCaml.Opaque.supply_witnesses value ltac:(first [exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto])]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]);
      Make_result.Map_choose_opt _rocq_argument_0 :=
        ltac:(first [exact (Map.choose_opt ) | exact (Map.choose_opt
        _) | first [unshelve refine (Map.choose_opt
        ) | unshelve refine (Map.choose_opt
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_find _rocq_argument_0 _rocq_witness_0 :=
        ltac:(first [unshelve refine (Map.find
        _rocq_witness_0) | unshelve refine (Map.find _rocq_argument_0
        _rocq_witness_0) | unshelve refine (Map.find
        ) | unshelve refine (Map.find
        _rocq_argument_0) | let value := uconstr:(Map.find) in RocqOfOCaml.Opaque.supply_witnesses value ltac:(first [exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto])]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]);
      Make_result.Map_find_opt _rocq_argument_0 :=
        ltac:(first [exact (Map.find_opt ) | exact (Map.find_opt
        _) | first [unshelve refine (Map.find_opt
        ) | unshelve refine (Map.find_opt
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_find_first _rocq_argument_0 _rocq_witness_0 :=
        ltac:(first [unshelve refine (Map.find_first
        _rocq_witness_0) | unshelve refine (Map.find_first _rocq_argument_0
        _rocq_witness_0) | unshelve refine (Map.find_first
        ) | unshelve refine (Map.find_first
        _rocq_argument_0) | let value := uconstr:(Map.find_first) in RocqOfOCaml.Opaque.supply_witnesses value ltac:(first [exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto])]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]);
      Make_result.Map_find_first_opt _rocq_argument_0 :=
        ltac:(first [exact (Map.find_first_opt ) | exact (Map.find_first_opt
        _) | first [unshelve refine (Map.find_first_opt
        ) | unshelve refine (Map.find_first_opt
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_find_last _rocq_argument_0 _rocq_witness_0 :=
        ltac:(first [unshelve refine (Map.find_last
        _rocq_witness_0) | unshelve refine (Map.find_last _rocq_argument_0
        _rocq_witness_0) | unshelve refine (Map.find_last
        ) | unshelve refine (Map.find_last
        _rocq_argument_0) | let value := uconstr:(Map.find_last) in RocqOfOCaml.Opaque.supply_witnesses value ltac:(first [exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto])]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_witness_0 | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]);
      Make_result.Map_find_last_opt _rocq_argument_0 :=
        ltac:(first [exact (Map.find_last_opt ) | exact (Map.find_last_opt
        _) | first [unshelve refine (Map.find_last_opt
        ) | unshelve refine (Map.find_last_opt
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_iter _rocq_argument_0 := ltac:(first [exact (Map.iter
        ) | exact (Map.iter _) | first [unshelve refine (Map.iter
        ) | unshelve refine (Map.iter
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_fold _rocq_argument_0 _rocq_argument_1 :=
        ltac:(first [exact (Map.fold ) | exact (Map.fold _) | exact (Map.fold _
        _) | first [unshelve refine (Map.fold ) | unshelve refine (Map.fold
        _rocq_argument_0) | unshelve refine (Map.fold _rocq_argument_0
        _rocq_argument_1)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | exact
        _rocq_argument_1 | eassumption | typeclasses eauto]]);
      Make_result.Map_map _rocq_argument_0 _rocq_argument_1 :=
        ltac:(first [exact (Map.map ) | exact (Map.map _) | exact (Map.map _
        _) | first [unshelve refine (Map.map ) | unshelve refine (Map.map
        _rocq_argument_0) | unshelve refine (Map.map _rocq_argument_0
        _rocq_argument_1)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | exact
        _rocq_argument_1 | eassumption | typeclasses eauto]]);
      Make_result.Map_mapi _rocq_argument_0 _rocq_argument_1 :=
        ltac:(first [exact (Map.mapi ) | exact (Map.mapi _) | exact (Map.mapi _
        _) | first [unshelve refine (Map.mapi ) | unshelve refine (Map.mapi
        _rocq_argument_0) | unshelve refine (Map.mapi _rocq_argument_0
        _rocq_argument_1)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | exact
        _rocq_argument_1 | eassumption | typeclasses eauto]]);
      Make_result.Map_filter _rocq_argument_0 := ltac:(first [exact (Map.filter
        ) | exact (Map.filter _) | first [unshelve refine (Map.filter
        ) | unshelve refine (Map.filter
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_filter_map _rocq_argument_0 _rocq_argument_1 :=
        ltac:(first [exact (Map.filter_map ) | exact (Map.filter_map
        _) | exact (Map.filter_map _ _) | first [unshelve refine (Map.filter_map
        ) | unshelve refine (Map.filter_map
        _rocq_argument_0) | unshelve refine (Map.filter_map _rocq_argument_0
        _rocq_argument_1)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | exact
        _rocq_argument_1 | eassumption | typeclasses eauto]]);
      Make_result.Map_partition _rocq_argument_0 :=
        ltac:(first [exact (Map.partition ) | exact (Map.partition
        _) | first [unshelve refine (Map.partition
        ) | unshelve refine (Map.partition
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_split _rocq_argument_0 := ltac:(first [exact (Map.split
        ) | exact (Map.split _) | first [unshelve refine (Map.split
        ) | unshelve refine (Map.split
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_is_empty _rocq_argument_0 :=
        ltac:(first [exact (Map.is_empty ) | exact (Map.is_empty
        _) | first [unshelve refine (Map.is_empty
        ) | unshelve refine (Map.is_empty
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_is_singleton _rocq_argument_0 :=
        ltac:(first [exact (Map.is_singleton ) | exact (Map.is_singleton
        _) | first [unshelve refine (Map.is_singleton
        ) | unshelve refine (Map.is_singleton
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_mem _rocq_argument_0 := ltac:(first [exact (Map.mem
        ) | exact (Map.mem _) | first [unshelve refine (Map.mem
        ) | unshelve refine (Map.mem
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_equal _rocq_argument_0 := ltac:(first [exact (Map.equal
        ) | exact (Map.equal _) | first [unshelve refine (Map.equal
        ) | unshelve refine (Map.equal
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_compare _rocq_argument_0 :=
        ltac:(first [exact (Map.compare ) | exact (Map.compare
        _) | first [unshelve refine (Map.compare
        ) | unshelve refine (Map.compare
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_for_all _rocq_argument_0 :=
        ltac:(first [exact (Map.for_all ) | exact (Map.for_all
        _) | first [unshelve refine (Map.for_all
        ) | unshelve refine (Map.for_all
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_exists _rocq_argument_0 := ltac:(first [exact (Map._exists
        ) | exact (Map._exists _) | first [unshelve refine (Map._exists
        ) | unshelve refine (Map._exists
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_to_list _rocq_argument_0 :=
        ltac:(first [exact (Map.to_list ) | exact (Map.to_list
        _) | first [unshelve refine (Map.to_list
        ) | unshelve refine (Map.to_list
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_of_list _rocq_argument_0 :=
        ltac:(first [exact (Map.of_list ) | exact (Map.of_list
        _) | first [unshelve refine (Map.of_list
        ) | unshelve refine (Map.of_list
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_to_seq _rocq_argument_0 := ltac:(first [exact (Map.to_seq
        ) | exact (Map.to_seq _) | first [unshelve refine (Map.to_seq
        ) | unshelve refine (Map.to_seq
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_to_rev_seq _rocq_argument_0 :=
        ltac:(first [exact (Map.to_rev_seq ) | exact (Map.to_rev_seq
        _) | first [unshelve refine (Map.to_rev_seq
        ) | unshelve refine (Map.to_rev_seq
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_to_seq_from _rocq_argument_0 :=
        ltac:(first [exact (Map.to_seq_from ) | exact (Map.to_seq_from
        _) | first [unshelve refine (Map.to_seq_from
        ) | unshelve refine (Map.to_seq_from
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_add_seq _rocq_argument_0 :=
        ltac:(first [exact (Map.add_seq ) | exact (Map.add_seq
        _) | first [unshelve refine (Map.add_seq
        ) | unshelve refine (Map.add_seq
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_of_seq _rocq_argument_0 := ltac:(first [exact (Map.of_seq
        ) | exact (Map.of_seq _) | first [unshelve refine (Map.of_seq
        ) | unshelve refine (Map.of_seq
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_at _rocq_argument_0 := ltac:(first [exact (Map._at
        ) | exact (Map._at _) | first [unshelve refine (Map._at
        ) | unshelve refine (Map._at
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_keys _rocq_argument_0 := ltac:(first [exact (Map.keys
        ) | exact (Map.keys _) | first [unshelve refine (Map.keys
        ) | unshelve refine (Map.keys
        _rocq_argument_0)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | eassumption | typeclasses eauto]]);
      Make_result.Map_difference _rocq_argument_0 _rocq_argument_1 :=
        ltac:(first [exact (Map.difference ) | exact (Map.difference
        _) | exact (Map.difference _ _) | first [unshelve refine (Map.difference
        ) | unshelve refine (Map.difference
        _rocq_argument_0) | unshelve refine (Map.difference _rocq_argument_0
        _rocq_argument_1)]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
        _rocq_argument_0 | exact
        _rocq_argument_1 | eassumption | typeclasses eauto]])
    |}.
End Make.
Definition Make {T_t : Set} (T : MonadVM.Map.OrderedType (t := T_t)) :=
  @Make.functor T_t (Make.Build_FArgs T).