package expr
- Alphabetic
- By Inheritance
- expr
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- case class -> (in: Ty, out: Ty) extends Ty with Product with Serializable
- class Abs extends LambdaExpression
- class App extends LambdaExpression
- class BinaryPropConnectiveHelper extends AnyRef
- type ClosedUnderFOLSub[T] = Substitutable[FOLSubstitution, T, T]
- trait ClosedUnderReplacement [T] extends Replaceable[T, T]
- type ClosedUnderSub[T] = Substitutable[Substitution, T, T]
- class Const extends LambdaExpression with VarOrConst
- case class Definition (what: Const, by: LambdaExpression) extends Product with Serializable
- implicit final class ExprNameGenerator extends AnyVal
-
class
ExpressionParseHelper
extends AnyRef
Extension class that provides string interpolation functions for various expression types.
- trait FOLAtom extends LambdaExpression with FOLPartialAtom with HOLAtom with FOLFormula
- trait FOLAtomConst extends Const with HOLAtomConst with FOLPartialAtom
- trait FOLConst extends Const with FOLTerm with FOLFunctionConst
- trait FOLExpression extends LambdaExpression
- trait FOLFormula extends LambdaExpression with FOLPartialFormula with HOLFormula with FOLExpression
- trait FOLFunctionConst extends Const with FOLPartialTerm
- trait FOLPartialAtom extends LambdaExpression with HOLPartialAtom
- trait FOLPartialTerm extends LambdaExpression
- trait FOLQuantifier extends Const with LogicalConstant
- class FOLSubstitution extends Substitution
- trait FOLTerm extends LambdaExpression with FOLPartialTerm with FOLExpression
- trait FOLVar extends Var with FOLTerm
- trait HOLAtom extends LambdaExpression with HOLFormula with HOLPartialAtom
- trait HOLAtomConst extends Const with HOLPartialAtom
- trait HOLFormula extends LambdaExpression
- trait HOLPartialAtom extends LambdaExpression
- abstract class LambdaExpression extends AnyRef
-
class
LambdaPosition
extends AnyRef
Represents a position in a at.logic.gapt.expr.LambdaExpression.
Represents a position in a at.logic.gapt.expr.LambdaExpression.
Positions are represented by lists of Integers. The empty list denotes the expression itself. A nonempty list denotes a position in the left or right subexpression according to whether it starts with 1 or 2.
-
abstract
class
LogicalC
extends AnyRef
Helper class for logical constants.
Helper class for logical constants.
The logical constans are the propositional connectives, the quantifiers, bottom, top, and the equality constant. A logical constant is different from an expression consisting of only this logical constant, as the expression is an object of type LambdaExpression and needs to have a definite type.
A logical constant consists of a name (e.g. "∀"), and a set of possible types, (e.g. (Ti->To)->To, ((Ti->Ti)->To)->To, ...). Subclasses need to implement the function matchType, which matches these possible types. This way we can handle the parametric types of the quantifiers.
- trait LogicalConstant extends Const
- trait MatchingAlgorithm extends AnyRef
- class MonoidalBinaryPropConnectiveHelper extends BinaryPropConnectiveHelper
-
class
MonomorphicLogicalC
extends LogicalC
Logical constant with a fixed type.
- class Normalizer extends AnyRef
- class NullaryPropConnectiveHelper extends AnyRef
-
sealed abstract
class
Polarity
extends AnyRef
Polarity of a formula.
Polarity of a formula.
There are two polarities, positive/in-succedent and negative/in-antecedent. Polarities serve multiple purposes:
- They distinguish strong and weak quantifiers. A universal (∀) quantifier in positive/in-succedent polarity is strong (requires an eigenvariable/Skolem inference), and is weak in negative/in-antecedent polarity (can be instantiated with any term).
- They guide the construction of expansion trees and their deep formulas. A merge in positive polarity has a disjunction as deep formula, in negative polarity it has a conjunction.
- They specify the side/cedent of a sequent.
Our convention is based on proofs in LK:
- formulas in the succedent are positive
- formulas in the antecedent are negative
This is used consistently, except for a major exception: in resolution proofs, the polarity is reversed. A formula in the antecedent of a clause in a resolution proof has the negative/in-antecedent polarity (as it is in the antecedent of a sequent). However upon conversion to LK/ET, the polarity switches to positive/in-succedent polarity.
- trait PropAtom extends Const with PropFormula with FOLAtom with FOLAtomConst
- trait PropConnective extends Const with LogicalConstant with PropPartialFormula
- trait PropFormula extends LambdaExpression with PropPartialFormula with FOLFormula
-
class
QuantifierC
extends LogicalC
A logical constant describing a quantifier, which is of type (α->To)->To.
- class QuantifierHelper extends AnyRef
-
trait
ReductionRule
extends AnyRef
Expression-level reduction rule.
Expression-level reduction rule.
Examples are beta-reduction in BetaReduction, and delta-reduction in Context.Definitions.
- trait Replaceable [-I, +O] extends AnyRef
-
trait
Substitutable
[-S <: Substitution, -T, +U] extends AnyRef
Trait that describes the following relation between types
S
,T
,U
: If a substitution of typeS
is applied to an element of typeT
, the result will have typeU
.Trait that describes the following relation between types
S
,T
,U
: If a substitution of typeS
is applied to an element of typeT
, the result will have typeU
.- S
A subtype of Substitution.
- T
The input type.
- U
The output type.
- Annotations
- @implicitNotFound( ... )
-
class
Substitution
extends AnyRef
A substitution is a mapping from variables to lambda-expressions which differs from the identity on finitely many variables.
A substitution is a mapping from variables to lambda-expressions which differs from the identity on finitely many variables. Therefore: 1) each variable is mapped to only one lambda expression 2) the order of the variable-mappings is irrelevant 3) all variable-mappings are applied simultaneously to a term i.e. {x |-> y, y |-> a}x = y and not a.
As the lambda calculus contains variable binders, substitution can only be defined up to alpha-equivalence. When applying a substitution, bound variables are renamed if needed.
- case class TBase (name: String) extends Ty with Product with Serializable
- case class TVar (name: String) extends Ty with Product with Serializable
- sealed abstract class Ty extends AnyRef
- class UnaryPropConnectiveHelper extends AnyRef
- class Var extends LambdaExpression with VarOrConst
- trait VarOrConst extends LambdaExpression
- class syntacticMatching extends MatchingAlgorithm
Value Members
- implicit def stringInterpolationForExpressions(sc: StringContext)(implicit file: File, line: Line, sig: BabelSignature): ExpressionParseHelper
- object Abs
- object All extends QuantifierHelper
- object And extends MonoidalBinaryPropConnectiveHelper
- object AndC extends MonomorphicLogicalC
- object App
- object Apps
- object BetaReduction extends ReductionRule
- object Bottom extends NullaryPropConnectiveHelper
- object BottomC extends MonomorphicLogicalC
- object Const
- object Eq
- object EqC extends LogicalC
- object Ex extends QuantifierHelper
- object ExistsC extends QuantifierC
- object ExpressionParseHelper
- object FOLAtom
- object FOLAtomConst extends FOLHead
- object FOLConst
- object FOLFunction
- object FOLFunctionConst extends FOLHead
- object FOLHeadType
- object FOLSubstitution
- object FOLVar
- object ForallC extends QuantifierC
-
object
FunctionType
Function type from_0 -> (from_1 -> ...
Function type from_0 -> (from_1 -> ... (from_n -> to)).
- object HOLAtom
- object HOLAtomConst
- object HOLFunction
- object Imp extends BinaryPropConnectiveHelper
- object ImpC extends MonomorphicLogicalC
- object LambdaPosition
- object Neg extends UnaryPropConnectiveHelper
- object NegC extends MonomorphicLogicalC
- object NonLogicalConstant
- object Or extends MonoidalBinaryPropConnectiveHelper
- object OrC extends MonomorphicLogicalC
- object Polarity
- object Quant
- object ReductionRule
- object Replaceable
- object Substitutable
- object Substitution
-
object
TermReplacement
A term replacement homomorphically extends a partial function on lambda expressions to all lambda expressions.
A term replacement homomorphically extends a partial function on lambda expressions to all lambda expressions.
This is done on a "best effort" basis. Replacing constants by ground terms of the same type will usually work, anything beyond that might or might not work.
- object Ti extends TBase
- object To extends TBase
- object Top extends NullaryPropConnectiveHelper
- object TopC extends MonomorphicLogicalC
- object Var
-
object
VarOrConst
Matches constants and variables, but nothing else.
-
object
arity
Arity of a type.
-
object
baseTypes
Base types occurring in a type.
- object clauseSubsumption
-
object
constants
Returns the set of non-logical constants occuring in the given argument.
- object containedNames
- object expressionSize
-
object
freeVariables
Returns the set of free variables in the given argument.
-
object
isInVNF
A lambda term is in variable-normal form (VNF) if different binders bind different variables, and bound variables are disjoint from the free ones.
- object longNormalForm
- object normalize
-
object
preExpr
Intermediate representation for expressions without explicit types.
Intermediate representation for expressions without explicit types.
The main application is during parsing: the at.logic.gapt.formats.babel.BabelParser produces pre-expressions.
This representation is intended to be as simple as possible, all higher-level constructs (such as <-> or ∀) are already desugared into simply-typed lambda terms.
It differs from the "real" lambda calculus in at.logic.gapt.expr in three major ways:
- There are type meta-variables.
- There are type annotations.
- Free variables, bound variables, and constants are not distinguished; they are all stored as "identifiers".
-
object
rename
get a new variable/constant (similar to the current and) different from all variables/constants in the blackList, returns this variable if this variable is not in the blackList.
-
object
replacementContext
Creates a lambda expression that designates positions to be replaced.
-
object
subTerms
Returns the set of all subterms of the given lambda term.
- object syntacticMGU
- object syntacticMatching extends syntacticMatching
- object toImplications
-
object
toVNF
Transforms an expression into an alpha-equivalent expression in variable-normal form, where no two binders bind the same variable, and the bound variables are disjoint from the free ones.
- object typeMatching
- object typeVars
-
object
variables
Returns the set of all variables occurring in the given argument (including vacuously bound variables).