2

This is a very strange issue I'm having trying to pass a list as an argument to Mathematica's "ImplicitRegion" function. Here's the issue:

basis = Array[e, 2]
Norm[basis, 1]
reg = ImplicitRegion[Norm[basis, 1] < 1, basis]
(* {e[1], e[2]} *)
(* Abs[e[1]] + Abs[e[2]] *)
(* ImplicitRegion[Norm[basis, 1] < 1, {basis}] *)

You can see that, for some reason, the variable "basis" isn't getting substituted correctly into the last call to ImplicitRegion. There is no problem passing it to Norm, it's only ImplicitRegion. In particular, it seems to be the last argument.

For instance, if I change it to this, you can that Norm[basis, 1] gets substituted correctly to Abs[e[1]] + Abs[e[2]] < 1 in the last ImplicitRegion call:

basis = Array[e, 2]
Norm[basis, 1]
reg = ImplicitRegion[Norm[basis, 1] < 1, {e[1], e[2]}]
(* {e[1], e[2]} *)
(* Abs[e[1]] + Abs[e[2]] *)
(* ImplicitRegion[Abs[e[1]] + Abs[e[2]] < 1, {e[1], e[2]}] *)

ImplicitRegion wants the last parameter to be a List, so it isn't seem like I should be using Apply or something.

How do I get this to substitute correctly? Is it a scope issue?

Carl Lange
  • 13,065
  • 1
  • 36
  • 70

0 Answers0