Описание тега isomorphism
An isomorphism is an invertible mapping between two mathematical structures, which guarantees that they are indistinguishable from one another by analizing their mappings from and into other structures.
In a fixed category, an isomorphism between objects A
and B
is given by two morphisms:
fw : A -> B
(forward)bw : B -> A
(backward)
Which compose in both directions to identity morphisms:
bw . fw = id_A : A -> A
fw . bw = id_B : B -> B
Given either morphism, fw
or bw
, the other is uniquely determined, so it is possible to speak of fw
alone as an isomorphism, if it is clear that bw
exists.
In the category of sets, as well as in Hask
(the category of Haskell types and functions), an isomorphism is just a function that is both injective and surjective. In categories whose objects have more interesting structure, isomorphisms are required to preserve this structure. For example, an isomorphism (and, more generally, a homomorphism) of Haskell Monoid
s f :: A -> B
is required to satisfy:
f mempty = mempty
f (a <> b) = f a <> f b