Isomorphisms

Investigating when two theories or representations mean the same things.
philosophy, computer-science
2009-04-252015-01-03 finished certainty: unlikely importance: 3


Metaphors and analo­gies are the coin of human thought and key to inter­pre­ta­tion in art. We often speak of sys­tems being trans­lat­able or being equiv­a­lent in some sense, and espe­cially we want to use sys­tems to look at each other and gain insight; but a trans­la­tion between sys­tems with no com­mon­al­ity strikes us as sense­less and wrong in some way. We know that some trans­la­tions are good and valid, and some are not. But how are we judg­ing this?

Mad morphisms

Trans­la­tions become more patho­log­i­cal the more detailed and thor­ough they are. That such trans­la­tions are not use­ful, or of val­ue, or even harm­less is the rea­son why we need to know what sep­a­rates the healthy from the ill; you may not be inter­ested in dis­eased think­ing, but dis­eased think­ing is inter­ested in you (ask sur­vivors of ide­o­log­i­cal regimes like Com­mu­nis­m). has a pas­sage in chap­ter 66 (one of many well worth read­ing) on this mania:

“Last night I hap­pened to come across a dri­ver’s man­u­al. Maybe it was the semi­dark­ness, or what you had said to me, but I began to imag­ine that those pages were say­ing Some­thing Else. Sup­pose the auto­mo­bile existed only to serve as metaphor of cre­ation? And we must­n’t con­fine our­selves to the exte­ri­or, or to the sur­face real­ity of the dash­board; we must learn to see what only the Maker sees, what lies beneath. What lies beneath and what lies above. It is the Tree of the .”

“You don’t say.”

“I am not the one who says; it is the thing itself that says. The is the trunk of the tree. Count the parts: , 2 front wheels, , , two , , and 2 rear wheels. Ten parts, ten Sefirot.”

“But the posi­tions don’t coin­cide.”

“Who says they don’t? Dio­tal­levi explained to us that in cer­tain ver­sions isn’t the sixth Sefi­rah, but the eighth, below and . My axle-tree is the tree of Bel­both.”

.”

“But let’s pur­sue the dialec­tic of the tree. At the sum­mit is the engine, Omnia Movens, of which more lat­er: this is the Cre­ative Source. The engine com­mu­ni­cates its cre­ative energy to the 2 front or higher wheels: the Wheel of Intel­li­gence and the Wheel of Knowl­edge.”

“If the car has .”

“The good thing about the Bel­both tree is that it allows meta­phys­i­cal alter­na­tives. So we have the image of a spir­i­tual cos­mos with fron­t-wheel-drive, where the engine, in front, trans­mits its wishes to the higher wheels, whereas in the mate­ri­al­is­tic ver­sion we have a degen­er­ate cos­mos in which motion is imparted by the engine to the 2 lower wheels: from the depths, the cos­mic ema­na­tion releases the base forces of mat­ter.”

“What about an engine in back, ?”

“Satan­ic. Higher and lower coin­cide. God is iden­ti­fied with the motion of crude mat­ter. God as an eter­nally frus­trated aspi­ra­tion to divin­i­ty. The result of the [tsim-sun].”

“Not the Break­ing of the Muffler?”

“That occurs in aborted uni­vers­es, where the nox­ious breath of the spreads through the ether. But we must­n’t digress. After the engine and 2 wheels comes the clutch, the Sefi­rah of grace that estab­lishes or inter­rupts the flow of love that binds the rest of the tree of the Super­nal Ener­gy. A disk, a that caresses another man­dala. Then the coffer of change—the gear box, or trans­mis­sion, as the pos­i­tivists call it, which is the prin­ci­ple of Evil, because it allows human will to speed up or slow down the con­stant process of ema­na­tion. For this rea­son, an costs more, for there it is the tree itself that decides, in accor­dance with its own Sov­er­eign Equi­lib­ri­um. Then comes the uni­ver­sal joint, the axle, the drive shaft, the differ­en­tial–note the opposition/repetition of the of cylin­ders in the engine, because the differ­en­tial (Mi­nor ) trans­mits motion to the earthly wheels. Here the func­tion of the Sefi­rah of differ­ence is obvi­ous, as, with a majes­tic sense of beau­ty, it dis­trib­utes the cos­mic forces to the Wheel of Glory and the Wheel of Vic­to­ry, which in an unaborted uni­verse (fron­t-wheel dri­ve) are sub­or­di­nate to the motion imparted by the higher wheels.”

“A coher­ent exe­ge­sis. And the heart of the engine, seat of the One, the Crown?”

