package lambdapi

All checked builds pass
  1. Overview
  2. Docs
Proof assistant for the λΠ-calculus modulo rewriting

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lambdapi-4.0.0.tbz
sha256=0e2e73e0ea0c674f1263bf85ed3453ed3d6084d38eea29974a03ba9e382d29d7
sha512=2831db57fcd09206687a92fc9ee7d363e87bcec5167949e9c8161d41c63d5887b9f3556bfd63a7a9a0c12e5a5dc61a397baf4f496ebdb2a2fce122142c05e7a1

doc/lambdapi.handle/Handle/Tactic/index.html

Module Handle.TacticSource

Handling of tactics.

Sourceval log : 'a Lplib.Base.outfmt -> 'a
Sourceval admitted_initial_value : int

Number of admitted axioms in the current signature. Used to name the generated axioms. This reference is reset in Compile for each new compiled module.

Sourceval admitted : int ref
Sourceval reset_admitted : unit -> int
Sourceval restore_admitted : int -> unit

add_axiom ss sym_pos m adds in signature state ss a new axiom symbol of type !(m.meta_type) and instantiate m with it. WARNING: It does not check whether the type of m contains metavariables. Return updated signature state ss and the new axiom symbol.

admit_meta ss sym_pos m adds as many axioms as needed in the signature state ss to instantiate the metavariable m by a fresh axiom added to the signature ss.

tac_admit ss pos ps gt admits typing goal gt.

tac_solve pos ps tries to simplify the unification goals of the proof state ps and fails if constraints are unsolvable.

tac_refine pos ps gt gs p t refines the typing goal gt with t.

ind_data t returns the ind_data structure of s if t is of the form s t1 .. tn with s an inductive type. Fails otherwise.

tac_induction pos ps gt tries to apply the induction tactic on the typing goal gt.

Sourceval get_prod_ids : Core.Env.env -> bool -> Core.Term.term -> string list

get_prod_ids env do_whnf t returns the list v1;..;vn if do_whnf is true and whnf t is of the form Π v1:A1, .., Π vn:An, u with u not a product, or if do_whnf is false and t is of the form Π v1:A1, .., Π vn:An, u with u not a product.

Sourcetype tactic =
  1. | T_admit
  2. | T_all_hyps
  3. | T_apply
  4. | T_assume
  5. | T_assumption
  6. | T_change
  7. | T_compose
  8. | T_fail
  9. | T_first_hyp
  10. | T_focus
  11. | T_generalize
  12. | T_have
  13. | T_induction
  14. | T_orelse
  15. | T_print
  16. | T_refine
  17. | T_reflexivity
  18. | T_remove
  19. | T_repeat
  20. | T_rewrite
  21. | T_set
  22. | T_simplify
  23. | T_simplify_beta
  24. | T_solve
  25. | T_symmetry
  26. | T_try
  27. | T_why3

Builtin tactic names.

Sourcetype config = (string, tactic) Hashtbl.t

get_config ss pos build the configuration using ss.

p_term pos t converts the term t into a p_term at position pos.

Sourceval string_of_term : Common.Pos.popt -> Core.Term.term -> string

string_of_term pos t returns the string contained in a string literal term t.

Sourceval pos_of_string : Core.Term.sym -> Lexing.position

p_term_of_string_term pos t turns into a p_term a string literal term t that is part of a bigger term obtained by scoping and normalizing of a p_term at position pos.

Sourceval p_rwpatt_of_string_term : Common.Pos.popt -> Core.Term.term -> Parsing.Syntax.p_rwpatt option

p_rwpatt_of_string_term pos t turns into a p_rwpatt option a string literal term t that is part of a bigger term obtained by scoping and normalizing of a p_term at position pos.

Sourceval int_of_term : Common.Pos.popt -> Core.Term.term -> int

int_of_term pos t returns the int contained in a string literal term t.

Sourceval is_right : Common.Pos.popt -> Core.Term.term -> bool

is_right pos t returns true iff t is "right".

Sourceval new_name : string -> Core.Env.t -> string

new_name prefix env returns a string prefixed by prefix and not occurring in env.

Representation of a tactic output.

handle sym_pos priv r tac n applies the tactic tac from the previous tactic output r and checks that the number of goals of the new proof state is compatible with the number n of subproofs. When tac fails, the proof state it was applied to is attached to the error (see Proof.state_on_error).