User blog comment:B1mb0w/The S Function Version 2/@comment-5529393-20160710174229

Also, it looks like you are supposed to apply the Sub function until you get b=0, but if b contains a T, the rules never replace T with something not involving T, so the T never goes away, and it is impossible to reach b=0.