All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.pirocks.logic.Builder.kt Maven / Gradle / Ivy

Go to download

A simple library for working with first order logic and natural deduction proofs

The newest version!
package io.github.pirocks.logic

infix fun FOLFormula.and(right: FOLFormula): FOLFormula {
    return And(this, right)
}

infix fun FOLFormula.or(right: FOLFormula): FOLFormula {
    return Or(this, right)
}

infix fun FOLFormula.iff(right: FOLFormula): FOLFormula {
    return IFF(this, right)
}

infix fun FOLFormula.implies(right: FOLFormula): FOLFormula {
    return Implies(this, right)
}

fun not(toNegate: FOLFormula): FOLFormula {
    return Not(toNegate)
}

fun forall(variableName: VariableName = VariableName(), init: VariableName.() -> FOLFormula): FOLFormula {
    return ForAll(variableName.init(), variableName)
}

fun exists(variableName: VariableName = VariableName(), init: VariableName.() -> FOLFormula): FOLFormula {
    return Exists(variableName.init(), variableName)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy