Manuscript Offprint
arXiv:2611.01625Classification of non-Leibnizian Strings
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Furkan Semih Dündar
Department of Mechanical Engineering, Amasya University Amasya, Türkiye
Wolfram Institute for Computational Foundations of Science Illinois, USA
Leibnizian ideas in foundations of physics has enjoyed a renewed interest. Cyclic string ontology in Wolfram Model multiway rewriting systems has been found to encode finite dimensional quantum systems where what are called as Leibnizian strings have been employed. It has then become important to classify strings in terms of their ability to correspond to a monadic interpretation à la Leibniz. The definition of Leibnizian strings are rather quite non-linear and for that purpose we classify non-Leibnizian strings for which there is a simpler criterion on maximal neighborhoods of characters. If a string is not non-Leibnizian then it must be Leibnizian. We found out three canonical forms of non-Leibnizian strings and noted that two of them are context-free languages whereas one is not.
Keywords: Leibnizian philosophy, non-Leibnizian strings, classification, context-free languages.
1. Introduction
Leibnizian ideas in foundations of physics, such as monads, have gained a revival in recent years, though somewhat limited. The origin of this trend can be traced back to Barbour and Smolin's work [1] and Barbour's Ref. [2]. There are studies [3-5] that directly employ Leibnizian ideas and others [6-8] that considers the notion of a 'view'. Here the term view corresponds to the Leibnizian notion of the view of a monad.
In order to investigate Leibnizian ideas in physics, the cyclic string ontology is a useful ground to test ideas. It is not trivially simple yet it is not as complex as the hypergraph ontology of Wolfram Model [9]. For a mathematical account of Wolfram Model see Refs. [10,11]. Recently, a study [12] has appeared that uses Leibnizian ideas in Wolfram Model multiway rewriting systems to encode finite dimensional quantum systems. In that study, only Leibnizian strings have been used. In essence in a Leibnizian string each character is distinguished locally by their neighborhoods (by their 'views') whereas in non-Leibnizian strings, there are at least two characters that have isomorphic neighborhoods
Complex Systems, Volume (year) 1-1+; year Complex Systems Publications, Inc.
at the maximum allowable radius. It has then become important to classify strings as either Leibnizian or non-Leibnizian and understand the nature of distinction between the two cases. In this paper we classify all non-Leibnizian strings over an alphabet . We find out three possible forms of non-Leibnizian strings and express that although two cases belong to context-free languages one case is not context-free and is rather context sensitive.
Formal languages has an important place in discussion of pregeometry and representing fundamental physics [13]. In this respect, studies on Leibnizian or non-Leibnizian strings, which are formal languages, are important in order to fully investigate the indications of works such as Ref. [12].
The organization of the paper is as follows. In Section 2 we provide preliminary background material. In Section 3 we classify all possible non-Leibnizian strings. In Section 4 we consider the formal language of non-Leibnizian strings. In Section 5 we conclude the paper with directions for future studies.
Definition 2.1 (Maximum radius) For a string of length , the maximum radius of a character is defined to be . If is odd, then or if is even, .
Definition 2.2 (String isomorphism) Two strings are deemed as isomorphic if they are the same or one is the mirror symmetric counterpart of the other.
Definition 2.3 (non-Leibnizian strings) A string is non-Leibnizian if two characters at different locations share isomorphic neighborhoods with the maximum radius , or if the string includes a single occurrence of a character.
Example 1. These are examples for non-Leibnizian strings:
-
aaaaaa
-
abbbbb
-
ababab
-
abccba
If there is only one element in the strings are trivially non-Leibnizian. From now on we consider an alphabet that has at least two letters. For completeness, we provide a definition of Leibnizian strings.
Definition 2.4 (Leibnizian strings) If a string is not non-Leibnizian it is called as Leibnizian.
In Leibnizian strings, each character is distinguished by local neighborhoods of radius less than or equal to . That property allows one to model Leibniz's monads by defining the 'view' of monad as the smallest neighborhood that is not isomorphic to other neighborhoods. Then due to Leibniz's identity of indiscernibles principle each monad is found to be unique as required. Hence Leibnizian strings can model monads whereas non-Leibnizian strings cannot model monads because in those there are at least two characters whose neighborhoods are not distinguished even at the maximum radius. That would mean 'equal' monads, which are not allowed in Leibnizian philosophy.
Because in the present study we focus only on non-Leibnizian strings and their classification, we do not consider Leibnizian strings, their monadic interpretation and the associated Barbour-Smolin-Deutsch variety [1] (the term is coined in Ref. [3] in the form of an acronym: 'BSD Variety'). For more please see Refs. [1,3,4,12].
3. Classification of non-Leibnizian Strings
In this Section, we classify all non-Leibnizian strings. If a string includes a single occurrence of a letter then the string is trivially non-Leibnizian. From now on we neglect those cases and suppose that any letter that is included in the string occurs more than once. As mentioned previously in a non-Leibnizian string there are two characters with isomorphic neighborhoods at the maximum radius . Due to nature of string isomorphism there are two cases:
-
(Case-I) Neighborhoods are equal to each other.
-
(Case-II) One neighborhood is the mirror symmetric equivalent of the other.
On the other hand, we differentiate the cases of strings with odd or even length. This is because the maximum neighborhood of a character in a string of odd length includes all the string, however the maximum neighborhood of a character in a string of even length leaves out a single character. The main reason is that the number of characters in
This principle basically means that if all the properties of two entities are the same, then they are the same entity. For a detailed discussion please refer to Ref. [14].
a maximum radius neighborhood is where as the string length is and for odd and even L respectively.
We suppose that the first character and the 'th character has isomorphic neighborhoods. Without any loss of generality we assume . The cases for can be obtained by cyclically rotating the string until the 'th character is placed in the first location of the string. We will need a theorem about string commutation, which we provide below.
As a short note on notation, we use lower-case Greek letters to denote single characters and upper-case Latin letters to indicate strings which may be empty as well. When we place letters or strings sequentially we suppose that they are concatenated. Moreover corresponds to transpose of a string S, that is, the string S in reverse order.
Theorem 3.1. Let be two strings over the alphabet . If holds, then either for some string or for some where .
Proof. Let be the greatest common divisor of and . First we suppose . Without any loss of generality we can suppose . When we map we obtain the same equation, namely . As long as we can use this map and obtain where . Note that the greatest common divisor of and is still one. In this case we have and apply the same mapping as before and obtain where . At the end, we will obtain an equation of the form where one of or will consist of a single character which will cause and to consist of a repeating single character. When one goes in the reverse direction the result and is obtained for some .
We now focus on the second part of the proof. In this case holds. We can write . Because is the greatest common divisor, it is seen that and are co-prime. We can write and where each of and have the length . Because all of these substrings have the same length we can consider and to be strings over some generalized alphabet which consists of and , formally . When considered in this way, we see that the only solution is and for some string of length .
Corollary 1. If strings have equal number of letters and , then .
3.1 Case-I
In this subsection we consider non-Leibnizian strings that are deemed as such using the neighborhood isomorphism in Case-I. To iterate, if and are two maximal neighborhoods then we need to have .
3.1.1 Odd L
Here we consider strings of the form . We suppose that the two characters at two different locations (index-1 and index-j) have equal maximal neighborhoods. Without loss of generality we consider . Larger values can be obtained by cyclic rotations of the string.
In order to illustrate the neighborhood structure of each , we repeat the string S three times and obtain . This representation is useful to see the neighborhoods of characters considering the cyclic boundary condition.
We indicate each neighborhood as and where are strings of length . Because , the string must be of the form for some and similarly must be of the form for some . Equating , and noting that for odd maximal neighborhoods cover the whole string we can write:
When we cyclically shift towards right by amount, we should obtain the same string, since we are considering Case-I symmetries. Hence we obtain (where we let ):
This equation is in the form of that we considered before, where now and . Here we have . The length of is and the length of is . Hence we obtain and . If these two numbers are co-prime, then the only solution is and where in the end
Now we suppose that these numbers are not co-prime and hence there is a string with at least two characters such that and for . We see that . It is also evident that for some . In this case we obtain (after changes of notation):
where for any string such that a is an integer.
3.1.2 Even L
In the case of even there is a subtlety. It is that in this case the maximal neighborhoods do not cover the whole string and leaves out exactly one character. The structure of neighborhoods is the same as in odd case that we just discussed. But in this case the whole string is in the form of for some characters where and . Let us write down the maximal neighborhoods:
and considering that the whole string is for some ,
When we rotate to right by steps we should obtain . For that purpose we let where . We now have the following equality:
If , this equation is in the form of . If the greatest common divisor of and is greater than 1, for some string we have and . The first character of is . In this case we obtain a string of the following form:
where for any string such that is an integer. On the other hand if and are co-prime then only solution is and all the string that appear is for some suitable for each string. The solution is a uniform string:
So far we have considered the case and we now suppose . Let us remember the equation we need to solve:
We propose that this equation has no solution if . For simplicity let us define and . Then the equation is:
The idea is to use recursion. It is evident that . We map for some and we obtain . Now . We now map for some and obtain . This process ends if or , where ‘ ’ denotes the empty string. If then we have and . If then we have . We have a solution if . If then we have no solution for . Let us see this in the following way. Since we map for some integers and we obtain . In both of these cases we get which is a contradiction, since we supposed that . Hence in this case there is no solution.
3.2 Case-II
In this subsection we consider non-Leibnizian strings that are deemed as such using the neighborhood isomorphism in Case-II. To iterate, if and are two maximal neighborhoods then we need to have .
3.2.1 Odd L
We use the same parameterization of the string as . We have and . Because , and for some strings . Hence and . Since for Case-II we have we obtain:
Here we see that because and . On the other hand we have , which yields:
Observe that meaning that is symmetric. Hence the result of this part is as follows:
where and . Since L is odd, we also require that is an odd number.
3.2.2 Even L
The setup is the same as previous subsection on Case-I for even . We write . The neighborhoods are then and . In Case-II we have and this results in:
Since we need to have , and . For some we have and where cyclic boundary condition is considered. When we shift by we should obtain as it is previously expressed in the beginning of this part. We also shift by we again obtain . These indicate the following equation holds
and we have
If we obtain , and the form of is then expressed as
where , and is even. Now suppose . Let us define and . We have
We map for some . Then the equation becomes which has the same form. Since in the end we will have and where . If we let we get which implies which is a contradiction since we assumed . Hence there is no solution if .
3.3 All Possible Forms of non-Leibnizian Strings
To summarize the results of this Section, we express that if a string is non-Leibnizian then it belongs to one of the following cases, where : 1) has a character that occurs only once. for all such that , 2) has symmetric substrings. where and , 3) is periodic. for some integer . We can further generalize these and write
-
has a character that occurs only once. for all such that .
-
has symmetric substrings. where and .
-
is periodic. for integer and string .
These are the canonical forms of non-Leibnizian strings. One is allowed to generate others by cyclic string rotations.
4. Language of non-Leibnizian Strings
Let us define the following sets:
It is easy to show that and are context-free languages. However is not. We construct context-free grammars for for . In these we consider an alphabet with two letters . These grammars can be generalized for alphabets with more than two letters.
It is seen that these three sets are not mutually exclusive. In particular , and . For an illustration, please see Figure 1.

