Example #1
0
def axiom_deduct(epression):
    cons = subst_pred(scheme_axiom[0], {'A': expression, 'B': alpha})
    deduction.append(cons)
    deduction.append(expression)
    deduction.append(cons.args[1])
Example #2
0
         try:
             term = find_mismatch(phi, expression.args[1], x)
             if subst(phi, x, term) == expression.args[1]:
                 proved = True
                 comment = 'universal scheme'
                 if alpha is not None:
                     axiom_deduct(expression)
         except ConnectedEntryException:
             correctness = False
             message = 'Терм {0} не свободен для подстановки в формулу {1} вместо {2}'.format(str(term), str(phi), str(x))
             break
             pass
 if not proved:
     if expression == alpha:
         for stat in semi_cons:
             deduction.append(subst_pred(stat, {'A': expression}))
             pass
         proved = True
 if not proved:
     if axiom_existence.has_same_shape(expression):
         phi = expression.args[1].ex
         x = expression.args[1].var
         try:
             term = find_mismatch(phi, expression.args[0], x)
             if subst(phi, x, term) == expression.args[0]:
                 proved = True
                 comment = 'existence scheme'
                 if alpha is not None:
                     axiom_deduct(expression)
         except ConnectedEntryException:
             correctness = False