User blog comment:Hyp cos/R function II/@comment-2033667-20150408132907

Now that I've got the syntax down I can move on to the rules.

In case B1, is the R function left-associative or right-associative?

In case B I'm concerned that you have three separate rules calling for "n times." Is there no way you could do this using induction?