Improved simplifying afs program: added simplifying SEQ(a(n), exit)