Topologic Reveals the Non-commutativity of XOR S. K. Kwon1* and H. N. Kwon2 1Department of Physics, Pohang University of Science and Technology, Pohang 37673, Republic of Korea 2Department of Economics and Division of Computer Science, Hanyang University, Ansan 15588, Republic of Korea *Correspondence:
[email protected] Abstract Logic has traditionally been confined to symbolic algebra. Here we present topologic, a framework in which logical operations are realized as spatial configurations of open sets. Although the algebraic truth table satisfies 𝐴 ⊕ 𝐵 = 𝐵 ⊕ 𝐴, their topological realizations do not. When a closed loop is traced around the logical origin, the two orders yield opposite holonomy values, Φ(𝐴 ⊕ 𝐵)= +1, Φ(𝐵 ⊕ 𝐴) = −1. This ±1 invariant is the minimal quantitative expression of logical noncommutativity—an orientation of logical space that cannot be removed by any algebraic rewriting. The logical plane divided by two variables, 𝐴 and 𝐵, produces four regions under the sign symmetry ℤ2× ℤ2. Within this space, AND, OR, and NOT appear as simply connected open sets, while XOR forms a one-point-connected open set that exposes a hidden non-commutativity of logical space. This representation resolves the incompleteness of symbolic logic and establishes a self-consistent geometric foundation for reasoning. Classical logic remains intact at the level of truth values, but topologic endows it with a spatial structure that classical notation could never make explicit. 1 Fundamental structure of topologic Classical Boolean algebra enforces commutativity at the symbolic level, 𝐴 ⊕ 𝐵 = 𝐵 ⊕ 𝐴,
but this symmetry conceals a deeper structural incompleteness. By suppressing orientation and irreversibility, it removes precisely the geometric features that characterize both computation and nature. As a result, classical logic cannot distinguish operations whose spatial realizations differ, nor can it capture the intrinsic non-commutativity that governs physical processes. Topologic restores this missing structure by revealing that logical operations reside not only in truth values but in the geometry of the space in which they act. Each logical variable divides the plane into positive and negative regions. When two variables 𝐴, 𝐵 act together, four open domains arise: 𝐴±𝐵±. They form the minimal topologic cell that contains all logical states. By attaching regions along their common boundaries, one obtains the visible form of logical operations. The basic operations— AND, OR, and NOT—are simply connected open sets without interior singularities. They preserve adjacency and orientation within a continuous domain. For definiteness, each logical region is treated as an open topological domain whose boundaries are shown only for visualization. The identifications used in XOR act on boundary points but do not alter the openness of the domains. Definition. Let 𝐴, 𝐵 ⊂ ℝ2be open sets divided by the sign-symmetry group ℤ2× ℤ2. The four regions 𝐴±𝐵± constitute the minimal topologic cell. The XOR operation defines the quotient space 𝑋𝐗𝐎𝐑 = (𝐴+∩ 𝐵−) ∪ (𝐴−∩ 𝐵+)/∼, where the equivalence ∼ identifies a single boundary point 𝑝0 joining the two disjoint regions. The equivalence relation identifies the boundary point where the two diagonally opposite regions meet under the sign symmetry. Only this single boundary point is collapsed, producing a one-point-connected space. The resulting one-point-connected open set reveals the topological origin of noncommutativity in logic. This framework does not alter the truth-functional content of classical logic; it provides a geometric representation that makes explicitly visible the topological structure that symbolic notation conceals. XOR is different. It connects two disjoint open regions at a single boundary point. This point acts as a branch: an unstable equilibrium where the system can enter either
region. The identification of these two regions at that point defines a one-point-connected open set. That connecting point is not merely a topological curiosity; it represents the logical transition itself. In electronic and quantum circuits, the same structural point corresponds to switches, tunneling junctions, or state transitions. Thus the XOR cell of topologic precisely depicts a universal mechanism of change that symbolic logic could not express. No additional axioms or hypotheses are required in this construction; the noncommutative structure arises solely from the topology induced by the sign symmetry. Every conclusion follows directly from the geometry of the space. 2 Topological and physical interpretation If one traces a closed loop around the origin of the XOR diagram, moving counterclockwise through its four regions, a ± holonomy appears—the geometric phase of logical space. This is the topological remnant of the non-commutative structure: a rotation in logical coordinates that cannot be removed by any algebraic substitution. For physicists, this feature directly echoes the concept of Berry phase and gauge curvature in field theory. What was once a symbolic gate now possesses a measurable topological orientation. The decisive evidence for this structure comes from the holonomy accumulated along a closed path around the identified point of XOR. The two orders of evaluation yield opposite topological charges, Φ(𝐴 ⊕ 𝐵)= +1, Φ(𝐵 ⊕ 𝐴) = −1, establishing a quantitative, orientation-dependent invariant of the logical plane. This ±1 value is the minimal form of gauge curvature generated by the one-point identification that defines XOR, and it persists under all continuous deformations of the space. No symbolic substitution or algebraic manipulation can remove this topological residue: it is the irreducible geometric imprint of non-commutativity in reasoning. The holonomy Φ is the topological remainder produced by the oriented gluing of two sign-defined regions at a single logical point. No differential geometry is required: the invariant simply records whether a loop crosses that point with positive or negative orientation. This ± sign is the smallest non-trivial topological degree residing in a logical operation. Thus XOR introduces not only a truth value but a topological orientation, revealing
that non-commutativity is a geometric phase intrinsic to reasoning. Logical space therefore admits not only static relations but ordered paths. Topology, usually timeless, becomes sequential. This is the new territory that topologic opens: reasoning as motion, inference as trajectory. Classical symbolic logic contains relations but no order; topologic restores the lost sequence of transformation. The non-commutative holonomy can, in principle, be observed as an orientationdependent switching behavior in physical XOR circuits, where connection order affects measurable states. The dependence of an operation on the order in which it is applied does not arise from symbolic rules but from the connectivity and path structure of the underlying space. The way two regions are attached, the transitions across their boundaries, and the holonomy accumulated along closed loops form invariants that persist under all changes of coordinates, representation, or algebraic rewriting. Non-commutativity is therefore not an algebraic accident but a topological invariant: like curvature or holonomy, it may change in magnitude but cannot vanish under any continuous deformation. This is why XOR retains its asymmetry even when symbolically rewritten, why rotations in three dimensions fail to commute regardless of basis, and why the position– momentum commutator remains non-zero in every physical representation. The asymmetry persists under all continuous deformations that preserve the gluing pattern of the two regions. Because no homotopy can remove the identified point without disconnecting the space, the ordering asymmetry is topologically protected. Non-commutativity is thus a structural topological quantity—an invariant imprint of how a space is glued, oriented, and traversed—rather than a feature of the symbols used to describe it. 3 Algebraic interpretation on the projective plane In the topologic representation, XOR is not merely a composite of AND, OR, and NOT. It constitutes a projective substructure generated by the sign-symmetry action on two coordinates. The XOR operation maps antipodal points across the logical plane into a single equivalence class, forming a quotient space that is topologically reminiscent of a patch of ℝℙ2, though not the full manifold. Within this topology, each logical state acquires orientation, and XOR acts as the transformation that reverses that orientation across the boundary.
Such a projective substructure has no place in classical symbolic logic, which assumes commutative combination and lacks spatial identification of antipodal elements. Yet logic requires this structure to represent transitions, reversals, and dualities faithfully. Without it, symbolic logic remains incomplete, unable to encode the non-orientable nature of reasoning itself. Topologic supplies this missing element, embedding logic in a space that naturally contains its symmetries and reversals. 4 Significance for logical and physical systems Figure 1 presents the fundamental diagram. It visualizes all primary logical operations within one geometric frame. The implications extend directly to the theory of neural computation. The classical requirement that a neural network must employ nonlinear activation functions to solve the XOR problem has long been treated as an algebraic limitation. Topologic reveals that the true source of this necessity is the topological irreversibility of the logical space itself: the XOR operation carries a non-trivial holonomy Φ = ±1 , indicating that its two orders inhabit different topological orientations. Instead of merely introducing nonlinearity, these activations act as alignment operators, reconfiguring the input manifold so that its orientation matches the holonomy imposed by the XOR cell. In this sense, nonlinear activation is not merely a computational trick but the network’s mechanism for realizing the non-commutative topology inherent in the data. This orientation is not a purely mathematical artifact. In physical XOR circuits, the ±1 holonomy can manifest as subtle but measurable differences in voltage thresholds, propagation delays, switching times, or energy dissipation, depending on the order in which signals traverse the junction. The orientation enforced by XOR introduces a subtle directionality into logical computation—an asymmetry that cannot be undone without altering the topology of the space. The same diagram is directly applicable to the analysis and design of logical, electronic, and quantum circuits. In these domains, the visible transitions and asymmetric junctions correspond to real components—transistors, gates, couplers—whose behavior depends on connection order. Conventional circuit diagrams, though practical, obscure the topological relations that govern these transitions. Topologic clarifies them by giving reasoning itself a spatial representation.
Symbols are insufficient containers for spatial meaning. They describe relationships yet suppress orientation and adjacency. This is why symbolic logic has long appeared commutative: it lacks access to the geometric asymmetry inherent in reasoning. When logic is expressed as topology, that hidden structure becomes visible and consistent. The framework is minimal yet complete, unifying algebraic reasoning with physical form. Nature is intrinsically non-commutative and therefore irreversible: time does not run backward, and interactions depend on the order in which they occur. The commutative form of classical dynamics is an approximation that suppresses this structure, and the well-known paradoxes of thermodynamics arise precisely from this suppression. Quantum mechanics restores the hidden structure—spin algebra, the position– momentum commutator, and the irreversible character of time evolution all reflect the underlying non-commutativity of reality. In this sense, XOR provides the minimal logical analogue of a fundamental physical fact: non-commutativity is not optional, but structural. 5 Conclusion Operations on open sets produce new open sets in the same space, enabling logic to act upon and reconstruct the very structure to which it belongs. This establishes a closed and self-consistent framework in which logic and space mutually define one another. Classical symbolic and formal logical systems intentionally removed this possibility, thereby creating the familiar hierarchy of meta-levels and the resulting structural incompleteness. By restoring self-reference through spatial operations, topologic circumvents this limitation and recovers the natural completeness of systems whose dynamics emerge from their own geometry. These results involve no speculative assumptions: the entire framework follows inevitably from the topology of the logical plane. A logical operation is therefore represented not by a single Boolean result but by a pair 𝐿(𝐴, 𝐵) = (𝑅(𝐴,𝐵), Φ(𝐴, 𝐵)). This representation is not an informal reinterpretation but the basis of a structured formal system. In the extended framework, subsequent compositions of logical operations naturally inherit both components of
𝐿 = (𝑅, Φ). While the detailed algebra of these compositions is the subject of future work, the topological index Φ behaves analogously to a gauge-like orientation: it accumulates, transforms, or cancels depending on the sequence of operations. Rather than extending Boolean logic, topologic operates on a geometric layer that Boolean algebra cannot access, enabling reasoning processes that depend on spatial orientation that the former cannot encode. For commutative operations such as AND and OR, the topological index is trivial, Φ = 0. While the two orders of XOR yield the same Boolean outcome, their topological states belong to different equivalence classes: the holonomy 𝚽 is not merely a number but a structural label that governs how successive logical operations accumulate orientation. It captures a fundamental feature of nature that commutative logical systems are structurally unable to express. Topologic elevates reasoning from symbolic algebra to geometric order. It resolves the structural incompleteness of symbolic logic by embedding it in space. Logical operations become open sets, their connections continuous yet directional. Non-commutativity arises naturally as an orientation of reasoning, not as an anomaly. The theory is compact, visual, and self-consistent. Logic, when drawn, reveals its hidden geometry. What appeared abstract becomes tangible. Logic is the language of science, mathematics its grammar, and physics its poetry. In this diagram they converge: a simple figure that expresses truth with quiet beauty, unveiling the unseen structure that has always governed thought. 6 Foundational statement Classical logic confined its foundations to AND and OR, treating XOR as a derivative operation. In doing so, it constrained the freedom of logic itself—forcing every operation into commutativity and removing the very mechanism that could explain asymmetry in the real world. This confinement silenced the natural dynamics of reasoning. With the emergence of topologic, that constraint is lifted. The foundation of logic is no longer algebraic but geometric; not imposed by symbols but revealed by the structure of space. Topologic does not extend classical logic, just as quantum mechanics does not extend classical mechanics—it transcends it.
This is not a construction built upon prior research, but a discovery of what has always existed in nature, unnoticed until now. The foundation is established. It is now time to build upon it. Figure 1 | The topologic cell and its derived logical operations. The logical plane (𝐴, 𝐵) splits into four sign-defined open sets. Each operation corresponds to a topological manipulation of this plane: AND and OR are simply connected unions of regions, whereas XOR produces a one-point-identified open set. This singular attachment reveals that XOR is intrinsically non-commutative—its value depends on the ordering of the gluing, 𝐴 ⊕ 𝐵 ≠ 𝐵 ⊕ 𝐴. When a closed loop 𝐶 is traced around the logical singularity 𝑝0, the holonomy (𝚽), which represents the minimal gauge curvature of the logical space, is computed as Φ = ∮𝐴 ∙ 𝑑𝑠 𝐶. Panels (g) and (h) show the two ordered sequences, yielding opposite topological charges: Φ(𝐴 ⊕ 𝐵) = +1 and Φ(𝐵 ⊕ 𝐴) = −1. This ±1 invariant formally establishes the noncommutativity as an irreducible geometric feature. The topologic cell thus serves as the minimal spatial unit of logic. Panels display (a) Topologic cell, (b) 𝐴, (c) 𝐵, (d) NOT, ¬𝐴, (e) AND, 𝐴 ∧ 𝐵, (f) OR, 𝐴 ∨ 𝐵, (g) XOR, 𝐴 ⊕ 𝐵, and (h) XOR, 𝐵 ⊕ 𝐴. References 1. Boole, G. An Investigation of the Laws of Thought (Walton & Maberly, London, 1854). 2. Frege, G. Begriffsschrift: Eine der arithmetischen nachgebildete Formelsprache des reinen Denkens (Halle, 1879). 3. Russell, B. & Whitehead, A. N. Principia Mathematica (Cambridge Univ. Press, Cambridge, 1910–1913). 4. Tarski, A. Introduction to Logic and to the Methodology of Deductive Sciences (Oxford Univ. Press, New York, 1941). 5. Stone, M. H. The theory of representations for Boolean algebras. Trans. Am. Math. Soc. 40, 37–111 (1936). Declarations Competing interests The authors declare no competing interests. Data availability No datasets were generated or analysed during the current study.