The successor function, denoted S(n) = n + 1, is a foundational concept in arithmetic and logic, defining the next…