lean-bindings-0.1: Haskell bindings to the Lean Theorem Prover.

Copyright(c) Galois Inc, 2015
LicenseApache-2
Maintainerjhendrix@galois.com, lcasburn@galois.com
Safe HaskellTrustworthy
LanguageHaskell98

Language.Lean.Expr

Contents

Description

Operations for Lean expressions.

Synopsis

Documentation

data Expr Source

A Lean expression

Constructors

varExpr :: Word32 -> Expr Source

Create a variable with de-Bruijn index i. This is a bound variable.

sortExpr :: Univ -> Expr Source

Creates a type for the given universe

constExpr :: Name -> List Univ -> Expr Source

Create a constant with a given name and universe parameters

appExpr :: Expr -> Expr -> Expr Source

Create a function application for expressions

lambdaExpr :: BinderKind -> Name -> Expr -> Expr -> Expr Source

Create a lambda abstraction for expressions

piExpr :: BinderKind -> Name -> Expr -> Expr -> Expr Source

Create a pi abstraction for expressions

macroExpr :: MacroDef -> List Expr -> Expr Source

Create a macro application for expressions

localExpr :: Name -> Expr -> Expr Source

Create a local constant with the given name and type.

localExtExpr Source

Arguments

:: BinderKind

The binder kind for expression

-> Name

The name of expression

-> Name

The pretty print name

-> Expr

The type of the expression

-> Expr 

Create a local constant with additional parameters

metavarExpr :: Name -> Expr -> Expr Source

Create a metavariable with the given name nm and type tp.

View

exprView :: Expr -> ExprView Source

View information about the structure of an expression.

Operations

exprLt :: Expr -> Expr -> Bool Source

Return true if first expression is structurally less than other.

exprToString :: Expr -> String Source

Return the string representation of an expression.