Library MonadVM.Byte_string

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

Require MonadVM.Comparable.
Require MonadVM.Map.
Require MonadVM.Option.
Require MonadVM.String.
Require MonadVM.Traits.

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.
Variable-length byte-strings defined as aliases to OCaml's string type.
Module Bytes.
  Definition t := MonadVM.String.t.

  Definition make
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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))
    := MonadVM.String.make (_rocq_fallback_arg_0).

  Definition init
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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))
    := MonadVM.String.init (_rocq_fallback_arg_0).

  Definition empty := MonadVM.String.empty.

  Definition length := MonadVM.String.length.

  Definition get
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((ascii)%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))
    := MonadVM.String.get (_rocq_fallback_arg_0).

  Definition of_bytes := MonadVM.String.of_bytes.

  Definition to_bytes := MonadVM.String.to_bytes.

  Definition blit := MonadVM.String.blit.

  Definition concat := MonadVM.String.concat.

  Definition cat := MonadVM.String.cat.

  Definition is_empty := MonadVM.String.is_empty.

  Definition starts_with := MonadVM.String.starts_with.

  Definition ends_with := MonadVM.String.ends_with.

  Definition includes := MonadVM.String.includes.

  Definition contains_from
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((bool)%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))
    := MonadVM.String.contains_from (_rocq_fallback_arg_0).

  Definition rcontains_from
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((bool)%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))
    := MonadVM.String.rcontains_from (_rocq_fallback_arg_0).

  Definition contains := MonadVM.String.contains.

  Definition sub
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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))
    := MonadVM.String.sub (_rocq_fallback_arg_0).

  Definition take_first := MonadVM.String.take_first.

  Definition take_last := MonadVM.String.take_last.

  Definition drop_first := MonadVM.String.drop_first.

  Definition drop_last := MonadVM.String.drop_last.

  Definition cut_first := MonadVM.String.cut_first.

  Definition cut_last := MonadVM.String.cut_last.

  Definition take_first_while := MonadVM.String.take_first_while.

  Definition take_last_while := MonadVM.String.take_last_while.

  Definition drop_first_while := MonadVM.String.drop_first_while.

  Definition drop_last_while := MonadVM.String.drop_last_while.

  Definition cut_first_while := MonadVM.String.cut_first_while.

  Definition cut_last_while := MonadVM.String.cut_last_while.

  Definition split_first := MonadVM.String.split_first.

  Definition split_last := MonadVM.String.split_last.

  Definition split_all := MonadVM.String.split_all.

  Definition rsplit_all := MonadVM.String.rsplit_all.

  Definition split_on_char := MonadVM.String.split_on_char.

  Definition map := MonadVM.String.map.

  Definition mapi := MonadVM.String.mapi.

  Definition fold_left {acc : Set} :
    (acc → ascii → acc) → acc → string → acc := MonadVM.String.fold_left.

  Definition fold_right {acc : Set} :
    (ascii → acc → acc) → string → acc → acc := MonadVM.String.fold_right.

  Definition for_all := MonadVM.String.for_all.

  Definition _exists := MonadVM.String._exists.

  Definition trim := MonadVM.String.trim.

  Definition escaped := MonadVM.String.escaped.

  Definition uppercase_ascii := MonadVM.String.uppercase_ascii.

  Definition lowercase_ascii := MonadVM.String.lowercase_ascii.

  Definition capitalize_ascii := MonadVM.String.capitalize_ascii.

  Definition uncapitalize_ascii := MonadVM.String.uncapitalize_ascii.

  Definition iter := MonadVM.String.iter.

  Definition iteri := MonadVM.String.iteri.

  Definition find_first_index
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((option int)%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))
    := MonadVM.String.find_first_index (_rocq_fallback_arg_0).

  Definition find_last_index
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((option int)%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))
    := MonadVM.String.find_last_index (_rocq_fallback_arg_0).

  Definition index_from
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.index_from (_rocq_fallback_arg_0).

  Definition index_from_opt
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((option int)%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))
    := MonadVM.String.index_from_opt (_rocq_fallback_arg_0).

  Definition rindex_from
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.rindex_from (_rocq_fallback_arg_0).

  Definition rindex_from_opt
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((option int)%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))
    := MonadVM.String.rindex_from_opt (_rocq_fallback_arg_0).

  Definition index
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.index (_rocq_fallback_arg_0).

  Definition index_opt := MonadVM.String.index_opt.

  Definition rindex
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.rindex (_rocq_fallback_arg_0).

  Definition rindex_opt := MonadVM.String.rindex_opt.

  Definition find_first
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((option int)%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))
    := MonadVM.String.find_first (_rocq_fallback_arg_0).

  Definition find_last
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((option int)%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))
    := MonadVM.String.find_last (_rocq_fallback_arg_0).

  Definition find_all {acc : Set}
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((acc)%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))
    : string → (int → acc → acc) → option int → string → acc → acc :=
    MonadVM.String.find_all (_rocq_fallback_arg_0).

  Definition rfind_all {acc : Set}
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((acc)%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))
    : string → (int → acc → acc) → option int → string → acc → acc :=
    MonadVM.String.rfind_all (_rocq_fallback_arg_0).

  Definition replace_first
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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))
    := MonadVM.String.replace_first (_rocq_fallback_arg_0).

  Definition replace_last
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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))
    := MonadVM.String.replace_last (_rocq_fallback_arg_0).

  Definition replace_all
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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))
    := MonadVM.String.replace_all (_rocq_fallback_arg_0).

  Definition to_seq := MonadVM.String.to_seq.

  Definition to_seqi := MonadVM.String.to_seqi.

  Definition of_seq := MonadVM.String.of_seq.

  Definition get_utf_8_uchar := MonadVM.String.get_utf_8_uchar.

  Definition is_valid_utf_8 := MonadVM.String.is_valid_utf_8.

  Definition get_utf_16be_uchar := MonadVM.String.get_utf_16be_uchar.

  Definition is_valid_utf_16be := MonadVM.String.is_valid_utf_16be.

  Definition get_utf_16le_uchar := MonadVM.String.get_utf_16le_uchar.

  Definition is_valid_utf_16le := MonadVM.String.is_valid_utf_16le.

  Definition edit_distance := MonadVM.String.edit_distance.

  Definition spellcheck := MonadVM.String.spellcheck.

  Definition get_uint8
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_uint8 (_rocq_fallback_arg_0).

  Definition get_int8
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_int8 (_rocq_fallback_arg_0).

  Definition get_uint16_ne
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_uint16_ne (_rocq_fallback_arg_0).

  Definition get_uint16_be
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_uint16_be (_rocq_fallback_arg_0).

  Definition get_uint16_le
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_uint16_le (_rocq_fallback_arg_0).

  Definition get_int16_ne
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_int16_ne (_rocq_fallback_arg_0).

  Definition get_int16_be
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_int16_be (_rocq_fallback_arg_0).

  Definition get_int16_le
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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))
    := MonadVM.String.get_int16_le (_rocq_fallback_arg_0).

  Definition get_int32_ne
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int32)%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))
    := MonadVM.String.get_int32_ne (_rocq_fallback_arg_0).

  Definition hash := MonadVM.String.hash.

  Definition seeded_hash := MonadVM.String.seeded_hash.

  Definition get_int32_be
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int32)%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))
    := MonadVM.String.get_int32_be (_rocq_fallback_arg_0).

  Definition get_int32_le
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int32)%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))
    := MonadVM.String.get_int32_le (_rocq_fallback_arg_0).

  Definition get_int64_ne
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int64)%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))
    := MonadVM.String.get_int64_ne (_rocq_fallback_arg_0).

  Definition get_int64_be
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int64)%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))
    := MonadVM.String.get_int64_be (_rocq_fallback_arg_0).

  Definition get_int64_le
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((int64)%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))
    := MonadVM.String.get_int64_le (_rocq_fallback_arg_0).

  Definition unsafe_get
    (_rocq_fallback_arg_0 :
      ltac:(let typ := constr:(ltac:(first [unshelve refine ((ascii)%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))
    := MonadVM.String.unsafe_get (_rocq_fallback_arg_0).

  Definition unsafe_blit := MonadVM.String.unsafe_blit.

  Definition _rocq_fallback_of_char_0 : ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition of_char (chr : ascii) : string :=
    (make (_rocq_fallback_of_char_0)) 1 chr.

  Definition of_chars (chars : list ascii) : MonadVM.String.t :=
    of_seq (RocqOfOCaml.OCamlList.to_seq chars).

  Definition _rocq_fallback_reverse_0 : ltac:(let typ := constr:(ltac:(first [unshelve refine ((ascii)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition reverse (bs : MonadVM.String.t) : string :=
    let n_value := length bs in
    mapi
      (fun (i_value : int) ⇒
        fun (function_parameter : ascii) ⇒
          let '_ := function_parameter in
          (RocqOfOCaml.OCamlString.get
            (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_reverse_0))
            bs
            (RocqOfOCaml.OCamlInt.sub (RocqOfOCaml.OCamlInt.sub n_value i_value)
              1)) bs.

Print bytes as a hexadecimal string, without a '0x' prefix.
  Definition to_hex_string (bytes_value : MonadVM.String.t) : string :=
    RocqOfOCaml.OCamlString.concat ""
      (RocqOfOCaml.OCamlList.of_seq
        (RocqOfOCaml.OCamlSeq.map
          ((RocqOfOCaml.OCamlFormat.sprintf
            (CamlinternalFormatBasics.Format
              (CamlinternalFormatBasics.Int CamlinternalFormatBasics.Int_x
                (CamlinternalFormatBasics.Lit_padding
                  CamlinternalFormatBasics.Zeros 2)
                CamlinternalFormatBasics.No_precision
                CamlinternalFormatBasics.End_of_format) "%02x")) : int → string)
          (RocqOfOCaml.OCamlSeq.map RocqOfOCaml.OCamlChar.code
            (to_seq bytes_value)))).

Print bytes as a hexadecimal string, without a '0x' prefix. Skip initial zeros.
  Definition to_short_hex_string (bytes_value : MonadVM.String.t) : string :=
    RocqOfOCaml.OCamlString.concat ""
      (RocqOfOCaml.OCamlList.of_seq
        (RocqOfOCaml.OCamlSeq.map
          ((RocqOfOCaml.OCamlFormat.sprintf
            (CamlinternalFormatBasics.Format
              (CamlinternalFormatBasics.Int CamlinternalFormatBasics.Int_x
                (CamlinternalFormatBasics.Lit_padding
                  CamlinternalFormatBasics.Zeros 2)
                CamlinternalFormatBasics.No_precision
                CamlinternalFormatBasics.End_of_format) "%02x")) : int → string)
          (RocqOfOCaml.OCamlSeq.map RocqOfOCaml.OCamlChar.code
            (RocqOfOCaml.OCamlSeq.drop_while
              (RocqOfOCaml.OCamlChar.equal "000" % char) (to_seq bytes_value))))).

Parse a string consisting of an even number of hex digits (\a-f\\A-F\\0-9\), optionally prefixed by '0x', into an array of bytes. If the width argument is provided, the resulting byte-string is left-padded with zeros up to the desired width. Raises an exception if the given string does not follow the correct format.
  Definition _rocq_fallback_of_hex_string_0 :
    ltac:(let typ := constr:(ltac:(first [unshelve refine ((RocqOfOCaml.OCamlIarray.t
      int)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition _rocq_fallback_of_hex_string_1 :
    ltac:(let typ := constr:(ltac:(first [unshelve refine ((unit)%type
    )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
    _rocq_fallback_of_hex_string_0 | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition _rocq_fallback_of_hex_string_3 :
    ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%type
    )]; first [match goal with |- ?g ⇒ let sort := type of g in lazymatch sort with Set ⇒ fail | _ ⇒ shelve end end | exact
    _rocq_fallback_of_hex_string_0 | exact
    _rocq_fallback_of_hex_string_1 | exact
    _rocq_fallback_of_char_0 | eassumption | typeclasses eauto | RocqOfOCaml.Opaque.opaque_inhabit 64%nat])) in let typ := _rocq_witness_type typ in exact typ).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition of_hex_string : option int → string → string :=
    let hex_table :=
      (RocqOfOCaml.OCamlIarray.init
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_of_hex_string_0))
        256
        (fun (i_value : int) ⇒
          let in_range (lo : ascii) (hi : ascii) : bool :=
            andb (Z.geb i_value (RocqOfOCaml.OCamlChar.code lo))
              (Z.leb i_value (RocqOfOCaml.OCamlChar.code hi)) in
          if in_range "0" % char "9" % char then
            RocqOfOCaml.OCamlInt.sub i_value
              (RocqOfOCaml.OCamlChar.code "0" % char)
          else
            if in_range "a" % char "f" % char then
              RocqOfOCaml.OCamlInt.sub (RocqOfOCaml.OCamlInt.add 10 i_value)
                (RocqOfOCaml.OCamlChar.code "a" % char)
            else
              if in_range "A" % char "F" % char then
                RocqOfOCaml.OCamlInt.sub (RocqOfOCaml.OCamlInt.add 10 i_value)
                  (RocqOfOCaml.OCamlChar.code "A" % char)
              else
                (-256)) in
    fun (width : option int) ⇒
      fun (str : string) ⇒
        let '_ :=
          if
            Z.eqb
              ((RocqOfOCaml.OCamlInt.rem
                (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_of_hex_string_3))
                (RocqOfOCaml.OCamlString.length str) 2) 0 then tt else
            _rocq_fallback_of_hex_string_1 in
        let start :=
          if
            orb (RocqOfOCaml.OCamlString.starts_with "0x" str)
              (RocqOfOCaml.OCamlString.starts_with "0X" str)
          then
            2
          else
            0 in
        let '(padding, len) :=
          let len :=
            (RocqOfOCaml.OCamlInt.div
              (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_of_hex_string_3))
              (RocqOfOCaml.OCamlInt.sub (RocqOfOCaml.OCamlString.length str)
                start) 2 in
          match width with
          | None ⇒ (0, len)
          | Some w_value ⇒
            ((RocqOfOCaml.OCamlInt.sub (Z.max w_value len) len),
              (Z.max w_value len))
          end in
        let byte_i (i_value : int) : ascii :=
          if Z.ltb i_value padding then
            "000" % char
          else
            let i_value := RocqOfOCaml.OCamlInt.sub i_value padding in
            let c1 :=
              RocqOfOCaml.OCamlChar.code
                ((RocqOfOCaml.OCamlString.get
                  (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_reverse_0))
                  str
                  (RocqOfOCaml.OCamlInt.add start
                    (RocqOfOCaml.OCamlInt.mul i_value 2))) in
            let c0 :=
              RocqOfOCaml.OCamlChar.code
                ((RocqOfOCaml.OCamlString.get
                  (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_reverse_0))
                  str
                  (RocqOfOCaml.OCamlInt.add
                    (RocqOfOCaml.OCamlInt.add start
                      (RocqOfOCaml.OCamlInt.mul i_value 2)) 1)) in
            let num :=
              RocqOfOCaml.OCamlInt.add
                (RocqOfOCaml.OCamlInt.mul
                  ((RocqOfOCaml.OCamlIarray.get
                    (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_of_hex_string_3))
                    hex_table c1) 16)
                ((RocqOfOCaml.OCamlIarray.get
                  (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_of_hex_string_3))
                  hex_table c0) in
            (RocqOfOCaml.OCamlChar.chr
              (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_reverse_0))
              num in
        (RocqOfOCaml.OCamlString.init
          (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_of_char_0)) len
          byte_i.

  Definition op_tildeat (str : string) : string := of_hex_string None str.

  Module zero_and_nonzero_counts.
    Record record : Set := Build {
      zero_bytes : int;
      nonzero_bytes : int;
    }.
    Definition with_zero_bytes zero_bytes (r : record) :=
      Build zero_bytes r.(nonzero_bytes).
    Definition with_nonzero_bytes nonzero_bytes (r : record) :=
      Build r.(zero_bytes) nonzero_bytes.
  End zero_and_nonzero_counts.
  Definition zero_and_nonzero_counts := zero_and_nonzero_counts.record.

  Definition count_zero_and_nonzero_bytes (bs : MonadVM.String.t)
    : zero_and_nonzero_counts :=
    fold_left
      (fun (counts : zero_and_nonzero_counts) ⇒
        fun (byte : RocqOfOCaml.OCamlChar.t) ⇒
          if RocqOfOCaml.OCamlChar.equal byte "000" % char then
            MonadVM.Byte_string.Bytes.zero_and_nonzero_counts.with_zero_bytes
              (RocqOfOCaml.OCamlInt.add
                counts.(MonadVM.Byte_string.Bytes.zero_and_nonzero_counts.zero_bytes)
                1) counts
          else
            MonadVM.Byte_string.Bytes.zero_and_nonzero_counts.with_nonzero_bytes
              (RocqOfOCaml.OCamlInt.add
                counts.(MonadVM.Byte_string.Bytes.zero_and_nonzero_counts.nonzero_bytes)
                1) counts)
      {| MonadVM.Byte_string.Bytes.zero_and_nonzero_counts.zero_bytes := 0;
        MonadVM.Byte_string.Bytes.zero_and_nonzero_counts.nonzero_bytes := 0; |}
      bs.

sub_with_zero_padding bytes i sz returns the sz-length byte-string starting at bytes.[i]. If the length of bytes is smaller than i + sz - 1, it is padded with zeros.
  Definition _rocq_fallback_sub_with_zero_padding_0 (bytes_value : string) :
    ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition sub_with_zero_padding
    (bytes_value : string) (i_value : int) (sz : int) : string :=
    (init ((_rocq_fallback_sub_with_zero_padding_0 bytes_value))) sz
      (fun (j_value : int) ⇒
        if
          orb
            (Z.geb (RocqOfOCaml.OCamlInt.add i_value j_value)
              (length bytes_value))
            (Z.ltb (RocqOfOCaml.OCamlInt.add i_value j_value) 0)
        then
          "000" % char
        else
          (RocqOfOCaml.OCamlString.get
            (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_reverse_0))
            bytes_value (RocqOfOCaml.OCamlInt.add i_value j_value)).

  Definition MonadVM_Comparable_Make_include_fargs :=
    MonadVM.Comparable.Make.Build_FArgs
      (let t : Set := MonadVM.String.t in
      let compare (x_value : t) (y_value : t) : int :=
        RocqOfOCaml.OCamlString.compare x_value y_value in
      ltac:(refine (_ :
        MonadVM.Map.OrderedType (t := t)); constructor; [refine (compare)]; shelve)).

  Definition MonadVM_Comparable_Make_include :
    MonadVM.Comparable.Make.Make_result
      (_fargs := MonadVM_Comparable_Make_include_fargs) :=
    (MonadVM.Comparable.Make.functor
    (_fargs := (MonadVM_Comparable_Make_include_fargs ))).

Inclusion of the module MonadVM_Comparable_Make_include
  Section _rocq_include_assumptions_comparison_op.
  #[local] Existing Instance MonadVM_Comparable_Make_include_fargs.

  Definition comparison_op :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.comparison_op).

  Definition op_lt :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.op_lt).

  Definition op_lteq :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.op_lteq).

  Definition op_eq :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.op_eq).

  Definition op_gteq :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.op_gteq).

  Definition op_gt :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.op_gt).

  Definition op_ltgt :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.op_ltgt).

  Definition equal :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.equal).

  Definition compare :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.compare).

  Definition max :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.max).

  Definition min :=
    Eval cbn in
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.min).
  End _rocq_include_assumptions_comparison_op.

  Module _Set.
    Definition elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.elt).

    Definition t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.t).

    Definition empty :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.empty).

    Definition add :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.add).

    Definition singleton :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.singleton).

    Definition remove :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.remove).

    Definition union :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.union).

    Definition inter :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.inter).

    Definition disjoint :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.disjoint).

    Definition diff :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.diff).

    Definition cardinal :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.cardinal).

    Definition elements :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.elements).

    Definition min_elt
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.min_elt)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition min_elt_opt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.min_elt_opt).

    Definition max_elt
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.max_elt)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition max_elt_opt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.max_elt_opt).

    Definition choose
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.choose)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition choose_opt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.choose_opt).

    Definition find
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_opt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_opt).

    Definition find_first
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_first)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_first_opt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_first_opt).

    Definition find_last
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_last)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_last_opt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_last_opt).

    Definition iter :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.iter).

    Definition fold {acc : Set} : (elt → acc → acc) → t → acc → acc :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.fold).

    Definition map :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.map).

    Definition filter :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.filter).

    Definition filter_map :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.filter_map).

    Definition partition :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.partition).

    Definition split :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.split).

    Definition is_empty :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.is_empty).

    Definition is_singleton :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.is_singleton).

    Definition mem :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.mem).

    Definition equal :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.equal).

    Definition compare :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.compare).

    Definition subset :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.subset).

    Definition for_all :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.for_all).

    Definition _exists :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S._exists).

    Definition to_list :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_list).

    Definition of_list :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.of_list).

    Definition to_seq_from :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_seq_from).

    Definition to_seq :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_seq).

    Definition to_rev_seq :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_rev_seq).

    Definition add_seq :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.add_seq).

    Definition of_seq :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.of_seq).
  End _Set.

  Section _rocq_include_assumptions__Set.
  #[local] Existing Instance MonadVM_Comparable_Make_include_fargs.

  Definition _Set :=
    MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).
  End _rocq_include_assumptions__Set.

  Module Map.
