package lambdapi

  1. Overview
  2. Docs
Proof assistant for the λΠ-calculus modulo rewriting

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lambdapi-3.0.0.tbz
sha256=1066aed2618fd8e6a400c5147dbf55ea977ce8d3fe2e518ac6785c6775a1b8be
sha512=f7f499626aba92e070ae69581299a58525973fdbfd04a160ed3ac89209fb6cbe307b816d0b23e1b75bc83467ce8b4b0530c6f9816eaf58f7a07fde65a450106c

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

Module Handle.RewriteSource

Implementation of the rewrite tactic.

Sourceval log : 'a Lplib.Base.outfmt -> 'a
Sourcetype eq_config = {
  1. symb_P : Core.Term.sym;
    (*

    Encoding of propositions.

    *)
  2. symb_T : Core.Term.sym;
    (*

    Encoding of types.

    *)
  3. symb_eq : Core.Term.sym;
    (*

    Equality proposition.

    *)
  4. symb_eqind : Core.Term.sym;
    (*

    Induction principle on equality.

    *)
  5. symb_refl : Core.Term.sym;
    (*

    Reflexivity of equality.

    *)
}

Equality configuration.

get_eq_config ss pos returns the current configuration for equality, used by tactics such as “rewrite” or “reflexivity”.

get_eq_data pos cfg a returns ((a,l,r),[v1;..;vn]) if a ≡ Π v1:A1, .., Π vn:An, P (eq a l r) and fails otherwise.

Sourcetype to_subst = Core.Term.var array * Core.Term.term

Type of a term with the free variables that need to be substituted. It is usually used to store the LHS of a proof of equality, together with the variables that were quantified over.

Sourceval matches : Core.Term.term -> Core.Term.term -> bool

matches p t instantiates the TRef's of p so that p gets equal to t and returns true if all TRef's of p could be instantiated, and false otherwise.

Sourceval no_match : ?subterm:bool -> Common.Pos.popt -> (Core.Term.var array * Core.Term.term) -> Core.Term.term -> 'a
Sourceval matching_subs : to_subst -> Core.Term.term -> Core.Term.term array option

matching_subs (xs,p) t attempts to match the pattern p containing the variables xs) with the term t. If successful, it returns Some ts where ts is an array of terms such that substituting xs by the corresponding elements of ts in p yields t.

WARNING: Some elements of ts may be uninstantiated TRef's. It will happen if not all vars are in LibTerm.free_vars p, for instance when some vars are type variables not occurring in p, for instance when trying to apply an equation of the form x = ... with x of polymorphic type. This could be improved by generating p_terms instead of terms. Indeed, in this case, we could replace uninstantiated TRef's by underscores.

Sourceval check_subs : Common.Pos.popt -> Core.Term.var array -> Core.Term.term array -> unit

check_subs vars ts check that no element of ts is an uninstantiated TRef.

Sourceval matching_subs_check_TRef : Common.Pos.popt -> (Core.Term.var array * Core.Term.term) -> Core.Term.term -> Core.Term.term array
Sourceval replace_wild_by_tref : Core.Term.term -> Core.Term.term

replace_wild_by_tref t substitutes every wildcard of t by a fresh TRef.

bind_pattern p t replaces in the term t every occurence of the pattern p by a fresh variable, and returns the binder on this variable.

swap cfg a r l t returns a term of type P (eq a l r) from a term t of type P (eq a r l).

rewrite ss p pos gt l2r pat t generates a term for the refine tactic representing the application of the rewrite tactic to the goal type gt. Every occurrence of the first instance of the left-hand side is replaced by the right-hand side of the obtained proof (or the reverse if l2r is false). pat is an optional SSReflect pattern. t is the equational lemma that is appied. It handles the full set of SSReflect patterns.

OCaml

Innovation. Community. Security.