Consecutive-base induction for additive semigroups (source code)

= Consecutive-base induction for additive semigroups

Suppose an additively closed subset $M$ of the <nonnegative integers> contains a positive <integer> $a$ and every <integer> from $N$ to $N+a-1$. Then it contains every <integer> at least $N$. The first $a$ values are the base cases. For $n\ge N+a$, the smaller number $n-a\ge N$ belongs to $M$ by <strong induction>, and closure under addition gives $n=(n-a)+a\in M$. Equivalently, write $n=N+qa+r$ by division with remainder, with $0\le r<a$; start at $N+r\in M$ and add $a$ exactly $q$ times.