def testBetaConv(self): t = Comb(Abs("x", Ta, Bound(0)), x) self.assertEqual(Thm.beta_conv(t), Thm.mk_equals(t, x))
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))
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))
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))