Declare.ProofDeclare.Proof.t Construction of constants using interactive proofs.
val start :
info:Info.t ->
cinfo:EConstr.t CInfo.t ->
?using:Names.Id.Set.t ->
Evd.evar_map ->
tstart_proof ~info ~cinfo sigma starts a proof of cinfo. The proof is started in the evar map sigma (which can typically contain universe constraints)
val start_derive :
name:Names.Id.t ->
info:Info.t ->
cinfo:unit CInfo.t list ->
Proofview.telescope ->
tstart_{derive,equations} are functions meant to handle interactive proofs with multiple goals, they should be considered experimental until we provide a more general API encompassing both of them. Please, get in touch with the developers if you would like to experiment with multi-goal dependent proofs so we can use your input on the design of the new API.
val start_equations :
name:Names.Id.t ->
info:Info.t ->
hook:(pm:OblState.t -> Names.Constant.t list -> Evd.evar_map -> OblState.t) ->
types:
(Environ.env
* Evar.t
* Evd.undefined Evd.evar_info
* EConstr.named_context
* Evd.econstr)
list ->
Evd.evar_map ->
Proofview.telescope ->
tval start_definition :
info:Info.t ->
cinfo:EConstr.t CInfo.t ->
?using:Vernacexpr.section_subset_expr ->
Evd.evar_map ->
tPretty much internal, used by the Lemma vernaculars
val start_mutual_definitions :
info:Info.t ->
cinfo:Constr.t CInfo.t list ->
bodies:Constr.t option list ->
possible_guard:(Pretyping.possible_guard * Sorts.relevance list) ->
?using:Vernacexpr.section_subset_expr ->
Evd.evar_map ->
tPretty much internal, used by mutual Lemma / Fixpoint vernaculars
val start_mutual_definitions_refine :
info:Info.t ->
cinfo:EConstr.t CInfo.t list ->
bodies:EConstr.t option list ->
possible_guard:(Pretyping.possible_guard * Evd.erelevance list) ->
?using:Vernacexpr.section_subset_expr ->
Evd.evar_map ->
tPretty much internal, used by mutual Lemma / Fixpoint vernaculars with #refine
val save :
pm:OblState.t ->
proof:t ->
opaque:Vernacexpr.opacity_flag ->
idopt:Names.lident option ->
OblState.t * Names.GlobRef.t listQed a proof
val save_regular :
proof:t ->
opaque:Vernacexpr.opacity_flag ->
idopt:Names.lident option ->
Names.GlobRef.t listFor proofs known to have Regular ending, no need to touch program state.
val save_admitted : pm:OblState.t -> proof:t -> OblState.tAdmit a proof
val by : Environ.env -> unit Proofview.tactic -> t -> t * boolby env tac applies tactic tac to the 1st subgoal of the current focused proof. Returns false if an unsafe tactic has been used.
val get_name : t -> Names.Id.tval map_fold_endline :
f:(Gentactic.glob_generic_tactic option -> Proof.t -> Proof.t * 'a) ->
t ->
t * 'aval set_endline_tactic : Gentactic.glob_generic_tactic -> t -> tSets the tactic to be used when a tactic line is closed with ...
Explicit: explicit Proof command, Implicit: no Proof command, NotRequired: opened by Next Obligation or similar
val definition_scope : t -> Locality.definition_scopeval set_proof_using : t -> Vernacexpr.section_subset_expr option -> tSets the section variables assumed by the proof, returns its closure (w.r.t. type dependencies and let-ins covered by it). With None, get the variables from the "using" attribute.
val get_used_variables : t -> Names.Id.Set.t optionGets the set of variables declared to be used by the proof. None means no "Proof using" or #using was given
Update the proof's universe information typically after a side-effecting command (e.g. a sublemma definition) has been run inside it.
val get_open_goals : t -> intHelpers to obtain proof state when in an interactive proof
get_goal_context n returns the context of the nth subgoal of the current focused proof or raises a UserError if there is no focused proof or if there is no more subgoals
val get_goal_context : t -> int -> Evd.evar_map * Environ.envval get_current_context : t -> Evd.evar_map * Environ.envget_current_context () returns the context of the current focused goal. If there is no focused goal but there is a proof in progress, it returns the corresponding evar_map. If there is no pending proof then it returns the current global environment and empty evar_map.
val return_proof : t -> closed_proof_outputRequires a complete proof.
XXX: This is an internal, low-level API and could become scheduled for removal from the public API, use higher-level declare APIs instead
val close_proof :
?warn_incomplete:bool ->
opaque:Vernacexpr.opacity_flag ->
keep_body_ucst_separate:bool ->
t ->
proof_objectval close_future_proof :
feedback_id:Stateid.t ->
t ->
closed_proof_output Future.computation ->
proof_objectval save_lemma_admitted_delayed :
pm:OblState.t ->
proof:proof_object ->
OblState.tSpecial cases for delayed proofs, in this case we must provide the proof information so the proof won't be forced.
val save_lemma_proved_delayed :
pm:OblState.t ->
proof:proof_object ->
idopt:Names.lident option ->
OblState.texception NotGuarded of Environ.env
* Evd.evar_map
* (Environ.env * int * EConstr.t Type_errors.pcofix_guard_error) option
* (Environ.env * int * int list * EConstr.t Type_errors.pfix_guard_error)
list
* EConstr.rec_declarationval control_only_guard : t -> unit