We have used the proofs of lemmas, but not the terms in the proofs. We test these in the monoid case.
import $cp.bin.`provingground-core-jvm-2932e539da.fat.jar`
import provingground._ , interface._, HoTT._, learning._
repl.pprinter() = {
val p = repl.pprinter()
p.copy(
additionalHandlers = p.additionalHandlers.orElse {
translation.FansiShow.fansiHandler
}
)
}
val tg1 = TermGenParams.zero.copy(appW = 0.1, unAppW = 0.1)
import library._, MonoidSimple._
val ts = TermState(dist1, dist1.map(_.typ))
val lp1 = LocalProver(ts, tg1)
import monix.execution.Scheduler.Implicits.global
val lemT1 = lp1.lemmas.memoize
lemT1.runToFuture
val pfsT = lp1.lemmaProofs
pfsT.runToFuture
val pfTermsT = lp1.proofTerms
pfTermsT.runToFuture
There seems to be no propagation at all of proofs. We should check individual back maps.
val lem = eqM(l)(op(l)(r))
val termsT = lp1.expressionEval.map(_.finalTerms)
termsT.runToFuture
val pfsT = termsT.map(_.filter(_.typ == lem))
pfsT.runToFuture
import Expression._, TermRandomVars._, GeneratorVariables._
val backT = for {
ev <- lp1.expressionEval
pfs <- pfsT
} yield ev.Final.backMap(FinalVal(Elem( pfs.support.head, Terms )))
backT.runToFuture
lp1.cutoff
val rhsT = for {
ev <- lp1.expressionEval
pfs <- pfsT
} yield ev.rhs(FinalVal(Elem( pfs.support.head, Terms )))
rhsT.runToFuture
val fullBackT = for {
ev <- lp1.expressionEval
pfs <- pfsT
} yield ev.Final.fullBackMap(Map(FinalVal(Elem( pfs.support.head, Terms )) -> 1), lp1.cutoff)
fullBackT.runToFuture