Equation

sealed class Equation

A class representing an Equation of logic terms, to be unified;

LHS stands for Left-Hand side and RHS stands for Right-Hand side, of the Equation

Types

Link copied to clipboard
data class Assignment(val lhs: <ERROR CLASS>, val rhs: <ERROR CLASS>) : Equation

An equation stating Var = Term

Link copied to clipboard
object Companion

Equation companion object

Link copied to clipboard
data class Comparison(val lhs: <ERROR CLASS>, val rhs: <ERROR CLASS>) : Equation

An equation comparing Terms, possibly different

Link copied to clipboard
data class Contradiction(val lhs: <ERROR CLASS>, val rhs: <ERROR CLASS>) : Equation

A contradicting equation, trying to equate non equal Terms

Link copied to clipboard
data class Identity(val lhs: <ERROR CLASS>, val rhs: <ERROR CLASS>) : Equation

An equation of identical Terms

Functions

Link copied to clipboard
fun apply(substitution: <ERROR CLASS>, equalityChecker: (<ERROR CLASS>, <ERROR CLASS>) -> Boolean = Term::equals): Equation

Applies given substitution to the Equation left-hand and right-hand sides, returning the new Equation

Link copied to clipboard
open fun asAssignment(): Equation.Assignment?
Link copied to clipboard
open fun asComparison(): Equation.Comparison?
Link copied to clipboard
open fun asContradiction(): Equation.Contradiction?
Link copied to clipboard
open fun asIdentity(): Equation.Identity?
Link copied to clipboard
fun castToAssignment(): Equation.Assignment
Link copied to clipboard
fun castToComparison(): Equation.Comparison
Link copied to clipboard
fun castToContradiction(): Equation.Contradiction
Link copied to clipboard
fun castToIdentity(): Equation.Identity
Link copied to clipboard
fun swap(): Equation
Link copied to clipboard
open fun toPair(): Pair<<ERROR CLASS>, <ERROR CLASS>>
Link copied to clipboard
open fun toTerm(): <ERROR CLASS>

Properties

Link copied to clipboard
open val isAssignment: Boolean
Link copied to clipboard
open val isComparison: Boolean
Link copied to clipboard
open val isContradiction: Boolean
Link copied to clipboard
open val isIdentity: Boolean
Link copied to clipboard
open val lhs: <ERROR CLASS>

The left-hand side of the equation

Link copied to clipboard
open val rhs: <ERROR CLASS>

The right-hand side of the equation

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
fun Equation.toAssignmentPair(): Pair<<ERROR CLASS>, <ERROR CLASS>>
Link copied to clipboard
fun Equation.toSubstitution(): <ERROR CLASS>

Transforms an Equation of a Var with a Term to the corresponding Substitution