There is a notion of "proof theoretic ordinal" for a formal theory https://en.wikipedia.org/wiki/Ordinal_analysis

Can we go backwards?

That is, we are given some recursive ordinal notation (we don't know if it's indeed ordinal notation). Is there some canonical way to construct formal theory corresponding to this ordinal?

I realize that probably not every ordinal is a strength of some theory (like $w$+1). So, strictly speaking, I am asking about computable function $F$ from ordinals to formal theories such that

- If $O$ is indeed ordinal notation then $F(O)$ is consistent theory.
- Strength of $F(O)$ is at least $O$.
- If $O_1$ < $O_2$ then $F(O_2)$ is extension of $F(O_1)$, i.e. set of provable formulas in $F(O_1)$ is contained in the set of provable formulas in $F(O_2)$.