import proveit
from proveit import defaults
from proveit import A, B
from proveit.logic import And, Implies, Iff, Not
from proveit.logic.booleans.conjunction import false_and_true_negated
from proveit.logic.booleans.implication import negated_reflex
theory = proveit.Theory() # the theorem's theory
%proving not_iff_via_not_right_impl
defaults.assumptions = not_iff_via_not_right_impl.all_conditions()
false_and_true_negated
not__AimplB_and_T = false_and_true_negated.inner_expr().operand.operands[0].substitute(
Implies(A, B))
not__AimplB_and_BimplA = not__AimplB_and_T.inner_expr().operand.operands[1].substitute(
Implies(B, A))
A_iff_B__def = Iff(A, B).definition(assumptions=[])
A_iff_B__def.sub_left_side_into(not__AimplB_and_BimplA)
%qed