When we have variables such as $A: Type$, $a : A$ and $B: Type$, we test whether we correctly:
This time the test is more refined. Namely,
import $cp.bin.`provingground-core-jvm-b17f79ea57.fat.jar`
import provingground._ , interface._, HoTT._, learning._
repl.pprinter() = {
val p = repl.pprinter()
p.copy(
additionalHandlers = p.additionalHandlers.orElse {
translation.FansiShow.fansiHandler
}
)
}
import $cp.$ import provingground._ , interface._, HoTT._, learning._
val A = "A" :: Type
val B = "B" :: Type
val a = "a" :: A
val ts = TermState(FiniteDistribution.unif(a), FiniteDistribution.unif(A, B), vars = Vector(A, B, a), context = Context.Empty.addVariable(A).addVariable(B).addVariable(a))
A: Typ[Term] = A B: Typ[Term] = B a: Term = a ts: TermState = TermState( FiniteDistribution(Vector(Weighted(a, 1.0))), FiniteDistribution(Vector(Weighted(A, 0.5), Weighted(B, 0.5))), Vector(A, B, a), FiniteDistribution(Vector()), FiniteDistribution(Vector()), AppendVariable(AppendVariable(AppendVariable(Empty, A), B), a) )
val lp = LocalProver(ts).sharpen(10)
lp: LocalProver = LocalProver( TermState( FiniteDistribution(Vector(Weighted(a, 1.0))), FiniteDistribution(Vector(Weighted(A, 0.5), Weighted(B, 0.5))), Vector(A, B, a), FiniteDistribution(Vector()), FiniteDistribution(Vector()), AppendVariable(AppendVariable(AppendVariable(Empty, A), B), a) ), TermGenParams( 0.1, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.0, 0.0, 0.0, 0.0, 0.3, 0.7, 0.5, 0.0, 0.0, 0.0, OrElse( OrElse(OrElse(OrElse(<function1>, <function1>), <function1>), <function1>), <function1> ) ), 1.0E-5, None, 12 minutes, 1.01, 1.0, ...
ts.vars
import TermData._
val datT = termData(lp)
res3_0: Vector[Term] = Vector(A, B, a) import TermData._ datT: monix.eval.Task[(TermState, Set[EquationNode])] = FlatMap( Async(<function2>, false, true, true), provingground.learning.TermData$$$Lambda$2561/530697066@56ff73d9 )
import monix.execution.Scheduler.Implicits.global
val td = datT.runSyncUnsafe()
import monix.execution.Scheduler.Implicits.global td: (TermState, Set[EquationNode]) = ( TermState( FiniteDistribution( Vector( Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , @a_2) : AĆB) ā¦ a, 5.425255561327946E-4 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (A ā AĆA)) ā¦ @a, 2.3669326838587427E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (B ā AĆA)) ā¦ @a, 2.3669326838587427E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, 3.2378133230521586E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, 4.625447604360225E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ @a, 2.2664693261365112E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, 3.0017119505275946E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, 4.2881599293251334E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ (@a : A) ā¦ @a, 2.1011983653693162E-5 ...
val (ns, eqs) = td
ns: TermState = TermState( FiniteDistribution( Vector( Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , @a_2) : AĆB) ā¦ a, 5.425255561327946E-4 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (A ā AĆA)) ā¦ @a, 2.3669326838587427E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (B ā AĆA)) ā¦ @a, 2.3669326838587427E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, 3.2378133230521586E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, 4.625447604360225E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ @a, 2.2664693261365112E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, 3.0017119505275946E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, 4.2881599293251334E-5 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ (@a : A) ā¦ @a, 2.1011983653693162E-5 ), ... eqs: Set[EquationNode] = Set( EquationNode( InitialVal( InIsle( InIsle( InIsle( InIsle( Elem(B, Typs), @a, Island( Terms, ConstRandVar(Terms), AddVar((B ā A)), Lambda, EnterIsle ) ), a, Island( Typs, ConstRandVar(Typs), provingground.learning.ExpressionEval$$Lambda$2810/440174345@22a1b85c, Pi, EnterIsle ) ), B, Island( Terms, ConstRandVar(Terms), provingground.learning.ExpressionEval$$Lambda$2816/1279821339@290d6093, Lambda, EnterIsle ) ), A, Island( ...
eqs.map(_.lhs)
res6: Set[Expression] = Set( FinalVal( InIsle( InIsle( Elem((a : A) ā¦ ((@a_1 , (@a_2_1 , @a_2_2)) : BĆAĆB) ā¦ a, Terms), B, Island( Terms, ConstRandVar(Terms), provingground.learning.ExpressionEval$$Lambda$2816/1279821339@290d6093, Lambda, EnterIsle ) ), A, Island( Typs, ConstRandVar(Typs), provingground.learning.ExpressionEval$$Lambda$2810/440174345@5d8c4ef0, Pi, EnterIsle ) ) ), InitialVal( InIsle( InIsle( InIsle( InIsle( Elem((@a_1 , (@a_2_1 , @a_2_2)), Terms), (@a_1 , (@a_2_1 , @a_2_2)), Island(Terms, ConstRandVar(Terms), AddVar(AĆBĆB), Lambda, EnterIsle) ), a, Island( Terms, ConstRandVar(Terms), provingground.learning.ExpressionEval$$Lambda$2816/1279821339@67dc8f...
eqs.map(_.rhs)
res7: Set[Expression] = Set( Product( IsleScale(a, Elem(Wrap(@a), Funcs)), InitialVal( InIsle( InIsle( Elem(Wrap(@a), Funcs), B, Island( Terms, ConstRandVar(Terms), provingground.learning.ExpressionEval$$Lambda$2816/1279821339@290d6093, Lambda, EnterIsle ) ), A, Island( Terms, ConstRandVar(Terms), provingground.learning.ExpressionEval$$Lambda$2816/1279821339@fda9dce, Lambda, EnterIsle ) ) ) ), Product( IsleScale(a, Elem(Wrap(@a), Funcs)), InitialVal( InIsle( InIsle( Elem(Wrap(@a), Funcs), B, Island( Terms, ConstRandVar(Terms), provingground.learning.ExpressionEval$$Lambda$2816/1279821339@290d60...
val atoms = (eqs.map(_.rhs).flatMap(Expression.varVals(_)) union eqs.map(_.lhs).flatMap(Expression.varVals(_))).map(_.variable)
atoms: Set[GeneratorVariables.Variable[Any]] = Set( InIsle( InIsle( InIsle( InIsle( InIsle( InIsle( Elem(B, Typs), @a, Island(Typs, ConstRandVar(Typs), AddVar(B), Sigma, EnterIsle) ), @a, Island(Typs, ConstRandVar(Typs), AddVar(B), Pi, EnterIsle) ), @a, Island(Typs, ConstRandVar(Typs), AddVar(A), Sigma, EnterIsle) ), a, Island( Typs, ConstRandVar(Typs), provingground.learning.ExpressionEval$$Lambda$2810/440174345@22a1b85c, Pi, EnterIsle ) ), B, Island( Terms, ConstRandVar(Terms), provingground.learning.ExpressionEval$$Lambda$2816/1279821339@290d6093, Lambda, EnterIsle ) ), A, Island( Typs, ConstRandVar(Typs), ...
import TermRandomVars._, GeneratorVariables._
val elemTerms = atoms.collect{case Elem(t: Term, Terms) => t}
import TermRandomVars._, GeneratorVariables._ elemTerms: Set[Term] = Set( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : BĆAĆA) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : AĆBĆB) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : AĆAĆB) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((``@a_1_1 , @a_1_2) , @a_2) : AĆAĆA) ā¦ ((``@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((``@a_1_1 , @a_1_2) , @a_2) : BĆBĆB) ā¦ ((``@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : BĆBĆA) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : AĆBĆA) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : BĆAĆB) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : A) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : A) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (A ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (B ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā A) ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā B) ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((B ā A) ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((B ā B) ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (AĆA ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (AĆB ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (BĆB ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (BĆA ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā B) ā A)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā A) ā A)) ā¦ a, ...
elemTerms.exists(_.dependsOn(A))
res10: Boolean = false
None of the terms depends on the variables
atoms.size
res11: Int = 31252
val elemTyps = atoms.collect{case Elem(t: Typ[Term], Typs) => t}
elemTyps: Set[Typ[Term]] = Set()
val normEqs = eqs.map(eq => TermData.isleNormalize(eq))
normEqs: Set[EquationNode] = Set( EquationNode( InitialVal( InIsle( InIsle( InIsle( InIsle( InIsle( Elem(@a, Terms), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@714e5352, AddVar(@b), Lambda, EnterIsle ) ), @b, Island( AtCoord(FuncsWithDomain, @a :: HNil), provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@419a2b43, AddVar(@a), Lambda, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@888b3f3, AddVar(@a), Pi, EnterIsle ) ), ...
val normAtoms = (normEqs.map(_.rhs).flatMap(Expression.varVals(_)) union normEqs.map(_.lhs).flatMap(Expression.varVals(_))).map(_.variable)
normAtoms: Set[Variable[Any]] = Set( InIsle( InIsle( InIsle( InIsle( Elem(@b, Typs), (@a_1 , @a_2), Island( TypFamilies, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@62a7fbf6, AddVar(@bĆ@b), Lambda, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@1aa1e3c8, AddVar(@a), Lambda, EnterIsle ) ), @b, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@451eab90, AddVar(š° ), Lambda, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@668d73c6, ...
val normElemTerms = normAtoms.collect{case Elem(t: Term, Terms) => t}
normElemTerms: Set[Term] = Set( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : AĆAĆB) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((``@a_1_1 , @a_1_2) , @a_2) : AĆAĆA) ā¦ ((``@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : BĆAĆA) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((``@a_1_1 , @a_1_2) , @a_2) : BĆBĆB) ā¦ ((``@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : AĆBĆA) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : AĆBĆB) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : BĆBĆA) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (((```@a_1_1 , @a_1_2) , @a_2) : BĆAĆB) ā¦ ((```@a_1_1 , @a_1_2) , @a_2), (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : A) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : A) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : B) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : B) ā¦ (@a : B) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : A) ā¦ (@a : A) ā¦ @a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (A ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā A) ā A)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (AĆB ā A)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (AĆA ā A)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā B) ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (BĆB ā A)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā A) ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : ((A ā B) ā A)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (B ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (BĆB ā B)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (BĆA ā A)) ā¦ a, (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ (@a : (AĆA ā B)) ā¦ a, ...
show(normEqs.take(10).map(_.lhs))
Set( FinalVal( InIsle( InIsle( InIsle( InIsle( Elem(@a, Typs), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@685aabf4, AddVar(@a), Sigma, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@41b62c6, AddVar(@a), Lambda, EnterIsle ) ), @b, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@75a178fe, AddVar(š° ), Lambda, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@7bb9b5b0, AddVar(š° ), Pi, EnterIsle ) ) ), FinalVal( InIsle( InIsle( InIsle( Elem((@bĆ@a ā @aĆ@b), Typs), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@66ee709, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@2831bf05, AddVar(š° ), Lambda, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@67ea8897, AddVar(š° ), Lambda, EnterIsle ) ) ), InitialVal( InIsle( InIsle( InIsle( InIsle( InIsle( Elem(@a, Terms), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@714e5352, AddVar(@b), Lambda, EnterIsle ) ), @b, Island( AtCoord(FuncsWithDomain, @a :: HNil), provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@419a2b43, AddVar(@a), Lambda, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@888b3f3, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@678f250f, AddVar(š° ), Pi, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@64d83e6f, AddVar(š° ), Pi, EnterIsle ) ) ), InitialVal( InIsle( InIsle( InIsle( InIsle( InIsle( InIsle( Elem(@a, Typs), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@296f1e9f, AddVar(@b), Pi, EnterIsle ) ), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@fb94f3, AddVar(@a), Pi, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@69a3c9ea, AddVar(@b), Sigma, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@3f62238e, AddVar(@a), Lambda, EnterIsle ) ), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@6e28491b, AddVar(š° ), Pi, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@32a81421, AddVar(š° ), Pi, EnterIsle ) ) ), FinalVal( InIsle( InIsle( InIsle( Elem(Wrap((@a : (@b ā @b)) ā¦ @b), TypFamilies), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@4cb07ad, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@541c4fca, AddVar(š° ), Lambda, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@72978067, AddVar(š° ), Lambda, EnterIsle ) ) ), FinalVal( InIsle( InIsle( InIsle( Elem(Wrap((@a : @a) ā¦ @b), TypFamilies), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@56173bbd, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@2702ae3d, AddVar(š° ), Lambda, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@382206bd, AddVar(š° ), Lambda, EnterIsle ) ) ), FinalVal( InIsle( InIsle( InIsle( InIsle( InIsle( InIsle( Elem(@b, Typs), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@7a90a5b6, AddVar(@b), Pi, EnterIsle ) ), @c, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@3b6bc172, AddVar(@a), Sigma, EnterIsle ) ), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@799727e7, AddVar(@a), Pi, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@7136f5ab, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@e74432e, AddVar(š° ), Pi, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@6b7173c3, AddVar(š° ), Pi, EnterIsle ) ) ), FinalVal( InIsle( InIsle( InIsle( InIsle( InIsle( Elem(@b, Typs), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@7d068fd2, AddVar(@b), Sigma, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@45f6e04f, AddVar((@b ā @b)), Sigma, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@4c86be98, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@57cf6750, AddVar(š° ), Lambda, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@1efe1a64, AddVar(š° ), Lambda, EnterIsle ) ) ), FinalVal( InIsle( InIsle( InIsle( Elem((@b ā @a)Ć@bĆ@a, Typs), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@37dfa841, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@4cfa9f5a, AddVar(š° ), Pi, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@1c2e13cc, AddVar(š° ), Pi, EnterIsle ) ) ), FinalVal( InIsle( InIsle( InIsle( InIsle( Elem(((@a ā @b) ā @a), Typs), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@4fea7803, AddVar(@b), Pi, EnterIsle ) ), @a, Island( Typs, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@6534b94b, AddVar(@a), Pi, EnterIsle ) ), @b, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@17ec87af, AddVar(š° ), Lambda, EnterIsle ) ), @a, Island( Terms, provingground.learning.TermRandomVars$$$Lambda$3125/2103660574@6af628b2, AddVar(š° ), Lambda, EnterIsle ) ) ) )
elemTerms == normElemTerms
res19: Boolean = true
val ts0 = TermState(FiniteDistribution.empty, FiniteDistribution.unif(Type))
ts0: TermState = TermState( FiniteDistribution(Vector()), FiniteDistribution(Vector(Weighted(š° , 1.0))), Vector(), FiniteDistribution(Vector()), FiniteDistribution(Vector()), Empty )
val ev = ExpressionEval.fromInitEqs(ts0, Equation.group(eqs), TermGenParams(), decayS = 0.95)
ev: ExpressionEval = provingground.learning.ExpressionEval$$anon$2@1f8cff5e
val termsT = ev.finalTerms
termsT: FiniteDistribution[Term] = FiniteDistribution( Vector( Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , (@a_2_1 , @a_2_2)) : AĆAĆB) ā¦ a, 0.00407379896217516 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((`@a_1 , (@a_2_1 , @a_2_2)) : BĆBĆB) ā¦ a, 0.004073799161465585 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((`@a_1 , (@a_2_1 , @a_2_2)) : AĆAĆA) ā¦ a, 0.004073779791043477 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , (@a_2_1 , @a_2_2)) : AĆBĆA) ā¦ a, 0.00407377984164196 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , (@a_2_1 , @a_2_2)) : BĆAĆB) ā¦ a, 0.004073799085112612 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , (@a_2_1 , @a_2_2)) : BĆBĆA) ā¦ a, 0.004073779925013815 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , (@a_2_1 , @a_2_2)) : AĆBĆB) ā¦ a, 0.004073799038380095 ), Weighted( (A : š° ) ā¦ (B : š° ) ā¦ (a : A) ā¦ ((``@a_1 , (@a_2_1 , @a_2_2)) : BĆAĆA) ā¦...
val evN = ExpressionEval.fromInitEqs(ts0, Equation.group(normEqs), TermGenParams(), decayS = 0.5)
evN: ExpressionEval = provingground.learning.ExpressionEval$$anon$2@167cf5f
val termsN = evN.finalTerms
Interrupted! scala.runtime.Statics.anyHash(Statics.java:122) scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) provingground.learning.TermGeneratorNodes$AddVar.hashCode(TermGeneratorNodes.scala:83) scala.runtime.Statics.anyHash(Statics.java:122) scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) provingground.learning.GeneratorNode$Island.hashCode(GeneratorNode.scala:470) scala.runtime.Statics.anyHash(Statics.java:122) scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) provingground.learning.GeneratorVariables$InIsle.hashCode(GeneratorVariables.scala:175) scala.runtime.Statics.anyHash(Statics.java:122) scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) provingground.learning.GeneratorVariables$InIsle.hashCode(GeneratorVariables.scala:175) scala.runtime.Statics.anyHash(Statics.java:122) scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) provingground.learning.Expression$FinalVal.hashCode(GeneratorVariables.scala:310) scala.runtime.Statics.anyHash(Statics.java:122) scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) provingground.learning.Expression$Product.hashCode(GeneratorVariables.scala:347) scala.runtime.Statics.anyHash(Statics.java:122) scala.collection.immutable.HashMap.elemHashCode(HashMap.scala:87) scala.collection.immutable.HashMap.computeHash(HashMap.scala:96) scala.collection.immutable.HashMap.get(HashMap.scala:56) scala.collection.MapLike.getOrElse(MapLike.scala:129) scala.collection.MapLike.getOrElse$(MapLike.scala:129) scala.collection.AbstractMap.getOrElse(Map.scala:63) provingground.learning.ExpressionEval$.recExp(ExpressionEval.scala:103) provingground.learning.ExpressionEval$.stabRecExp(ExpressionEval.scala:126) provingground.learning.ExpressionEval$.$anonfun$nextMap$1(ExpressionEval.scala:141) provingground.learning.ExpressionEval$$$Lambda$2819/1865196807.apply(Unknown Source) scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237) scala.collection.TraversableLike$$Lambda$125/973576304.apply(Unknown Source) scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:321) scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:977) scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:977) scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:977) scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:977) scala.collection.TraversableLike.map(TraversableLike.scala:237) scala.collection.TraversableLike.map$(TraversableLike.scala:230) scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:51) scala.collection.SetLike.map(SetLike.scala:104) scala.collection.SetLike.map$(SetLike.scala:104) scala.collection.AbstractSet.map(Set.scala:51) provingground.learning.ExpressionEval$.nextMap(ExpressionEval.scala:141) provingground.learning.ExpressionEval$.stableMap(ExpressionEval.scala:186) provingground.learning.ExpressionEval.finalDist(ExpressionEval.scala:424) provingground.learning.ExpressionEval.finalDist$(ExpressionEval.scala:423) provingground.learning.ExpressionEval$$anon$2.finalDist$lzycompute(ExpressionEval.scala:231) provingground.learning.ExpressionEval$$anon$2.finalDist(ExpressionEval.scala:231) provingground.learning.ExpressionEval.finalTerms(ExpressionEval.scala:448) provingground.learning.ExpressionEval.finalTerms$(ExpressionEval.scala:446) provingground.learning.ExpressionEval$$anon$2.finalTerms$lzycompute(ExpressionEval.scala:231) provingground.learning.ExpressionEval$$anon$2.finalTerms(ExpressionEval.scala:231) ammonite.$sess.cmd28$Helper.<init>(cmd28.sc:1) ammonite.$sess.cmd28$.<init>(cmd28.sc:7) ammonite.$sess.cmd28$.<clinit>(cmd28.sc:-1)
normEqs.size
res25: Int = 61844
eqs.size
res26: Int = 61844