Here I am going to pee on (You) as an Intellectually Superior Alpha Male [Wolf] would. The reaction I expect from (You) is to lower your tone, put your tail between your legs and to step aside.

I am the last living Natural Philosopher (before the LLMs made the very notion of accumulating and refining knowledge obsolete, just like the petrol cars made obsolete the whole horse-based economy).

trait NaturalPhilisopher: Mathematics + Classic Physical + Programming + Liguistics + PhilosopgyOfMind {}

A set of traits, indeed.

I am living by at the place where small rivers merge among mountains and forests of trees, somehow like Warden, but for different existential reasons. It is true, when you observe deeply and long enough you will begin to notice at least some of the underlying structure of things around you. This is how the ancient Indian Philosophy emerged and has been partially captured in writing.

Rivers merge at its sources and split before entering the sea. There no other shapes they generate. Never, in principle.

Trees, on the other hand, are just like rivers (if you know the shape of the roots).

This is not a random coincidence – there are the universal shape of physical processes constrained by causality.

Yes, a river may split into individual streams, and then join them together, which trees never do, but this is an incidental complexity, not the essential one.

The essential concepts are – linearity and ordering.

Each process in the universe is a composition of arrows of Causality.

  * -> * -> * -> * -> *

This abstract shape seem to emerge literally everywhere, but it is not merely emerges, it underlays. It captures the shape of Causality itself.

To see that you have to change your perspective. What appears as a strictly liner sequence is in reality a “join” of several arrows.

The first profound realization is the abstract notion of Currying is not just a syntactic trick, it is exactly this shift in perception

A curried function is a chain of nested functions, each of which, take exactly one argument (always) and reruns another function (a closure, which captures the previous “arrow”).

The partial application (of such curried function) naturally arises by just applying to a fewer arguments and binding the resulting closure.

One may think that this is just a syntactic trick, only till (You) actually realize that an enzyme with partially filled “slots”, not yet captured all of the necessary components for a reaction and not yet reached the necessary and sufficient energy threshold is the very same partially applied function. An enzyme even changes its physical shape after certain molecular components binds to (and thus being captured by) it.

Again, nothing is random there. The order at which the components has to arrive inside its immediate (undersell) environment is undefined in principle, and when evolution requires a particular order, the enzyme changes (evolves) its shape, so no molecular compound can bind to it prior to certain other molecular compound.

This is precisely why the only possible realization (actual implementation) of function composition is a nesting of function calls – a frame of the environment for an inner closure has to be fully formed before the outer closure can use its results.

(.) :: (b -> c) -> (a -> b) -> a -> c
    -- Defined in ‘GHC.Internal.Base’

The arrows (which capture and encode the directedness) are not arbitrary there – they represent the Causality. Again, we see this as a linear sequence, but there is implicit nesting.

Now yet another familiar signature

 fmap :: (a -> b) -> f a -> f b
  ...
      -- Defined in ‘GHC.Internal.Base’

And anther one

($) :: (a -> b) -> a -> b 	-- Defined in ‘GHC.Internal.Base’
infixr 0 $

And another one, with the order of arguments has been changed (warning: a pseudocode)

type Monad :: (* -> *) -> Constraint
class Applicative m => Monad m where
  (>>=) :: (a -> m b) -> m a -> m b
  ...
      -- Defined in ‘GHC.Internal.Base’

Notice the Applicative part (it is, again, just a function application) and also that an order of argument matters for an infix function.

And another old friend

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
   -- Defined in ‘GHC.Internal.Control.Monad’
infixr 1 <=<

Notice the similarity? Just “Nested arrows”. Arrows imply direction. Nesting is composition with implicit ordering by Causality.

Cool, yeah? Now let’s break all this.

Monoids do not exist in reality, Only Semigroup is a properly captured abstraction. The reality of thermodynamics neither posses (or allows) a “no-op” (zero energy expenditure) transitions (operations), not “null” (zero energy) state (values). Boy, it does not even have a zero, in principle.

What the Associativity Law captures? It states that it does not matter which Oxygen atom comes first (enters into a particular locality) to form the \(O_2\) molecule, or how some other molecular compounds are being formed (this is an ultimate composition, which is an ultimate Semigroup).

The Commutativity Law is states that some compositions (putting together) are symmetrical (the direction from which the \(O_2\) atoms come from does not change the outcome).

The concatenation (joining) of molecular chains is, of course, NOT commutative, because each non-symmetric molecular sequence (a chain) has two distinct orientations

Looks like I “accidentally” solved the question Whether Mathematics has been Invented or Discovered – Non-bullshit mathematics has been discovered, the bllshit branches (high-dimensional manifolds and their topology) are indeed Tatnra-like social constructs. The same distinction alleles to the two Physics.

What Reality actually does is nesting (composition) of a structure-preserving (energy-preserving) transformations, but it forms a Semigroup, not a Monoid, and the arrows can never be reversed, in principle, ever.

The Causality (and the derived abstract notion of Time) emerges as the result (or a by-product) of this universal Order (rta) of this universal composition.

