1
$\begingroup$
$Version

"13.0.1 for Microsoft Windows (64-bit) (January 28, 2022)"

Is this a bug or I am missing something?

Correct result:

ImplicitRegion[x <= 1/3 && y == -x, {x, y}];
HalfLine[{1/3, -1/3}, {-1, 1}];
RegionEqual[%%, %]

True

Returns back the input:

ImplicitRegion[x <= 1/3 && y == -x, {x, y}];
HalfLine[{1/3, -1/3}, {0, 0}];
RegionEqual[%%, %]

RegionEqual[ImplicitRegion[x <= 1/3 && y == -x, {x, y}], 
 HalfLine[{1/3, -(1/3)}, {0, 0}]]

Incorrect result:

ImplicitRegion[x <= 1/3 && y == -x, {x, y}]
HalfLine[{1/3, -1/3}, {1/4, -1/4}]
RegionEqual[%%, %]

False
$\endgroup$
1
  • 1
    $\begingroup$ RegionEqual[ImplicitRegion[x <= 1/3 && y == -x, {x, y}], HalfLine[{{1/3, -(1/3)}, {0, 0}}]] and RegionEqual[ImplicitRegion[x <= 1/3 && y == -x, {x, y}], HalfLine[{{1/3, -1/3}, {1/4, -1/4}}]] $\endgroup$
    – cvgmt
    Commented Jan 31 at 12:46

1 Answer 1

3
$\begingroup$

HalfLine[{x1,y1},{v1,v2}] is the half-line start from {x1,y1} with the direction {v1,v2}.

RegionEqual[HalfLine[{{x1, y1}, {x2, y2}}], 
 HalfLine[{x1, y1}, {x2, y2} - {x1, y1}]]

True

For the comment.

(* Version11.3, 12.2, 12.3.1,13.3.1,14.0 *)
reg1 = ImplicitRegion[{1/3 <= x <= 1/2 && y == -1 + 2 x}, {x, y}];
reg2 = Line[{{1/3, -1/3}, {1/2, 0}}];
{RegionWithin[reg2, reg1], RegionWithin[reg1, reg2]}

True,False.

And all of the above versions also return wrong result when we run

RegionEqual[reg1, reg2]

False.

It is a bug.

$\endgroup$
3
  • $\begingroup$ And what about this? Is this a bug? RegionEqual[ ImplicitRegion[{1/3 <= x <= 1/2 && y == -1 + 2 x}, {x, y}], Line[{{1/3, -1/3}, {1/2, 0}}]] It outputs False. $\endgroup$ Commented Jan 31 at 13:21
  • 1
    $\begingroup$ @azerbajdzan I test version 11.3,12.2,12.3.1, 13.3.1,14, It must be a bug. $\endgroup$
    – cvgmt
    Commented Jan 31 at 13:36
  • $\begingroup$ This is the link to the actual bug: mathematica.stackexchange.com/questions/297270/… $\endgroup$ Commented Jan 31 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.