
gapt.proofs.lk.reductions.CutReduction.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
import gapt.proofs.lk.rules.CutRule
trait CutReduction extends Reduction {
def reduce(proof: LKProof): Option[LKProof] =
proof match {
case cut @ CutRule(_, _, _, _) => reduce(cut)
case _ => None
}
def reduce(proof: CutRule): Option[LKProof]
def orElse(reduction: CutReduction): CutReduction =
new CutReduction {
def reduce(cut: CutRule): Option[LKProof] =
CutReduction.this.reduce(cut) orElse reduction.reduce(cut)
}
def andThen(reduction: CutReduction): CutReduction =
new CutReduction {
def reduce(cut: CutRule) =
CutReduction.this.reduce(cut) flatMap reduction.reduce
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy