#NEWLINE# def test_issue_10401( ) : #NEWLINE# #INDENT# x = symbols ( 'x' ) #NEWLINE# fin = symbols ( 'inf' , finite = True ) #NEWLINE# inf = symbols ( 'inf' , infinite = True ) #NEWLINE# inf2 = symbols ( 'inf2' , infinite = True ) #NEWLINE# zero = symbols ( 'z' , zero = True ) #NEWLINE# nonzero = symbols ( 'nz' , zero = False , finite = True ) #NEWLINE# assert ( Eq ( ( 1 / ( ( 1 / x ) + 1 ) ) , 1 ) . func is Eq ) #NEWLINE# assert ( Eq ( ( 1 / ( ( 1 / x ) + 1 ) ) , 1 ) . subs ( x , S . ComplexInfinity ) is S . true ) #NEWLINE# assert ( Eq ( ( 1 / ( ( 1 / fin ) + 1 ) ) , 1 ) is S . false ) #NEWLINE# ( T , F ) = ( S . true , S . false ) #NEWLINE# assert ( Eq ( fin , inf ) is F ) #NEWLINE# assert ( ( Eq ( inf , inf2 ) is T ) and ( inf != inf2 ) ) #NEWLINE# assert ( Eq ( ( inf / inf2 ) , 0 ) is F ) #NEWLINE# assert ( Eq ( ( inf / fin ) , 0 ) is F ) #NEWLINE# assert ( Eq ( ( fin / inf ) , 0 ) is T ) #NEWLINE# assert ( ( Eq ( ( zero / nonzero ) , 0 ) is T ) and ( ( zero / nonzero ) != 0 ) ) #NEWLINE# assert ( Eq ( ( fin / ( zero + 1 ) ) , 1 ) is S . false ) #NEWLINE# o = symbols ( 'o' , odd = True ) #NEWLINE# assert ( Eq ( o , ( 2 * o ) ) is S . false ) #NEWLINE# p = symbols ( 'p' , positive = True ) #NEWLINE# assert ( Eq ( ( p / ( p - 1 ) ) , 1 ) is F )