Extension class that provides string interpolation functions for various expression types.
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.
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.
Logical constant with a fixed type.
Together with the scala <:<
construct, the Not trait allows us to express that a type is not a subtype of another.
Together with the scala <:<
construct, the Not trait allows us to express that a type is not a subtype of another. This works in the following manner:
Suppose you have types S <: T
and a function foo[T]
that you only want to apply to elements of type T that are not of type S.
Then you can write foo[T](implicit notAnS: Not[S <:<T])
.
TODO: Add an "ambiguous implicit" annotation to make this clearer. My scala version does not currently support this.
A logical constant describing a quantifier, which is of type (α->To)->To.
Trait that describes the following relation between types S
, T
, U
: If a substitution of type S
is applied
to an element of type T
, the result will have type U
.
Trait that describes the following relation between types S
, T
, U
: If a substitution of type S
is applied
to an element of type T
, the result will have type U
.
A subtype of Substitution.
The input type.
The output type.
(Since version 2016-02-25) Use strings instead
Testifies that type FOLAtom
is closed under FOLSub
.
Testifies that applying a non-FOL substitution to a FOLAtom results in a HOLAtom.
Testifies that applying a non-FOL substitution to a FOLAtom results in a HOLAtom.
Testifies that S is not a FOLSubstitution.
Testifies that applying a FOLSubstitution to a FOLExpression that is not a formula or a term will result in a FOLExpression.
Testifies that applying a FOLSubstitution to a FOLExpression that is not a formula or a term will result in a FOLExpression.
Testifies that T is not a subtype of FOLTerm.
Testifies that T is not a subtype of FOLFormula.
Testifies that applying a Substitution that is not a FOLSubstitution to a FOLExpression will result in a LambdaExpression.
Testifies that applying a Substitution that is not a FOLSubstitution to a FOLExpression will result in a LambdaExpression.
Testifies that S is not a subtype of FOLSubstitution.
Testifies that applying a FOLSubstitution to a FOLFormula that is not an atom will result in a FOLFormula.
Testifies that applying a FOLSubstitution to a FOLFormula that is not an atom will result in a FOLFormula.
Testifies that T is not a subtype of FOLAtom.
Testifies that type FOLTerm
is closed under FOLSub
.
Function type from_0 -> (from_1 -> ...
Function type from_0 -> (from_1 -> ... (from_n -> to)).
Testifies that applying a FOLSubstitution to a HOLFormula that is not a FOLFormula will result in a HOLFormula.
Testifies that applying a FOLSubstitution to a HOLFormula that is not a FOLFormula will result in a HOLFormula.
Testifies that T is not a subtype of FOLFormula.
Testifies that applying a Substitution that is not a FOLSubstitution to a HOLFormula will result in a HOLFormula.
Testifies that applying a Substitution that is not a FOLSubstitution to a HOLFormula will result in a HOLFormula.
Testifies that S is not a subtype of FOLSubstitution.
Testifies that applying a Substitution to a LambdaExpression that is not a FOLExpression or a HOLFormula will result in a LambdaExpression.
Testifies that applying a Substitution to a LambdaExpression that is not a FOLExpression or a HOLFormula will result in a LambdaExpression.
Testifies that T is not a subtype of FOLExpression.
Testifies that T is not a subtype of HOLFormula.
Testifies that a pair of substitutable objects is substitutable (by applying the substitution to each element).
Testifies that a Seq of substitutable objects is itself substitutable (by mapping over it).
Testifies that a Sequent of substitutable objects is itself substitutable (by mapping over it).
Testifies that a Set of substitutable objects is itself substitutable (by mapping over it).
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.
Matches constants and variables, but nothing else.
Arity of a type.
Base types occurring in a type.
Returns the set of non-logical constants occuring in the given argument.
Returns the set of free variables in the given argument.
A lambda term is in variable-normal form (VNF) if different binders bind different variables, and bound variables are disjoint from the free ones.
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.
Creates a lambda expression that designates positions to be replaced.
Returns the set of all subterms of the given lambda term.
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.
Returns the set of all variables occurring in the given argument (including vacuously bound variables).