User blog comment:Wythagoras/Dollar function formal definition/@comment-5529393-20130616091711/@comment-5529393-20130616100149

It's not clear from your rules how a$0]_[0 evaluates.

You need to add to your rules how to evaluate subscripts.