Skip to content

Commit

Permalink
Tidy examples
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianCassayre committed Jun 23, 2022
1 parent 58b05eb commit 30b0c34
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package me.cassayre.florian.masterproject.examples

import lisa.kernel.proof.SCProofChecker

import scala.util.chaining.*
import me.cassayre.florian.masterproject.front.fol.FOL.{*, given}
import me.cassayre.florian.masterproject.front.proof.Proof.{*, given}
Expand Down Expand Up @@ -56,4 +58,11 @@ import me.cassayre.florian.masterproject.front.theory.SetTheory.*

p.asTheorem()
}

println("=== Reconstruction ===")
println("(t0):")
println(KernelPrinter.prettyJudgedProof(SCProofChecker.checkSCProof(reconstructSCProofForTheorem(t0))))
println()
println("(t1):")
println(KernelPrinter.prettyJudgedProof(SCProofChecker.checkSCProof(reconstructSCProofForTheorem(t1))))
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.cassayre.florian.masterproject.examples

import lisa.kernel.proof.SCProofChecker
import me.cassayre.florian.masterproject.front.fol.FOL.{*, given}
import me.cassayre.florian.masterproject.front.parser.FrontMacro.{*, given}
import me.cassayre.florian.masterproject.front.printer.FrontPositionedPrinter.*
Expand Down Expand Up @@ -157,4 +158,7 @@ import scala.util.chaining.*

asTheorem()
}

println("=== Reconstruction ===")
println(KernelPrinter.prettyJudgedProof(SCProofChecker.checkSCProof(reconstructSCProofForTheorem(thmUnionAny))))
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import scala.util.chaining.*
val theorem: Theorem = ProofMode(sequent).tap(_(propositionalSolver)).asTheorem()
val scProof: SCProof = reconstructSCProofForTheorem(theorem)

println(KernelPrinter.prettyProof(scProof))
println()
assert(SCProofChecker.checkSCProof(scProof).isValid)
println(KernelPrinter.prettyJudgedProof(SCProofChecker.checkSCProof(scProof)))
}

testSolve(sequent"?a |- ?a")
Expand Down

0 comments on commit 30b0c34

Please sign in to comment.