Now do lower your tone.

Let’s go back to the Mother Nature. Along with rivers and trees there are paths.

What is a path? Well,

  * -> * -> * -> * -> *

an [ordered] sequence of steps. (by the way, an unordered sequence is an abstract bullshit).

What is the defining characteristic of path? It is step-by-step, one-step-at-time.

Are these characteristics arbitrary or only applicable to a path? No, they describe are the universal abstract shape of a recursive process. Any recursive process. Every possible recursive process.

Just like rivers, paths may fork and join. Yet, (You) can only take one of several possible paths at a fork (without explicit backtracking). Notice the intentional lack of “at a time”.

No surprise here – every single water molecule within the river takes only one stream, and if we trace its path it will always be an ordered (linear) sequence. Non-linear sequences is also abstract bullshit.

So, each individual [possible] path through a Directed Acyclic Graphs (DAG) is a ordered linear sequence (of steps), implicitly necessary ordered by Causality Itself.

This is not a random accident that one cannot write down any set, but as an ordered sequence. This is because our writing system is one-by-one character, one-character-at-a-time.

Japanese, Chinese, and Korean write in pictograms (hieroglyphs), which is vastly inferior system, since it lacks combinatorial properties of sequences of sound a human throat can produce, and yet, the process of writing a single hieroglyph with a brush is one stroke at a time, and they form vertical sequences of them anyway.

Yes, yes, a pictogram or a hieroglyph can be “written” (rendered) at once, using a seal, and a whole page can be printed at once using a printing press, but this fact is not essential.

What is essential is that the process of writing is one-by-one, one-at-a-time because the process or reading or observation by a human being is one-by-one, one-at-a-time.

Yes, we observe paintings as a whole (not really, human sensory perception is sequential), but this fact is not essential.

What is essential is that this processing of a whole /one-by-one, one-at-a-time is a universal shape, and it has been captured by mathematicians as the abstract notion of an mathematical induction and generalized into a recursive process.

But, of course, long before mathematicians have captured, generalized and named these abstractions, evolution has discovered an ordered sequence as the optimal encoding of information, and a recursive processes for both writing (synthesizing) and reading (interpreting) them down.

Since every sequence, unless it is perfectly symmetric, can have two distinct readings (due to rotation along the vertical axis, or rotation of the observer around the sequence, which is one and the same), evolution has invented distinct start and strop markers, so an enzyme knows from which side to read.

What is an enzyme? It is a physical machine, made out of proteins, which implements a particular directed, multi-step process which transforms one molecular structure into another, preserving the atoms.

How do they compose? By implicit chaining (which we implement by explicit nesting) – the product (output) of one catalyzed reaction is an input for the next in a chain.

It is not a coincidence that biologists name such chains of reactions as particular pathways. They are the paths – directed (irreversible) sequence of individual steps, implicitly ordered by [the underlying] Causality.

Now let’s talk about Environments (and scope and shadowing). Nothing happens in vacuum. Everything we observe and interpret (think of) as a “thing” is in reality a localized process– a structured energy (atomic structures) trapped by gravity and other forces in a particular physical locality.

Every [what we call] atom is a such localized process, and what we call a Periodic Table and “based on it” Chemistry is a perfect (and ultimate and very actual and very real) Abstract Interface – the Life Itself ha been built upon this Abstract Interface..

So, what is an Environment? It is an Universal abstraction which captures a few different notions – a distinct localized partition (a cell, or an organ), a localized process (the physical locality determines its boundaries), the “collection"of all the atoms being made so far, or. much better, the collection of all atoms (of all kinds) which has been “trapped” by forces within a particular locality.

This notion is so universal, that it actually exists without a “concrete implementation” – a set of all previous results of non-bullshit (proper, which captures and studies the properties of recurrently emerging patters of What Is) mathematics, the set of all previous results within a particular system of Logic, the set of all [immutable] symbol-to-value bindings (so far), and so on.

Mathematicians and Logicians usually denote it as \(\Gamma\), and use it as the set of all the axioms and previously proven resits (to further build upon these).

There is more. A dictionary, which defines the “current (up to date)” meaning associated with individual words of a language (which are the written forms for particular sequences of sounds) within a shared culture, is an environment. The shared language-based culture itself.

This is where the notion of scope and shadowing come from.

Mother Evolution does not destroy anything in principle. It does not even compare!. It eventually produces a new versions – more energy efficient or less matter heavy, while explicitly reusing what is “already out there”, (having its own “technical debt”). Notice that what we call mater is just a localized, trapped in particular physical locality, what we call energy, which cannot be either created or destroyed, only transformed from one form to another).

Eventually, Biological Evolution will use new “better” versions of evolved “stuff” instead of the previous ones, but it neither destroys the old ones, not mechanically replaces the old with the new.

For Biological Evolution everything is immutable. (it does not know anything about Entropy and the Inevitable Cessation of Localized High-Energy States – the Inevitable Returns To The Base Line, which is the Cold and Void).