“You have but to look with the eyes of an ini­ti­ate. The supreme engine lives by an . A com­plex, divine res­pi­ra­tion, a cycle ini­tially based on 2 units called cylin­ders (an obvi­ous geo­met­ri­cal arche­type), which then gen­er­ate a third, and finally gaze upon one another in mutual love and bring forth the glory of a fourth. In the cycle of the first cylin­der (none is first hier­ar­chi­cal­ly, but only through the mirac­u­lous alter­na­tion of posi­tion), the (et­y­mol­o­gy: ) descends from the upper neu­tral posi­tion to the lower neu­tral posi­tion as the cylin­der fills with energy in the pure state. I’m sim­pli­fy­ing, because here come into play, the valves, which, as my hand­book says, ‘allow the open­ing and clos­ing of the aper­tures that link the inte­rior of the cylin­ders to the induc­tion pipes lead­ing out of the car­bu­re­tor.’ The inner seat of the engine can com­mu­ni­cate with the rest of the cos­mos only through this medi­a­tion, and here I believe is revealed—I am reluc­tant to utter heresy—the orig­i­nal limit of the One, which, in order to cre­ate, some­how depends on the Great Eccentrics. A closer read­ing of the text may be required here. The cylin­der fills with ener­gy, the pis­ton returns to the upper neu­tral posi­tion and achieves max­i­mum com­pres­sion–the tsim-sun. And lo, the glory of the Big Bang: com­bus­tion, expan­sion. A spark flies, the mix­ture of fuel flares and blazes, and this the hand­book calls the active phase of the cycle. And woe, woe if in the mix­ture of fuel the Shells intrude, the , drops of impure mat­ter like water or Coca-Co­la. Then expan­sion does not take place or occurs in abortive starts…”

“Then the mean­ing of Shell is qelip­pot? We’d bet­ter not use it any­more. From now on, only Vir­gin’s Milk…”

“We’ll check. It could be a trick of the , lower ema­na­tions try­ing to con­trol the process of cre­ation…In any case, after expan­sion, behold the great divine release, the exhaust. The pis­ton rises again to the upper neu­tral posi­tion and expels the form­less mat­ter, now com­bust­ed. Only if this process of purifi­ca­tion suc­ceeds can the new cycle begin. Which, if you think about it, is also the mech­a­nism of Exo­dus and , mirac­u­lous dialec­tic of the Way Up and the Way Down.”

Quan­tum mor­talia pec­tora cea­cae noc­tis habent!1 And the sons of mat­ter never real­ized it!”

“They never saw the con­nec­tion between the philoso­pher’s stone and .”

“For tomor­row, I’ll pre­pare a mys­ti­cal inter­pre­ta­tion of the phone book.”

The acute reader will be either hor­ri­fied or amused by the fore­go­ing. Some­times the trans­lat­ing is self­-con­sciously void of any truth, and being used solely didac­ti­cal­ly; no-one read­ing through the tedious alle­gories of will seri­ously think that the lay­out of a room ‘really’ has any­thing to do with Protes­tant Chris­tian­i­ty. But then did­n’t the read­ers of the past who made it a best-seller which every Eng­lish and Amer­i­can fam­ily had a copy of (sit­ting next to their Bible) take it quite seri­ous­ly? Was­n’t it a com­mon­place of older the­o­log­i­cal thought that every­thing in the Bible had—at the very least—2 mean­ings (such as the exo­teric and eso­ter­ic)? Why is it a bad inter­pre­ta­tion?

Telling the good from bad

But some­times they are clearly wrong and sense­less (such as inter­pret­ing through quan­tum mechan­ic­s), but the author plows onward con­vinced he is engaged in valu­able inter­pre­ta­tion, and other times they are dan­ger­ously close to being plau­si­ble (Old Tes­ta­ment ethics & injunc­tions for mod­ern life, or per­haps eco­nom­ic­s—Key­ne­sian or Aus­tri­an). How do we know what is a valid trans­la­tion, when there is a real ?

I sug­gest we can test iso­mor­phisms by see­ing whether the same manip­u­la­tions on the same start­ing points give us the same results. The more such sim­i­lar­i­ties there are, the more sim­i­lar the sys­tems are; the more analo­gies can be trust­ed. When all such manip­u­la­tions coin­cide, then we can call the 2 sys­tems the same.

Unary versus Decimal

