package lambdapi

  1. Overview
  2. Docs

Module Handle.ProofSource

Proof state.

Sourcetype proof_state = {
  1. proof_name : Common.Pos.strloc;
    (*

    Name of the theorem.

    *)
  2. proof_term : Core.Term.meta option;
    (*

    Optional metavariable holding the goal associated to a symbol used as a theorem/definition and not just a simple declaration

    *)
  3. proof_goals : Goal.goal list;
    (*

    Open goals (focused goal is first).

    *)
}

Representation of the proof state of a theorem.

Sourceval finished : proof_state -> bool

finished ps tells whether there are unsolved goals in ps.

goals ppf gl prints the goal list gl to channel ppf.

Sourceval state_on_error : bool ref

state_on_error controls whether the failure of a tactic attaches the current proof state to the error, as the err_desc argument of the Fatal exception, printed after the error message. It is enabled by default, and disabled by the LSP server, which has its own means of displaying the proof state. Errors that always reported the proof state (subproof-count mismatches, unfinished proofs) keep doing so regardless of this setting.

Sourceval error_state : ?after:??? -> proof_state -> string

error_state ?after ps renders, for attachment to an error report, the proof state ps a failing tactic was applied to, followed, when the failure was only detected after the tactic was applied (a subproof-count mismatch), by the proof state after its application.

Sourceval remove_solved_goals : proof_state -> proof_state

remove_solved_goals ps removes from the proof state ps the typing goals that are solved.

Sourceval meta_of_key : proof_state -> int -> Core.Term.meta option

meta_of_key ps i returns Some m where m is a meta of ps whose key is i, or else it returns None.

Sourceval focus_env : proof_state option -> Core.Env.t

focus_env ps returns the scoping environment of the focused goal or the empty environment if there is none.