: L a w s o f F o r m N o t e b o o k :
What ?
A tool to explore the world of George Spencer-Brown's paradoxical Forms.
As much for a toy as for more serious enquiries. This is essentially the testbed of a kernel which will eventually become a more serious programming language.
Someday.
Well, the best place to start is probably to read Laws of Form. If you don't feel like waiting for shipping, have a look at this website, or this one, or try my own introduction here.
Once you have an understanding of what the cross (or the mark) is, you can start fiddling with LoFN. Here is a brief overview :
This is pretty much all there is to it. You have a canvas of unlimited size on which you drop marks, links, and contexts (oh, my, what is a context? Hold on, we're getting there)
In addition to what is explicitly in the book, there are a few things to understand before we begin.
In order to evaluate the form, there must be a well defined protocol. In LoF, there is no such protocol described beyond degree 1, and so this program is but one implementation of one specific protocol to evaluate the state of the entire expression in time (degree 2 and above). Because of this, the language is disconnected from any pretense of algebraic, logical or arithmetical truth beyond degree 1, or at least, until someone shows its consistancy, or lack thereof.The evaluation protocol simply defines an order in which the states of the marks are evaluated, or to say it in GSB's words, the order in which we are crossing the boundaries of the form. This order is itself defined by the location of the marks on the canvas. Marks are resolved from left to right, then when several marks are located on the same vertical line, the order becomes top to bottom. The evaluation cycles through all of the gates over and over, until the form is stopped.
So in the picture above what we have is a number of marks (the red and blue things, blue for unmarked, red for marked, the yellow outline is a simple selection), and a number of links. Some marks are linked to themselves, some others are linked to marks which are in turn linked back. All in all, a whole bunch of links, but that should not be a problem now that we have clearly defined the order in which they will be evaluated.
Then we have the rectangle on the right. This is a context, and is an arguable addition of mine over GSB's forms. In a sense, contexts are a form of degree 3. If we remember that degree 2 started time, we can see degree 3 as stopping it. Another way to look at it is to see it modelizing the concept of operator.
Remember, in degree 1 we had :
The mark.
And in degree 2, we had :
,
, ... ,
The subversion, the simplest instance being the contradiction.
And so now, in degree 3, we introduce forms controlling the timing of other forms: if a connection to a context is unmarked, then time in this context does not pass and connections from marks lying in this context are ignored by the rest of the form. If we hash the value of a subverted form using another subverted form, we reach a new, higher degree in the calculation :
,
,
,
, ... ,
We could call it... let see... the counter-affirmation, but that's not very generic. A better term seems to be, quite simply, the operation.
The operator here is the marked state of the context. If we wish to describe it so, degree 1 and 2 are expressions which omit both their context, and their operator (us). We are therefore ourselves a connection to the context of any form we write down.
Here, degree 3 embodies the rule that what is not allowed is forbidden. One could simply view it as an AND operator, but that would be a mistake, much like the mark is not a NOR operator per se.
So, What Can I do With It ?
The first, quite obvious thing that one can do with LoFN is to familiarize oneself with logic. The software can be used to modelize classical logic circuits such as number encoding and decoding, adders, seven segments, etc.
But the specificity of this tool is that it will let one connect logic in any way one wants, not necessarily in a way that the logic of semiconductors will be able to reproduce directly. Here are a few pointers on where to start from :
Logic
The sixteen boolean logic gates can be directly transcribed in degree 1, see this page for a list of the gates and their form.
Much in the fashion in which GSB creates a modulated wave of one half the frequency of its input, one can use the subversions of the form to create numbers. Integers are very simply made by connecting N-1 marks to each others, including themselves.
The number 5. Just for fun, here is the number 30
Rationals
Making rational numbers is slightly more involved but is possible, to some extent. Here is the integer 5 transformed into a modulation, equivalent to the rational number 5.0, or 5/1:
What we have added here is a modulator, what it does is to change the state of its output each time it receives a discrete pulse from its input. Therefore connecting its input to a simple mark produces an oscillation similar to the simplest degree 2 equation. Connecting any discrete, integer number will transform it into a rational, modulated number.
Frequency Multiplication / Wavelength Division
Now this wouldn't be very useful if all we could do was to transform integers into rationals and somehow maintain the pretense that they indeed are rationals simply by adding ".0" whenever we refer to them. The reader will have guessed that there was a deeper purpose in doing this, we can now begin to multiply the frequency of signals , or more to the point, we can introduce the concept of division, that of wavelength. What we end up with are, literally, fractions.
7 /3
One can extract the value of the fraction by measuring the average length of the modulation :
= (3 + 2 + 2) / 3
= (3 + 2 + 2 + 3 + 2 + 2) / 6
= (3 + 2 + 2 + 3 + 2 + 2 + 3 + 2 + 2) / 9
= (3 + 2 + 2 + 3 + 2 + 2 + 3 + 2 + 2 + 3 + 2 + 2) / 12
= 7/3
Obviously this only works for fractions whose value are greater than 1, since a number smaller than this cannot be described this way. For this we would either need a substructure for each discrete pulse, or we would need to carry an inversion bit so as to represent the number using its inverse. This is however quite beyond the scope of this simple introduction.
One can obviously see from this point how the form could reach another higher degree if it was possible to abstract the concept of time altogether so as to reinject the result computed by a context back to itself (sort of a 'time compression' problem). This would allow adding two values, and re-using the result into the same operation by way of a degree 4 link. If we could do this, we would in fact have the equivalent of a quadratic equation resolved in terms of a continued fraction. One of the simplest equations of this degree would yield the golden mean :
Finite State Machines
With degree 3, it is also possible to construct finite state machines with arbitrary number of parallel states running concurently. Here is a very small example of a two-states machine with only one state active at one time :
Here in its steady state after start up. The form S at the top left is the starter, it is a form that remains marked only on the first pass of the evaluation. Its purpose is to explicitly allow the first state to actually run first and then let the state machine run on its own.
On the bottom left you can see two input values, a and b, we can look at them as our verbs, or the commands which will tell the state machine what state to switch to.
Formally, our state machine looks like this :
The reason why state 1 remains alive after it is started up is because it is using a memory to feed its own context (for an introduction on memory forms, see here). Because of this, it will, on its own, maintain the marked state of its own context, until the memory is reset by the command to switch to state 2.
If we inject a marked pulse in a, the memory of state 1 will be discharged. In the next evaluation, the context will be unmarked and detection of the command a will not take place. However, by that time, state 2 will have started, courtesy of state 1's last command before being suspended. If we then leave the form steady, state 2 will remain current because of the memory it uses to maintain its context marked, just as state 1 did. If we now decide to change b into a marked state, state 2 will in turn be suspended, and state 1 will be resumed.
This FSM never terminates, but if we wanted it to we could do so simply by suspending all of the states of the machine (in contrast with classical FSM, our machine has the possibility of never starting, we would simply omit the starter form S).
Anything I Missed ?
Not much, here is a list of useful keyboard shortcuts: Space toggles the Hand tool, Control toggles the Move tool. Control-Zoom unzooms. Shift-Select adds to the selection, Alt-Select removes from it (I haven't got around to making the cursor support yet, so you'll have to tolerate a dull arrow for all of the tools, heh). Delete deletes anything you have in your selection (no, there is no UNDO :-) ).
Check out the context menu when you have made some selection as there are a few useful tools hidden there. Careful with the Collapse command as it has not been very thoroughly tested yet.
Have fun !
Francis Gastellu
San Francisco
2/12/2002
History
- Kernel Test v1.1 - Fixes crash when collapsing gates with no outbound connections. - 2/12/2002- Kernel Test v1.0 - First release - 2/12/2002