This is a more down-to-earth notions of sameness than abstract Equality. When we said "the same molecule" we reflect that they are equivalent (but not exactly equal, like abstract Numbers) and in a given context could be thought as being equal.

When we say "the same molecule" we mean "the equal structure" or "the same structure", NOT exactly the same molecule in the same location.

This implementation of the equality procedure defined for (in the context of) homogeneous lists of Equable or Comparable elements

instance (Eq a) => Eq [a] where
      []     == []      =  True
      (x:xs) == (y:ys)  =  x == y && xs == ys
      _      == _       =  False

ensures that two given Lists have exactly the same structure (of the same length and Ordering) of exactly the same elements (values), NOT that these are two references are to exactly the same location in memory (to the same List).

It checks for equivalence, not for equality.

Notice that the notion of a reference to the same object requires an intelligent observer. To The Mother Nature there is no such thing as "same object" or "sameness", but there are connections between things.

To emphasize this consider that

foldr (:) [] [1,2,3]

will produce a distinct, new copy of a given list structure whose elements will refer to the same locations in memory.

However, when an enzyme produces the same (or identical) protein from a given RNA template no part of it will be the same (will occupy the same location).


This means that in some physical contexts, such as DNA sequences, Equal can be substituted for the equal without losing the physical properties of a structure (a molecule). Each Carbon atom is equally good. Moreover, even isotopes (existence of which proved that even atoms are NOT the same) are good-enough for DNA or RNA.

Substitutability of an equivalent for an equivalent is the Universal Principle. It is prior any maths or intellect. This very notion or rather principle is behind the notion of equivalent Traits or equivalent Interface Implementations.


Last modified 3 years ago Last modified on Mar 31, 2018, 12:30:38 PM
Note: See TracWiki for help on using the wiki.