Here’s an exam­ple of what I mean. Sup­pose we had invented the dec­i­mal num­ber sys­tem, and also an unary sys­tem. Some­times one sys­tem is more con­ve­nient than the oth­er—dec­i­mal’s great for mul­ti­pli­ca­tion & divi­sion, but an unary sys­tem can be phys­i­cally instan­ti­ated with sticks or peb­bles and worked with in the dark. You notice that the 2 sys­tems seem to have a lot of shared traits, and work­ing in one is a lot like work­ing in the oth­er; indeed, you hap­pen to’ve for­mal­ized your dec­i­mals and have put a lot of effort into prov­ing var­i­ous the­o­rems about them—­would­n’t it be nice if you could eas­ily trans­late them into the­o­rems also about your new unary sys­tem? Per­haps there are good analo­gies between the sys­tems.

We can’t be sure a pri­ori that they’re just the same, that they’re both num­ber sys­tems and have done with it. func­tion differ­ently from the , which are very differ­ent from the nat­ural num­bers. Or, another exam­ple might be if we add 2 apples togeth­er, we have 2 things; but if I add 2 pails of liq­uids togeth­er, I have only 1 water—it’s the vol­ume that increas­es, not the num­ber of com­po­nents.2

So if we were inter­ested in show­ing a good trans­la­tion between unary and dec­i­mal, what would this even mean? Well, it would mean that a prop­erty holds: if we take a sys­tem as a sin­gle func­tion, ‘round-trip’ means we’re ask­ing for a between the inputs and out­puts of the 2 func­tions. For exam­ple, we can turn a dec­i­mal into an unary and then back again into the orig­i­nal, and vice-ver­sa. If we pre­fer to see our sys­tems as lit­tle machines or , we’re defin­ing their equal­ity as a .

Hacking the code

OK, so how can we show that? Let’s do a lit­tle Haskell pro­gram­ming.

Translating back and forth

Unary num­bers as we know are just defined as a sequence of an arbi­trary token; obvi­ously the num­ber of these tokens, the length of the sequence, is its numer­i­cal val­ue. So if we define a unary type which is just a list of some arbi­trary mark­er, to turn it into a dec­i­mal, we just get its length. And we do the oppo­site—we ask for a list of length n for the num­ber n. The code:

type Unary = [()]
unaryToDecimal :: Unary -> Int
unaryToDecimal = length

decimalToUnary :: Int -> Unary
decimalToUnary a = replicate a ()

And our prop­erty is that Dec­i­mal→U­nary→Dec­i­mal is a loss­less trans­for­ma­tion, as is Unary→Dec­i­mal→U­nary. Let’s express these as prop­er­ties (QuickCheck does­n’t pro­vide for­mal proofs, but it will test ran­dom inputs look­ing for dis­proofs of the prop­er­ty):

udProp x = x>=0 ==> -- discard all non-natural integers
                unaryToDecimal (decimalToUnary x) == x
duProp x = decimalToUnary (unaryToDecimal x) == x

QuickCheck duly ver­i­fies that these two prop­er­ties were true for all the cases it devised.

Check addition

Now let’s tackle a more inter­est­ing case. A map­ping from just items in one sys­tem to items in another sys­tem is bor­ing and not very valu­able. What would be more valu­able is if we knew some things like addi­tion were the same!

So here our prop­erty is that if we trans­late 2 num­bers into Unary and add them and trans­late the result back into Dec­i­mal, we get the same num­ber as we would have in Dec­i­mal adding.

First, what is adding in unary? As each ‘num­ber’ is a list of dis­crete ele­ments, we can assume, I think, that con­cate­nat­ing the 2 lists together is enough. Haskell is nice enough to let us define + on lists if we ask polite­ly:

