package lambdapi

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lambdapi-2.0.0.tbz
sha256=66d7d29f7a0d10493b8178c4c3aeb247971e24fab3eba1c54887e1b9a82fe005
sha512=69ecf2406e4c7225ab7f8ebe11624db5d2ab989c8f30f5b6e5d426fd8ef9102f142a2840af16fb9103bb712ebcf7d314635f8b413a05df66e7b7a38548867032

doc/lambdapi.core/Core/Ctxt/index.html

Module Core.CtxtSource

Typing context.

unbind ctx a def b returns a triple (x,t,new_ctx) such that (x,t) is an unbinding of b (in the sense of Bindlib.unbind) and new_ctx is an extension of the context ctx with the declaration that x has type a (only if x occurs in t). If def is of the form Some(u), the context also registers the term u as the definition of variable x.

Sourceval type_of : Term.tvar -> Term.ctxt -> Term.term

type_of x ctx returns the type of x in the context ctx when it appears in it, and

  • raises [Not_found]

    otherwise.

Sourceval def_of : Term.tvar -> Term.ctxt -> Term.ctxt * Term.term option

def_of x ctx returns the definition of x in the context ctx if it appears, and None otherwise

Sourceval mem : Term.tvar -> Term.ctxt -> bool

mem x ctx tells whether variable x is mapped in the context ctx.

Sourceval to_prod : Term.ctxt -> Term.term -> Term.term * int

to_prod ctx t builds a product by abstracting over the context ctx, in the term t. It returns the number of products as well.

Sourceval to_abst : Term.ctxt -> Term.term -> Term.term

to_abst ctx t builds a sequence of abstractions over the context ctx, in the term t.

to_let ctx t adds the defined variables of ctx on top of t.

Sourceval sub : Term.ctxt -> Term.tvar array -> Term.ctxt

sub ctx vs returns the sub-context of ctx made of the variables of vs.

unfold ctx t behaves like Term.unfold unless term t is of the form Vari(x) with x defined in ctx. In this case, t is replaced by the definition of x in ctx. In particular, if no operation is carried out on t, we have unfold ctx t == t.

Sourceval get_args : Term.ctxt -> Term.term -> Term.term * Term.term list

get_args ctx t decomposes term t as Term.get_args does, but any variable encountered is replaced by its definition in ctx (if it exists).

to_map builds a map from a context.