
gapt.proofs.lk.reductions.Reduction.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gapt_3 Show documentation
Show all versions of gapt_3 Show documentation
General Architecture for Proof Theory
The newest version!
package gapt.proofs.lk.reductions
import gapt.proofs.context.Context
import gapt.proofs.lk.LKProof
trait Reduction {
def reduce(proof: LKProof): Option[LKProof]
def orElse(reduction: Reduction): Reduction =
new Reduction {
def reduce(proof: LKProof): Option[LKProof] =
Reduction.this.reduce(proof) orElse reduction.reduce(proof)
}
def andThen(reduction: Reduction): Reduction =
new Reduction {
def reduce(proof: LKProof): Option[LKProof] =
Reduction.this.reduce(proof) flatMap reduction.reduce
}
def isRedex(proof: LKProof): Boolean =
reduce(proof).nonEmpty
def redexes(proof: LKProof): Seq[LKProof] =
proof.subProofs.filter { isRedex(_) }.toSeq
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy