예제 #1
0
    def get_proof_term(self, thy, t):
        if t.ty != Term.COMB:
            return refl(t)

        f, c = t.fun, t.arg
        if is_fun_upd(f):
            f1, a, b = f.args
            if a == c:
                return rewr_conv("fun_upd_same").get_proof_term(thy, t)
            else:
                neq = nat.nat_const_ineq(thy, c, a)
                eq = rewr_conv("fun_upd_other",
                               conds=[neq]).get_proof_term(thy, t)
                return eq.on_arg(thy, self)
        elif f.is_abs():
            return ProofTerm.beta_conv(t)
        else:
            return refl(t)
예제 #2
0
파일: conv.py 프로젝트: zhouwenfan/temp
 def get_proof_term(self, thy, t):
     try:
         return ProofTerm.beta_conv(t)
     except InvalidDerivationException:
         raise ConvException()