NamegenSourceThis file features facilities to generate fresh names.
type intro_pattern_naming_expr = | IntroIdentifier of Names.Id.t| IntroFresh of Names.Id.t| IntroAnonymousGeneral evar naming using intro patterns
Equalities on intro_pattern_naming
val id_of_name_using_hdchar :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
Names.Name.t ->
Names.Id.tval mkProd_name :
Environ.env ->
Evd.evar_map ->
(Names.Name.t EConstr.binder_annot * EConstr.types * EConstr.types) ->
EConstr.typesval mkLambda_name :
Environ.env ->
Evd.evar_map ->
(Names.Name.t EConstr.binder_annot * EConstr.types * EConstr.constr) ->
EConstr.constrval prod_name :
Environ.env ->
Evd.evar_map ->
(Names.Name.t EConstr.binder_annot * EConstr.types * EConstr.types) ->
EConstr.typesDeprecated synonyms of mkProd_name and mkLambda_name
val lambda_name :
Environ.env ->
Evd.evar_map ->
(Names.Name.t EConstr.binder_annot * EConstr.types * EConstr.constr) ->
EConstr.constrval prod_create :
Environ.env ->
Evd.evar_map ->
(EConstr.ERelevance.t * EConstr.types * EConstr.types) ->
EConstr.constrval lambda_create :
Environ.env ->
Evd.evar_map ->
(EConstr.ERelevance.t * EConstr.types * EConstr.constr) ->
EConstr.constrval name_assumption :
Environ.env ->
Evd.evar_map ->
EConstr.rel_declaration ->
EConstr.rel_declarationval mkProd_or_LetIn_name :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
EConstr.rel_declaration ->
EConstr.typesval mkLambda_or_LetIn_name :
Environ.env ->
Evd.evar_map ->
EConstr.constr ->
EConstr.rel_declaration ->
EConstr.constrval it_mkProd_or_LetIn_name :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
EConstr.rel_context ->
EConstr.typesval it_mkLambda_or_LetIn_name :
Environ.env ->
Evd.evar_map ->
EConstr.constr ->
EConstr.rel_context ->
EConstr.constrAvoid clashing with a name satisfying some predicate
next_ident_away original_id unwanted_ids returns a new identifier as close as possible to the original_id while avoiding all unwanted_ids.
In particular:
original_id does not appear in the list of unwanted_ids, then original_id is returned.if original_id appears in the list of unwanted_ids, then this function returns a new id that:
original_id,unwanted_ids,where by subscript of some identifier we mean last part of it that is composed only from (decimal) digits and by root of some identifier we mean the whole identifier except for the subscript.
E.g. if we take foo42, then 42 is the subscript, and foo is the root.
Avoid clashing with a name already used in current module
Avoid clashing with a name already used in current module but tolerate overwriting section variables, as in goals
Default is default_non_dependent_ident
val next_name_away_with_default_using_types :
string ->
Names.Name.t ->
Names.Id.Set.t ->
EConstr.types ->
Names.Id.ttype renaming_flags = | RenamingForCasesPattern of Names.Name.t list * EConstr.constravoid only global constructors
*)| RenamingForGoalavoid all globals (as in intro)
*)| RenamingElsewhereFor of Names.Name.t list * EConstr.constrval make_all_rel_context_name_different :
Environ.env ->
Evd.evar_map ->
EConstr.rel_context ->
Environ.env * EConstr.rel_contextval compute_displayed_name_in :
Environ.env ->
Evd.evar_map ->
renaming_flags ->
Names.Id.Set.t ->
Names.Name.t ->
EConstr.constr ->
Names.Name.t * Names.Id.Set.tval compute_displayed_let_name_in :
Environ.env ->
Evd.evar_map ->
renaming_flags ->
Names.Id.Set.t ->
Names.Name.t ->
Names.Name.t * Names.Id.Set.tval compute_displayed_name_in_gen :
(Evd.evar_map -> int -> 'a -> bool) ->
Environ.env ->
Evd.evar_map ->
Names.Id.Set.t ->
Names.Name.t ->
'a ->
Names.Name.t * Names.Id.Set.t