Figure 1. Venn diagram illustration of the sets.
In general is not a proper subset of . However if there are only two letters in the alphabet, . Let . The elements of are of the form or which are always in for and , or vice versa.
Let us now give examples that are at the intersection of two sets. Let . If and this string belongs to both of and . If then the string is an element of both and . There is no intersection between and because in elements of the former set a character occurs only once where as in the latter set the strings are periodic and for that purpose it does not include a single occurrence of a specific letter.
4.1 The language
is a context-free language. The context-free grammar for the language is as follows:
4.2 The language
is a context-free language. The context-free grammar for the language is as follows:
4.3 The language
The language is not a context-free language. We show that using what is called as the pumping lemma. It is expressed as follows:
Lemma 1 (The pumping lemma [15]) Suppose that is a context-free language. Then there is and for any string with it can be written as such that the following conditions are satisfied:
Theorem 4.1. The language is not context-free.
Proof. Let be the pumping length. We consider the string and define . Initially we see that cannot be a substring of or , otherwise . There are two cases: is a string of the form or for with .
We consider the first case, where is found in the first half of without any loss of generality. There are three cases:
When one considers with these parameters, one cannot obtain a periodic string. Hence . We now consider the last option: . We have three decompositions:
As well as in this case, we cannot obtain a periodic string . Hence the string cannot be pumped and the language is not a context free language. The key idea here is that if then the string should begin with the letter ‘a’ and end with the letter ‘b’. When one considers the form of decomposition in both cases, it is seen that for some . For all the six decompositions this form is not obtained. Hence is not a context-free language.
□
5. Conclusion
As Leibnizian ideas gain more visibility in foundations of physics it has become important to understand the distinction between Leibnizian and non-Leibnizian configurations, presently in the string ontology. It is a quite useful exercise of thought to consider the string ontology. It is not as complex as the (hyper-)graph ontology yet it is quite useful to be used to model physics.
Understanding the Leibnizian structure of strings is important in order to make contact with known physics. Especially see Ref. [12] in this regard. That study considers Leibnizian strings to emulate finite dimensional quantum systems using Wolfram Model multiway rewriting systems.
In this study we concerned ourselves with the problem of classifying all non-Leibnizian strings. We have found three canonical cases for the form of such strings. We have determined that the first two are context-free languages whereas the third class could not be expressed by a context-free language.
As a future research direction, one may consider classifying all non-Leibnizian (hyper-)graphs. That will contribute to understanding the Leibnizian nature of various ontologies.
References
[1] Julian Barbour and Lee Smolin. Extremal variety as the foundation of a cosmological quantum theory. arXiv preprint hep-th/9203041, 1992.
[2] Julian Barbour. The deep and suggestive principles of Leibnizian philosophy. The Harvard Review of Philosophy, 11(1):45–58, 2003.
[3] Furkan Semih Dündar. A case study for Leibnizian ideas in Wolfram Model. Foundations of Physics, 54(3):43, 2024.
[4] Furkan Semih Dündar. A use of variety as a law of the universe. Complex Systems, 31(2), 2022.
[5] Dean Rickles, Hatem Elshatlawy, and Xerxes D Arsiwalla. Ruliology: Linking computation, observers, and physical law. In Quantum Gravity and Computation, pages 244–276. Routledge, 2023. arXiv:2308.16068.
[6] Lee Smolin. Views, variety and quantum mechanics. 2021. arXiv:2105.03539.
[7] Lee Smolin. Views, variety, and celestial spheres. Time and Science, 3:239–268, 2023. arXiv:2202.00594.
[8] Lee Smolin. Quantum mechanics and the principle of maximal variety. Foundations of Physics, 46(6):736–758, 2016.
[9] Stephen Wolfram. A class of models with the potential to represent fundamental physics. Complex Systems, 29(2):107–536, 2020.
[10] Xerxes D. Arsiwalla and Jonathan Gorard. Pregeometric spaces from Wolfram model rewriting systems as homotopy types. International Journal of Theoretical Physics, 63(4):83, 2024.
[11] Xerxes D. Arsiwalla, Jonathan Gorard, and Hatem Elshatlawy. Homotopies in multiway (non-deterministic) rewriting systems as n-fold categories. 2021. arXiv:2105.10822.
[12] Furkan Semih Dündar, Xerxes D. Arsiwalla, and Hatem Elshatlawy. Quantum gates from Wolfram Model multiway rewriting systems. 2025. arXiv:2512.20587.
[13] Xerxes D. Arsiwalla, Hatem Elshatlawy, and Dean Rickles. Pregeometry, formal language, and constructivist foundations of physics. In Quantum Gravity and Computation, pages 137–159. Routledge, 2023. arXiv:2311.03973.
[14] Gonzalo Rodriguez-Pereyra. The Identity of Indiscernibles. In Edward N. Zalta and Uri Nodelman, editors, The Stanford Encyclopedia of Philosophy. Metaphysics Research Lab, Stanford University, Summer 2025 edition, 2025.
[15] Michael Sipser. Introduction to the Theory of Computation. Cengage Learning, 3rd edition, 2013.