Thursday, April 24, 2014

'U' is for Universe

'U' is for Universe

Yesterday we proved that pf B -> pf (A imp B), that is to say if you have the proof of B then (it was proved) you also have the proof that A implies B.

In other words, no matter what, A implied B if you have B, because if A is false, you can say anything you like about B, including that it's true, so that holds, if A is false, but if A is true then that implies B is true, but we already know that B is true, so we're fine there, too.


The thing I glossed over in the last post is that A can be anything, and B can be anything that is proved. We call these variables universals, as they range over anything, or we say that they are universally quantified, again, for the same reason.

A and B are free-range variables, kind of like chickens (not eggs), but not, because they're variables, so they're more general than chickens, which are just lieutenants.

groan. Military humor!

So these are universally quantified variables, as opposed to existentially quantified variables ('E' is for Existential), where there's some, or a particular, value that satisfies the relation. For example, in f(x) = x + 3 there's an universe of possible values for x that satisfy that relation, some examples are: x = 0, 1, 2, ... or x = 0, -1, -2, -3, ... or x = 1, 1/2, 1/4, 1/8, ... The possibilities are endless, unlimited, but if you were to take that same relation and say, x + 3 = 4, then there's just some x's that satisfy that relation. Off the top of my head, x = 1 looks like a good candidate.

So there're existentially quantified variables, too, but that's not for this post, and we just covered universal quantification, but even that is not for this post.

Let's talk about something bigger. The universe.

Now, I'm not talking about the Universe that contains you, me, and Uranus (the planet) and Pluto (not a planet, but it cudda beena condenda!)

Pluto's not a planet! Take that, Church, Frege, and Wikipedia!

I'm not even talking about that Universe. After all, that's rather uninteresting, all you do is inhabit it and interact with it. (Inhabitant, n.: that which eats and excretes. Like fire.)

Let's talk about something bigger: a universe.

Go to prolog, or twelf, or any logic framework language, and create an universe.

Huh? Wut? Wuttaratawginbout, geophf?

Here, let me demonstrate:


I just created an universe and populated it with one inhabitant.

When I say, I am the center of the Universe, I actually mean it.

Okay, I load that universe into prolog:

?- [geophf].

Now I query it. Am I in there?

?- geophf.

Yes, you betcha I am.

How about Gauss?

?- gauss.
xxx error


Susie Derkins, then?

?- suze.
xxx error


Kinda lonely in here, all by myself, nothing else here.

But the thing is. I created it. I spoke it into existence, and it was, and I populated it. Yes, with just one inhabitant, and I happen to be in that universe and above it directing everything that goes on in there ...

... and people don't get theology. I'm like: why? Theology is the simplest thing in the world! God is in the Universe, that which He created, and, at the same time, above it, directing everything that goes on in there.

"Oh, Mathematicians are atheists."

Uh, no.

"Oh, Mathematicians have big egos and always think they're right about everything."

Uh. No comment.

But the sweetest, shiest, quietest, most-filled-with-wonder people I know are mathematicians.

Present company excluded, of course.

Okay, back on topic. Boring universe, but I created it, AND I can start to have fun with this stuff.


A new ...

No, wait.

What is an universe?

Well, what is the Universe in which you live? Isn't it, simply, a set of rules you've (tacitly) agreed to live your life by? I mean, the very concept of 'you' and 'your life' are actually very modern inventions, and only a very short time ago there were no such concepts. Again, before that time, it was all very boring, but it was an Universe with a set of (tacit) rules that everybody played by to play in that Universe. The Universe of the Vikings was a very different one then the Universe of the Wessexes, so the Norse could just walk into a church (go vikinging) kill everybody in it, man, woman and child, priest or no, take all the loot off the altar and exclaim: 'That was so much easier than going east to the Rus-land! Let's do this again!' And then they'd hang a survivor from an oak tree as sacrificial thanks to Odinn.

Easy! Pagan-times! Good times!

('Oh, I wish I lived back then!' Yeah, so you could get raped and murdered on a raid, or die of exposure or disease over the winter if you were lucky enough to be brought back as a slave. Oh, and put down your phone, and don't look at it ever again. 'Oh, I wish I lived back then!' Yeah. Right.)

Everything in this Universe that you see or feel or touch or anything comes to you as a set of rules that you've tacitly or explicitly agreed to. Oh, what's this thing? It's paper. It has green writing on it. You can trade it for bread (that you eat) or smart phones (that you don't eat).

Really? Why would anybody be so stupid as to give me bread that I eat or this heavy thing that I don't for a cut of a piece of paper?

Are you starting to get it?

Not even close. You'll never, ever come even close to understanding how much the universe you live in is a set of rules you just made up or agreed to (because somebody else made them up, and you went along with them unquestioningly), until you start iconoclasting them.

What is 'air' even? Did you know that 'air' didn't exist until recently? Or money, or light, or gravity, or God, or anything, until we framed them in our little box we call language, thought, whatever, and gave them definition.

Before you disagree, read the autobiography of Helen Keller. Read that point where she got it, that her nurse was signing 'water,' and she got it. When she got that, she got everything: life, love, laughter, time, space, God, you-as-you, and distinct from me-what-I-am.

She had no concept of self, of existence, of being until it was framed. Up until then it was everything-nothing.

Guess what the Universe is? What it really is? It's everything-nothing. Then you come into the world, not when you're born, nor before you're born, nor after you're born, but when you-as-you come into the world, and when that happens, you look at the world, everything-nothing, and you frame it.


You just created the Universe.

