## Friday, April 30, 2010

### Orders of Infinity

Originally posted 14 April 2010 on my temporary blogspace...

Eighteen months ago I posted a blog entry describing a Mass-Parity-Distance-invariant Universe. I got that idea while reading Roger Penrose's The Road to Reality during a month of vacation time away from online and other distractions. I couldn't see anything in the book that contradicted the idea. I knew String Theory is the most popular theory on how to unite the four forces, explain the Universe, and all that, but whenever I read up about it I sensed a certain inelegance about it all. Because I knew Penrose felt the same way, I was keen to plow through his book when I had the time. I haven't read up on physics much since writing that blog, but it's hard not to think about the maths when I'm out for a walk and daydreaming, and so I've had some further ideas for the maths...

### Physics recap

I explained how by using a Mass-Parity-Distance (MPD) symmetry, similar to the well-known Charge-Parity-Time (CPT) symmetry, we would have a Universe where equal amounts of positive and negative energy fly off in opposite directions at the big bang, each side self-attracting but mutually repelling. At the Big Bang, the left-handed gravitons and left-handed neutrinos fly off in one direction, thus equating positive mass with normal matter in the large, while their right-handed counterparts would fly off in the other direction, equating negative mass with anti-matter. Matter and antimatter created from positive energy in our side of the Universe would both have positive mass, but a virtual particle-antiparticle pair in a vacuum would have an overall energy of zero, one of the pair having positive energy, the other, negative.

I also explained how such an MPD-symmetric Universe could explain dark energy, though I suspect for it to have its observed strength and timing, the observable Universe would be a very tiny proportion of the actual Universe. Just as our sun is one of about 100 billion in the Milky Way, and our galaxy one of about 100 billion in the observable Universe, so our observable Universe could also be a 100-billionth of the actual Universe. Homogeneity and isotropy would be a more local effect to this scenario. To picture it all using the common 2D-curved-space picture for general relativity, the positive matter would be on top of the sheet sinking downwards, but the negative matter would be under the sheet to indicate negative distances, floating upwards to indicate the negative mass. The positive and negative matter would both self-gravitate, but repel the other.

### Cantor's hierarchy of infinities

I suggested the dual CPT and MPD symmetries suggest a mathematical model where the Universe is made up of two complex planes rather than four real lines. A complex plane is different to a 2-real-D plane in not having reflectional symmetry about the real line: two complex planes would have two such assymmetries, perhaps explaining the "parity" in both the CPT and MPD symmetries. But to see why our Universe would be two complex planes related in some way instead of some other structure, we'd need to understand what would make such a structure special. Why two complex planes and not three? And why use complex planes instead of real lines? What might make such a structure special could be the same thing that makes a single complex plane special. I suggest we look at its position in Cantor's hierarchy of infinities, as that seems more foundational than the other branches of mathematics, and move on up from there...

We know the zeroith order of infinity (a.k.a. finiteness) can define a logic system, by using two or more ordered finite values, i.e. false and true for boolean logic, more for other logic systems. The first order of infinity (a.k.a. aleph-0) can define an arithmetic system. The simplest is the natural numbers, created by starting at number 1 and applying induction. Extensions to this such as the integers and rational numbers are also aleph-0. Godel showed this arithmetic system cannot be both consistent and complete.

Things get more interesting at the second order of infinity. A next higher order of infinity is the power set of a lower one. The real numbers, introducing the square root of 2, extend the integers. We can prove they're at some higher order than the first order (integers, etc), but can't prove at what order they are. We therefore speculate they're at the second order (a.k.a. aleph-1), calling this the Continuum Hypothesis. Other number systems with the property of continuity (e.g. complex numbers, n-D manifolds) would then also be aleph-1, but complex numbers, which introduce the square root of -1, are "algebraically complete", not requiring any further extensions.

