def eliminate_implications(s):
if not s.args or is_symbol(s.op): return s     <EOL>args = list(map(eliminate_implications, s.args))<EOL>a, b = args[<NUM_LIT:0>], args[-<NUM_LIT:1>]<EOL>if s.op == '<STR_LIT>':<EOL><INDENT>return (b | ~a)<EOL><DEDENT>elif s.op == '<STR_LIT>':<EOL><INDENT>return (a | ~b)<EOL><DEDENT>elif s.op == '<STR_LIT>':<EOL><INDENT>return (a | ~b) & (b | ~a)<EOL><DEDENT>elif s.op == '<STR_LIT>':<EOL><INDENT>assert len(args) == <NUM_LIT:2>   <EOL>return (a & ~b) | (~a & b)<EOL><DEDENT>else:<EOL><INDENT>assert s.op in ('<STR_LIT:&>', '<STR_LIT:|>', '<STR_LIT>')<EOL>return Expr(s.op, *args)<EOL><DEDENT>
Change >>, <<, and <=> into &, |, and ~. That is, return an Expr
    that is equivalent to s, but has only &, |, and ~ as logical operators.
    >>> eliminate_implications(A >> (~B << C))
    ((~B | ~C) | ~A)
    >>> eliminate_implications(A ^ B)
    ((A & ~B) | (~A & B))