# Type formation rules for 1-position expressions

I made a summary of the rules for formation of types for simple 1-position expressions, as I understand them.

Here it is in textual form:

• A symbol, say, α, is a discrete entity, represented by a unique string of characters
• A type is created from a symbol, or from another type, with the operator [] (column Type, downwards in the table)
• In the other "direction" (upwards in the table, column Head), the head of a type is an operation of reading a label, in the form of a symbol, from an expression. Despite being "in the other direction", it is not a dual of creating a type, as creating a type returns an expression, and reading a head returns a symbol.
• So, for example: the head of x[][] is x[], the head of x[] is x, etc.. On the other direction, adding [] to x creates a type x[], to x[] creates a type x[][], and so on.
• The head of a symbol without brackets x is the symbol Symbol, common head of all symbols without brackets
• The head of Symbol is also just Symbol itself, so, in a way, Symbol is the "root" symbol of the "hierarchy"
• Being a "root", a type is exceptionally created from Symbol by also specifying its identifying string: Symbol["name"], which is the symbol name.

Here is a table representation:

Symbol Symbol α
α Symbol α[]
α[] α α[][]
α[][] α[] α[][][]

Are these rules correct?

• Atomic: Things like numbers, symbols, etc. AtomQ[expr] returns True, and the head is not necessarily "part" of the expression: Head[x] is Symbol, Head[1] is Integer, etc.
• Symbols have a name and context, retrievable by SymbolName and Context, respectively. A symbol can be created from its textual representation using Symbol or ToExpression, where the latter also works for all other types, e.g. integers. The "exceptional" behavior of creating new symbols using Symbol is more of a convenient "overload" of the symbol Symbol rather than a deeper property in my mind. For example, Rational[3/4] will return 3/4, which has head Rational (but Integer[3] is not 3).
• Composite: Everything else. The form is head[arg1,…], where each of head, arg1,… can themselves be any expression (of course, there can also be no arguments). AtomQ[head[…]] returns False, Head[head[…]] returns head2.
1There are some subtleties regarding stuff like SystemPrivateSetNoEntry, but ignore that for now