A formal note · III
Polynomial and traced network semantics for memetic replication
Typed operations, shared subcomputations, feedback, resources, and (∞,2)-categorical dynamics.
polynomial monad / sharing / trace / resources / (∞,2)-category
Abstract
We extend the operadic theory of memetic replication from rooted-tree histories to general computational and communicative networks with typed interfaces, fan-out, shared subcomputations, and feedback.
Let
be a cognitive ∞-topos. A typed family of memetic states is represented by an object over a type object . A polynomial
determines an endofunctor
whose points encode typed operations with input slots and outputs. Polynomial monads generalize operads and provide the syntax of finite typed recombination.
Iteration of polynomial operations still produces trees. To represent sharing of subcomputations one must additionally allow copying and discarding, equivalently a suitable commutative comonoid or cartesian structure. To represent cyclic dependence one adds a trace operator
Finally, organizing networks, transformations between networks, and higher equivalences naturally leads to a symmetric monoidal (∞,2)-category.
The resulting theory separates four layers:
Polynomial syntax, sharing, feedback, and higher semantics.
This allows memetic replication to be modeled as preservation of semantic invariants by arbitrary resource-sensitive network computations, rather than merely by unary copying or tree-shaped recombination. The unary theory is Note I; the operadic theory is Note II.
Notation
The symbols of this note, in the order they become active.
- A typed family of memetic states. The fiber over i is the space of states of type i.
- A polynomial: operations B, slots E, slot assignment p, input types s, output types t.
- The polynomial endofunctor on the slice over I.
- Copying, when a comonoid or cartesian structure supplies it.
- Feedback: close a wire of type U.
- The semantic process interpreted from a formal network N.
- Operational equivalence of diagrams, versus equivalence of their meanings.
- A resource valuation: energy, latency, memory, bandwidth, or operation count.
- A symmetric monoidal (∞,2)-category of networks and transformations between them.
- A semantic observable. Replication relative to Q is preservation of a Q-class.
1Ambient semantic setting
Let be a cognitive ∞-site and let
be its ∞-topos. Let be an object of semantic types. A typed memetic state is an object
The fiber over is the space of memetic states of semantic type . The natural ambient category is therefore the slice .
2Internal polynomial functors
Definition2.1Polynomial
A polynomial over is a diagram
in . Its parts are interpreted as follows.
- Object of operations.
- Object of input positions.
- Assignment of input slots to operations.
- Input typing.
- Output typing.
Definition2.2Polynomial endofunctor
The polynomial determines
by
Here is pullback, is dependent product, and is dependent sum. In internal type-theoretic notation,
A point of consists of an operation whose output has type , together with one input state of type for every input slot .
3Polynomial memetic dynamics
Definition3.1Polynomial memetic algebra
A polynomial memetic algebra is an object together with a morphism
in . The map evaluates one layer of typed memetic recombination. Internally,
4Operads as a special case
An operad records operations together with substitution. A polynomial functor records only the one-step shape of operations. To obtain coherent substitution we impose monadic structure.
Definition4.1Polynomial monad
A polynomial monad is a monad on whose underlying endofunctor is polynomial and whose unit and multiplication are represented by compatible polynomial morphisms. The monad multiplication
encodes substitution of operations into input slots.
Proposition4.2Tree-shaped composition
Every algebra for a polynomial monad possesses coherent finite tree-shaped composition of its primitive operations.
An algebra is a map satisfying and . The second equation states that evaluating an outer operation after evaluating its immediate suboperations agrees with first substituting all operations into one composite polynomial operation and then evaluating. Induction over finite rooted trees therefore gives coherent evaluation of every polynomial tree.
5Why polynomial syntax alone still yields trees
The free algebra of a polynomial monad is generated by finite substitution. Consequently, its formal expressions have a rooted-tree shape. If a value is used twice, the tree contains two occurrences of that value. This distinguishes duplication of syntax from sharing of one computed value. These are not the same operational structure.
Example5.1Recomputation versus fan-out
Consider
As an ordinary term tree, the subterm appears twice. A shared computational graph instead has one node computing , followed by a fan-out feeding both inputs of . Hence term trees cannot by themselves distinguish recomputation from sharing.
6Sharing via comonoid structure
Let be a symmetric monoidal ∞-category of semantic processes.
Definition6.1Copying structure
A copying operation on is a morphism
A discarding operation is
If these form a coherently commutative comonoid structure, then outputs may be copied and discarded. If is cartesian monoidal, so that , then every object possesses canonical maps
Thus cartesian structure provides canonical fan-out and deletion.
7Shared memetic computations
Suppose and . The shared network
has composite
This represents one execution of followed by reuse of its result. By contrast, the tree-like map is
possibly preceded by . The distinction is operational even when the resulting semantic maps happen to agree.
8Term graphs
Definition8.1Memetic term graph
A memetic term graph is a directed acyclic network whose vertices are labeled by primitive polynomial operations and whose edges carry typed memetic states, with fan-out permitted. Unlike an operadic tree, one output edge may feed several later operations. A term graph therefore represents a computation with shared intermediate results.
There is an unfolding map
obtained by duplicating every shared subgraph once for each use.
Proposition8.2Semantic invariance under unfolding
Assume the semantic category is cartesian monoidal and all graph nodes are interpreted functorially. Then a finite acyclic term graph and its complete tree unfolding have equivalent semantic evaluations.
Every shared node with outgoing uses is interpreted using the -fold diagonal . Naturality and the universal property of finite products imply that composing once with and then diagonally copying its output is equivalent to the map
The unfolded tree computes exactly these components separately. Induction on the finite acyclic graph therefore yields equality of the resulting morphisms.
Remark8.3Cost is not preserved
Operational cost need not be preserved. The unfolded tree may recompute a subexpression many times, while the graph computes it once. Thus semantic equivalence does not imply resource equivalence.
9Resource-sensitive semantics
To distinguish such implementations, the semantic category should not automatically identify copying as free. Let be symmetric monoidal but not necessarily cartesian. Then a state cannot in general be duplicated unless a specific map is supplied. This permits explicit accounting of resources.
Definition9.1Resource-sensitive memetic process
A resource-sensitive memetic process is a morphism
in a symmetric monoidal semantic category. Inputs are consumed and outputs produced according to the monoidal structure.
10Resource observables
Let be a commutative ordered monoid, for example .
Definition10.1Resource valuation
A resource valuation is a function
satisfying, at minimum,
and
Examples include energy, latency, memory, bandwidth, and the number of primitive operations. Two networks may therefore satisfy
while . This is precisely the distinction between semantic and operational equivalence.
11Feedback
Trees and directed acyclic graphs remain acyclic. Recursive self-reference and recurrent processing require cycles. The appropriate categorical structure is a trace.
Definition11.1Traced symmetric monoidal structure
A traced symmetric monoidal ∞-category is a symmetric monoidal ∞-category together with operations
satisfying homotopy-coherent versions of naturality, dinaturality, vanishing, superposing, and yanking.
A morphism can be pictured as a process from to with an auxiliary wire of type .
The trace closes that wire:
12Feedback memetic process
Suppose , where is an internal state. Then
represents a process in which the state output is fed back as the next state input. This models recurrence, memory, self-conditioning, iterative refinement, and feedback control.
13Feedback replication
Let be a memetic signal and suppose a recurrent transformation has semantic map
Replication is again the identity type
Thus feedback changes the causal architecture but not the fundamental semantic identity criterion.
14Fixed points and traces
A feedback loop should not automatically be identified with an ordinary fixed-point equation. A trace provides a way to close a wire:
becomes
A fixed point instead concerns a point satisfying . The two notions coincide only under additional hypotheses, such as an appropriate Conway or iteration structure. This distinction is important for recursive systems.
15Memetic networks
Definition15.1Memetic network
A memetic network is a finite typed string diagram generated by:
- polynomial operations;
- sequential composition;
- parallel tensor product;
- copying and discarding operations, when available;
- symmetry morphisms;
- feedback via trace.
Its semantic interpretation is a morphism
in the chosen semantic category.
16Network equivalence
Definition16.1Operational equivalence
Two networks are operationally equivalent if they are equivalent as network presentations under the chosen graphical calculus. Write .
Definition16.2Semantic equivalence
They are semantically equivalent if
Write . In general
but not conversely. Thus the semantic quotient is typically many-to-one.
17Network-to-semantic-class map
Let denote the space of formal networks from to . Evaluation gives
This is the network analogue of the earlier trace evaluation map from Note II. The homotopy fiber
is the space of operational realizations of a semantic map .
18Nonuniqueness theorem
Theorem18.1Semantic uniqueness does not imply implementation uniqueness
Suppose has more than one connected component. Then there exist operationally inequivalent networks such that
Choose from different connected components of the same homotopy fiber. By membership in that fiber, and . Hence . But the two points are not connected in the implementation space. Therefore the networks are operationally inequivalent.
19Resource nonuniqueness
Corollary19.1Cost is not a semantic invariant
Semantically equivalent replication networks may have different resource costs. That is,
does not imply . Hence semantic identity does not determine energy, latency, memory, or physical implementation.
20From an (∞,1)-category to an (∞,2)-category
So far networks and their semantic maps live in mapping spaces. To explicitly retain transformations between processes, introduce an (∞,2)-category . Its structure may be interpreted as semantic interfaces, memetic networks, and transformations between networks, with higher invertible coherences above dimension 2.
21Memetic (∞,2)-category
Definition21.1Memetic process (∞,2)-category
A memetic process (∞,2)-category is a symmetric monoidal (∞,2)-category in which objects are typed semantic interfaces, 1-morphisms are computational or communicative processes, and 2-morphisms are process transformations.
For , a 2-morphism may represent:
- optimization
- compilation
- refactoring
- learning
- simulation
- implementation replacement
22Semantic invariants of process transformations
Let be a semantic functor into another (∞,2)-category.
Definition22.1Semantics-preserving transformation
A 2-morphism is -semantics preserving if is an equivalence between and . Thus an implementation can change while its chosen semantics remains invariant.
23Replication as a 2-categorical invariant
Suppose is a replication process. Let be its observable semantic action. A transformed implementation is the same replicator relative to whenever there exists such that is invertible.
Hence the replicator is more naturally an equivalence class of 1-morphisms under semantics-preserving 2-morphisms.
24Compilation as a 2-morphism
Suppose is a high-level network and a lower-level implementation. A compiler can be represented abstractly by . Correctness means preservation of semantics:
Resource optimization can simultaneously require . Thus optimization is naturally a transformation inside a semantic equivalence class.
25Recursive improvement
A recursive improvement step is then not necessarily an endomorphism of a state object. It may instead be a 2-morphism
between successive system implementations. Semantic preservation requires
while improvement may be expressed by a monotone resource functional
or by a performance functional
Thus recursive improvement takes the form
inside a 2-category of implementations.
26Resource-relative improvement
Definition26.1Improvement preorder
Let be a resource cost. For semantically equivalent processes , define
when . If , write .
Definition26.2Strict semantic improvement
A transformation is a strict -improvement if and .
27Replication under optimization
Theorem27.1Optimization preserves replication
Let be processes and suppose is -semantics preserving. If replicates a semantic invariant , then also replicates .
Suppose replication by means . Since , we obtain
Therefore preserves the same semantic invariant.
This formalizes the idea that a replicating operation may change implementation without ceasing to be the same semantic replicator.
28Observer-relative network semantics
Return now to the cognitive site . Suppose every architecture possesses a semantic process category . An architecture morphism induces reindexing
Then a network at has observer-relative image . Two networks may satisfy but . Thus semantic collapse extends from states to entire causal networks.
29Network descent
Assume the assignment forms a stack of symmetric monoidal (∞,2)-categories. Then for a cover one obtains
Hence networks themselves can be assembled by descent from local process descriptions.
30Distributed causal structure
This means that a globally defined memetic process can be represented by networks
on each subsystem, together with equivalences
higher equivalences on triple overlaps, and all required coherence data. Thus the causal architecture of a meme can itself be distributed.
31Replication networks as invariant-preserving morphisms
Let be an observable semantic quotient. A network
replicates the -th input relative to if
This generalizes every earlier definition.
| Symbol | Meaning |
|---|---|
| Literal copying. | |
| Capability-relative replication, via localization. | |
| Observer-relative replication, via restriction. | |
| Feature-relative replication, for any chosen observable. |
32Network replication theorem
Theorem32.1Semantics-preserving transformations preserve replication
Suppose satisfies . If is related to by a -semantics-preserving 2-morphism, then also replicates the -th semantic input relative to .
A -semantics-preserving transformation implies . By hypothesis . Therefore .
33Composition theorem
Suppose replicates input relative to , and replicates one input carrying the output of . Then the composite network preserves the original -class.
Theorem33.1Network heredity
If every node along a causal path preserves a semantic invariant , then the entire composite network preserves that invariant along that path.
Each local preservation gives an equivalence . Composition of these equivalences yields . The conclusion is independent of whether the intervening network contains branching, sharing, or feedback, provided the global composite is defined and each relevant preservation equation holds.
34Polynomial syntax and traced execution
The complete picture is now five layers.
specifies the primitive typed operations and their substitution.
specifies parallel composition and resource combination.
specifies sharing and deletion.
specifies feedback.
specifies transformations between networks.
35Formal total specification
A sufficiently rich memetic network theory is a tuple
| Symbol | Meaning |
|---|---|
| Cognitive architectures. | |
| Cognitive coverage. | |
| Semantic ∞-topos. | |
| Semantic type object. | |
| Polynomial monad of primitive transformations. | |
| Symmetric monoidal semantic category. | |
| Sharing structure. | |
| Feedback operator. | |
| Symmetric monoidal (∞,2)-category of networks. | |
| Semantic observable or localization. | |
| Resource valuation. |
36Fundamental equations
Primitive recombination:
Evaluation:
Sharing:
Feedback:
Semantic network evaluation:
Replication relative to :
Semantics-preserving optimization:
37Central structural theorem
Theorem37.1General network memetic replication theorem
Let be a system as above. Then:
- (i) Polynomial monads generate coherent typed tree-shaped transformations. See Proposition 4.2.
- (ii) Commutative comonoid structure extends tree syntax to networks with fan-out and shared subcomputations. See Sections 6–8.
- (iii) Traced symmetric monoidal structure extends acyclic networks to networks with feedback. See Sections 11–14.
- (iv) A symmetric monoidal (∞,2)-category organizes networks and transformations between them. See Sections 20–24.
- (v) Evaluation sends every formal network to a semantic process. See Definition 15.1.
- (vi) Distinct network realizations may evaluate to the same semantic process. See Theorem 18.1.
- (vii) Semantic equivalence does not imply resource equivalence. See Corollary 19.1.
- (viii) Replication relative to an observable is exactly preservation of the corresponding -class. See Section 31.
- (ix) Semantics-preserving optimization preserves replication. See Theorem 27.1.
- (x) The unary, operadic, and capability-localized theories arise as special cases. See Note I and Note II.
38Relation among the successive theories
The entire development can now be organized as a chain of strict generalizations:
Unary dynamics, then operadic trees, then polynomial typed trees, then shared DAGs, then feedback networks.
At the semantic level:
Sets, then spaces, then ∞-topoi, then indexed ∞-topoi.
At the process level:
Functions, then monoidal categories, then traced monoidal categories, then (∞,2)-categories.
These are independent axes of generalization.
39Consequence for the concept of a meme
A meme should no longer be identified with a string, a token, or even merely a point . The full theory distinguishes six levels, and these levels need not determine one another uniquely.
| Symbol | Meaning |
|---|---|
| Semantic state. | |
| Formal construction. | |
| Causal network. | |
| Semantic action. | |
| Observer-relative image. | |
| Resource realization. |
40Final principle
The strongest formulation is therefore:
Memetic replication is preservation of a semantic invariant under a typed network transformation.
The network may contain composition, parallelism, sharing, recombination, feedback, and optimization. What makes it replication is not its graphical form. It is the existence of an invariant such that
Different implementations may realize the same invariant:
They may also differ radically in resource usage:
Hence the semantic object, operational trace, causal network, and physical realization must be regarded as distinct levels. The complete conceptual hierarchy is
Physical realization, then causal network, then semantic process, then observer-relative invariant.
Memetic identity lives at the final level selected by the observer’s semantic modality, whereas replication is the persistence of that invariant through transformations at all preceding levels.