Beispiel #1
0
def trivial_goal(goal):
    """ A goal is trivial if the conclusion is equal to one of the premises modulo
    alpha conversion """
    conc = goal_conc(goal)
    for prem in goal_prem_goals(goal):
        if len(goal_prems(prem)) == 0:
            if il.equal_mod_alpha(goal_conc(prem), conc):
                return True
    return False
Beispiel #2
0
def check_concs_match(g1, g2):
    c1, c2 = map(goal_conc, (g1, g2))
    if not il.equal_mod_alpha(c1, c2):
        raise ProofError(
            None, 'conclusions do not match:\n    {}\n     {}'.format(c1, c2))