And what of aleph-2, the third order of infinity? The set of all curves (including fractal ones) is known to be at some order of infinity above aleph-1, hypothesized to be aleph-2. When looking at the curves, maybe it's best to consider the most complex curves first, such as 1D-lines with a (Hausdorff-) dimension of 2. The most famous of these are the Mandelbrot and Julia sets, which both happen to be defined on the complex plane. When we look at computer simulations of them, we see many concentric closed curves of various colors, reflecting the different integral-valued accuracies of calculation. If we could mathematically define a real-valued accuracy of calculation, would we still see concentric fractal curves? I suspect so, and that they would merge into a continuously-varying fractal structure with (Hausdorff-) dimension of 3, on the 2-dimensional complex plane. All of the Julia sets for the standard Mandelbrot look like they have this same concentricity property, though only some of them seem to have (Hausdorff-) dimension 3, the rest (on inspection) seeming to have dimension of less than 2. One is even a perfect circle, with only (Hausdorff-) dimension 1. And of course we could consider the nonstandard Mandelbrot views for all these Julia sets.

### The Julibrot Set

Let's use these two fractals in a candidate mathematical model for our Universe. The Julibrot Set is defined as the topologically-4D union of all the Julia sets of the Mandelbrot set. If we consider real-valued accuracies of calculation for the entire Julibrot, we have a (Hausdorff-) dimensionality of somewhere between 4 and 6, embedded in the 4 topological dimensions. Now I suspect there could be a theorem concerning the (Hausdorff-) dimension in such a structure: I'll speculate it's 5 and see where that leads. If such a 2-complex-plane structure explains the 4D-spacetime of our Universe, then there's an extra non-expansive dimension supplied by considering the fractal curves at different positive-real-valued degrees of accuracy. This would explain the phenomenon of mass in our 4D-spacetime, along with certain rules of distribution within, which could be the law of Einsteinian gravity.

But where would this positive real number come from? In my other blog entry, I suggested we could relate each complex plane to the other probabilistically! Each position in a Julia set would correspond only probabilistically to the positions in the associated nonstandard Mandelbrots. This would explain why the said mass in our Universe doesn't conform fully deterministically to the large-scale gravity-based rules of distribution, but has degrees of freedom as ultimately enabled by the law of quantum physics, as powered by Planck's constant, being the measure of probability relating the two complex planes together. Such a structure consisting of 2 complex planes related probabilistically therefore would be the minimumly complexed structure that can squeeze in a fifth real-valued dimension, the one we know as Mass, into the four expansive dimensions.

What would be the order of infinity for this Julibrot-based Universe? There could be a theorem saying this structure is necessary and sufficient to contain all curves, and is therefore at the third order of infinity, aleph-2. Our Universe could then be the minimumly-complexed structure that can exist at aleph-2. Furthermore, just as the complex numbers are algebraically complete at aleph-1-infinity, so also our 4D-spacetime with its inbuilt phenomenon of Mass, obeying rules both of gravitation and of quantum physics, could also be complete in some way at aleph-2-infinity.

### The directed dimension and inbuilt polarity

Is this probabilistically-defined Julibrot set the best model for our Universe? Any recursively-applied polynomial equation seems to give the basic Mandelbrotly-edged shape on the computer, so presumably they all have high enough Hausdorff dimension to be a candidate model. But only simple Julibrot Sets are reflectionally or rotationally symmetric in 3 dimensions, but not in 4, giving a dimension that looks like Time.

By looking at the Julibrot's constituent Mandelbrot and Julia sets on the computer, including their colored accuracy levels, we see that the Mandelbrot-real dimension is the assymmetric dimension, i.e. the Time dimension. As a bonus, the Mandelbrot-imaginary dimension is the only one that's reflectionally symmetric, therefore the one along which positive and negative matter flew apart, i.e. the Axial Space dimension. The Julia sets at each point below the standard Mandelbrot Time axis (where y=0 on the plane) are similar to the corresponding one above, except for being reflected through their Julia-real axis. This gives the appearance of the Mass rotating in opposite directions in each half of the structure, perhaps suggesting the opposite handedness of gravitons and neutrinos in each half of the mass distribution in our Universe. But in each half of the Mandelbrot Mass distribution, when we look toward the Time axis, the Mass appears to rotate in the same direction, perhaps suggesting why space appears to have an inbuilt polarity.

The Julibrot generated by the standard parameter plane doesn't bear an obvious visual resemblance to the MPD-symmetric Universe I've been describing, but by using a non-standard parameter plane for the Mandelbrot, we can shape it more like our Universe, such as the 1/μ-plane for a Big Crunch universe, or the 1/(μ + 0.25) plane for a Heat Death one, as pictured on this page.

