sig
  type namespace = {
    ns_ts : Ty.tysymbol Wstdlib.Mstr.t;
    ns_ls : Term.lsymbol Wstdlib.Mstr.t;
    ns_pr : Decl.prsymbol Wstdlib.Mstr.t;
    ns_ns : Theory.namespace Wstdlib.Mstr.t;
  }
  val empty_ns : Theory.namespace
  val ns_find_ts : Theory.namespace -> string list -> Ty.tysymbol
  val ns_find_ls : Theory.namespace -> string list -> Term.lsymbol
  val ns_find_pr : Theory.namespace -> string list -> Decl.prsymbol
  val ns_find_ns : Theory.namespace -> string list -> Theory.namespace
  val import_namespace : Theory.namespace -> string list -> Theory.namespace
  type meta_arg_type =
      MTty
    | MTtysymbol
    | MTlsymbol
    | MTprsymbol
    | MTstring
    | MTint
    | MTid
  type meta_arg =
      MAty of Ty.ty
    | MAts of Ty.tysymbol
    | MAls of Term.lsymbol
    | MApr of Decl.prsymbol
    | MAstr of string
    | MAint of int
    | MAid of Ident.ident
  type meta = private {
    meta_name : string;
    meta_type : Theory.meta_arg_type list;
    meta_excl : bool;
    meta_desc : Pp.formatted;
    meta_tag : int;
  }
  val print_meta_desc : Pp.formatter -> Theory.meta -> unit
  module Mmeta :
    sig
      type key = meta
      type +'a t
      val empty : 'a t
      val is_empty : 'a t -> bool
      val mem : key -> 'a t -> bool
      val add : key -> '-> 'a t -> 'a t
      val singleton : key -> '-> 'a t
      val remove : key -> 'a t -> 'a t
      val merge :
        (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
      val union : (key -> '-> '-> 'a option) -> 'a t -> 'a t -> 'a t
      val compare : ('-> '-> int) -> 'a t -> 'a t -> int
      val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
      val iter : (key -> '-> unit) -> 'a t -> unit
      val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
      val for_all : (key -> '-> bool) -> 'a t -> bool
      val exists : (key -> '-> bool) -> 'a t -> bool
      val filter : (key -> '-> bool) -> 'a t -> 'a t
      val partition : (key -> '-> bool) -> 'a t -> 'a t * 'a t
      val cardinal : 'a t -> int
      val bindings : 'a t -> (key * 'a) list
      val min_binding : 'a t -> key * 'a
      val max_binding : 'a t -> key * 'a
      val choose : 'a t -> key * 'a
      val split : key -> 'a t -> 'a t * 'a option * 'a t
      val find : key -> 'a t -> 'a
      val map : ('-> 'b) -> 'a t -> 'b t
      val mapi : (key -> '-> 'b) -> 'a t -> 'b t
      val change : ('a option -> 'a option) -> key -> 'a t -> 'a t
      val inter : (key -> '-> '-> 'c option) -> 'a t -> 'b t -> 'c t
      val diff : (key -> '-> '-> 'a option) -> 'a t -> 'b t -> 'a t
      val submap : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
      val disjoint : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
      val set_union : 'a t -> 'a t -> 'a t
      val set_inter : 'a t -> 'b t -> 'a t
      val set_diff : 'a t -> 'b t -> 'a t
      val set_submap : 'a t -> 'b t -> bool
      val set_disjoint : 'a t -> 'b t -> bool
      val set_compare : 'a t -> 'b t -> int
      val set_equal : 'a t -> 'b t -> bool
      val find_def : '-> key -> 'a t -> 'a
      val find_opt : key -> 'a t -> 'a option
      val find_exn : exn -> key -> 'a t -> 'a
      val map_filter : ('-> 'b option) -> 'a t -> 'b t
      val mapi_filter : (key -> '-> 'b option) -> 'a t -> 'b t
      val mapi_fold :
        (key -> '-> 'acc -> 'acc * 'b) -> 'a t -> 'acc -> 'acc * 'b t
      val mapi_filter_fold :
        (key -> '-> 'acc -> 'acc * 'b option) ->
        'a t -> 'acc -> 'acc * 'b t
      val fold_left : ('-> key -> '-> 'b) -> '-> 'a t -> 'b
      val fold2_inter :
        (key -> '-> '-> '-> 'c) -> 'a t -> 'b t -> '-> 'c
      val fold2_union :
        (key -> 'a option -> 'b option -> '-> 'c) ->
        'a t -> 'b t -> '-> 'c
      val translate : (key -> key) -> 'a t -> 'a t
      val add_new : exn -> key -> '-> 'a t -> 'a t
      val replace : exn -> key -> '-> 'a t -> 'a t
      val keys : 'a t -> key list
      val values : 'a t -> 'a list
      val of_list : (key * 'a) list -> 'a t
      val contains : 'a t -> key -> bool
      val domain : 'a t -> unit t
      val subdomain : (key -> '-> bool) -> 'a t -> unit t
      val is_num_elt : int -> 'a t -> bool
      type 'a enumeration
      val val_enum : 'a enumeration -> (key * 'a) option
      val start_enum : 'a t -> 'a enumeration
      val next_enum : 'a enumeration -> 'a enumeration
      val start_ge_enum : key -> 'a t -> 'a enumeration
      val next_ge_enum : key -> 'a enumeration -> 'a enumeration
    end
  module Smeta :
    sig
      module M :
        sig
          type key = meta
          type 'a t = 'Mmeta.t
          val empty : 'a t
          val is_empty : 'a t -> bool
          val mem : key -> 'a t -> bool
          val add : key -> '-> 'a t -> 'a t
          val singleton : key -> '-> 'a t
          val remove : key -> 'a t -> 'a t
          val merge :
            (key -> 'a option -> 'b option -> 'c option) ->
            'a t -> 'b t -> 'c t
          val union : (key -> '-> '-> 'a option) -> 'a t -> 'a t -> 'a t
          val compare : ('-> '-> int) -> 'a t -> 'a t -> int
          val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val for_all : (key -> '-> bool) -> 'a t -> bool
          val exists : (key -> '-> bool) -> 'a t -> bool
          val filter : (key -> '-> bool) -> 'a t -> 'a t
          val partition : (key -> '-> bool) -> 'a t -> 'a t * 'a t
          val cardinal : 'a t -> int
          val bindings : 'a t -> (key * 'a) list
          val min_binding : 'a t -> key * 'a
          val max_binding : 'a t -> key * 'a
          val choose : 'a t -> key * 'a
          val split : key -> 'a t -> 'a t * 'a option * 'a t
          val find : key -> 'a t -> 'a
          val map : ('-> 'b) -> 'a t -> 'b t
          val mapi : (key -> '-> 'b) -> 'a t -> 'b t
          val change : ('a option -> 'a option) -> key -> 'a t -> 'a t
          val inter : (key -> '-> '-> 'c option) -> 'a t -> 'b t -> 'c t
          val diff : (key -> '-> '-> 'a option) -> 'a t -> 'b t -> 'a t
          val submap : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
          val disjoint : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
          val set_union : 'a t -> 'a t -> 'a t
          val set_inter : 'a t -> 'b t -> 'a t
          val set_diff : 'a t -> 'b t -> 'a t
          val set_submap : 'a t -> 'b t -> bool
          val set_disjoint : 'a t -> 'b t -> bool
          val set_compare : 'a t -> 'b t -> int
          val set_equal : 'a t -> 'b t -> bool
          val find_def : '-> key -> 'a t -> 'a
          val find_opt : key -> 'a t -> 'a option
          val find_exn : exn -> key -> 'a t -> 'a
          val map_filter : ('-> 'b option) -> 'a t -> 'b t
          val mapi_filter : (key -> '-> 'b option) -> 'a t -> 'b t
          val mapi_fold :
            (key -> '-> 'acc -> 'acc * 'b) -> 'a t -> 'acc -> 'acc * 'b t
          val mapi_filter_fold :
            (key -> '-> 'acc -> 'acc * 'b option) ->
            'a t -> 'acc -> 'acc * 'b t
          val fold_left : ('-> key -> '-> 'b) -> '-> 'a t -> 'b
          val fold2_inter :
            (key -> '-> '-> '-> 'c) -> 'a t -> 'b t -> '-> 'c
          val fold2_union :
            (key -> 'a option -> 'b option -> '-> 'c) ->
            'a t -> 'b t -> '-> 'c
          val translate : (key -> key) -> 'a t -> 'a t
          val add_new : exn -> key -> '-> 'a t -> 'a t
          val replace : exn -> key -> '-> 'a t -> 'a t
          val keys : 'a t -> key list
          val values : 'a t -> 'a list
          val of_list : (key * 'a) list -> 'a t
          val contains : 'a t -> key -> bool
          val domain : 'a t -> unit t
          val subdomain : (key -> '-> bool) -> 'a t -> unit t
          val is_num_elt : int -> 'a t -> bool
          type 'a enumeration = 'Mmeta.enumeration
          val val_enum : 'a enumeration -> (key * 'a) option
          val start_enum : 'a t -> 'a enumeration
          val next_enum : 'a enumeration -> 'a enumeration
          val start_ge_enum : key -> 'a t -> 'a enumeration
          val next_ge_enum : key -> 'a enumeration -> 'a enumeration
        end
      type elt = M.key
      type t = unit M.t
      val empty : t
      val is_empty : t -> bool
      val mem : elt -> t -> bool
      val add : elt -> t -> t
      val singleton : elt -> t
      val remove : elt -> t -> t
      val merge : (elt -> bool -> bool -> bool) -> t -> t -> t
      val compare : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val disjoint : t -> t -> bool
      val iter : (elt -> unit) -> t -> unit
      val fold : (elt -> '-> 'a) -> t -> '-> 'a
      val for_all : (elt -> bool) -> t -> bool
      val exists : (elt -> bool) -> t -> bool
      val filter : (elt -> bool) -> t -> t
      val partition : (elt -> bool) -> t -> t * t
      val cardinal : t -> int
      val elements : t -> elt list
      val min_elt : t -> elt
      val max_elt : t -> elt
      val choose : t -> elt
      val split : elt -> t -> t * bool * t
      val change : (bool -> bool) -> elt -> t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val diff : t -> t -> t
      val fold_left : ('-> elt -> 'b) -> '-> t -> 'b
      val fold2_inter : (elt -> '-> 'a) -> t -> t -> '-> 'a
      val fold2_union : (elt -> '-> 'a) -> t -> t -> '-> 'a
      val translate : (elt -> elt) -> t -> t
      val add_new : exn -> elt -> t -> t
      val is_num_elt : int -> t -> bool
      val of_list : elt list -> t
      val contains : t -> elt -> bool
      val add_left : t -> elt -> t
      val remove_left : t -> elt -> t
      val print :
        (Format.formatter -> elt -> unit) -> Format.formatter -> t -> unit
    end
  module Hmeta :
    sig
      type key = meta
      type !'a t
      val create : int -> 'a t
      val clear : 'a t -> unit
      val reset : 'a t -> unit
      val copy : 'a t -> 'a t
      val add : 'a t -> key -> '-> unit
      val remove : 'a t -> key -> unit
      val find : 'a t -> key -> 'a
      val find_all : 'a t -> key -> 'a list
      val replace : 'a t -> key -> '-> unit
      val mem : 'a t -> key -> bool
      val iter : (key -> '-> unit) -> 'a t -> unit
      val filter_map_inplace : (key -> '-> 'a option) -> 'a t -> unit
      val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
      val length : 'a t -> int
      val stats : 'a t -> Hashtbl.statistics
      val to_seq : 'a t -> (key * 'a) Seq.t
      val to_seq_keys : 'a t -> key Seq.t
      val to_seq_values : 'a t -> 'Seq.t
      val add_seq : 'a t -> (key * 'a) Seq.t -> unit
      val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
      val of_seq : (key * 'a) Seq.t -> 'a t
      val find_def : 'a t -> '-> key -> 'a
      val find_opt : 'a t -> key -> 'a option
      val find_exn : 'a t -> exn -> key -> 'a
      val map : (key -> '-> 'b) -> 'a t -> 'b t
      val memo : int -> (key -> 'a) -> key -> 'a
      val is_empty : 'a t -> bool
    end
  val meta_equal : Theory.meta -> Theory.meta -> bool
  val meta_hash : Theory.meta -> int
  val register_meta :
    desc:Pp.formatted -> string -> Theory.meta_arg_type list -> Theory.meta
  val register_meta_excl :
    desc:Pp.formatted -> string -> Theory.meta_arg_type list -> Theory.meta
  val lookup_meta : string -> Theory.meta
  val list_metas : unit -> Theory.meta list
  val meta_range : Theory.meta
  val meta_float : Theory.meta
  val meta_projection : Theory.meta
  val meta_record : Theory.meta
  val meta_proved_wf : Theory.meta
  type theory = private {
    th_name : Ident.ident;
    th_path : string list;
    th_decls : Theory.tdecl list;
    th_ranges : Theory.tdecl Ty.Mts.t;
    th_floats : Theory.tdecl Ty.Mts.t;
    th_crcmap : Coercion.t;
    th_proved_wf : (Decl.prsymbol * Term.lsymbol) Term.Mls.t;
    th_export : Theory.namespace;
    th_known : Decl.known_map;
    th_local : Ident.Sid.t;
    th_used : Ident.Sid.t;
  }
  and tdecl = private { td_node : Theory.tdecl_node; td_tag : int; }
  and tdecl_node =
      Decl of Decl.decl
    | Use of Theory.theory
    | Clone of Theory.theory * Theory.symbol_map
    | Meta of Theory.meta * Theory.meta_arg list
  and symbol_map = {
    sm_ty : Ty.ty Ty.Mts.t;
    sm_ts : Ty.tysymbol Ty.Mts.t;
    sm_ls : Term.lsymbol Term.Mls.t;
    sm_pr : Decl.prsymbol Decl.Mpr.t;
  }
  module Mtdecl :
    sig
      type key = tdecl
      type +'a t
      val empty : 'a t
      val is_empty : 'a t -> bool
      val mem : key -> 'a t -> bool
      val add : key -> '-> 'a t -> 'a t
      val singleton : key -> '-> 'a t
      val remove : key -> 'a t -> 'a t
      val merge :
        (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
      val union : (key -> '-> '-> 'a option) -> 'a t -> 'a t -> 'a t
      val compare : ('-> '-> int) -> 'a t -> 'a t -> int
      val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
      val iter : (key -> '-> unit) -> 'a t -> unit
      val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
      val for_all : (key -> '-> bool) -> 'a t -> bool
      val exists : (key -> '-> bool) -> 'a t -> bool
      val filter : (key -> '-> bool) -> 'a t -> 'a t
      val partition : (key -> '-> bool) -> 'a t -> 'a t * 'a t
      val cardinal : 'a t -> int
      val bindings : 'a t -> (key * 'a) list
      val min_binding : 'a t -> key * 'a
      val max_binding : 'a t -> key * 'a
      val choose : 'a t -> key * 'a
      val split : key -> 'a t -> 'a t * 'a option * 'a t
      val find : key -> 'a t -> 'a
      val map : ('-> 'b) -> 'a t -> 'b t
      val mapi : (key -> '-> 'b) -> 'a t -> 'b t
      val change : ('a option -> 'a option) -> key -> 'a t -> 'a t
      val inter : (key -> '-> '-> 'c option) -> 'a t -> 'b t -> 'c t
      val diff : (key -> '-> '-> 'a option) -> 'a t -> 'b t -> 'a t
      val submap : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
      val disjoint : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
      val set_union : 'a t -> 'a t -> 'a t
      val set_inter : 'a t -> 'b t -> 'a t
      val set_diff : 'a t -> 'b t -> 'a t
      val set_submap : 'a t -> 'b t -> bool
      val set_disjoint : 'a t -> 'b t -> bool
      val set_compare : 'a t -> 'b t -> int
      val set_equal : 'a t -> 'b t -> bool
      val find_def : '-> key -> 'a t -> 'a
      val find_opt : key -> 'a t -> 'a option
      val find_exn : exn -> key -> 'a t -> 'a
      val map_filter : ('-> 'b option) -> 'a t -> 'b t
      val mapi_filter : (key -> '-> 'b option) -> 'a t -> 'b t
      val mapi_fold :
        (key -> '-> 'acc -> 'acc * 'b) -> 'a t -> 'acc -> 'acc * 'b t
      val mapi_filter_fold :
        (key -> '-> 'acc -> 'acc * 'b option) ->
        'a t -> 'acc -> 'acc * 'b t
      val fold_left : ('-> key -> '-> 'b) -> '-> 'a t -> 'b
      val fold2_inter :
        (key -> '-> '-> '-> 'c) -> 'a t -> 'b t -> '-> 'c
      val fold2_union :
        (key -> 'a option -> 'b option -> '-> 'c) ->
        'a t -> 'b t -> '-> 'c
      val translate : (key -> key) -> 'a t -> 'a t
      val add_new : exn -> key -> '-> 'a t -> 'a t
      val replace : exn -> key -> '-> 'a t -> 'a t
      val keys : 'a t -> key list
      val values : 'a t -> 'a list
      val of_list : (key * 'a) list -> 'a t
      val contains : 'a t -> key -> bool
      val domain : 'a t -> unit t
      val subdomain : (key -> '-> bool) -> 'a t -> unit t
      val is_num_elt : int -> 'a t -> bool
      type 'a enumeration
      val val_enum : 'a enumeration -> (key * 'a) option
      val start_enum : 'a t -> 'a enumeration
      val next_enum : 'a enumeration -> 'a enumeration
      val start_ge_enum : key -> 'a t -> 'a enumeration
      val next_ge_enum : key -> 'a enumeration -> 'a enumeration
    end
  module Stdecl :
    sig
      module M :
        sig
          type key = tdecl
          type 'a t = 'Mtdecl.t
          val empty : 'a t
          val is_empty : 'a t -> bool
          val mem : key -> 'a t -> bool
          val add : key -> '-> 'a t -> 'a t
          val singleton : key -> '-> 'a t
          val remove : key -> 'a t -> 'a t
          val merge :
            (key -> 'a option -> 'b option -> 'c option) ->
            'a t -> 'b t -> 'c t
          val union : (key -> '-> '-> 'a option) -> 'a t -> 'a t -> 'a t
          val compare : ('-> '-> int) -> 'a t -> 'a t -> int
          val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
          val iter : (key -> '-> unit) -> 'a t -> unit
          val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
          val for_all : (key -> '-> bool) -> 'a t -> bool
          val exists : (key -> '-> bool) -> 'a t -> bool
          val filter : (key -> '-> bool) -> 'a t -> 'a t
          val partition : (key -> '-> bool) -> 'a t -> 'a t * 'a t
          val cardinal : 'a t -> int
          val bindings : 'a t -> (key * 'a) list
          val min_binding : 'a t -> key * 'a
          val max_binding : 'a t -> key * 'a
          val choose : 'a t -> key * 'a
          val split : key -> 'a t -> 'a t * 'a option * 'a t
          val find : key -> 'a t -> 'a
          val map : ('-> 'b) -> 'a t -> 'b t
          val mapi : (key -> '-> 'b) -> 'a t -> 'b t
          val change : ('a option -> 'a option) -> key -> 'a t -> 'a t
          val inter : (key -> '-> '-> 'c option) -> 'a t -> 'b t -> 'c t
          val diff : (key -> '-> '-> 'a option) -> 'a t -> 'b t -> 'a t
          val submap : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
          val disjoint : (key -> '-> '-> bool) -> 'a t -> 'b t -> bool
          val set_union : 'a t -> 'a t -> 'a t
          val set_inter : 'a t -> 'b t -> 'a t
          val set_diff : 'a t -> 'b t -> 'a t
          val set_submap : 'a t -> 'b t -> bool
          val set_disjoint : 'a t -> 'b t -> bool
          val set_compare : 'a t -> 'b t -> int
          val set_equal : 'a t -> 'b t -> bool
          val find_def : '-> key -> 'a t -> 'a
          val find_opt : key -> 'a t -> 'a option
          val find_exn : exn -> key -> 'a t -> 'a
          val map_filter : ('-> 'b option) -> 'a t -> 'b t
          val mapi_filter : (key -> '-> 'b option) -> 'a t -> 'b t
          val mapi_fold :
            (key -> '-> 'acc -> 'acc * 'b) -> 'a t -> 'acc -> 'acc * 'b t
          val mapi_filter_fold :
            (key -> '-> 'acc -> 'acc * 'b option) ->
            'a t -> 'acc -> 'acc * 'b t
          val fold_left : ('-> key -> '-> 'b) -> '-> 'a t -> 'b
          val fold2_inter :
            (key -> '-> '-> '-> 'c) -> 'a t -> 'b t -> '-> 'c
          val fold2_union :
            (key -> 'a option -> 'b option -> '-> 'c) ->
            'a t -> 'b t -> '-> 'c
          val translate : (key -> key) -> 'a t -> 'a t
          val add_new : exn -> key -> '-> 'a t -> 'a t
          val replace : exn -> key -> '-> 'a t -> 'a t
          val keys : 'a t -> key list
          val values : 'a t -> 'a list
          val of_list : (key * 'a) list -> 'a t
          val contains : 'a t -> key -> bool
          val domain : 'a t -> unit t
          val subdomain : (key -> '-> bool) -> 'a t -> unit t
          val is_num_elt : int -> 'a t -> bool
          type 'a enumeration = 'Mtdecl.enumeration
          val val_enum : 'a enumeration -> (key * 'a) option
          val start_enum : 'a t -> 'a enumeration
          val next_enum : 'a enumeration -> 'a enumeration
          val start_ge_enum : key -> 'a t -> 'a enumeration
          val next_ge_enum : key -> 'a enumeration -> 'a enumeration
        end
      type elt = M.key
      type t = unit M.t
      val empty : t
      val is_empty : t -> bool
      val mem : elt -> t -> bool
      val add : elt -> t -> t
      val singleton : elt -> t
      val remove : elt -> t -> t
      val merge : (elt -> bool -> bool -> bool) -> t -> t -> t
      val compare : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val disjoint : t -> t -> bool
      val iter : (elt -> unit) -> t -> unit
      val fold : (elt -> '-> 'a) -> t -> '-> 'a
      val for_all : (elt -> bool) -> t -> bool
      val exists : (elt -> bool) -> t -> bool
      val filter : (elt -> bool) -> t -> t
      val partition : (elt -> bool) -> t -> t * t
      val cardinal : t -> int
      val elements : t -> elt list
      val min_elt : t -> elt
      val max_elt : t -> elt
      val choose : t -> elt
      val split : elt -> t -> t * bool * t
      val change : (bool -> bool) -> elt -> t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val diff : t -> t -> t
      val fold_left : ('-> elt -> 'b) -> '-> t -> 'b
      val fold2_inter : (elt -> '-> 'a) -> t -> t -> '-> 'a
      val fold2_union : (elt -> '-> 'a) -> t -> t -> '-> 'a
      val translate : (elt -> elt) -> t -> t
      val add_new : exn -> elt -> t -> t
      val is_num_elt : int -> t -> bool
      val of_list : elt list -> t
      val contains : t -> elt -> bool
      val add_left : t -> elt -> t
      val remove_left : t -> elt -> t
      val print :
        (Format.formatter -> elt -> unit) -> Format.formatter -> t -> unit
    end
  module Htdecl :
    sig
      type key = tdecl
      type !'a t
      val create : int -> 'a t
      val clear : 'a t -> unit
      val reset : 'a t -> unit
      val copy : 'a t -> 'a t
      val add : 'a t -> key -> '-> unit
      val remove : 'a t -> key -> unit
      val find : 'a t -> key -> 'a
      val find_all : 'a t -> key -> 'a list
      val replace : 'a t -> key -> '-> unit
      val mem : 'a t -> key -> bool
      val iter : (key -> '-> unit) -> 'a t -> unit
      val filter_map_inplace : (key -> '-> 'a option) -> 'a t -> unit
      val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
      val length : 'a t -> int
      val stats : 'a t -> Hashtbl.statistics
      val to_seq : 'a t -> (key * 'a) Seq.t
      val to_seq_keys : 'a t -> key Seq.t
      val to_seq_values : 'a t -> 'Seq.t
      val add_seq : 'a t -> (key * 'a) Seq.t -> unit
      val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
      val of_seq : (key * 'a) Seq.t -> 'a t
      val find_def : 'a t -> '-> key -> 'a
      val find_opt : 'a t -> key -> 'a option
      val find_exn : 'a t -> exn -> key -> 'a
      val map : (key -> '-> 'b) -> 'a t -> 'b t
      val memo : int -> (key -> 'a) -> key -> 'a
      val is_empty : 'a t -> bool
    end
  val td_equal : Theory.tdecl -> Theory.tdecl -> bool
  val td_hash : Theory.tdecl -> int
  type theory_uc = private {
    uc_name : Ident.ident;
    uc_path : string list;
    uc_decls : Theory.tdecl list;
    uc_ranges : Theory.tdecl Ty.Mts.t;
    uc_floats : Theory.tdecl Ty.Mts.t;
    uc_crcmap : Coercion.t;
    uc_proved_wf : (Decl.prsymbol * Term.lsymbol) Term.Mls.t;
    uc_prefix : string list;
    uc_import : Theory.namespace list;
    uc_export : Theory.namespace list;
    uc_known : Decl.known_map;
    uc_local : Ident.Sid.t;
    uc_used : Ident.Sid.t;
  }
  val create_theory : ?path:string list -> Ident.preid -> Theory.theory_uc
  val close_theory : Theory.theory_uc -> Theory.theory
  val open_scope : Theory.theory_uc -> string -> Theory.theory_uc
  val close_scope : Theory.theory_uc -> import:bool -> Theory.theory_uc
  val import_scope : Theory.theory_uc -> string list -> Theory.theory_uc
  val get_namespace : Theory.theory_uc -> Theory.namespace
  val restore_path : Ident.ident -> string list * string * string list
  val restore_theory : Ident.ident -> Theory.theory
  val create_decl : Decl.decl -> Theory.tdecl
  val add_decl :
    ?warn:bool -> Theory.theory_uc -> Decl.decl -> Theory.theory_uc
  val add_ty_decl : Theory.theory_uc -> Ty.tysymbol -> Theory.theory_uc
  val add_data_decl :
    Theory.theory_uc -> Decl.data_decl list -> Theory.theory_uc
  val add_param_decl : Theory.theory_uc -> Term.lsymbol -> Theory.theory_uc
  val add_logic_decl :
    Theory.theory_uc -> Decl.logic_decl list -> Theory.theory_uc
  val add_ind_decl :
    Theory.theory_uc ->
    Decl.ind_sign -> Decl.ind_decl list -> Theory.theory_uc
  val add_prop_decl :
    ?warn:bool ->
    Theory.theory_uc ->
    Decl.prop_kind -> Decl.prsymbol -> Term.term -> Theory.theory_uc
  val attr_w_non_conservative_extension_no : Ident.attribute
  val create_use : Theory.theory -> Theory.tdecl
  val use_export : Theory.theory_uc -> Theory.theory -> Theory.theory_uc
  type th_inst = {
    inst_ty : Ty.ty Ty.Mts.t;
    inst_ts : Ty.tysymbol Ty.Mts.t;
    inst_ls : Term.lsymbol Term.Mls.t;
    inst_pr : Decl.prop_kind Decl.Mpr.t;
    inst_df : Decl.prop_kind;
  }
  val empty_inst : Theory.th_inst
  val warn_clone_not_abstract : Loc.position -> Theory.theory -> unit
  val warning_clone_not_abstract : Loc.warning_id
  val warn_axiom_abstract : Loc.warning_id
  val clone_theory :
    ('-> Theory.tdecl -> 'a) -> '-> Theory.theory -> Theory.th_inst -> 'a
  val clone_export :
    Theory.theory_uc -> Theory.theory -> Theory.th_inst -> Theory.theory_uc
  val add_clone_internal :
    unit ->
    Theory.theory_uc ->
    Theory.theory -> Theory.symbol_map -> Theory.theory_uc
  val meta_coercion : Theory.meta
  val create_meta : Theory.meta -> Theory.meta_arg list -> Theory.tdecl
  val add_meta :
    Theory.theory_uc ->
    Theory.meta -> Theory.meta_arg list -> Theory.theory_uc
  val clone_meta :
    Theory.tdecl -> Theory.theory -> Theory.symbol_map -> Theory.tdecl option
  val builtin_theory : Theory.theory
  val ignore_theory : Theory.theory
  val bool_theory : Theory.theory
  val highord_theory : Theory.theory
  val tuple_theory : int -> Theory.theory
  val tuple_theory_name : string -> int option
  val add_decl_with_tuples :
    Theory.theory_uc -> Decl.decl -> Theory.theory_uc
  type bad_instance =
      BadI of Ident.ident
    | BadI_ty_vars of Ty.tysymbol
    | BadI_ty_ner of Ty.tysymbol
    | BadI_ty_impure of Ty.tysymbol
    | BadI_ty_arity of Ty.tysymbol
    | BadI_ty_rec of Ty.tysymbol
    | BadI_ty_mut_lhs of Ty.tysymbol
    | BadI_ty_mut_rhs of Ty.tysymbol
    | BadI_ty_alias of Ty.tysymbol
    | BadI_field of Ty.tysymbol * Term.vsymbol
    | BadI_field_type of Ty.tysymbol * Term.vsymbol
    | BadI_field_ghost of Ty.tysymbol * Term.vsymbol
    | BadI_field_mut of Ty.tysymbol * Term.vsymbol
    | BadI_field_inv of Ty.tysymbol * Term.vsymbol
    | BadI_ls_type of Term.lsymbol * Ty.ty * Ty.ty
    | BadI_ls_kind of Term.lsymbol
    | BadI_ls_arity of Term.lsymbol
    | BadI_ls_rs of Term.lsymbol
    | BadI_rs_arity of Ident.ident
    | BadI_rs_type of Ident.ident * exn
    | BadI_rs_kind of Ident.ident
    | BadI_rs_ghost of Ident.ident
    | BadI_rs_mask of Ident.ident
    | BadI_rs_reads of Ident.ident * Term.Svs.t
    | BadI_rs_writes of Ident.ident * Term.Svs.t
    | BadI_rs_taints of Ident.ident * Term.Svs.t
    | BadI_rs_covers of Ident.ident * Term.Svs.t
    | BadI_rs_resets of Ident.ident * Term.Svs.t
    | BadI_rs_raises of Ident.ident * Ident.Sid.t
    | BadI_rs_spoils of Ident.ident * Ty.Stv.t
    | BadI_rs_oneway of Ident.ident
    | BadI_xs_type of Ident.ident
    | BadI_xs_mask of Ident.ident
  exception NonLocal of Ident.ident
  exception BadInstance of Theory.bad_instance
  exception CannotInstantiate of Ident.ident
  exception CloseTheory
  exception NoOpenedNamespace
  exception ClashSymbol of string
  exception KnownMeta of Theory.meta
  exception UnknownMeta of string
  exception BadMetaArity of Theory.meta * int
  exception MetaTypeMismatch of Theory.meta * Theory.meta_arg_type *
              Theory.meta_arg_type
  exception RangeConflict of Ty.tysymbol
  exception FloatConflict of Ty.tysymbol
  exception IllFormedWf of Decl.prsymbol * Term.lsymbol
  exception ProvedWfConflict of Term.lsymbol
end