# list elements as indices

I have the list R:

R={{-π, -π}, {-π, -(π/2)}, {-π, 0}, {-π, π/2},
{-(π/2), -π}, {-(π/2), -(π/2)}, {-(π/2), 0}, {-(π/2), π/2},
{0, -π}, {0, -(π/2)}, {0, 0}, {0, π/2},
{π/2, -π}, {π/2, -(π/2)}, {π/2, 0}, {π/2, π/2},
{-π, -π}, {-π, -(π/2)}, {-π, 0}, {-π, π/2},
{-(π/2), -π}, {-(π/2), -(π/2)}, {-(π/2), 0}, {-(π/2),π/2},
{0, -π}, {0, -(π/2)}, {0, 0}, {0, π/2},
{π/2, -π}, {π/2, -(π/2)}, {π/2, 0}, {π/2, π/2}}


How can I produce the list $$(1_{(-\pi,-\pi)}, 1_{(-\pi/2,-\pi/2)}, \dots, 1_{(-\pi,-\pi)}, \dots, 1_{(\pi/2,\pi/2)})$$, i.e make the elements of the list R indices of the elements of another list with the same Length?

Can I also add a superscript to the elements of the new list? E.g $$(1^{a}_{(-\pi,-\pi)}, 1^{a}_{(-\pi/2,-\pi/2)}, \dots, 1^{b}_{(-\pi/2,-\pi/2)},\dots, 1^{b}_{(\pi/2,\pi/2)})$$

You mean something like:

Subscript[1, ##] & @@@ R


and:

MapThread[
Subsuperscript[1, Row[#1, ","], #2]&,
{
R,
Join[
ConstantArray["a", Length[R]/2],
ConstantArray["b", Length[R]/2]
]
}
]


?

# Edit

If you want parentheses around the subscripts, you can use:

Subsuperscript[1, Row[{"(", Row[#1, ","], ")"}], #2]&


in the MapThread instead.

• Can I include the subscripts in parentheses or curly brackets e.g $1_{(-\pi,-\pi)}$ or $1_{\{-\pi,-\pi\}}$?
– geom
Jan 19, 2021 at 11:13
• You can use Subsuperscript[1, #1, #2]& in the 2nd code block instead if you want curly brackets. Subsuperscript[1, Row[{"(", Row[#1, ","], ")"}], #2]& gives you parentheses. Jan 19, 2021 at 11:21