In (canonical, simple) Continued Fraction (CFs) representation, every real number is a list starting with an integer πβ and followed by some number (possibly none) of positive integers [πβ, πβ, ...]. In strictly typed programming languages, this is essentially a non-empty list; for example, in Haskell, one can use Data.List.NonEmpty and the CF becomes (πβ :| [πβ, πβ, ...]) = (πβ :| tail).
Haskell's strict typing enforces the non-empty aspect of CFs. The CF list must be non-empty, so we can think of it as a head (the πβ term) and a (possibly empty) tail (the [πβ, πβ, ...] terms). If the tail is empty, then the number is an integer. So the natural numbers 0, 1, 2, ... become (0 :| []), (1 :| []), (2 :| []) and so on in CF representation.
Now, taking reciprocal in CF representation involves either removing πβ if it is 0, or prepending 0 to the whole list. Focusing on the first case, if πβ is 0, then we remove that from the list and keep only the tail terms. This step combined with strict typing shows why there is no reciprocal of 0.
If we start with (0 :| []), remove 0 and only keep the tail then we are left with just the empty list []. However, every real number corresponds to a non-empty list and CFs don't allow empty lists.
Therefore the reciprocal of 0 is not a real number.
#math #ContinuedFractions #type #theory #haskell #FunctionalPrograming