Anyway, This is a yet another Universal Principle – new versions, new structures,, new values, new “meanings” are being used (selected) instead of the previous ones, without destroying or replacing the old ones.

This is exactly what scoping rules capture and implement. We just “shadow” the old with the “new” [versions], leaving the “old versions of structures” intact (to be reclaimed by the Entropy), so the Mother Evolution does not need a Garbage Collector – for It everything is immutable and persistent, while in reality Nothing Is Permanent or Immutable (the Buddha).

Ok, Nothing exists in vacuum, no processes occur wishing an implicit Environment that just Exists prior to it, no logical or mathematical expression can be reduced or evaluated without an implicit Environment of all the prior bindings and results.

Both the Gentzen’s Natural Deduction and the original Untyped Lambda Calculus require an implicit Environment (the Simply Typed Lambda Calculus require two distinct environments!).

Ultimately, a shared environment is a collection (within a particular locality) of all the Stable Intermediate [molecular] Forms used by Biological Evolution as building blocks for biological systems.

Every Interpreter requires (has a necessary “hidden” or existentially qualified) Environment, which can be mathematically modeled as on unordered set of ordered pairs with the explicit shadowing rule.

How does shadowing and actual immutability is implemented? By having “nested” (“new”) Frames of environment, which are just smaller structures (sets) of the same kind, which the search process visits first (prior to) the old.

What search process? The process which reruns a value (the meaning) for a given symbol (binding). This process, unsurprisingly, can be defined as a pure recursive function and it will have the distinct particular shape of a recursive process, which processes the whole Environment (a set of nested Frames) one-by-one, one-element-at-a-time.

What is remarkable about this Universal arrangement is that the sub-process that observes (scrutinizes) or transforms an individual element does not know anything about the others or that they ever exist, and the sub-process which translates (traverses) or “shifts” the actual linear ordered “sequence” does not know anything about what is going on with the individual elements.

This principle is true both for the DNA Transcription enzymes (or any polymer-transforming enzyme whatsoever) and for application of a function on elements for a whole List using map. The notion of a Functor just properly captures yet another Universal Pattern, which “existed prior to being captured”.

Now we will talk about what dirty tricks our language-based minds play upon us (the observers of thoughts).

When we say basting or neared structures, there are different kinds of nesting. When we say composed sequences, there are different kinds of compositions which both appears as a sequence of arrows which is a path.

It has been noted by the Category Theorists that the sequence 1, 2, 3, 4 is isomorphic to the sequence ->1 ->2 ->3 ->4. The second reading is not that 1 implies 2 or that 1 is necessary and sufficient for 2. Sometimes it does, sometimes it does not.

This means that the notation is too general, and that it “loses the meaning” exactly as a loosely transformation loses information. And yet, there is a hint for, a glimpse of the underlying structure, which is a ultimately a DAG.

So, the composition of functions (pure expressions) which is a description of (a blueprint for) a process, appears to be an ordered sequence, and an ordered sequence of values (or molecular structures) is, indeed, an ordered sequence. They have the same shape, but not necessarily have the same meaning.

The underlying Order of composition (and thus of an eventual execution) is not semantically the same (of the same kind) as the particular Order of a [written/ physically rendered] sequence, which may or may not capture the Order of Causality (of events as they have happened).

The Order of function composition (which is nesting under the hood) is always Causal, while the order of an arbitrary sequence may or may not.

Again, the most fundamental and the most universal notions are of an Order (the only invariant is this [exists, comes] prior to that) and of the Directedness – the arrows, not mere lines, and these arrows cannot be reversed in principle. The Causality Itself dictates the first, Thermodynamics dictates the second.

For the Causal Order the invariant is that “this comes as a result of that [and also that]” which implies that “that” has to be present (exist) in a particular locality prior to this. This is the famous a priori principle, or the much earlier principle of Dependent Origination formulated by the Buddha (“from this [exist] that arises, from this disappears, that ceases to be).

Notice that the way (the particular order) in which an Observer happen to observe becomes the Manifestation of Causality for it. Same goes for speaking out, writing down or “encoding” (serializing, wire-encoding).

Perception is sequential, so is Interpretation. Thus a lose-less encoding for communication has to be sequential (with explicit or implicit but necessarily taking turn). There is where the arrows in the Category Theory come from. Processes have particular Universal shapes, and Recursion over an Ordered Sequence (of observed events) is one of these.

There is a catch – the Ordered Sequence in which events have been observed by an Observer is not necessarily the same as the implicit sequence in which events have occurred. This is, of course, the Relativity.

But the Molecular Biology has to deal with this without knowing it, and this is exactly how (by endless trial-and-error) it solves this ultimate problem – everything has to be explicitly encoded in an physically ordered sequence, with distinct start and stop markers, to only to “eliminate” implicit Relativity but to eliminate any implicit Ambiguity (caused by the implicit Relativity – where an observing entity is happen to be physically located relative to the “actual source, emitter of events”).

Physical localities are real and they have implicit relations to each other – of a distance and of a relative superposition.

And this, again, comes back to the universal one-by-one, one-at-a-time, the way all communication system (processes) are structured.