We can also see suggestions of increasing entropy of Mass by looking at the Mandelbrot set. Because of the second law of thermodynamics, the entropy of the Universe at the Big Bang was at its minimum. In a Big Crunch Universe, the likely death scenario in both the positive matter and negative matter sides of the Universe is as two black holes spinning around each other for trillions of years before eventually smashing together, a high entropy end-state. We can consider the directedness of the dimension of Time as being caused by the increasing entropy of the Mass inside the Universe along the Time dimension. The standard Mandelbrot set on various parameter planes (i.e. the Time and Axial Space dimensions) seem to have one "creation" point, where the (Hausdorff-) dimensionality is 1 just at that point, situated on the Time axis, suggesting the low-entropy Big Bang.

So we could say that by increasing the mapping uncertainty between the Mandelbrot and Julia sets of complex planes (i.e. Planck's constant) up from zero, we create a fifth, non-expansive, dimension called Mass, which causes the Mandelbrot-real dimension to be directed and become Time, and the Mandelbrot-imaginary dimension to become a spatial axis around which the Julia planes rotate.

### Electromagnetism

In this probabilistic Julibrot model I've described, Charge is seemingly absent. We first considered this type of model because of the CPT and MPD dual symmetries suggesting two complex planes, but have only derived out the entity of MPD-symmetric Mass following certain gravitational and quantum rules. We can consider the forces without an infinite range (the strong and weak forces) to be more minor details for filling in later, but can't consider electromagnetism that way.

We can put electromagnetism into this model by introducing an additional relationship into the structure, besides the probabilistic one between the two complex planes. The basic apparent difference between MPD-symmetric gravity and CPT-symmetric electromagnetism is that with gravity, like masses attract while unlike ones repel, whereas with electromagnetism, like charges repel while unlike ones attract. The logical effect of this is that gravity's masses are real numbers, enabling aggregation of mass, while charges must be discrete. These look like big differences, but there's a simple structural property we can introduce into the model which makes gravity and electromagnetism be exactly the same force!

Someone once asked me how we know the Universe isn't like at the end of the Men in Black: 1 movie, where it's all just a speck of dust on another creature's back. I've since realized that unless the Universe looks exactly the same at its largest scale as it does at its smallest, then it's not really a self-contained system. The generally-agreed smallest scale of the Universe is a particle and anti-particle splitting apart, then perhaps coming back together. In an MPD-symmetric Universe, the largest scale is positive matter and negative matter splitting apart in opposite directions along one dimension of space, then, in some cosmological theories, coming back together again. If the very first particles to split apart at the Big Bang were some form of particle/graviton coupling, splitting away from their opposite forms, then the negative mass will be mainly antimatter, just as the positive mass we observe around us is mainly normal matter. And a virtual particle and anti-particle splitting apart and coming back together would have matching positive mass and negative mass.

So, the only difference between gravity and electromagnetism in such a MPD-symmetric neutrino/graviton-origined Universe is that gravity is what we see when we're on the inside looking outwards, and electromagnetism is what we see when we're on the outside looking inwards. On the inside looking outwards, there's only one instance to look at, but on the outside looking in, we see many instances. From the inside looking out, it looks like MPD-symmetric positive and negative Mass obeying the laws of gravity, but from the outside looking in, it looks like CPT-symmetric positive and negative Charge obeying electromagnetic laws.

Black holes could fit naturally into this model. Some people speculate they're inherently similar to particles, others say they're the outside of other Universes. And when we look at a computer simulation of the Mandelbrot set, we see many near-similar instances of the large-scale Mandelbrot at smaller and smaller scales, ditto with the Julia sets, and perhaps this mathematical fact suggests in some way this physical fact about the Universe, that the Universe must always look the same at its largest scale as it does at its smallest. And in fact, this mathematical fact suggests perhaps we don't need to introduce this physical fact as an additional relationship into our structure, but perhaps it falls naturally out of it.

### At the Big Bang

What might the Universe look like under this model in the first instant after the Big Bang? Because the neutrino is the particle defining matter/antimatter, I'll call the first particle to split from its antiparticle at the Big Bang a proto-neutrino. When the first protoneutrino/graviton coupling split apart from its opposite at the Big Bang, but before either the protoneutrino or the protoneutrino decayed into more particles, each half of the Universe looked like an expanding outer balloon with one decaying inner balloon inside it. Both outer and inner balloons had the same inherent structure: from the viewpoint of the space between them, the outer balloon appeared to obey the laws of MPD-symmetric Einsteinian gravity, and the inner balloon appeared to obey the laws of quantum electrodynamics. As the protoneutrino decayed into further different particles, the outermost scale and the innermost (quantum) scale always kept the same mathematical structure.

The protoneutrino further decayed into other particles, and in our own positive matter side of the Universe, in our own observable portion of the Universe, the fermions are presently the our well-known leptons, quarks, weak-force bosons, and whatever dark matter particles there are. In unobservable portions of the positive matter side of the Universe, perhaps the fermions are different. Perhaps the masses of particles change depending on when and where they are in the Universe. Perhaps other dimensionless constants, such as the fine structure constant, also change. In the negative matter side of the Universe, perhaps the first few quantum rolls of the dice caused the anti-protoneutrino to decay differently, resulting in a totally different life story there, but the overall mass distribution would be the same as in the positive matter side of the Universe, and there would also be a direct identity lineage from the protoneutrino to our present-day neutrino, ditto in the negative matter Universe. But despite what other changes there are in the structure of the Mass, the smallest scale would always have the same structure as the largest scale, and any changes to the structure of the Mass, such as values of particle masses or the fine structure constant, would actually be caused by this self-similarity requirement.

### Higher orders of infinity?

So we've seen a possible model of our physical Universe by regarding Mathematics not as something that simply describes the Universe, but as something which the Universe is at some order of infinity. I suspect if my conjectures above are correct, then the core theorem deriving the axioms of General and Special relativity and quantum electrodynamics from an uncertainty-based Julibrot set would be as significant at aleph-2-infinity as the Cauchy-Riemann theorem is at aleph-1-infinity.

If our Universe is what exists at the third order of infinity, then what might constitute the next higher order of infinity? Using Cantor's theorem, by considering the power set of our Universe, we might say it's the set of everything that could have happened, could yet happen, and would yet have happened in our Universe, except for the number of dimensions. But how would we place our own specific Universe of actual happenings in this picture, with its unique quantum reductions into actualities? One person might say the power set is at a higher order of infinity than our own specific Universe of actual happenings, because of Cantor's theorem. But someone else might say the Universe of happenings is at a higher order, being the real, intentioned actualization, while the possibilities are at a lower order, being just the canvas for the actualization, so to speak. It sounds like an argument between atheists and theists, and perhaps never able to be proven either way.

So possibly our own consciousnesses can't really comprehend very high up the ladders of infinity. At the first order, we can't logically define a consistent and complete system. At the next order, we must hypothesize its actuality as The Continuum in our own Universe. And at another order or two higher, where our own consciousnesses dwell, we can't logically prove which of the two orders is the higher and which is the lower. If we could look higher up the hierarchy of infinities to the infinite level, then the hierarchy itself would be able to be counted by an induction-based counting scheme, and so become self-referenced, and even itself an inconsistent and incomplete arithmetic system, which it isn't. In fact, because different instances of our human consciousnesses can't agree which of the third and fourth orders of infinity is higher than the other, we can't even make the known physical representations of the orders of infinity into a propositional logic system, not knowing which to call True.

Moving each order of infinity up the ladder seems to require utilizing some new well-known mathematical concept. Moving from finiteness to aleph-0 requires Induction, and from aleph-0 to aleph-1 requires Continuity. If an MPD-invariant Universe is at aleph-2, then moving there requires Probability. This would be the lowest order of infinity which contains the entities of Time and Mass, as distinct from Space. And such entities, Time and Mass, are required for the mathematics of computational complexity, Time as a resource and Mass for building Turing machines. Perhaps the next order of infinity, aleph-3, requires the concept of Computation, which could explain the phenomena of consciousness. Such Computation is also required for calculating fractal curves in aleph-2 spacetime.

### Computational complexity

Perhaps computational complexity will play an important role in a theory of the Universe. There's now many known complexity classes in the zoo. If we can slot the theory of computational complexity directly onto a mathematical structure which defines a space-distinct Time, which behaves according to the laws of our Universe, then many of these complexity classes, such as PSPACE and P(TIME), may meld into one when we factor in the effects of Special and General Relativity, such as time dilation and space contraction. PSPACE problems require more computation "power" than P(TIME) problems, but if space can become time due to high acceleration or a nearby strong gravitational field, perhaps ultimately they're really the same complexity class.

Similarly, the distinction between the P(TIME) and NP(TIME) complexity classes may not exist at Planck scales because of the quantum nondeterminism. Perhaps the electric field generated by human brain neural structure makes use of such quantum nondeterminism to produce the effect of consciousness. Perhaps both large-scale (relativistic) and small-scale (quantum) effects together reduce the many complexity classes down to a mere few. They seem to fall into four broad groups: logarithmic, polynomial, exponential, and recursive.

Do these complexity groups each match up somehow to the various orders of infinity I've described? Do aleph-0-infinite structures like the integers relate somehow to logarithmic-space computation? Do aleph-1-infinite structures like the complex numbers relate to polynomial-resource computation? Is our Universe an aleph-2-infinite structure? Is it an MPD-invariant "canvas" for our Universe of actual happenings, related somehow to exponential-resource computation? Are the quantum reductions that form the actual happenings in our Universe, including our own consciousnesses, an aleph-3-infinite structure? Related somehow to recursively-enumerable computation? And what could possibly lie beyond that?

### Programming Language Structure

Originally posted 16 January 2010 on my temporary blogspace...

Programming languages have their origin in natural language, so to understand the structure of computer languages, we need to understand natural ones. According to Systemic Functional Grammar (SFG) theory, to understand the structure of language, we need to consider its use: language is as it is because of the functions it's required to serve. Much analysis of the English language has been performed using these principles, but I haven't found much on programming languages.

Functional grammar of natural languages

According M.A.K. Halliday's SFG, the vast numbers of options for meaning potential embodied in language combine into three relatively independent components, and each of these components correspond to a certain basic function of language. Within each component, the networks of options are closely interconnected, while between components, the connections are few. He identifies the "representational" and "interactional" functions of language, and a third, the "textual" function, which is instrumental to the other two, linking with them, with itself, and with features of the situation in which it's used.

To understand these three components in natural languages, we need to understand the stages of encoding. Two principle encodings occur when speech is produced: the first converts semantic concepts into a lexical-syntactic encoding; the second converts this into spoken sounds. A secondary encoding converts some semantics directly into the vocal system, being overlaid onto the output of the lexical-syntactic encoding. Programming languages have the same three-level encoding: at the top is the semantic, in the middle is the language syntax, and at the bottom are the lexical tokens.

The representational function of language involves encoding our experience of the outside world, and of our own consciousness. It's often encoded in as neutral a way as possible for example's sake: "The Groovy Language was first officially announced by James Strachan on Friday 29 August 2003, causing some to rejoice and others to tremble."

We can analyze this as two related processes. The first has actor "James Strachan", process "to officially announce", goal "the Groovy Language", instance circumstance "first", and temporal circumstance "Friday 29 August 2008"; the second process is related as an effect in a cause-and-effect relationship, being two further equally conjoined processes: one with process "to rejoice" and actor "some"; the other with process "to tremble" and actor "others".

The interactional function of language involves injecting the language participants into the encoding. A contrived example showing many types of injects: "The Groovy Language was first announced by, of all people, creator James Strachan, sometime in August 2003. Was it on Friday 29th? Could you tell me if it was? Must have been. That august August day made some happy chappies like me rejoice, didn't it?, yeehaaaah, and probably some other unfortunates to tuh-rem-ble, ha-haaah!"

We see an informal tone, implying the relationship between speaker and listener. There's glosses added, i.e. "of all people", "august", "happy chappies like me", "unfortunates", semantic words added, i.e. "creator", semantic words removed, i.e. "officially", sounds inserted, i.e. "yeehaaaah", "ha-haaah", prepended expressions of politeness, i.e. "Could you tell me if", and words spoken differently, e.g. "tuh-rem-ble". Mood is added, i.e. a sequence of (indicative, interrogative, indicative). Probability modality is added, i.e. "must have", "probably". We could have added other modality, such as obligation, permission, or ability. We've added a tag, i.e. "didn't it?". We could have added polarity in the main predicate. What we can't indicate in this written encoding of speech is the attitudinal intonation overlaid onto each clause, of which English has hundreds. Neither can we show the body language, also part of the interactional function of speech.

Natural language in the human brain

A recent article in Scientific American says biologists now believe the specialization of the human brain’s two cerebral hemispheres was already in place when vertebrates arose 500 million years ago, and that "the left hemisphere originally seems to have focused in general on controlling well-established patterns of behavior; the right specialized in detecting and responding to unexpected stimuli. Both speech and right-handedness may have evolved from a specialization for the control of routine behavior. Face recognition and the processing of spatial relations may trace their heritage to a need to sense predators quickly."

I suspect the representational function of language is that which is produced by the left hemisphere of the brain, and the interactional function by the right hemisphere. Because the right side of the brain is responsible for unexpected stimuli, from both friend and foe, then perhaps interactional language in vertebrates began as body language and facial expressions to denote conditions relevant to others, e.g. anger, fear, affection, humidity, rain, danger, etc. Later, vocal sounds arose as the voice box developed in various species, and in humans, increasingly complex sounds became possible. The left side of the brain is responsible for dealing with regular behavior, and so allowed people to use their right hand to make sign language to communicate. Chimpanzees and gorillas use their right hands to communicate with each other, often in gestures that also incorporate the head and mouth. The article hypothesizes that the evolution of the syllable in humans triggered the ability to form sentences describing processes involving people, things, places, times, etc. Proto-representational language was probably a series of one-syllable sounds similar to what some chimps can do nowadays with sign language, e.g. "Cat eat son night". Later, these two separate functions of natural language intertwined onto human speech.

Programming language structure

When looking at programming languages, we can see the representational function easily. It maps closely to that for natural languages. The process is like a function, and the actor, goal, recipient, and other entities in the transitive structure of natural language are like the function parameters. In the object-oriented paradigm, one entity, the actor, is like the object. The circumstances are the surrounding static scope, and the relationships between processes is the sequencing of statements. Of course, the semantic domains of natural and programming languages are different: natural languages talk about a wider variety of things, themselves more vague, than programming languages. But the encoding systems are similar: the functional and object-oriented paradigms became popular for programming because between them it's easy for programmers to code about certain aspects of things they use natural language to talk about. The example in pseudocode:

`Date("2003-8-29").events += {  def a = new Instances();  a[1] = jamesStrachan.officiallyAnnounce(Language.GROOVY);  a[1].effect = [some: s => s.rejoice(), others: o => o.tremble];}`

The similarities between the interactional functions of natural and programming languages is more difficult to comprehend. The major complication is the extra participants in programming languages. In natural language, one person speaks, maybe one, maybe more people listen, perhaps immediately, perhaps later. Occasionally it's intended someone overhears. In programming languages, one person writes. The computer reads, but good programming practice is that other human people read the code later. Commenting, use of whitespace, and variable naming partly enable this interactional function. So does including test scripts with code. Java/C#-style exception-handling enables programmer-to-programmer interaction similar to the probability-modality of English verbal phrases, e.g. will/definitely, should/probably, might/could/possibly, won't, probably won't.

Many programming systems allow some interactional code to be separated from the representational code. One way is using system-wide aspects. A security aspect will control the pathway between various humans and different functions of the program while it's running. Aspects can control communication between the running program and different facets of the computer equipment, e.g. a logging aspect comes between the program and recording medium, a persistence aspect between the program and some storage mechanism, an execution performance aspect between the program and CPU, a concurrency aspect between the program and many CPU's, a distribution aspect between the program and another executing somewhere else. Here, we are considering these differents facets of the computer equipment to be participants in the communication, just like the programmer. Aspects can also split out code for I/O actions and the program entry point, which are program-to-human interactions. This can also be done by monads in "pure functional" languages like Haskell. Representational function in Haskell is always kept separate from interactional functions like I/O and program entry, with monads enabling the intertwining between them. Monads also control all access between the program and modifiable state in the computer, another example of an interactional function.

Textual function of language

The textual function of language in SFG is that which concerns the language medium itself. In spoken natural language, this is primarily the sequential nature of voice, and in written language, the 2-D form of the page. Whereas in natural language theory, the voice-carrying atmosphere and the ink-carrying paper are obviously mediums and not participants, it's more difficult to categorize the difference between them in programming language theory. Because a program is written as much for the CPU as for other human readers, if not more so, we could call the CPU a participant. But then why can't the CPU cache, computer memory, hard-disk storage, and comms lines also be called participants? Perhaps the participants and the transmission medium for natural languages are also more similar than different.

The textual function of language is made up of the thematic, informational, and cohesive structures. Although mainly medium-oriented, they also involve the participants. The thematic structure is speaker-oriented, the informational structure is listener-oriented. The thematic structure is overlaid onto the clause. In English, what the speaker regards as the heading to what they're saying, the theme, is put in first position. Not only clauses, but also sentences, speech acts, written paragraphs, spoken discourses, and even entire novels have themes. Some examples using lexical items James, to give, programmers, Groovy, and 2003, with theme in italics:

• James Strachan gave programmers Groovy in 2003.
• Programmers are who James gave Groovy to in 2003.
• The Groovy Language is what James gave programmers in 2003.
• 2003 is when James gave programmers Groovy.
• Given was Groovy by James to programmers in 2003.

In English, the Actor of the representational function's transitive structure is most likely to be separated from the interactional function's Subject and from the Theme in a clause, than those from each other. I think the textual functions of natural language are far more closely linked to the interactional function than to the representational. Perhaps the right side of the brain also processes for such texture structure.

The informational structure jumps from the top (i.e. semantic) encoding level directly to the bottom (i.e. phonological) one in English, skipping the middle (i.e. lexical/syntactic) level. This is mirrored by how programming languages such as Python use the lexical tokens to directly determine semantic meaning. In English, the speech is broken into tone units, separated by short pauses. Each tone unit has the stress on some part of it to indicate the new information. For example, each of these sentences has a different informational meaning (the bold indicates the stresses):

• James gave programmers Groovy in 2003.
• James gave programmers the Groovy Language in 2003.
• James gave programmers Groovy in 2003.
• James gave programmers Groovy in 2003.
• James Strachan gave programmers Groovy in 2003.

Unlike the thematic structure, the informational structures the tone unit by relating it to what has gone before, reflecting what the speaker assumes is the status of the information in the mind of the listener. The informational structure usually uses the same structure used in the thematic, but needn't. English grammar allows the lexical items to be arranged in any order to enable them to be broken up in any combination into tone units. For example, these examples restructure the clause so it can be divided into two tone units (shown by the comma), each with its own stress, so two items of new information can be introduced in one clause:

• James gave Groovy to programmers, in 2003.
• As for Groovy, James gave it to programmers in 2003.
• In 2003, James gave programmers Groovy.

Programming languages should follow the example of natural languages, and allow developers to structure their code to show both thematic and informational structure. The final textual function, the cohesive structure enables links between clauses, using various techniques, such as reference, pronouns, and conjunctions. Imperative programming languages rely heavily on reference, i.e. temporary variables, but don't use pronouns very much. Programming languages should also provide developers with many pronouns.

Summary

Programming languages initially represented information in the same way humans do, using transitive structures such as function calls, joined by logical relationships such as blocks and class definitions. Interactional aspects of code were initially intertwined, but could be separated out using aspects and monads. Enabling different textual structures in programs isn't very widespread, so far limited to providing different views of an AST in an IDE, only occasionally allowing "more than one way to do things" at the lexical level. When used well, textual structures in code enable someone later on to more easily read and understand the program.

In promoting the benefits of programming languages enabling different textual structures, I think it's useful to narrow down to two primary structures: the transitive and the thematic, as these two are easiest to communicate to programmers. See my earlier thoughts on how a programming language can enable more thematic variation. Programming languages of the future should provide the same functions for programmers that natural languages provide for humans.

And of course, I'm building Groovy 2.0, which will both enable thematic variation in the language syntax/morphology, and supply a vast vocabulary of Unicode tokens for names. The first iteraction will use Groovy 1.x's SwingBuilder? and ASTBuilder, along with my own Scala-based combinator parsers, to turn Groovy 2.0 source into Groovy 1.x bytecode. The accompanying Strach IME will enable programmers to enter the Unicode tokens intuitively. Groovy 2.0 will break the chains of the the Antlr/Eclipse syntactic bottleneck over Groovy 1.x !!!