Infinite S-expansion with ideal subtraction and some applications