Recursion and Induction: Identity
Since a pair can typically be written down in several different ways, you might ask how can you tell whether one display is equal to another? For example, how can you determine that (1 . (2 . (3 . nil))) is the same pair as (1 2 3), which is also the same pair as (1 . (2 3))?
One way is to write each constant in a canonical form. If their canonical forms are different, the two constants are different. For integers, the standard canonical form is to use base 10 and to drop leading 0s and “+” signs. For symbols, it is to write everything in upper case. For conses, the canonical form is to eschew the use of the three conventions noted in the previous section and to use dot notation exclusively.