Your intent is interval arithmetics. Mathematica offers specialized built-ins to deal with intervals.
Interval
IntervalUnion[Interval[{0, 1/12}], Interval[{0, 1/4}]]
Interval[{0, 1/4}]
IntervalIntersection[Interval[{0, 1/12}], Interval[{0, 1/4}]]
Interval[{0, 1/12}]
FullForm@IntervalIntersection[Interval[{0, 1/12}], Interval[{0, 1/4}]]
Interval[List,[0,Rational[1,12]]]
This is some a tautology and the check corresponding Your MemberQ input is redundant.
On the other hand there is the built-in IntervalMemberQ
:
IntervalMemberQ[Interval[{0, 1/12}], Interval[{0, 1/15}]]
True
To more directly:
Equal[Inequality[0, Less, x, Less, Rational[1, 12]],
Less[0, x, Rational[1, 12]]]
(0 < x < 1/12) == (0 < x < 1/12)
The output is not True and
Expand[%]
does not alter any.
But
Equivalent@Equal[Inequality[0, Less, x, Less, Rational[1, 12]],
Less[0, x, Rational[1, 12]]]
True
Equivalent
represents the logical equivalence of both representation.
Equivalent[%741] // TautologyQ
True
TautologyQ@Equal[Inequality[0, Less, x, Less, Rational[1, 12]],
Less[0, x, Rational[1, 12]]]
False
It is in the terms of Mathematica not a direct tautology, but is set with Equal.
NumberLinePlot[{Interval[{0, 1/4}], Interval[{0, 1/12}]}]
This does not work with the Inequality.
NumberLinePlot[Simplify[And @@ list], {x, 0, .1}]
This brings up the real differences between both representation and how there are meant to be made equal in Mathematica.
And it visualizes the main drawback. The interval in Mathematica is closed, the inequalities are strict and therefore open.
The very most suitable answer is use Reduce:
Reduce[list, x]
0 < x < 1/12
Reduce[Inequality[0, Less, x, Less, Rational[1, 12]], x]
0 < x < 1/12
FullForm of both is the very same.
FullForm@Reduce[Inequality[0, Less, x, Less, Rational[1, 12]], x]
Inequality[0,Less,x,Less,Rational[1,12]]
FullForm@Reduce[list, x]
Inequality[0,Less,x,Less,Rational[1,12]]
FullForm@Reduce[Inequality[0, Less, x, Less, Rational[1, 12]], x]==FullForm@Reduce[list, x]
True
Inequality
. A possible workaround is to construct intervals likeintervals = Interval[{First[#], Last[#]}] & /@ list;
then doresult = IntervalIntersection @@ intervals
andMemberQ[intervals, result]
is true. But this will not work well for arbitrary inequalities, only these two sided ones. $\endgroup$MemberQ[Reduce`InequalityExpand /@ list, Reduce`InequalityExpand[Simplify[And @@ list2]]]
$\endgroup$LogicalExpand
, it is working $\endgroup$