{-# LANGUAGE TypeSynonymInstances #-}

type Unary = [()]

instance Num Unary where
    (+) = (++)
-- We reuse the + defined on Ints, of course

This seems intu­itively right. If ||||→4, and |||||→5, and 9→|||||||||, then the obvi­ous way from |||| and ||||| to ||||||||| is to smash them togeth­er. (Is intu­ition not good enough a jus­ti­fi­ca­tion? Well, it’s sim­ple; and it’s not like all the other pos­si­ble oper­a­tors for imple­ment­ing addi­tion in unary have any bet­ter claim to our atten­tion. The ulti­mate jus­ti­fi­ca­tion is whether it work­s.)

So two prop­er­ties looks like:

unEqualDec x y = (x>=0 && y>=0) ==> x+y == unaryToDecimal ((decimalToUnary x) + (decimalToUnary y))
decEqualUn x y = x+y == decimalToUnary ((unaryToDecimal x) + (unaryToDecimal y))

QuickCheck again will tell us that they pass the test­cases it devised.

Suc­cess? Not quite.

Essential vs accidental

We can think of other prop­er­ties that dec­i­mals have, but which unary can’t. For exam­ple, one can note that (, , etc.)

How would we express this in unary? The key is that we’re speak­ing about 0—and yet unary has no 0! That’s part of the defi­n­i­tion, for if it had one sym­bol for noth­ing­ness, and another sym­bol for some­thing, then it’s a binary num­ber sys­tem and not unary. That’s why we’ve dealt with nat­ural num­bers through­out: zero is present in unary by the absence of any unary num­ber at all. There is no nam­ing of it, no indi­rec­tion that allows us to speak of or men­tion it. We can’t say any­thing like ‘if 0 is in the ones place, then adding the lead­ing numeral gives us a typo­graph­i­cal dupli­ca­tion’. Sup­pose we tried some con­torted scheme involv­ing divi­sion by 10; but would this work when we try to find an iso­mor­phism to, say, or ?

If this exam­ple does­n’t sat­isfy you, con­sider other pos­si­ble prop­er­ties. How about prop­er­ties based on how many vow­els the Eng­lish words of a num­ber have? We can get sil­lier, but I think the point is clear: there are ‘essen­tial’ prop­er­ties and ‘acci­den­tal’ ones. The vow­el-count of ‘five’ is acci­den­tal, but some­thing like is essen­tial.

When the sys­tems are for­mal­ized such that we can ask for their bijec­tion or their bisim­u­la­tion, then we have well-de­fined ways to see whether essen­tial prop­er­ties hold. (Peter de Blanc if an agent has a sim­ple model of the world, it can update its model based on sur­pris­ing obser­va­tions by pick­ing a new, more com­plex mod­el, which accounts for all past obser­va­tions but differs min­i­mal­ly—as defined by —from the pre­vi­ous mod­el.)

How to know when some­thing is essen­tial, and when the prop­erty is acci­den­tal, is unclear, and this is because, as Alan J. Perlis reminds us, “One can’t pro­ceed from the infor­mal to the for­mal by for­mal means.”

Appendix: the code

A few notes on the code:

  • we have that LANGUAGE pragma there so we can define our own addi­tion on lists (as the default List type does­n’t define a silly thing like addi­tion); - the very acute Haskeller will be ask­ing him­self, “why not define the abstract struc­ture as that of a (see Data.­Monoid3), and get list con­cate­na­tion & inte­ger addi­tion for free?” That’s because while there’s only one sen­si­ble monoid on lists, there are 2 for inte­gers—Sum and Product.
  • we’re actu­ally using Ints here which allow for both neg­a­tive and pos­i­tive inte­gers, while unary nota­tion is usu­ally just for the (and the encod­ing of neg­a­tive num­bers into unary is tedious), so we gen­er­ally ignore the pos­si­bil­ity of neg­a­tive num­bers except our test prop­er­ty, unEqualDec, which just dis­cards any neg­a­tive num­bers.
  • we don’t define a newtype or data for Unary because that’s overkill

The con­sol­i­dated code, with type sig­na­tures and a test har­ness:

{-# LANGUAGE TypeSynonymInstances #-}
import Test.QuickCheck

type Unary = [()]

instance Num Unary where
    (+) = (++)

unaryToDecimal :: Unary -> Int
unaryToDecimal = length

decimalToUnary :: Int -> Unary
decimalToUnary a = replicate a ()

-- Roundtrip: number->number
udProp :: Int -> Property
udProp x = x>=0 ==> -- discard all non-natural integers
                unaryToDecimal (decimalToUnary x) == x

duProp :: Unary -> Bool
duProp x = decimalToUnary (unaryToDecimal x) == x

-- Roundtrip: addition->concatenation
unEqualDec :: Int -> Int -> Property
unEqualDec x y = (x>=0 && y>=0) ==> x+y == unaryToDecimal ((decimalToUnary x) + (decimalToUnary y))

decEqualUn :: Unary -> Unary -> Bool
decEqualUn x y = x+y == decimalToUnary ((unaryToDecimal x) + (unaryToDecimal y))

-- test harness
test :: IO ()
test = do quickCheck udProp
          quickCheck duProp
          quickCheck unEqualDec
          quickCheck decEqualUn

  1. “ye gods, how much dark night there is / in mor­tal breasts!” .↩︎

  2. To those who argue that the num­ber of atoms dou­bled when I added the 2 pails togeth­er: what if the 2 liq­uids have differ­ent den­si­ties?↩︎

  3. apfel­mus’s fin­gertree tuto­r­ial also ably cov­ers monoids.↩︎