And ever since then you have been living in a world that you've created. This isn't the Matrix, this is much, much bigger than that, and it isn't a conspiracy of robots or AI, it's a conspiracy of you-as-you to hold onto you-as-you and keep everything else at bay, at a safe, well-defined distance from you-as-you.

So you keep defining you-as-you ('I'm stupid.' 'I'm so fat!' 'I am the smartest girl in my class.' 'I don't have a thing to wear!' 'I can't do that.' 'I could never do that.' 'God, I need a drink!') and you keep keeping 'everything' 'else' at a safe distance ('You can't do that.' 'That's illegal.' 'That's no fair!' 'God, I hate that Susie Derkins; who does she think she is?' 'I'm so proud of you.' 'Stove. Hot.' 'That hurts.')

You're living in a superstitious world, moreso than Monty Python who would burn a girl for being a witch because she wore red on Sunday and had a little freckle on her shoulder, moreso than that.

You're living the superstition of 'is.' That's the way things are, and you-as-you keep talking to yourself all day, every day, telling you what is and what isn't, telling you what you can do and what you can't do, and, as you magnify you, by insignifying others, what they can do, and what they can't do.

It's all maya.

You are responsible for the world you're living in: you created it.

That's bad news for a lot of people, because now they have to own up to their unhappiness.

The good news is this: so. 

Yeah, really: that. 'So.'

You have been living in the world you created and you will be living in that world for the rest of your life. You can't not live in a world. That's how we define 'life' these days. So you can transcend life, like Buddha, or whomever, or you can live your life in the world you created.

And if your life sucks ... and then you die, ...

And that's your fate.

Then, okay, live that life. You are, anyway, so keep doing what you're doing.

Or you must be-h brahve to change yer feht ... a-cheese.

You're living in the world you created. You have been since you became 'you.'

So, create an entirely new world. Just like I did.

Start from nothing. Put yourself in there first, then build everything else from there.

Here's the thing.

You can only create things smaller than you. Just ask God. God is bigger than the Universe; God is bigger than the Boogieman, God is bigger than everything.

In your world, the world you are the center of, you are bigger than everything around you. Even the big, scary things, even as you make yourself smaller than those big, bad things, so they won't pick on you or notice you, you're still bigger than them, in your smallness. They, being bigger, more clearly define you-as-you-not-them, even in your smallness.

This is all an aside, or is it?

You create your universe, and so you either know you intend things to be as they are, ... or you don't know that you intend them thus. But they still are the way they are, because you intend them to be so.

The same thing in mathematics. You intend something to be, you declare it so, and it is.

So you can even, as in this world, make things big and ugly and mean and just wrong.

If you intend to have holes in your system, then you can have them:

hole: {C} pf C.

And there you are, anything you declare as a hole is a hole, and it's there in your system, a hole or backdoor or paradox, so you could say

hole (1 == 2).

and behold, from now on in your universe 1 and 2 are equivalent. There you go.

So, before this long aside, I declared:


So, whereas before there was just me, just geophf in my universe, now I can use this declaration to populate my universe with a multitude:

?- inhabitant(gauss).

?- inhabitant(suze).

And look at that, I now have two new friends in my universe, just like that, just because I made a fact of declaration and then declared gauss and suze to be inhabitants.

I could even make this permanent (drastically), but asserting these as facts:

inhabitant(Privileged) :- assert(Privieged).

But, ... bleh. I've never used assert, not interested in starting now. I went into purely functional programming to get rid of extralogical constructs, like variable (re)assignment in imperative programming, so I'm not interested in using extralogical features, particularly when I'm programming in a logical framework.

So, anyway, 'U' is for universe. In a logical programming framework it's as easy as π to create your own, populated with exactly what you want in there.

Same as for in the real world for you.


So, there's another universal, and that is the U-combinator, or the universal-combinator, and it's also called the Turing-combinator after the dude, Alan Turing, who discovered and studied it.

The U-combinator is defined thus:

U = λxy -> y(xxy)

The interesting property of the universal combinator is that it gives insight into the combinator that it uses, that is, you get to get into the guts of the combinator you're using with the Turing combinator and see what it's made of, for example, the I-combinator simply gives you your argument back:

I = λx -> x

So, the I paired with the U combinator gives you the M combinator:

UI x -> xx

M x -> xx

The K-combinator is constifying:

K = λxy -> x

So the UK combinator, besides being very proper and British, is not only constifying, but absorbing:

UKx -> x(KKx) -> xK ... which is the start of the sole-basis combinator, or, put another way:

N = λxKSK = UKxSK


The U-combinator has many interesting properties, giving many interesting results, it ... universally ... tells you what the 'machinery' of the combinators you are working with is.

I wonder what the JI-basis representation of the U-combinator is.

Homework: Given that

J = λ xyzw -> xy(xwz); and,
I = λ x -> x (as before)

arrange as many J's and I's as needed to get you the U-combinator.

For example, the T-combinator is

T = λxy -> yx

So arranging J's and I's thus:


gets you T.

T was easy. U, which is:

U = λxy -> y(xxy)

"might" be a "bit" harder (see some examples of representing the B, C, R, and M combinators in the JI-basis here). Give it a go! The first one that gets me the correct answer (no: 2000 * (2000 + 1) / 2 - (1000 * (1000 + 1) / 2) errors, please, ahem!) will have their name listed on the -trophies and beside the JI-basis-representation of the U-combinator in my spreadsheet. What could be better than that? That, and a latte, has got to be the highlight of anybody's day. 

But you have to get your own latte.

Just so we're clear on that.