@_Maxim_Thank you. I am weak on Groebner basis. Shall experiment and see.
In Maple 18 the expand term is not needed inside algsubs.
for k to 4 do
for i to 6 do
`sbΦ` := simplify(algsubs(tobesbstd[i] = sbeqmaple18[i], expand(`sbΦ`))) # This expand
simplify(`sbΦ`); sort(expand(evalf(`sbΦ`))) #and this expand not needed in maple 18
"this is repeated until the leading monomial in f is less than the leading monomial in a" . I think I understand this.
In my loop above set k to 1 so it only does the whole substitution once, the equation will still contain highter order terms. On the second time around the loop in this equation they all reduce. So round 3 and 4 not needed in this case. It the coefficients are different they might be. I had 12 other equations one required repeating the substitution set 6 times.
THe example of using algsubs(x^2 = x*y, x^3); is very simple the the complexitits don't arise.