Inclusion from a translated functor-result record
    Definition key :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_key).

    Definition t (a : Set) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_t)
        a.

    Definition empty {a : Set} : Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_empty).

    Definition add {a : Set} : key → a → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_add).

    Definition add_to_list {a : Set} :
      key → a → Map.t (list a) → Map.t (list a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_add_to_list).

    Definition update {a : Set} :
      key → (option a → option a) → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_update).

    Definition singleton {a : Set} : key → a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_singleton).

    Definition remove {a : Set} : key → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_remove).

    Definition merge {a b c : Set} :
      (key → option a → option b → option c) → Map.t a → Map.t b → Map.t c
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_merge).

    Definition union {a : Set} :
      (key → a → a → option a) → Map.t a → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_union).

    Definition cardinal {a : Set} : Map.t a → int :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_cardinal).

    Definition bindings {a : Set} : Map.t a → list (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_bindings).

    Definition min_binding {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))
      : Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_min_binding)
        (_rocq_fallback_arg_0).

    Definition min_binding_opt {a : Set} : Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_min_binding_opt).

    Definition max_binding {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))
      : Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_max_binding)
        (_rocq_fallback_arg_0).

    Definition max_binding_opt {a : Set} : Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_max_binding_opt).

    Definition choose {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))
      : Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_choose)
        (_rocq_fallback_arg_0).

    Definition choose_opt {a : Set} : Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_choose_opt).

    Definition 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))
      : key → Map.t a → a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find)
        (_rocq_fallback_arg_0).

    Definition find_opt {a : Set} : key → Map.t a → option a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_opt).

    Definition find_first {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) → Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_first)
        (_rocq_fallback_arg_0).

    Definition find_first_opt {a : Set} :
      (key → bool) → Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_first_opt).

    Definition find_last {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) → Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_last)
        (_rocq_fallback_arg_0).

    Definition find_last_opt {a : Set} :
      (key → bool) → Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_last_opt).

    Definition iter {a : Set} : (key → a → unit) → Map.t a → unit :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_iter).

    Definition fold {a acc : Set} :
      (key → a → acc → acc) → Map.t a → acc → acc :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_fold).

    Definition map {a b : Set} : (a → b) → Map.t a → Map.t b :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_map).

    Definition mapi {a b : Set} : (key → a → b) → Map.t a → Map.t b :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_mapi).

    Definition filter {a : Set} : (key → a → bool) → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_filter).

    Definition filter_map {a b : Set} :
      (key → a → option b) → Map.t a → Map.t b :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_filter_map).

    Definition partition {a : Set} :
      (key → a → bool) → Map.t a → Map.t a × Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_partition).

    Definition split {a : Set} : key → Map.t a → Map.t a × option a × Map.t a
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_split).

    Definition is_empty {a : Set} : Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_is_empty).

    Definition is_singleton {a : Set} : Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_is_singleton).

    Definition mem {a : Set} : key → Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_mem).

    Definition equal {a : Set} : (a → a → bool) → Map.t a → Map.t a → bool
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_equal).

    Definition compare {a : Set} : (a → a → int) → Map.t a → Map.t a → int
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_compare).

    Definition for_all {a : Set} : (key → a → bool) → Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_for_all).

    Definition _exists {a : Set} : (key → a → bool) → Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_exists).

    Definition to_list {a : Set} : Map.t a → list (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_list).

    Definition of_list {a : Set} : list (key × a) → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_of_list).

    Definition to_seq {a : Set} : Map.t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_seq).

    Definition to_rev_seq {a : Set} :
      Map.t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_rev_seq).

    Definition to_seq_from {a : Set} :
      key → Map.t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_seq_from).

    Definition add_seq {a : Set} :
      RocqOfOCaml.OCamlSeq.t (key × a) → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_add_seq).

    Definition of_seq {a : Set} : RocqOfOCaml.OCamlSeq.t (key × a) → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_of_seq).

    Definition _at {v : Set} : key → Lens.t (Map.t v) (option v) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_at).

    Definition keys {a : Set} : Map.t a → _Set.(RocqOfOCaml.OCamlSet.S.t) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_keys).

    Definition difference {a d : Set} :
      (option a → option a → option d) → Map.t a → Map.t a → Map.t d :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_difference).

    Module Map_signature.
      Record signature {t : Set → Set} : Type := {
        key := MonadVM.String.t;
        t := t;
        empty : ∀ {a : Set} , t a;
        add : ∀ {a : Set} , key → a → t a → t a;
        add_to_list : ∀ {a : Set} , key → a → t (list a) → t (list a);
        update : ∀ {a : Set} , key → (option a → option a) → t a → t a;
        singleton : ∀ {a : Set} , key → a → t a;
        remove : ∀ {a : Set} , key → t a → t a;
        merge :
          ∀ {a b c : Set} ,
            (key → option a → option b → option c) → t a → t b → t c;
        union :
          ∀ {a : Set} , (key → a → a → option a) → t a → t a → t a;
        cardinal : ∀ {a : Set} , t a → int;
        bindings : ∀ {a : Set} , t a → list (key × a);
        min_binding :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((MonadVM.String.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)),
            t a → key × a;
        min_binding_opt : ∀ {a : Set} , t a → option (key × a);
        max_binding :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((MonadVM.String.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)),
            t a → key × a;
        max_binding_opt : ∀ {a : Set} , t a → option (key × a);
        choose :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((MonadVM.String.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)),
            t a → key × a;
        choose_opt : ∀ {a : Set} , t a → option (key × a);
        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)),
            key → t a → a;
        find_opt : ∀ {a : Set} , key → t a → option a;
        find_first :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((MonadVM.String.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)),
            (key → bool) → t a → key × a;
        find_first_opt :
          ∀ {a : Set} , (key → bool) → t a → option (key × a);
        find_last :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((MonadVM.String.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)),
            (key → bool) → t a → key × a;
        find_last_opt :
          ∀ {a : Set} , (key → bool) → t a → option (key × a);
        iter : ∀ {a : Set} , (key → a → unit) → t a → unit;
        fold :
          ∀ {a acc : Set} , (key → a → acc → acc) → t a → acc → acc;
        map : ∀ {a b : Set} , (a → b) → t a → t b;
        mapi : ∀ {a b : Set} , (key → a → b) → t a → t b;
        filter : ∀ {a : Set} , (key → a → bool) → t a → t a;
        filter_map : ∀ {a b : Set} , (key → a → option b) → t a → t b;
        partition : ∀ {a : Set} , (key → a → bool) → t a → t a × t a;
        split : ∀ {a : Set} , key → t a → t a × option a × t a;
        is_empty : ∀ {a : Set} , t a → bool;
        is_singleton : ∀ {a : Set} , t a → bool;
        mem : ∀ {a : Set} , key → t a → bool;
        equal : ∀ {a : Set} , (a → a → bool) → t a → t a → bool;
        compare : ∀ {a : Set} , (a → a → int) → t a → t a → int;
        for_all : ∀ {a : Set} , (key → a → bool) → t a → bool;
        _exists : ∀ {a : Set} , (key → a → bool) → t a → bool;
        to_list : ∀ {a : Set} , t a → list (key × a);
        of_list : ∀ {a : Set} , list (key × a) → t a;
        to_seq : ∀ {a : Set} , t a → RocqOfOCaml.OCamlSeq.t (key × a);
        to_rev_seq : ∀ {a : Set} , t a → RocqOfOCaml.OCamlSeq.t (key × a);
        to_seq_from :
          ∀ {a : Set} , key → t a → RocqOfOCaml.OCamlSeq.t (key × a);
        add_seq :
          ∀ {a : Set} , RocqOfOCaml.OCamlSeq.t (key × a) → t a → t a;
        of_seq : ∀ {a : Set} , RocqOfOCaml.OCamlSeq.t (key × a) → t a;
        _at : ∀ {v : Set} , key → Lens.t (t v) (option v);
        keys : ∀ {a : Set} , t a → _Set.(RocqOfOCaml.OCamlSet.S.t);
        difference :
          ∀ {a d : Set} ,
            (option a → option a → option d) → t a → t a → t d;
      }.
    End Map_signature.
    Definition Map_signature := @Map_signature.signature.
    Arguments Map_signature {_}.

    Definition module :Map_signature (t := _) :=
      {|
        Map_signature.empty _rocq_argument_0 := ltac:(first [exact (empty
          ) | exact (empty _) | first [unshelve refine (empty
          ) | unshelve refine (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]]);
        Map_signature.add _rocq_argument_0 := ltac:(first [exact (add
          ) | exact (add _) | first [unshelve refine (add
          ) | unshelve refine (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]]);
        Map_signature.add_to_list _rocq_argument_0 :=
          ltac:(first [exact (add_to_list ) | exact (add_to_list
          _) | first [unshelve refine (add_to_list
          ) | unshelve refine (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]]);
        Map_signature.update _rocq_argument_0 := ltac:(first [exact (update
          ) | exact (update _) | first [unshelve refine (update
          ) | unshelve refine (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]]);
        Map_signature.singleton _rocq_argument_0 :=
          ltac:(first [exact (singleton ) | exact (singleton
          _) | first [unshelve refine (singleton ) | unshelve refine (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]]);
        Map_signature.remove _rocq_argument_0 := ltac:(first [exact (remove
          ) | exact (remove _) | first [unshelve refine (remove
          ) | unshelve refine (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]]);
        Map_signature.merge _rocq_argument_0 _rocq_argument_1 _rocq_argument_2
        := ltac:(first [exact (merge ) | exact (merge _) | exact (merge _
          _) | exact (merge _ _ _) | first [unshelve refine (merge
          ) | unshelve refine (merge _rocq_argument_0) | unshelve refine (merge
          _rocq_argument_0 _rocq_argument_1) | unshelve refine (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]]);
        Map_signature.union _rocq_argument_0 := ltac:(first [exact (union
          ) | exact (union _) | first [unshelve refine (union
          ) | unshelve refine (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]]);
        Map_signature.cardinal _rocq_argument_0 := ltac:(first [exact (cardinal
          ) | exact (cardinal _) | first [unshelve refine (cardinal
          ) | unshelve refine (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]]);
        Map_signature.bindings _rocq_argument_0 := ltac:(first [exact (bindings
          ) | exact (bindings _) | first [unshelve refine (bindings
          ) | unshelve refine (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]]);
        Map_signature.min_binding _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (min_binding
          _rocq_witness_0) | unshelve refine (min_binding _rocq_argument_0
          _rocq_witness_0) | unshelve refine (min_binding
          ) | unshelve refine (min_binding
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.min_binding_opt _rocq_argument_0 :=
          ltac:(first [exact (min_binding_opt ) | exact (min_binding_opt
          _) | first [unshelve refine (min_binding_opt
          ) | unshelve refine (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]]);
        Map_signature.max_binding _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (max_binding
          _rocq_witness_0) | unshelve refine (max_binding _rocq_argument_0
          _rocq_witness_0) | unshelve refine (max_binding
          ) | unshelve refine (max_binding
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.max_binding_opt _rocq_argument_0 :=
          ltac:(first [exact (max_binding_opt ) | exact (max_binding_opt
          _) | first [unshelve refine (max_binding_opt
          ) | unshelve refine (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]]);
        Map_signature.choose _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (choose
          _rocq_witness_0) | unshelve refine (choose _rocq_argument_0
          _rocq_witness_0) | unshelve refine (choose ) | unshelve refine (choose
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.choose_opt _rocq_argument_0 :=
          ltac:(first [exact (choose_opt ) | exact (choose_opt
          _) | first [unshelve refine (choose_opt
          ) | unshelve refine (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]]);
        Map_signature.find _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (find
          _rocq_witness_0) | unshelve refine (find _rocq_argument_0
          _rocq_witness_0) | unshelve refine (find ) | unshelve refine (find
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.find_opt _rocq_argument_0 := ltac:(first [exact (find_opt
          ) | exact (find_opt _) | first [unshelve refine (find_opt
          ) | unshelve refine (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]]);
        Map_signature.find_first _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (find_first
          _rocq_witness_0) | unshelve refine (find_first _rocq_argument_0
          _rocq_witness_0) | unshelve refine (find_first
          ) | unshelve refine (find_first
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.find_first_opt _rocq_argument_0 :=
          ltac:(first [exact (find_first_opt ) | exact (find_first_opt
          _) | first [unshelve refine (find_first_opt
          ) | unshelve refine (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]]);
        Map_signature.find_last _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (find_last
          _rocq_witness_0) | unshelve refine (find_last _rocq_argument_0
          _rocq_witness_0) | unshelve refine (find_last
          ) | unshelve refine (find_last
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.find_last_opt _rocq_argument_0 :=
          ltac:(first [exact (find_last_opt ) | exact (find_last_opt
          _) | first [unshelve refine (find_last_opt
          ) | unshelve refine (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]]);
        Map_signature.iter _rocq_argument_0 := ltac:(first [exact (iter
          ) | exact (iter _) | first [unshelve refine (iter
          ) | unshelve refine (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]]);
        Map_signature.fold _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (fold ) | exact (fold _) | exact (fold _
          _) | first [unshelve refine (fold ) | unshelve refine (fold
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.map _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (map ) | exact (map _) | exact (map _
          _) | first [unshelve refine (map ) | unshelve refine (map
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.mapi _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (mapi ) | exact (mapi _) | exact (mapi _
          _) | first [unshelve refine (mapi ) | unshelve refine (mapi
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.filter _rocq_argument_0 := ltac:(first [exact (filter
          ) | exact (filter _) | first [unshelve refine (filter
          ) | unshelve refine (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]]);
        Map_signature.filter_map _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (filter_map ) | exact (filter_map
          _) | exact (filter_map _ _) | first [unshelve refine (filter_map
          ) | unshelve refine (filter_map
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.partition _rocq_argument_0 :=
          ltac:(first [exact (partition ) | exact (partition
          _) | first [unshelve refine (partition ) | unshelve refine (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]]);
        Map_signature.split _rocq_argument_0 := ltac:(first [exact (split
          ) | exact (split _) | first [unshelve refine (split
          ) | unshelve refine (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]]);
        Map_signature.is_empty _rocq_argument_0 := ltac:(first [exact (is_empty
          ) | exact (is_empty _) | first [unshelve refine (is_empty
          ) | unshelve refine (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]]);
        Map_signature.is_singleton _rocq_argument_0 :=
          ltac:(first [exact (is_singleton ) | exact (is_singleton
          _) | first [unshelve refine (is_singleton
          ) | unshelve refine (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]]);
        Map_signature.mem _rocq_argument_0 := ltac:(first [exact (mem
          ) | exact (mem _) | first [unshelve refine (mem
          ) | unshelve refine (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]]);
        Map_signature.equal _rocq_argument_0 := ltac:(first [exact (equal
          ) | exact (equal _) | first [unshelve refine (equal
          ) | unshelve refine (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]]);
        Map_signature.compare _rocq_argument_0 := ltac:(first [exact (compare
          ) | exact (compare _) | first [unshelve refine (compare
          ) | unshelve refine (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]]);
        Map_signature.for_all _rocq_argument_0 := ltac:(first [exact (for_all
          ) | exact (for_all _) | first [unshelve refine (for_all
          ) | unshelve refine (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]]);
        Map_signature._exists _rocq_argument_0 := ltac:(first [exact (_exists
          ) | exact (_exists _) | first [unshelve refine (_exists
          ) | unshelve refine (_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]]);
        Map_signature.to_list _rocq_argument_0 := ltac:(first [exact (to_list
          ) | exact (to_list _) | first [unshelve refine (to_list
          ) | unshelve refine (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]]);
        Map_signature.of_list _rocq_argument_0 := ltac:(first [exact (of_list
          ) | exact (of_list _) | first [unshelve refine (of_list
          ) | unshelve refine (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]]);
        Map_signature.to_seq _rocq_argument_0 := ltac:(first [exact (to_seq
          ) | exact (to_seq _) | first [unshelve refine (to_seq
          ) | unshelve refine (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]]);
        Map_signature.to_rev_seq _rocq_argument_0 :=
          ltac:(first [exact (to_rev_seq ) | exact (to_rev_seq
          _) | first [unshelve refine (to_rev_seq
          ) | unshelve refine (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]]);
        Map_signature.to_seq_from _rocq_argument_0 :=
          ltac:(first [exact (to_seq_from ) | exact (to_seq_from
          _) | first [unshelve refine (to_seq_from
          ) | unshelve refine (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]]);
        Map_signature.add_seq _rocq_argument_0 := ltac:(first [exact (add_seq
          ) | exact (add_seq _) | first [unshelve refine (add_seq
          ) | unshelve refine (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]]);
        Map_signature.of_seq _rocq_argument_0 := ltac:(first [exact (of_seq
          ) | exact (of_seq _) | first [unshelve refine (of_seq
          ) | unshelve refine (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]]);
        Map_signature._at _rocq_argument_0 := ltac:(first [exact (_at
          ) | exact (_at _) | first [unshelve refine (_at
          ) | unshelve refine (_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]]);
        Map_signature.keys _rocq_argument_0 := ltac:(first [exact (keys
          ) | exact (keys _) | first [unshelve refine (keys
          ) | unshelve refine (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]]);
        Map_signature.difference _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (difference ) | exact (difference
          _) | exact (difference _ _) | first [unshelve refine (difference
          ) | unshelve refine (difference
          _rocq_argument_0) | unshelve refine (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 Map.
  Definition Map := Map.module.
End Bytes.

Module Fixed.
  Class FArgs := {
    Byte_width : MonadVM.Traits.Byte_width.SIG;
  }.

  Definition _rocq_fallback_byte_width_0 `{_fargs : FArgs} : ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition byte_width `{_fargs : FArgs} : int :=
    match Byte_width.(MonadVM.Traits.Byte_width.SIG.byte_width) with
    | MonadVM.Support.Variants.ByteWidth.Fixed n_value ⇒ n_value
    | _ ⇒ _rocq_fallback_byte_width_0
    end.

  Module Impl.
    Definition t `{_fargs : FArgs} : Set := string.

    Definition of_bytes `{_fargs : FArgs} (bs : Bytes.t) : option t :=
      if Z.eqb (RocqOfOCaml.OCamlString.length bs) byte_width then
        Some bs
      else
        None.

    Definition _rocq_fallback_init_0 `{_fargs : FArgs} : ltac:(let typ := constr:(ltac:(first [unshelve refine ((t)%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).
    Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

    Definition init `{_fargs : FArgs} (byte_i : int → ascii) : t :=
      (MonadVM.String.init (_rocq_fallback_init_0)) byte_width byte_i.

    Module Impl_signature.
      Record signature `{_fargs : FArgs} : Type := {
        t := string;
        of_bytes : string → option t;
        init : (int → ascii) → t;
      }.
    End Impl_signature.
    Definition Impl_signature `{_fargs : FArgs} := @Impl_signature.signature _.
    Arguments Impl_signature {_}.

    Definition module `{_fargs : FArgs} :Impl_signature :=
      {|
        Impl_signature.of_bytes := of_bytes;
        Impl_signature.init := init
      |}.
  End Impl.
  Definition Impl `{_fargs : FArgs} := Impl.module.

Inclusion of the module Impl
  Definition t `{_fargs : FArgs} := Impl.(Impl.Impl_signature.t).

  Definition of_bytes `{_fargs : FArgs} :
    t → option Impl.(Impl.Impl_signature.t) :=
    Impl.(Impl.Impl_signature.of_bytes).

  Definition init `{_fargs : FArgs} :
    (int → ascii) → Impl.(Impl.Impl_signature.t) :=
    Impl.(Impl.Impl_signature.init).

  Definition make `{_fargs : FArgs} (char : ascii) : string :=
    init
      (fun (function_parameter : int) ⇒
        let '_ := function_parameter in
        char).

  Definition zeros `{_fargs : FArgs} : string := make "000" % char.

  Definition ones `{_fargs : FArgs} : string := make "255" % char.

  Definition _rocq_fallback_of_bytes_exn_0 `{_fargs : FArgs} : ltac:(let typ := constr:(ltac:(first [unshelve refine ((string)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition of_bytes_exn `{_fargs : FArgs} (bs : Bytes.t) : string :=
    (MonadVM.Option.get (_rocq_fallback_of_bytes_exn_0)) (of_bytes bs).

  Definition to_bytes `{_fargs : FArgs} (bs : string) : string := bs.

  Definition to_seq `{_fargs : FArgs} (bs : string)
    : RocqOfOCaml.OCamlSeq.t ascii := MonadVM.String.to_seq bs.

  Definition fold_left `{_fargs : FArgs} {A : Set}
    (f_value : A → ascii → A) (acc : A) (bs : string) : A :=
    MonadVM.String.fold_left f_value acc bs.

  Definition fold_right `{_fargs : FArgs} {A : Set}
    (f_value : ascii → A → A) (bs : string) (acc : A) : A :=
    MonadVM.String.fold_right f_value bs acc.

  Definition starts_with `{_fargs : FArgs} (prefix : Bytes.t) (bs : string)
    : bool := MonadVM.String.starts_with prefix bs.

  Definition _rocq_fallback_op_pointdollarlparenrparen_0 `{_fargs : FArgs} : ltac:(let typ := constr:(ltac:(first [unshelve refine ((ascii)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition op_pointdollarlparenrparen `{_fargs : FArgs}
    (bs : string) (i_value : int) : ascii :=
    (MonadVM.String.get (_rocq_fallback_op_pointdollarlparenrparen_0)) bs
      i_value.

  Definition map `{_fargs : FArgs} (f_value : ascii → ascii) (bs : string)
    : string :=
    init
      (fun (i_value : int) ⇒ f_value (op_pointdollarlparenrparen bs i_value)).

  Definition mapi `{_fargs : FArgs}
    (f_value : int → ascii → ascii) (bs : string) : string :=
    init
      (fun (i_value : int) ⇒
        f_value i_value (op_pointdollarlparenrparen bs i_value)).

  Definition iter `{_fargs : FArgs} (f_value : ascii → unit) (bs : string)
    : unit := MonadVM.String.iter f_value bs.

  Definition iteri `{_fargs : FArgs}
    (f_value : int → ascii → unit) (bs : string) : unit :=
    MonadVM.String.iteri f_value bs.

  Definition for_all `{_fargs : FArgs} (f_value : ascii → bool) (bs : string)
    : bool := MonadVM.String.for_all f_value bs.

  Definition _exists `{_fargs : FArgs} (f_value : ascii → bool) (bs : string)
    : bool := MonadVM.String._exists f_value bs.

  Definition reverse `{_fargs : FArgs} (bs : string) : string :=
    let byte_i (i_value : int) : ascii :=
      op_pointdollarlparenrparen bs
        (RocqOfOCaml.OCamlInt.sub (RocqOfOCaml.OCamlInt.sub byte_width i_value)
          1) in
    init byte_i.

sub bytes i returns the {!byte_width}-length byte-string starting at bytes.[i]. Throws an exception if i is out of bounds or bytes is shorter than i + byte_width - 1.
  Definition _rocq_fallback_sub_0 `{_fargs : FArgs} (bytes_value : Bytes.t) :
    ltac:(let typ := constr:(ltac:(first [unshelve refine ((Bytes.t)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition sub `{_fargs : FArgs} (bytes_value : Bytes.t) (i_value : int)
    : string :=
    of_bytes_exn
      ((Bytes.sub ((_rocq_fallback_sub_0 bytes_value))) bytes_value i_value
        byte_width).

sub_with_zero_padding bytes i returns the {!byte_width}-length byte-string starting at bytes.[i]. If the length of bytes is smaller than i + byte_width - 1, it is padded with zeros.
  Definition sub_with_zero_padding `{_fargs : FArgs}
    (bytes_value : Bytes.t) (i_value : int) : string :=
    init
      (fun (j_value : int) ⇒
        if
          orb
            (Z.geb (RocqOfOCaml.OCamlInt.add i_value j_value)
              (Bytes.length bytes_value))
            (Z.ltb (RocqOfOCaml.OCamlInt.add i_value j_value) 0)
        then
          "000" % char
        else
          (MonadVM.String.get (_rocq_fallback_op_pointdollarlparenrparen_0))
            bytes_value (RocqOfOCaml.OCamlInt.add i_value j_value)).

Print bytes as a hexadecimal string, without a '0x' prefix.
  Definition to_hex_string `{_fargs : FArgs} (bytes_value : string) : string :=
    Bytes.to_hex_string bytes_value.

Print bytes as a hexadecimal string, without a '0x' prefix. Skip initial zeros.
  Definition to_short_hex_string `{_fargs : FArgs} (bytes_value : string)
    : string := Bytes.to_short_hex_string bytes_value.

Parse a string consisting of an even number of hex digits (\a-f\\A-F\\0-9\), optionally prefixed by '0x', into an array of bytes. Raises an exception if the given string does not follow the correct format, or the length of the resulting byte-string is different from {!byte_width}.
  Definition of_hex_string `{_fargs : FArgs} (zero_pad_optional : option bool)
    : string → string :=
    match zero_pad_optional with
    | Some zero_pad ⇒
      fun (str : string) ⇒
        let width :=
          if zero_pad then
            Some byte_width
          else
            None in
        of_bytes_exn (Bytes.of_hex_string width str)
    | None ⇒
      let 'zero_pad := true in
      fun (str : string) ⇒
        let width :=
          if zero_pad then
            Some byte_width
          else
            None in
        of_bytes_exn (Bytes.of_hex_string width str)
    end.

  Definition op_tildeat `{_fargs : FArgs} (str : string) : string :=
    of_hex_string None str.

  Definition MonadVM_Comparable_Make_include_fargs `{_fargs : FArgs} :=
    MonadVM.Comparable.Make.Build_FArgs
      (let t : Set := string in
      let compare (x_value : t) (y_value : t) : int :=
        MonadVM.String.compare x_value y_value in
      ltac:(refine (_ :
        MonadVM.Map.OrderedType (t := t)); constructor; [refine (compare)]; shelve)).

  Definition MonadVM_Comparable_Make_include `{_fargs : FArgs} :
    MonadVM.Comparable.Make.Make_result
      (_fargs := MonadVM_Comparable_Make_include_fargs) :=
    (MonadVM.Comparable.Make.functor
    (_fargs := (MonadVM_Comparable_Make_include_fargs ))).

Inclusion of the module MonadVM_Comparable_Make_include
  Definition comparison_op `{_fargs : FArgs} :
    (int → int → bool) → string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.comparison_op).

  Definition op_lt `{_fargs : FArgs} : string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.op_lt).

  Definition op_lteq `{_fargs : FArgs} : string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.op_lteq).

  Definition op_eq `{_fargs : FArgs} : string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.op_eq).

  Definition op_gteq `{_fargs : FArgs} : string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.op_gteq).

  Definition op_gt `{_fargs : FArgs} : string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.op_gt).

  Definition op_ltgt `{_fargs : FArgs} : string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.op_ltgt).

  Definition equal `{_fargs : FArgs} : string → string → bool :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.equal).

  Definition compare `{_fargs : FArgs} : string → string → int :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.compare).

  Definition max `{_fargs : FArgs} : string → string → string :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.max).

  Definition min `{_fargs : FArgs} : string → string → string :=
    Eval cbn in
      (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result.min).

  Module _Set.
    Definition elt `{_fargs : FArgs} :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.elt).

    Definition t `{_fargs : FArgs} :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.t).

    Definition empty `{_fargs : FArgs} : t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.empty).

    Definition add `{_fargs : FArgs} : elt → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.add).

    Definition singleton `{_fargs : FArgs} : elt → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.singleton).

    Definition remove `{_fargs : FArgs} : elt → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.remove).

    Definition union `{_fargs : FArgs} : t → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.union).

    Definition inter `{_fargs : FArgs} : t → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.inter).

    Definition disjoint `{_fargs : FArgs} : t → t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.disjoint).

    Definition diff `{_fargs : FArgs} : t → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.diff).

    Definition cardinal `{_fargs : FArgs} : t → int :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.cardinal).

    Definition elements `{_fargs : FArgs} : t → list elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.elements).

    Definition min_elt `{_fargs : FArgs}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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 → elt :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.min_elt)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition min_elt_opt `{_fargs : FArgs} : t → option elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.min_elt_opt).

    Definition max_elt `{_fargs : FArgs}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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 → elt :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.max_elt)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition max_elt_opt `{_fargs : FArgs} : t → option elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.max_elt_opt).

    Definition choose `{_fargs : FArgs}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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 → elt :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.choose)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition choose_opt `{_fargs : FArgs} : t → option elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.choose_opt).

    Definition find `{_fargs : FArgs}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      : elt → t → elt :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_opt `{_fargs : FArgs} : elt → t → option elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_opt).

    Definition find_first `{_fargs : FArgs}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      : (elt → bool) → t → elt :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_first)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_first_opt `{_fargs : FArgs} :
      (elt → bool) → t → option elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_first_opt).

    Definition find_last `{_fargs : FArgs}
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      : (elt → bool) → t → elt :=
      (MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_last)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_last_opt `{_fargs : FArgs} :
      (elt → bool) → t → option elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.find_last_opt).

    Definition iter `{_fargs : FArgs} : (elt → unit) → t → unit :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.iter).

    Definition fold `{_fargs : FArgs} {acc : Set} :
      (elt → acc → acc) → t → acc → acc :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.fold).

    Definition map `{_fargs : FArgs} : (elt → elt) → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.map).

    Definition filter `{_fargs : FArgs} : (elt → bool) → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.filter).

    Definition filter_map `{_fargs : FArgs} : (elt → option elt) → t → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.filter_map).

    Definition partition `{_fargs : FArgs} : (elt → bool) → t → t × t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.partition).

    Definition split `{_fargs : FArgs} : elt → t → t × bool × t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.split).

    Definition is_empty `{_fargs : FArgs} : t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.is_empty).

    Definition is_singleton `{_fargs : FArgs} : t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.is_singleton).

    Definition mem `{_fargs : FArgs} : elt → t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.mem).

    Definition equal `{_fargs : FArgs} : t → t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.equal).

    Definition compare `{_fargs : FArgs} : t → t → int :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.compare).

    Definition subset `{_fargs : FArgs} : t → t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.subset).

    Definition for_all `{_fargs : FArgs} : (elt → bool) → t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.for_all).

    Definition _exists `{_fargs : FArgs} : (elt → bool) → t → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S._exists).

    Definition to_list `{_fargs : FArgs} : t → list elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_list).

    Definition of_list `{_fargs : FArgs} : list elt → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.of_list).

    Definition to_seq_from `{_fargs : FArgs} :
      elt → t → RocqOfOCaml.OCamlSeq.t elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_seq_from).

    Definition to_seq `{_fargs : FArgs} : t → RocqOfOCaml.OCamlSeq.t elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_seq).

    Definition to_rev_seq `{_fargs : FArgs} : t → RocqOfOCaml.OCamlSeq.t elt :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.to_rev_seq).

    Definition add_seq `{_fargs : FArgs} : RocqOfOCaml.OCamlSeq.t elt → t → t
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.add_seq).

    Definition of_seq `{_fargs : FArgs} : RocqOfOCaml.OCamlSeq.t elt → t :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result._Set).(RocqOfOCaml.OCamlSet.S.of_seq).
  End _Set.

  Definition _Set `{_fargs : FArgs} :=
    (MonadVM_Comparable_Make_include (_fargs := _fargs)).(MonadVM.Comparable.Make.Make_result._Set).

  Module Map.
Inclusion from a translated functor-result record
    Definition key `{_fargs : FArgs} :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_key).

    Definition t `{_fargs : FArgs} (a : Set) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_t)
        a.

    Definition empty `{_fargs : FArgs} {a : Set} : Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_empty).

    Definition add `{_fargs : FArgs} {a : Set} : key → a → Map.t a → Map.t a
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_add).

    Definition add_to_list `{_fargs : FArgs} {a : Set} :
      key → a → Map.t (list a) → Map.t (list a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_add_to_list).

    Definition update `{_fargs : FArgs} {a : Set} :
      key → (option a → option a) → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_update).

    Definition singleton `{_fargs : FArgs} {a : Set} : key → a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_singleton).

    Definition remove `{_fargs : FArgs} {a : Set} : key → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_remove).

    Definition merge `{_fargs : FArgs} {a b c : Set} :
      (key → option a → option b → option c) → Map.t a → Map.t b → Map.t c
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_merge).

    Definition union `{_fargs : FArgs} {a : Set} :
      (key → a → a → option a) → Map.t a → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_union).

    Definition cardinal `{_fargs : FArgs} {a : Set} : Map.t a → int :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_cardinal).

    Definition bindings `{_fargs : FArgs} {a : Set} : Map.t a → list (key × a)
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_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))
      : Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_min_binding)
        (_rocq_fallback_arg_0).

    Definition min_binding_opt `{_fargs : FArgs} {a : Set} :
      Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_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))
      : Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_max_binding)
        (_rocq_fallback_arg_0).

    Definition max_binding_opt `{_fargs : FArgs} {a : Set} :
      Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_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))
      : Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_choose)
        (_rocq_fallback_arg_0).

    Definition choose_opt `{_fargs : FArgs} {a : Set} :
      Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_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 → Map.t a → a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find)
        (_rocq_fallback_arg_0).

    Definition find_opt `{_fargs : FArgs} {a : Set} : key → Map.t a → option a
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_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) → Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_first)
        (_rocq_fallback_arg_0).

    Definition find_first_opt `{_fargs : FArgs} {a : Set} :
      (key → bool) → Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_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) → Map.t a → key × a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_last)
        (_rocq_fallback_arg_0).

    Definition find_last_opt `{_fargs : FArgs} {a : Set} :
      (key → bool) → Map.t a → option (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_find_last_opt).

    Definition iter `{_fargs : FArgs} {a : Set} :
      (key → a → unit) → Map.t a → unit :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_iter).

    Definition fold `{_fargs : FArgs} {a acc : Set} :
      (key → a → acc → acc) → Map.t a → acc → acc :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_fold).

    Definition map `{_fargs : FArgs} {a b : Set} :
      (a → b) → Map.t a → Map.t b :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_map).

    Definition mapi `{_fargs : FArgs} {a b : Set} :
      (key → a → b) → Map.t a → Map.t b :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_mapi).

    Definition filter `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_filter).

    Definition filter_map `{_fargs : FArgs} {a b : Set} :
      (key → a → option b) → Map.t a → Map.t b :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_filter_map).

    Definition partition `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → Map.t a → Map.t a × Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_partition).

    Definition split `{_fargs : FArgs} {a : Set} :
      key → Map.t a → Map.t a × option a × Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_split).

    Definition is_empty `{_fargs : FArgs} {a : Set} : Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_is_empty).

    Definition is_singleton `{_fargs : FArgs} {a : Set} : Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_is_singleton).

    Definition mem `{_fargs : FArgs} {a : Set} : key → Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_mem).

    Definition equal `{_fargs : FArgs} {a : Set} :
      (a → a → bool) → Map.t a → Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_equal).

    Definition compare `{_fargs : FArgs} {a : Set} :
      (a → a → int) → Map.t a → Map.t a → int :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_compare).

    Definition for_all `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_for_all).

    Definition _exists `{_fargs : FArgs} {a : Set} :
      (key → a → bool) → Map.t a → bool :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_exists).

    Definition to_list `{_fargs : FArgs} {a : Set} : Map.t a → list (key × a)
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_list).

    Definition of_list `{_fargs : FArgs} {a : Set} : list (key × a) → Map.t a
      :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_of_list).

    Definition to_seq `{_fargs : FArgs} {a : Set} :
      Map.t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_seq).

    Definition to_rev_seq `{_fargs : FArgs} {a : Set} :
      Map.t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_rev_seq).

    Definition to_seq_from `{_fargs : FArgs} {a : Set} :
      key → Map.t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_to_seq_from).

    Definition add_seq `{_fargs : FArgs} {a : Set} :
      RocqOfOCaml.OCamlSeq.t (key × a) → Map.t a → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_add_seq).

    Definition of_seq `{_fargs : FArgs} {a : Set} :
      RocqOfOCaml.OCamlSeq.t (key × a) → Map.t a :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_of_seq).

    Definition _at `{_fargs : FArgs} {v : Set} :
      key → Lens.t (Map.t v) (option v) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_at).

    Definition keys `{_fargs : FArgs} {a : Set} :
      Map.t a → _Set.(RocqOfOCaml.OCamlSet.S.t) :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_keys).

    Definition difference `{_fargs : FArgs} {a d : Set} :
      (option a → option a → option d) → Map.t a → Map.t a → Map.t d :=
      MonadVM_Comparable_Make_include.(MonadVM.Comparable.Make.Make_result.Map_difference).

    Module Map_signature.
      Record signature `{_fargs : FArgs} {t : Set → Set} : Type := {
        key := string;
        t := t;
        empty : ∀ {a : Set} , t a;
        add : ∀ {a : Set} , key → a → t a → t a;
        add_to_list : ∀ {a : Set} , key → a → t (list a) → t (list a);
        update : ∀ {a : Set} , key → (option a → option a) → t a → t a;
        singleton : ∀ {a : Set} , key → a → t a;
        remove : ∀ {a : Set} , key → t a → t a;
        merge :
          ∀ {a b c : Set} ,
            (key → option a → option b → option c) → t a → t b → t c;
        union :
          ∀ {a : Set} , (key → a → a → option a) → t a → t a → t a;
        cardinal : ∀ {a : Set} , t a → int;
        bindings : ∀ {a : Set} , t a → list (key × a);
        min_binding :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((string × 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;
        min_binding_opt : ∀ {a : Set} , t a → option (key × a);
        max_binding :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((string × 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;
        max_binding_opt : ∀ {a : Set} , t a → option (key × a);
        choose :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((string × 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;
        choose_opt : ∀ {a : Set} , t a → option (key × a);
        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)),
            key → t a → a;
        find_opt : ∀ {a : Set} , key → t a → option a;
        find_first :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((string × 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;
        find_first_opt :
          ∀ {a : Set} , (key → bool) → t a → option (key × a);
        find_last :
          ∀ {a : Set}
            (_rocq_fallback_arg_0 :
              ltac:(let typ := constr:(ltac:(first [unshelve refine ((string × 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;
        find_last_opt :
          ∀ {a : Set} , (key → bool) → t a → option (key × a);
        iter : ∀ {a : Set} , (key → a → unit) → t a → unit;
        fold :
          ∀ {a acc : Set} , (key → a → acc → acc) → t a → acc → acc;
        map : ∀ {a b : Set} , (a → b) → t a → t b;
        mapi : ∀ {a b : Set} , (key → a → b) → t a → t b;
        filter : ∀ {a : Set} , (key → a → bool) → t a → t a;
        filter_map : ∀ {a b : Set} , (key → a → option b) → t a → t b;
        partition : ∀ {a : Set} , (key → a → bool) → t a → t a × t a;
        split : ∀ {a : Set} , key → t a → t a × option a × t a;
        is_empty : ∀ {a : Set} , t a → bool;
        is_singleton : ∀ {a : Set} , t a → bool;
        mem : ∀ {a : Set} , key → t a → bool;
        equal : ∀ {a : Set} , (a → a → bool) → t a → t a → bool;
        compare : ∀ {a : Set} , (a → a → int) → t a → t a → int;
        for_all : ∀ {a : Set} , (key → a → bool) → t a → bool;
        _exists : ∀ {a : Set} , (key → a → bool) → t a → bool;
        to_list : ∀ {a : Set} , t a → list (key × a);
        of_list : ∀ {a : Set} , list (key × a) → t a;
        to_seq : ∀ {a : Set} , t a → RocqOfOCaml.OCamlSeq.t (key × a);
        to_rev_seq : ∀ {a : Set} , t a → RocqOfOCaml.OCamlSeq.t (key × a);
        to_seq_from :
          ∀ {a : Set} , key → t a → RocqOfOCaml.OCamlSeq.t (key × a);
        add_seq :
          ∀ {a : Set} , RocqOfOCaml.OCamlSeq.t (key × a) → t a → t a;
        of_seq : ∀ {a : Set} , RocqOfOCaml.OCamlSeq.t (key × a) → t a;
        _at : ∀ {v : Set} , key → Lens.t (t v) (option v);
        keys : ∀ {a : Set} , t a → _Set.(RocqOfOCaml.OCamlSet.S.t);
        difference :
          ∀ {a d : Set} ,
            (option a → option a → option d) → t a → t a → t d;
      }.
    End Map_signature.
    Definition Map_signature `{_fargs : FArgs} := @Map_signature.signature _.
    Arguments Map_signature {_ _}.

    Definition module `{_fargs : FArgs} :Map_signature (t := _) :=
      {|
        Map_signature.empty _rocq_argument_0 := ltac:(first [exact (empty
          ) | exact (empty _) | first [unshelve refine (empty
          ) | unshelve refine (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]]);
        Map_signature.add _rocq_argument_0 := ltac:(first [exact (add
          ) | exact (add _) | first [unshelve refine (add
          ) | unshelve refine (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]]);
        Map_signature.add_to_list _rocq_argument_0 :=
          ltac:(first [exact (add_to_list ) | exact (add_to_list
          _) | first [unshelve refine (add_to_list
          ) | unshelve refine (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]]);
        Map_signature.update _rocq_argument_0 := ltac:(first [exact (update
          ) | exact (update _) | first [unshelve refine (update
          ) | unshelve refine (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]]);
        Map_signature.singleton _rocq_argument_0 :=
          ltac:(first [exact (singleton ) | exact (singleton
          _) | first [unshelve refine (singleton ) | unshelve refine (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]]);
        Map_signature.remove _rocq_argument_0 := ltac:(first [exact (remove
          ) | exact (remove _) | first [unshelve refine (remove
          ) | unshelve refine (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]]);
        Map_signature.merge _rocq_argument_0 _rocq_argument_1 _rocq_argument_2
        := ltac:(first [exact (merge ) | exact (merge _) | exact (merge _
          _) | exact (merge _ _ _) | first [unshelve refine (merge
          ) | unshelve refine (merge _rocq_argument_0) | unshelve refine (merge
          _rocq_argument_0 _rocq_argument_1) | unshelve refine (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]]);
        Map_signature.union _rocq_argument_0 := ltac:(first [exact (union
          ) | exact (union _) | first [unshelve refine (union
          ) | unshelve refine (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]]);
        Map_signature.cardinal _rocq_argument_0 := ltac:(first [exact (cardinal
          ) | exact (cardinal _) | first [unshelve refine (cardinal
          ) | unshelve refine (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]]);
        Map_signature.bindings _rocq_argument_0 := ltac:(first [exact (bindings
          ) | exact (bindings _) | first [unshelve refine (bindings
          ) | unshelve refine (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]]);
        Map_signature.min_binding _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (min_binding
          _rocq_witness_0) | unshelve refine (min_binding _rocq_argument_0
          _rocq_witness_0) | unshelve refine (min_binding
          ) | unshelve refine (min_binding
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.min_binding_opt _rocq_argument_0 :=
          ltac:(first [exact (min_binding_opt ) | exact (min_binding_opt
          _) | first [unshelve refine (min_binding_opt
          ) | unshelve refine (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]]);
        Map_signature.max_binding _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (max_binding
          _rocq_witness_0) | unshelve refine (max_binding _rocq_argument_0
          _rocq_witness_0) | unshelve refine (max_binding
          ) | unshelve refine (max_binding
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.max_binding_opt _rocq_argument_0 :=
          ltac:(first [exact (max_binding_opt ) | exact (max_binding_opt
          _) | first [unshelve refine (max_binding_opt
          ) | unshelve refine (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]]);
        Map_signature.choose _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (choose
          _rocq_witness_0) | unshelve refine (choose _rocq_argument_0
          _rocq_witness_0) | unshelve refine (choose ) | unshelve refine (choose
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.choose_opt _rocq_argument_0 :=
          ltac:(first [exact (choose_opt ) | exact (choose_opt
          _) | first [unshelve refine (choose_opt
          ) | unshelve refine (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]]);
        Map_signature.find _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (find
          _rocq_witness_0) | unshelve refine (find _rocq_argument_0
          _rocq_witness_0) | unshelve refine (find ) | unshelve refine (find
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.find_opt _rocq_argument_0 := ltac:(first [exact (find_opt
          ) | exact (find_opt _) | first [unshelve refine (find_opt
          ) | unshelve refine (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]]);
        Map_signature.find_first _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (find_first
          _rocq_witness_0) | unshelve refine (find_first _rocq_argument_0
          _rocq_witness_0) | unshelve refine (find_first
          ) | unshelve refine (find_first
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.find_first_opt _rocq_argument_0 :=
          ltac:(first [exact (find_first_opt ) | exact (find_first_opt
          _) | first [unshelve refine (find_first_opt
          ) | unshelve refine (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]]);
        Map_signature.find_last _rocq_argument_0 _rocq_witness_0 :=
          ltac:(first [unshelve refine (find_last
          _rocq_witness_0) | unshelve refine (find_last _rocq_argument_0
          _rocq_witness_0) | unshelve refine (find_last
          ) | unshelve refine (find_last
          _rocq_argument_0) | let value := uconstr:(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]);
        Map_signature.find_last_opt _rocq_argument_0 :=
          ltac:(first [exact (find_last_opt ) | exact (find_last_opt
          _) | first [unshelve refine (find_last_opt
          ) | unshelve refine (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]]);
        Map_signature.iter _rocq_argument_0 := ltac:(first [exact (iter
          ) | exact (iter _) | first [unshelve refine (iter
          ) | unshelve refine (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]]);
        Map_signature.fold _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (fold ) | exact (fold _) | exact (fold _
          _) | first [unshelve refine (fold ) | unshelve refine (fold
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.map _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (map ) | exact (map _) | exact (map _
          _) | first [unshelve refine (map ) | unshelve refine (map
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.mapi _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (mapi ) | exact (mapi _) | exact (mapi _
          _) | first [unshelve refine (mapi ) | unshelve refine (mapi
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.filter _rocq_argument_0 := ltac:(first [exact (filter
          ) | exact (filter _) | first [unshelve refine (filter
          ) | unshelve refine (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]]);
        Map_signature.filter_map _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (filter_map ) | exact (filter_map
          _) | exact (filter_map _ _) | first [unshelve refine (filter_map
          ) | unshelve refine (filter_map
          _rocq_argument_0) | unshelve refine (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]]);
        Map_signature.partition _rocq_argument_0 :=
          ltac:(first [exact (partition ) | exact (partition
          _) | first [unshelve refine (partition ) | unshelve refine (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]]);
        Map_signature.split _rocq_argument_0 := ltac:(first [exact (split
          ) | exact (split _) | first [unshelve refine (split
          ) | unshelve refine (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]]);
        Map_signature.is_empty _rocq_argument_0 := ltac:(first [exact (is_empty
          ) | exact (is_empty _) | first [unshelve refine (is_empty
          ) | unshelve refine (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]]);
        Map_signature.is_singleton _rocq_argument_0 :=
          ltac:(first [exact (is_singleton ) | exact (is_singleton
          _) | first [unshelve refine (is_singleton
          ) | unshelve refine (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]]);
        Map_signature.mem _rocq_argument_0 := ltac:(first [exact (mem
          ) | exact (mem _) | first [unshelve refine (mem
          ) | unshelve refine (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]]);
        Map_signature.equal _rocq_argument_0 := ltac:(first [exact (equal
          ) | exact (equal _) | first [unshelve refine (equal
          ) | unshelve refine (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]]);
        Map_signature.compare _rocq_argument_0 := ltac:(first [exact (compare
          ) | exact (compare _) | first [unshelve refine (compare
          ) | unshelve refine (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]]);
        Map_signature.for_all _rocq_argument_0 := ltac:(first [exact (for_all
          ) | exact (for_all _) | first [unshelve refine (for_all
          ) | unshelve refine (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]]);
        Map_signature._exists _rocq_argument_0 := ltac:(first [exact (_exists
          ) | exact (_exists _) | first [unshelve refine (_exists
          ) | unshelve refine (_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]]);
        Map_signature.to_list _rocq_argument_0 := ltac:(first [exact (to_list
          ) | exact (to_list _) | first [unshelve refine (to_list
          ) | unshelve refine (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]]);
        Map_signature.of_list _rocq_argument_0 := ltac:(first [exact (of_list
          ) | exact (of_list _) | first [unshelve refine (of_list
          ) | unshelve refine (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]]);
        Map_signature.to_seq _rocq_argument_0 := ltac:(first [exact (to_seq
          ) | exact (to_seq _) | first [unshelve refine (to_seq
          ) | unshelve refine (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]]);
        Map_signature.to_rev_seq _rocq_argument_0 :=
          ltac:(first [exact (to_rev_seq ) | exact (to_rev_seq
          _) | first [unshelve refine (to_rev_seq
          ) | unshelve refine (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]]);
        Map_signature.to_seq_from _rocq_argument_0 :=
          ltac:(first [exact (to_seq_from ) | exact (to_seq_from
          _) | first [unshelve refine (to_seq_from
          ) | unshelve refine (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]]);
        Map_signature.add_seq _rocq_argument_0 := ltac:(first [exact (add_seq
          ) | exact (add_seq _) | first [unshelve refine (add_seq
          ) | unshelve refine (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]]);
        Map_signature.of_seq _rocq_argument_0 := ltac:(first [exact (of_seq
          ) | exact (of_seq _) | first [unshelve refine (of_seq
          ) | unshelve refine (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]]);
        Map_signature._at _rocq_argument_0 := ltac:(first [exact (_at
          ) | exact (_at _) | first [unshelve refine (_at
          ) | unshelve refine (_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]]);
        Map_signature.keys _rocq_argument_0 := ltac:(first [exact (keys
          ) | exact (keys _) | first [unshelve refine (keys
          ) | unshelve refine (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]]);
        Map_signature.difference _rocq_argument_0 _rocq_argument_1 :=
          ltac:(first [exact (difference ) | exact (difference
          _) | exact (difference _ _) | first [unshelve refine (difference
          ) | unshelve refine (difference
          _rocq_argument_0) | unshelve refine (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 Map.
  Definition Map `{_fargs : FArgs} := Map.module.

  Definition lift_bytewise `{_fargs : FArgs}
    (f_value : int → int → int) (b1 : string) (b2 : string) : string :=
    init
      (fun (i_value : int) ⇒
        (RocqOfOCaml.OCamlChar.chr
          (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_op_pointdollarlparenrparen_0))
          (f_value
            (RocqOfOCaml.OCamlChar.code (op_pointdollarlparenrparen b1 i_value))
            (RocqOfOCaml.OCamlChar.code (op_pointdollarlparenrparen b2 i_value)))).

  Definition logand `{_fargs : FArgs} : string → string → string :=
    lift_bytewise RocqOfOCaml.OCamlInt.logand.

  Definition logor `{_fargs : FArgs} : string → string → string :=
    lift_bytewise RocqOfOCaml.OCamlInt.logor.

  Definition logxor `{_fargs : FArgs} : string → string → string :=
    lift_bytewise RocqOfOCaml.OCamlInt.logxor.

  Definition lognot `{_fargs : FArgs} (b_value : string) : string :=
    init
      (fun (i_value : int) ⇒
        let b_i :=
          RocqOfOCaml.OCamlChar.code
            (op_pointdollarlparenrparen b_value i_value) in
        (RocqOfOCaml.OCamlChar.chr
          (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_op_pointdollarlparenrparen_0))
          (RocqOfOCaml.OCamlInt.logxor 255 b_i)).

  Definition union `{_fargs : FArgs} (bs : RocqOfOCaml.OCamlSeq.t string)
    : string := RocqOfOCaml.OCamlSeq.fold_left logor zeros bs.

  Definition intersection `{_fargs : FArgs} (bs : RocqOfOCaml.OCamlSeq.t string)
    : string := RocqOfOCaml.OCamlSeq.fold_left logand ones bs.

  Definition _rocq_fallback_set_bit_0 `{_fargs : FArgs} (bit_index : int) : ltac:(let typ := constr:(ltac:(first [unshelve refine ((int)%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).
  Proof. unshelve (RocqOfOCaml.Opaque.opaque_inhabit 64%nat). all: RocqOfOCaml.Opaque.opaque_inhabit 64%nat. Qed.

  Definition set_bit `{_fargs : FArgs} (b_value : string) (bit_index : int)
    : string :=
    let byte_index :=
      (RocqOfOCaml.OCamlInt.div
        (H := RocqOfOCaml.Opaque.legacy_witness (_rocq_fallback_set_bit_0 bit_index)))
        bit_index 8 in
    let bit_index :=
      (RocqOfOCaml.OCamlInt.rem
        (H := RocqOfOCaml.Opaque.legacy_witness (_rocq_fallback_set_bit_0 bit_index)))
        bit_index 8 in
    init
      (fun (i_value : int) ⇒
        if Z.eqb i_value byte_index then
          (RocqOfOCaml.OCamlChar.chr
            (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_op_pointdollarlparenrparen_0))
            (RocqOfOCaml.OCamlInt.logor
              (RocqOfOCaml.OCamlChar.code
                (op_pointdollarlparenrparen b_value i_value))
              (RocqOfOCaml.OCamlInt.shift_right_logical 128 bit_index))
        else
          op_pointdollarlparenrparen b_value i_value).

  Definition test_bit `{_fargs : FArgs} (b_value : string) (bit_index : int)
    : bool :=
    let byte_index :=
      (RocqOfOCaml.OCamlInt.div
        (H := RocqOfOCaml.Opaque.legacy_witness (_rocq_fallback_set_bit_0 bit_index)))
        bit_index 8 in
    let bit_index :=
      (RocqOfOCaml.OCamlInt.rem
        (H := RocqOfOCaml.Opaque.legacy_witness (_rocq_fallback_set_bit_0 bit_index)))
        bit_index 8 in
    RocqOfOCaml.OCamlInt.not_equal
      (RocqOfOCaml.OCamlInt.logand
        (RocqOfOCaml.OCamlChar.code
          (op_pointdollarlparenrparen b_value byte_index))
        (RocqOfOCaml.OCamlInt.shift_right_logical 128 bit_index)) 0.

  Module Fixed_result.
    Record signature `{_fargs : FArgs} {Set_t : Set} {Map_t : Set → Set} : Type
      := {
      byte_width : int;
      Impl : Fixed.Impl.Impl_signature;
      t := string;
      of_bytes : string → option string;
      init : (int → ascii) → string;
      make : ascii → string;
      zeros : string;
      ones : string;
      of_bytes_exn : Bytes.t → string;
      to_bytes : string → string;
      to_seq : string → RocqOfOCaml.OCamlSeq.t ascii;
      fold_left : ∀ {A : Set} , (A → ascii → A) → A → string → A;
      fold_right : ∀ {A : Set} , (ascii → A → A) → string → A → A;
      starts_with : Bytes.t → string → bool;
      op_pointdollarlparenrparen : string → int → ascii;
      map : (ascii → ascii) → string → string;
      mapi : (int → ascii → ascii) → string → string;
      iter : (ascii → unit) → string → unit;
      iteri : (int → ascii → unit) → string → unit;
      for_all : (ascii → bool) → string → bool;
      _exists : (ascii → bool) → string → bool;
      reverse : string → string;
      sub : Bytes.t → int → string;
      sub_with_zero_padding : Bytes.t → int → string;
      to_hex_string : string → string;
      to_short_hex_string : string → string;
      of_hex_string : option bool → string → string;
      op_tildeat : string → string;
      comparison_op : (int → int → bool) → string → string → bool;
      op_lt : string → string → bool;
      op_lteq : string → string → bool;
      op_eq : string → string → bool;
      op_gteq : string → string → bool;
      op_gt : string → string → bool;
      op_ltgt : string → string → bool;
      equal : string → string → bool;
      compare : string → string → int;
      max : string → string → string;
      min : string → string → string;
      _Set : RocqOfOCaml.OCamlSet.S (elt := string) (t := Set_t);
      Map : Fixed.Map.Map_signature (t := Map_t);
      lift_bytewise : (int → int → int) → string → string → string;
      logand : string → string → string;
      logor : string → string → string;
      logxor : string → string → string;
      lognot : string → string;
      union : RocqOfOCaml.OCamlSeq.t string → string;
      intersection : RocqOfOCaml.OCamlSeq.t string → string;
      set_bit : string → int → string;
      test_bit : string → int → bool;
      Set_t := Set_t;
      Map_t := Map_t;
    }.
  End Fixed_result.
  Definition Fixed_result `{_fargs : FArgs} := @Fixed_result.signature _.
  Arguments Fixed_result {_ _ _}.

  Definition functor `{_fargs : FArgs} :Fixed_result (Set_t := _) (Map_t := _)
    :=
    {|
      Fixed_result.byte_width := byte_width;
      Fixed_result.Impl := Impl;
      Fixed_result.of_bytes := of_bytes;
      Fixed_result.init := init;
      Fixed_result.make := make;
      Fixed_result.zeros := zeros;
      Fixed_result.ones := ones;
      Fixed_result.of_bytes_exn := of_bytes_exn;
      Fixed_result.to_bytes := to_bytes;
      Fixed_result.to_seq := to_seq;
      Fixed_result.fold_left _rocq_argument_0 := ltac:(first [exact (fold_left
        ) | exact (fold_left _) | first [unshelve refine (fold_left
        ) | unshelve refine (fold_left
        _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]]);
      Fixed_result.fold_right _rocq_argument_0 := ltac:(first [exact (fold_right
        ) | exact (fold_right _) | first [unshelve refine (fold_right
        ) | unshelve refine (fold_right
        _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]]);
      Fixed_result.starts_with := starts_with;
      Fixed_result.op_pointdollarlparenrparen := op_pointdollarlparenrparen;
      Fixed_result.map := map;
      Fixed_result.mapi := mapi;
      Fixed_result.iter := iter;
      Fixed_result.iteri := iteri;
      Fixed_result.for_all := for_all;
      Fixed_result._exists := _exists;
      Fixed_result.reverse := reverse;
      Fixed_result.sub := sub;
      Fixed_result.sub_with_zero_padding := sub_with_zero_padding;
      Fixed_result.to_hex_string := to_hex_string;
      Fixed_result.to_short_hex_string := to_short_hex_string;
      Fixed_result.of_hex_string := of_hex_string;
      Fixed_result.op_tildeat := op_tildeat;
      Fixed_result.comparison_op := comparison_op;
      Fixed_result.op_lt := op_lt;
      Fixed_result.op_lteq := op_lteq;
      Fixed_result.op_eq := op_eq;
      Fixed_result.op_gteq := op_gteq;
      Fixed_result.op_gt := op_gt;
      Fixed_result.op_ltgt := op_ltgt;
      Fixed_result.equal := equal;
      Fixed_result.compare := compare;
      Fixed_result.max := max;
      Fixed_result.min := min;
      Fixed_result._Set := _Set;
      Fixed_result.Map := Map;
      Fixed_result.lift_bytewise := lift_bytewise;
      Fixed_result.logand := logand;
      Fixed_result.logor := logor;
      Fixed_result.logxor := logxor;
      Fixed_result.lognot := lognot;
      Fixed_result.union := union;
      Fixed_result.intersection := intersection;
      Fixed_result.set_bit := set_bit;
      Fixed_result.test_bit := test_bit
    |}.
End Fixed.
Definition Fixed (Byte_width : MonadVM.Traits.Byte_width.SIG) :=
  @Fixed.functor (Fixed.Build_FArgs Byte_width).

Definition B256_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes256.

Definition B256 : Fixed.Fixed_result (_fargs := B256_fargs) := (Fixed.functor
  (_fargs := (B256_fargs ))).

Definition B96_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes96.

Definition B96 : Fixed.Fixed_result (_fargs := B96_fargs) := (Fixed.functor
  (_fargs := (B96_fargs ))).

Definition B64_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes64.

Definition B64 : Fixed.Fixed_result (_fargs := B64_fargs) := (Fixed.functor
  (_fargs := (B64_fargs ))).

Definition B48_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes48.

Definition B48 : Fixed.Fixed_result (_fargs := B48_fargs) := (Fixed.functor
  (_fargs := (B48_fargs ))).

Definition B33_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes33.

Definition B33 : Fixed.Fixed_result (_fargs := B33_fargs) := (Fixed.functor
  (_fargs := (B33_fargs ))).

Definition B32_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes32.

Definition B32 : Fixed.Fixed_result (_fargs := B32_fargs) := (Fixed.functor
  (_fargs := (B32_fargs ))).

Module B20.
  Definition Fixed_include_fargs :=
    Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes20.

  Definition Fixed_include : Fixed.Fixed_result (_fargs := Fixed_include_fargs)
    := (Fixed.functor (_fargs := (Fixed_include_fargs ))).

Inclusion of the module Fixed_include
  Section _rocq_include_assumptions_byte_width.
  #[local] Existing Instance Fixed_include_fargs.

  Definition byte_width := Fixed_include.(Fixed.Fixed_result.byte_width).
  End _rocq_include_assumptions_byte_width.

  Module Impl.
    Definition t :=
      Fixed_include.(Fixed.Fixed_result.Impl).(Fixed.Impl.Impl_signature.t).

    Definition of_bytes :=
      Fixed_include.(Fixed.Fixed_result.Impl).(Fixed.Impl.Impl_signature.of_bytes).

    Definition init :=
      Fixed_include.(Fixed.Fixed_result.Impl).(Fixed.Impl.Impl_signature.init).
  End Impl.

  Section _rocq_include_assumptions_Impl.
  #[local] Existing Instance Fixed_include_fargs.

  Definition Impl := Fixed_include.(Fixed.Fixed_result.Impl).

  Definition t := Fixed_include.(Fixed.Fixed_result.t).

  Definition of_bytes := Fixed_include.(Fixed.Fixed_result.of_bytes).

  Definition init := Fixed_include.(Fixed.Fixed_result.init).

  Definition make := Fixed_include.(Fixed.Fixed_result.make).

  Definition zeros := Fixed_include.(Fixed.Fixed_result.zeros).

  Definition ones := Fixed_include.(Fixed.Fixed_result.ones).

  Definition of_bytes_exn := Fixed_include.(Fixed.Fixed_result.of_bytes_exn).

  Definition to_bytes := Fixed_include.(Fixed.Fixed_result.to_bytes).

  Definition to_seq := Fixed_include.(Fixed.Fixed_result.to_seq).
  End _rocq_include_assumptions_Impl.

  Definition fold_left {A : Set} : (A → ascii → A) → A → t → A :=
    Fixed_include.(Fixed.Fixed_result.fold_left).

  Definition fold_right {A : Set} : (ascii → A → A) → t → A → A :=
    Fixed_include.(Fixed.Fixed_result.fold_right).

  Section _rocq_include_assumptions_starts_with.
  #[local] Existing Instance Fixed_include_fargs.

  Definition starts_with := Fixed_include.(Fixed.Fixed_result.starts_with).

  Definition op_pointdollarlparenrparen :=
    Fixed_include.(Fixed.Fixed_result.op_pointdollarlparenrparen).

  Definition map := Fixed_include.(Fixed.Fixed_result.map).

  Definition mapi := Fixed_include.(Fixed.Fixed_result.mapi).

  Definition iter := Fixed_include.(Fixed.Fixed_result.iter).

  Definition iteri := Fixed_include.(Fixed.Fixed_result.iteri).

  Definition for_all := Fixed_include.(Fixed.Fixed_result.for_all).

  Definition _exists := Fixed_include.(Fixed.Fixed_result._exists).

  Definition reverse := Fixed_include.(Fixed.Fixed_result.reverse).

  Definition sub := Fixed_include.(Fixed.Fixed_result.sub).

  Definition sub_with_zero_padding :=
    Fixed_include.(Fixed.Fixed_result.sub_with_zero_padding).

  Definition to_hex_string := Fixed_include.(Fixed.Fixed_result.to_hex_string).

  Definition to_short_hex_string :=
    Fixed_include.(Fixed.Fixed_result.to_short_hex_string).

  Definition of_hex_string := Fixed_include.(Fixed.Fixed_result.of_hex_string).

  Definition op_tildeat := Fixed_include.(Fixed.Fixed_result.op_tildeat).

  Definition comparison_op := Fixed_include.(Fixed.Fixed_result.comparison_op).

  Definition op_lt := Fixed_include.(Fixed.Fixed_result.op_lt).

  Definition op_lteq := Fixed_include.(Fixed.Fixed_result.op_lteq).

  Definition op_eq := Fixed_include.(Fixed.Fixed_result.op_eq).

  Definition op_gteq := Fixed_include.(Fixed.Fixed_result.op_gteq).

  Definition op_gt := Fixed_include.(Fixed.Fixed_result.op_gt).

  Definition op_ltgt := Fixed_include.(Fixed.Fixed_result.op_ltgt).

  Definition equal := Fixed_include.(Fixed.Fixed_result.equal).

  Definition compare := Fixed_include.(Fixed.Fixed_result.compare).

  Definition max := Fixed_include.(Fixed.Fixed_result.max).

  Definition min := Fixed_include.(Fixed.Fixed_result.min).
  End _rocq_include_assumptions_starts_with.

  Module _Set.
    Definition elt :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.elt).

    Definition t :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.t).

    Definition empty :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.empty).

    Definition add :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.add).

    Definition singleton :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.singleton).

    Definition remove :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.remove).

    Definition union :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.union).

    Definition inter :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.inter).

    Definition disjoint :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.disjoint).

    Definition diff :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.diff).

    Definition cardinal :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.cardinal).

    Definition elements :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.elements).

    Definition min_elt
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.min_elt)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition min_elt_opt :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.min_elt_opt).

    Definition max_elt
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.max_elt)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition max_elt_opt :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.max_elt_opt).

    Definition choose
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.choose)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition choose_opt :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.choose_opt).

    Definition find
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.find)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_opt :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.find_opt).

    Definition find_first
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.find_first)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_first_opt :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.find_first_opt).

    Definition find_last
      (_rocq_fallback_arg_0 :
        ltac:(let typ := constr:(ltac:(first [unshelve refine ((elt)%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))
      :=
      (Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.find_last)
        (H := RocqOfOCaml.Opaque.legacy_witness _rocq_fallback_arg_0)).

    Definition find_last_opt :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.find_last_opt).

    Definition iter :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.iter).

    Definition fold {acc : Set} : (elt → acc → acc) → t → acc → acc :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.fold).

    Definition map :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.map).

    Definition filter :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.filter).

    Definition filter_map :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.filter_map).

    Definition partition :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.partition).

    Definition split :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.split).

    Definition is_empty :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.is_empty).

    Definition is_singleton :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.is_singleton).

    Definition mem :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.mem).

    Definition equal :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.equal).

    Definition compare :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.compare).

    Definition subset :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.subset).

    Definition for_all :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.for_all).

    Definition _exists :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S._exists).

    Definition to_list :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.to_list).

    Definition of_list :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.of_list).

    Definition to_seq_from :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.to_seq_from).

    Definition to_seq :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.to_seq).

    Definition to_rev_seq :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.to_rev_seq).

    Definition add_seq :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.add_seq).

    Definition of_seq :=
      Fixed_include.(Fixed.Fixed_result._Set).(RocqOfOCaml.OCamlSet.S.of_seq).
  End _Set.

  Section _rocq_include_assumptions__Set.
  #[local] Existing Instance Fixed_include_fargs.

  Definition _Set := Fixed_include.(Fixed.Fixed_result._Set).
  End _rocq_include_assumptions__Set.

  Module Map.
    Definition key :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.key).

    Definition t (a : Set) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.t) a.

    Definition empty {a : Set} : t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.empty).

    Definition add {a : Set} : key → a → t a → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.add).

    Definition add_to_list {a : Set} : key → a → t (list a) → t (list a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.add_to_list).

    Definition update {a : Set} : key → (option a → option a) → t a → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.update).

    Definition singleton {a : Set} : key → a → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.singleton).

    Definition remove {a : Set} : key → t a → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.remove).

    Definition merge {a b c : Set} :
      (key → option a → option b → option c) → t a → t b → t c :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.merge).

    Definition union {a : Set} :
      (key → a → a → option a) → t a → t a → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.union).

    Definition cardinal {a : Set} : t a → int :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.cardinal).

    Definition bindings {a : Set} : t a → list (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.bindings).

    Definition min_binding {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 :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.min_binding)
        (_rocq_fallback_arg_0).

    Definition min_binding_opt {a : Set} : t a → option (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.min_binding_opt).

    Definition max_binding {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 :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.max_binding)
        (_rocq_fallback_arg_0).

    Definition max_binding_opt {a : Set} : t a → option (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.max_binding_opt).

    Definition choose {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 :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.choose)
        (_rocq_fallback_arg_0).

    Definition choose_opt {a : Set} : t a → option (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.choose_opt).

    Definition 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))
      : key → t a → a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.find)
        (_rocq_fallback_arg_0).

    Definition find_opt {a : Set} : key → t a → option a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.find_opt).

    Definition find_first {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 :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.find_first)
        (_rocq_fallback_arg_0).

    Definition find_first_opt {a : Set} :
      (key → bool) → t a → option (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.find_first_opt).

    Definition find_last {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 :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.find_last)
        (_rocq_fallback_arg_0).

    Definition find_last_opt {a : Set} :
      (key → bool) → t a → option (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.find_last_opt).

    Definition iter {a : Set} : (key → a → unit) → t a → unit :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.iter).

    Definition fold {a acc : Set} :
      (key → a → acc → acc) → t a → acc → acc :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.fold).

    Definition map {a b : Set} : (a → b) → t a → t b :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.map).

    Definition mapi {a b : Set} : (key → a → b) → t a → t b :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.mapi).

    Definition filter {a : Set} : (key → a → bool) → t a → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.filter).

    Definition filter_map {a b : Set} : (key → a → option b) → t a → t b :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.filter_map).

    Definition partition {a : Set} : (key → a → bool) → t a → t a × t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.partition).

    Definition split {a : Set} : key → t a → t a × option a × t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.split).

    Definition is_empty {a : Set} : t a → bool :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.is_empty).

    Definition is_singleton {a : Set} : t a → bool :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.is_singleton).

    Definition mem {a : Set} : key → t a → bool :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.mem).

    Definition equal {a : Set} : (a → a → bool) → t a → t a → bool :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.equal).

    Definition compare {a : Set} : (a → a → int) → t a → t a → int :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.compare).

    Definition for_all {a : Set} : (key → a → bool) → t a → bool :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.for_all).

    Definition _exists {a : Set} : (key → a → bool) → t a → bool :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature._exists).

    Definition to_list {a : Set} : t a → list (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.to_list).

    Definition of_list {a : Set} : list (key × a) → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.of_list).

    Definition to_seq {a : Set} : t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.to_seq).

    Definition to_rev_seq {a : Set} : t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.to_rev_seq).

    Definition to_seq_from {a : Set} :
      key → t a → RocqOfOCaml.OCamlSeq.t (key × a) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.to_seq_from).

    Definition add_seq {a : Set} :
      RocqOfOCaml.OCamlSeq.t (key × a) → t a → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.add_seq).

    Definition of_seq {a : Set} : RocqOfOCaml.OCamlSeq.t (key × a) → t a :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.of_seq).

    Definition _at {v : Set} : key → Lens.t (t v) (option v) :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature._at).

    Definition keys {a : Set} : t a → _Set.t :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.keys).

    Definition difference {a d : Set} :
      (option a → option a → option d) → t a → t a → t d :=
      Fixed_include.(Fixed.Fixed_result.Map).(Fixed.Map.Map_signature.difference).
  End Map.

  Section _rocq_include_assumptions_Map.
  #[local] Existing Instance Fixed_include_fargs.

  Definition Map := Fixed_include.(Fixed.Fixed_result.Map).

  Definition lift_bytewise := Fixed_include.(Fixed.Fixed_result.lift_bytewise).

  Definition logand := Fixed_include.(Fixed.Fixed_result.logand).

  Definition logor := Fixed_include.(Fixed.Fixed_result.logor).

  Definition logxor := Fixed_include.(Fixed.Fixed_result.logxor).

  Definition lognot := Fixed_include.(Fixed.Fixed_result.lognot).

  Definition union := Fixed_include.(Fixed.Fixed_result.union).

  Definition intersection := Fixed_include.(Fixed.Fixed_result.intersection).

  Definition set_bit := Fixed_include.(Fixed.Fixed_result.set_bit).

  Definition test_bit := Fixed_include.(Fixed.Fixed_result.test_bit).
  End _rocq_include_assumptions_Map.

Truncate a 32-byte string bs to a 20-byte address, discarding the leftmost bytes.
  Definition of_bytes32_truncating (bs : string) : t :=
    init
      (fun (i_value : int) ⇒
        B32.(Fixed.Fixed_result.op_pointdollarlparenrparen) bs
          (RocqOfOCaml.OCamlInt.sub (RocqOfOCaml.OCamlInt.add i_value 32) 20)).

Widen a 20 byte string addr to 32 bytes by left-padding with zeros.
  Definition to_bytes32 (addr : t) : string :=
    B32.(Fixed.Fixed_result.init)
      (fun (i_value : int) ⇒
        if Z.ltb i_value (RocqOfOCaml.OCamlInt.sub 32 20) then
          "000" % char
        else
          op_pointdollarlparenrparen addr
            (RocqOfOCaml.OCamlInt.add (RocqOfOCaml.OCamlInt.sub i_value 32) 20)).
End B20.

Definition B8_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes8.

Definition B8 : Fixed.Fixed_result (_fargs := B8_fargs) := (Fixed.functor
  (_fargs := (B8_fargs ))).

Definition B4_fargs := Fixed.Build_FArgs MonadVM.Traits.Byte_width.Bytes4.

Definition B4 : Fixed.Fixed_result (_fargs := B4_fargs) := (Fixed.functor
  (_fargs := (B4_fargs ))).