# Typing (and executing) expressions with multiple superscripts

I am trying to type (and evaluate) expressions of the following form:

$$G^{a,b}$$

into a mathematica. I've tried the obvious

G^(a, b)


or

Superscript[G,a,b]


But both of these give the same error

Syntax::tsntxi: "a,b" is incomplete; more input is needed.


I know one solution is to use Symbolize from the Notation package

<< Notation
Symbolize[ParsedBoxWrapper[SuperscriptBox["G", RowBox[{"_", ",", "_"}]]]]


however this solution will not suffice as I want to perform operations such as the following:

In[3]:= Sum[G^(a, b), {a, 1, 2}, {b, 1, 2}]
Out[3]= 4 G^(a, b)


Is there any sensible way to get around this? Why is Superscript so much more picky than Subscript? Thanks in advance.

• Superscript[G, {a, b}] would be the right way to go I assume. – Öskå Aug 31 '14 at 23:23
• Shouldn't the sum return G^(1,1) + G^(1,2) + G^(2,1) + G^(2,2) instead of 4 G^(a,b)? – Teake Nutma Sep 1 '14 at 8:51

MakeBoxes[Superscript[b_, x_, y__], form_] ^:=

Sum[Superscript[G, a, b], {a, 1, 2}, {b, 1, 2}]
`
$G^{11}+G^{12}+G^{21}+G^{22}$