package lambdapi

  1. Overview
  2. Docs

Module Handle.GoalSource

Goal.

Sourcetype goal_typ = {
  1. goal_meta : Core.Term.meta;
    (*

    Goal metavariable.

    *)
  2. goal_hyps : Core.Env.t;
    (*

    Precomputed scoping environment.

    *)
  3. goal_type : Core.Term.term;
    (*

    Precomputed type.

    *)
}
Sourcetype ('a, 'b) t =
  1. | Typ of 'a
  2. | Unif of 'b
Sourceval is_typ : goal -> bool
Sourceval is_unif : goal -> bool
Sourceval get_constr : goal -> Core.Term.constr
Sourceval get_names : goal -> int Lplib.Extra.StrMap.t
Sourcetype info = (string * string) list * (string * string, string) t

The string representation of a goal g is a tuple (l,b,s,t) where l is a list of pairs of strings (assumption_name,assumption_type) and, if g is a typing goal, then b=true, s is the goal meta name and t is the goal type, and if g is a unification goal, then b=false and s and t are the LHS and RHS of the goal respectively.

ctxt g returns the typing context of the goal g.

Sourceval env : goal -> Core.Env.t

env g returns the scoping environment of the goal g.

Sourceval of_meta : Core.Term.meta -> goal

of_meta m creates a goal from the meta m.

Sourceval simpl_opt : (Core.Term.ctxt -> Core.Term.term -> Core.Term.term option) -> goal -> goal option

simpl_opt f g tries to simplify the goal g with the function f.

simpl f g simplifies the goal g with the function f.

Sourceval typ_or_def : int Lplib.Extra.StrMap.t -> Format.formatter -> (Core.Term.term * Core.Term.term option) -> unit

typ_or_def idmap ppf (_,ty,def) prints in ppf the type ty or the definition def if there is one.

ctxt_elt idmap ppf x prints in ppf the context element x.

Sourceval env_elt : int Lplib.Extra.StrMap.t -> Format.formatter -> (string * ('a * Core.Term.term * Core.Term.term option)) -> unit

env_elt idmap ppf x prints in ppf the environment element x.

hyps ppf g prints on ppf the beta-normal forms of the hypotheses of the goal g.

concl ppf g prints on ppf the beta-normal form of the conclusion of the goal g.

Sourceval pp : Format.formatter -> goal -> unit

pp ppf g prints on ppf the beta-normal form of the goal g with its hypotheses.

Sourceval pp_no_hyp : Format.formatter -> goal -> unit

pp_no_hyp ppf g prints on ppf the beta-normal form of the conclusion of the goal g without its hypotheses.

Sourceval to_info : goal -> info

to_info g converts the goal g into an info data structure.

Sourceval add_goals_of_problem : Core.Term.problem -> goal list -> goal list

add_goals_of_problem p gs extends the list of goals gs with the metavariables and constraints of p.