Natural numbers are defined inductively https://softwarefoundations.cis.upenn.edu/lf-current/Basics.html#lab30 as s(s(...s(0)...)).
Such definition is nothing special, especially when one can observe how rich and useful and widely used theory (arithmetics) emerge from such simple notion. But are there more general natural numbers, e.g. defined by some kind of additional functions (e.g. s(t(s(t(s(0)))))) or a(a(0, 0))...)?
Maybe such generalized numbers can be used for the enumeration of the lambda terms (or software programs in some kind of formal language). And such enumeration can help for program synthesis, e.g. article https://arxiv.org/pdf/1804.02477.pdf considers the program synthesis (finding one program, optimal in some kind of sense) as the non-smooth optimization/search problem over the space of all syntactically correct terms (programs) into some language.
Maybe generalized numberings (of combinatorial structures) can help in such tasks and enable the construction of optimization theory for such kind of problems. See https://en.wikipedia.org/wiki/Structured_prediction with some other approach of finding the symbolic/combinatorial element that is optimal in some kind.
I have found article https://arxiv.org/abs/1910.07750 which has the notion of numbering, but I am not sure whether it is the thing I am speaking in my question. Or maybe notions of lattice (partially ordered sets) is the one I am seeking?