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 true_and_false_negated
from proveit.logic.booleans.implication import negated_reflex
theory = proveit.Theory() # the theorem's theory
%proving not_iff_via_not_left_impl
defaults.assumptions = not_iff_via_not_left_impl.all_conditions()
true_and_false_negated
not__AimplB_and_T = true_and_false_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