I implemented this custom notation...

In[57]:= Notation[ParsedBoxWrapper[
RowBox[{"x_", "↓", "y_"}]] ⟺ 
RowBox[{" ", 
RowBox[{"FunctionExpand", "[", 
RowBox[{"FactorialPower", "[", 
RowBox[{"x_", ",", "y_"}], "]"}], "]"}]}]]]

and works as expected:

In[71]:= x↓2

Out[71]= (-1 + x) x

What I really want is that when I enter x ^ ( 2 ) that this is interpreted as FactorialPower[x,2] meaning that the outer ( and ) make it a FactorialPower instead of a normal power.

Which changes should I implement to achieve this?

  • $\begingroup$ Not sure if it is what you are asking, but ctrl-6 on my mac gives a shortcut to raise something to a power. I have to use the arrow keys to move from that to the "normal" line of the equation. The "6" is the up carrot so if you are using a PC, there is probably an equivalent using the key with the up carrot. $\endgroup$
    – Mark R
    Commented Feb 7, 2020 at 23:02
  • $\begingroup$ I have windows, I can do that too with ctr-6. If I create 5^(2) I get 25 instead of 20. $\endgroup$ Commented Feb 8, 2020 at 8:08
  • $\begingroup$ @niloderoock I don’t understand what you’re looking for. It isn’t clear what you’re trying to shortcut to what. Can you provide a little more context, maybe what the definition of this shortcut should be? $\endgroup$ Commented Feb 9, 2020 at 4:21
  • $\begingroup$ Falling should give 5*4*3=60 rising should give 5*6*7=210 $\endgroup$ Commented Feb 9, 2020 at 4:30
  • 2
    $\begingroup$ Mma has the function FactorialPower which handles this. I am mainly concerned about the formatting / notation. - I am now investigating the Notation Package but that is not an easy package. $\endgroup$ Commented Feb 9, 2020 at 8:19

2 Answers 2


Another non-Notation option is to use InputAliases:

CurrentValue[EvaluationNotebook[], {InputAliases, "fp"}] = TemplateBox[
    {"\[SelectionPlaceholder]", "\[Placeholder]"},

Then, typing Esc f p Esc will generate the desired input.

  • $\begingroup$ So Notation is not necessary after all. $\endgroup$ Commented Feb 11, 2020 at 13:25
  • $\begingroup$ At the end of the day I want to be able to switch between normal exponents, falling exponents and rising exponents. To start with, I would like ( in "a falling exponents mode" ), x^2-x to display as x^(2). - Could this be the reason why initially Notation was suggested? I hoped the Notation[ _ <=> _] would be able to do this. $\endgroup$ Commented Feb 11, 2020 at 13:42

This code interprets the superscript (achieved with ctrl+6) as FactorialPower:

MakeExpression[SuperscriptBox[x_, RowBox[{"(", y_, ")"}]], StandardForm] := 
  MakeExpression[RowBox[{FactorialPower, "[", x, ",", y, "]"}], StandardForm]

Then an input of


leads to

  • $\begingroup$ How can I add FunctionExpand after FactorialPower ? I want (x+5)^(3) to evaluate to (x+5)(x+4)(x+3) ; FactorialPower as a name should never appear. $\endgroup$ Commented Feb 11, 2020 at 13:25
  • 1
    $\begingroup$ You can add a layer of RowBox[{FunctionExpand,"["...,"]"}] around the FactorialPower inside MakeExpression. $\endgroup$
    – QuantumDot
    Commented Feb 11, 2020 at 16:24
  • $\begingroup$ I found it very hard to choose which answer to accept, sorry. $\endgroup$ Commented Feb 24, 2020 at 8:08

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.