Ejemplo n.º 1
0
 def testBetaConv(self):
     t = Comb(Abs("x", Ta, Bound(0)), x)
     self.assertEqual(Thm.beta_conv(t), Thm.mk_equals(t, x))
Ejemplo n.º 2
0
 def testBetaConv(self):
     cv = beta_conv()
     t = lf(x)
     self.assertEqual(cv.eval(thy, t), Thm.beta_conv(t))
     self.assertEqual(thy.check_proof(cv.get_proof_term(thy, t).export()),
                      Thm.beta_conv(t))
Ejemplo n.º 3
0
 def testTryConv(self):
     cv = try_conv(beta_conv())
     t = lf(x)
     self.assertEqual(cv.eval(thy, t), Thm.beta_conv(t))
     self.assertEqual(cv.eval(thy, x), Thm.reflexive(x))
Ejemplo n.º 4
0
    def eval(self, thy, args, ths):
        th = ths[0]
        assert Term.is_equals(th.prop), "beta_conv_rhs"
        rhs = th.prop.rhs

        return Thm.transitive(th, Thm.beta_conv(rhs))