Module Proof_global
This module defines proof facilities relevant to the toplevel. In particular it defines the global proof environment.
val get_current_proof_name : t -> Names.Id.tval get_current_persistence : t -> Decl_kinds.goal_kindval get_all_proof_names : t -> Names.Id.t listval discard : Names.lident -> t -> t optionval discard_current : t -> t optionval give_me_the_proof : t -> Proof.tval compact_the_proof : t -> t
type lemma_possible_guards= int list listWhen a proof is closed, it is reified into a
proof_object, whereidis the name of the proof,entriesthe list of the proof terms (in a form suitable for definitions). Together with theterminatorfunction which takes aproof_objecttogether with aproof_end(i.e. an proof ending command) and registers the appropriate values.
type proof_object={id : Names.Id.t;entries : Safe_typing.private_constants Entries.definition_entry list;persistence : Decl_kinds.goal_kind;universes : UState.t;}type opacity_flag=|Opaque|Transparenttype proof_ending=|Admitted of Names.Id.t * Decl_kinds.goal_kind * Entries.parameter_entry * UState.t|Proved of opacity_flag * Names.lident option * proof_objecttype proof_terminatortype closed_proof= proof_object * proof_terminator
val make_terminator : (proof_ending -> unit) -> proof_terminatorval apply_terminator : proof_terminator -> proof_ending -> unitval start_proof : ontop:t option -> Evd.evar_map -> Names.Id.t -> ?pl:UState.universe_decl -> Decl_kinds.goal_kind -> (Environ.env * EConstr.types) list -> proof_terminator -> tstart_proof ~ontop id str pl goals terminatorstarts a proof of nameidwith goalsgoals(a list of pairs of environment and conclusion);strdescribes what kind of theorem/definition this is;terminatoris used at the end of the proof to close the proof (e.g. to declare the built constructions as a coercion or a setoid morphism). The proof is started in the evar mapsigma(which can typically contain universe constraints), and with universe bindings pl.
val start_dependent_proof : ontop:t option -> Names.Id.t -> ?pl:UState.universe_decl -> Decl_kinds.goal_kind -> Proofview.telescope -> proof_terminator -> tLike
start_proofexcept that there may be dependencies between initial goals.
val update_global_env : t -> tUpdate the proofs global environment after a side-effecting command (e.g. a sublemma definition) has been run inside it. Assumes there_are_pending_proofs.
val close_proof : opaque:opacity_flag -> keep_body_ucst_separate:bool -> Future.fix_exn -> t -> closed_proof
type closed_proof_output= (Constr.t * Safe_typing.private_constants) list * UState.t
val return_proof : ?allow_partial:bool -> t -> closed_proof_outputval close_future_proof : opaque:opacity_flag -> feedback_id:Stateid.t -> t -> closed_proof_output Future.computation -> closed_proofval get_terminator : t -> proof_terminatorGets the current terminator without checking that the proof has been completed. Useful for the likes of
Admitted.
val set_terminator : proof_terminator -> t -> tval get_open_goals : t -> intval with_current_proof : (unit Proofview.tactic -> Proof.t -> Proof.t * 'a) -> t -> t * 'aRuns a tactic on the current proof. Raises
NoCurrentProofis there is no current proof. The return boolean is set tofalseif an unsafe tactic has been used.
val simple_with_current_proof : (unit Proofview.tactic -> Proof.t -> Proof.t) -> t -> tval set_endline_tactic : Genarg.glob_generic_argument -> t -> tSets the tactic to be used when a tactic line is closed with
...
val set_used_variables : t -> Names.Id.t list -> (Constr.named_context * Names.lident list) * tSets the section variables assumed by the proof, returns its closure * (w.r.t. type dependencies and let-ins covered by it) + a list of * ids to be cleared
val get_used_variables : t -> Constr.named_context optionval get_universe_decl : t -> UState.universe_declGet the universe declaration associated to the current proof.