1 Introduction

Despite the unquestionable successes of the natural sciences, which in modern times adopted the methodology of mathematical deduction and empirical experiments as means for testing the validity of hypotheses, our knowledge of the world is still incomplete. This fact is stressed by both the scientists working on the “theory of everything” and the philosophers supporting scientific realism. As realists, they believe that our best scientific theories describe the world as it is (at least to an approximation) and that the terms used in these theories refer to actually existing objects and qualities. However, accepting that our knowledge is incomplete is often treated as implying some form of epistemic antirealism encapsulated, to a degree, in Niels Bohr’s opinion that “[i]n our description of nature, the purpose is not to disclose the real essence of phenomena but only to track down, as far as possible, the relations between the multifold aspects of our experience (Bohr, 1934).”

At the end of the twentieth century, Worrall (1989) took it upon himself to put an end to the realist-antirealist debate by introducing the concept of structural realism (SR) into the contemporary philosophical discourse as offering “the best of both worlds”. This proposal seemed appealing for several reasons: it is directly related to contemporary scientific practice; it is supported by intuitions common to both sides of the debate; and, as it later turned out, it can withstand not only the classic “no miracles” counterargument leveled against antirealists, but also the so-called “pessimistic meta-induction” (Arenhart & Bueno, 2015). The first argument expresses a powerful intuition against anti-realism, stating that realism “is the only philosophy that doesn’t make the success of science a miracle” Putnam (1975). On the other hand, the pessimistic meta-induction, that is commonly used against traditional realism, is motivated by the observation that there are many theories “[that] were once successful and verified, but which contained key terms that turned out (as we think today) to lack any material referent” (Laudan, 1984).

According to Worrall (1989), the standard version of scientific realism, which assumes that the nature of the unobserved objects justifying natural phenomena is well understood and described by our scientific theories, is untenable, particularly in light of the radical changes being observed in modern physical theories. Nevertheless, this does not mean that we should adopt an antirealist stance towards science, accepting the uncanny concurrence of our theories with experience as a “miracle”. On the contrary, we should commit ourselves to the unchanging mathematical or structural content of these theories, which is being transmitted from theory to theory, and instead adopt a structural realism stance. This idea honors the intuition imbedded in scientific realism while simultaneously avoiding the pessimistic meta-induction (not committing us to a belief in the scientific description of the “furnishings” of our world) and the antirealist intuition, without entangling us in the problem of accepting the success of the contemporary sciences as “miraculous” (committing us to the assertion that the structure of our theory, separate from its empirical content, correctly describes reality).

Presently, there are many forms of structural realism, which combine issues relevant to debates in metaphysics, epistemology, philosophy of science, and scientific methodology (French & Ladyman, 2003; Landry & Rickles, 2012; French, 2014; Beni, 2019; Beni & Northoff, 2021; Gonzalez, 2020). Towards the end of the last century, Ladyman (1998) made a general distinction between epistemic and ontic versions of the concept. Nowadays, the most frequently discussed and developed is ontic structural realism (OSR), whose main thesis, in its most radical form, states that “all that there is, is structure” (da Costa & French, 2003), in opposition to a slightly weaker epistemic version (epistemic structural realism-ESR), saying that all we get to know about the world is its structure (Brading & Crull, 2017).

Today, OSR is thought to be the philosophy of science that bears the most promise with regard to realism. But even such a specific view has received several variations, emphasizing all sorts of subtleties in the understanding of structure, its relationship to the physical world, or the relationship between objects and relations. Ladyman (2020) subdivides OSR into seven different positions of varying degrees of metaphysical strength or tendentiousness. Esfeld & Lam (2010) spell out five different accounts of the relationship between objects and relations-three of which are versions of OSR. What is, however, common to all of them is treating the ramifications of our most successful contemporary physical theories (quantum field theory, general and special relativity, quantum chromodynamics, quantum topology, etc.) as suggesting a view of the world which calls into question the “traditional” metaphysical world-picture (Ladyman & Ross, 2007). One can, therefore, understand OSR as an approach that calls attention to a problem of the individuation and representation of objects in our contemporary scientific (especially physical) theories. And given the evident significance of whether our best theories about the world are genuinely true or not, there is a clear motivation to articulate OSR as precisely as possible (Arenhart & Bueno, 2015). This requires, among other things, its placement within an appropriate formal framework.

In this paper, I will briefly present the problem of structural representation in the OSR context, focusing on two main formal representations of relevant structures that appear in the literature: set theory and category theory. Faced with the theoretical and philosophical implications of the initially assumed, set-theoretic, formalism, OSR was from the beginning exposed to criticism concerning its fundamental notions, such as the seemingly incoherent concept of structure that requires the existence of ’relations’ without ’relata’. In recent years, however, trying to preserve the main ideas behind OSR and get rid of the theoretical obstacles at the same time, some proponents of the approach have introduced the formalism of category theory as an elegant way out. The aim was to take advantage of the newly developed formalism that represents a shift in focus from ’relata’ to ’relations’. Now, however, the crucial question arises: which one of those two formalisms–set theory or category theory–better articulates the fundamental notion of structure and serves the OSR’s purposes?

To contribute to the discussion concerning the expressive powers of both formalisms, I will turn to contemporary scientific practice and investigate the cases where such a choice has been made as well, unraveling the reasons behind picking the “appropriate” formal framework in a particular research setup. Examining the motivations behind such choices, together with the already existing literature on OSR, will allow us to draw conclusions about some crucial features those two frameworks possess and which seem to be decisive in their scientific and philosophical applications. Seeing the role those formal frameworks play in shaping our view of “reality”, I will explore a hypothesis stating that we should, similarly to scientific practice, make use of the interplay between the specific powers of different representational methods, adopting a pluralistic-in opposition to standard, unificatory-approach to the question of structural representation in OSR.

2 Representing the structure: set theory vs. category theory

Structural realism, especially its ontic version, has attracted the most sympathy among philosophers of physics and physicists. Their interest seems natural, since (French and Ladyman, 2011) introduced OSR as a position motivated by two main concerns of contemporary philosophy of science: the problem of identity and individuality (regarding quantum objects, spacetime points, etc.) and scientific representation, in particular the role of models and idealizations in physics. “In most general terms, any representation that is the product of a scientific endeavor is a scientific representation. These representations are a heterogeneous group comprising anything from thermometer readings and flow charts to verbal descriptions, photographs, X-ray pictures, digital imagery, equations, models, and theories” (Frigg & Nguyen, 2020). Some of these representations, in particular models and theories used in contemporary science, are highly mathematized—and it is exactly these irreducible mathematical features that are crucial to their representational function.

This mathematical and formal aspect of representation lies at the heart of scientific structuralism, which originated in the so-called semantic (or model-theoretic) view of theories developed in the second half of the twentieth century. The idea behind it states that scientific theory is best thought of as a collection of its models, as opposed to the syntactic approach, focusing mainly on the mathematical content of a theory expressed through equations and reconstructed in terms of sentences cast in a meta-mathematical language (such as Ramsey’s sentence (Ramsey, 1929)). Proponents of the semantic view assume models to be structures, representing their target systems in virtue of certain morphisms (isomorphisms, partial isomorphisms, homomorphisms, etc.) existing between them. This idea was articulated by Suppes, stating that “the meaning of the concept of model is the same in mathematics and the empirical sciences” (Suppes, 1960).

Although one can find a number of different concepts of structure being discussed in the literature (Thomson-Jones, 2011), by far the most common in the OSR context is the one grounded in set theory and mathematical logic (Suppes, 1967; French, 2014; Halvorson, 2013). “A structure S in that sense (sometimes [called] “mathematical structure” or “set-theoretic structure”) is a composite entity consisting of the following: a non-empty set U of objects called the domain (or universe) of the structure; and an indexed set R of relations on U (supporters of the partial structures approach, e.g., (da Costa & French, 2003) or (Bueno et al., 2002), use partial n-place relations, for which it may be undefined whether or not some n-tuples are in their extension)” (Frigg & Nguyen, 2020). By defining the concept of a “shared structure” between models in terms of relevant functions determined between the analyzed mathematical and empirical structures, the semantic view seems to be a natural move for the scientific structuralist, since it provides a neat explanation of how mathematics is used in scientific modelling. It also honors the popular position that sees mathematics as the study of structures (Mac Lane, 1996; Resnik, 1997; Shapiro, 2000; Hellman & Shapiro, 2019). Such an approach gives us a hierarchy of models between “higher” theoretical structures and the lower phenomenological and empirical ones. One can also witness a form of horizontal spreading as models are conjoined in order to explain a given phenomenon. Such mappings between the model and the target system allow us to convert truths about the model into claims about the target system. Proponents of this view tend to refer to the other words of Suppes: “What we can do is to show that the structure of a set of phenomena under certain empirical operations is the same as the structure of some set of numbers under arithmetical operations and relations. The definition of isomorphism of models in the given context makes the intuitive ideas of the same structure precise” (Suppes, 1967). The main advantages of such an approach are certainly the fact that it is highly developed, well established and widely applied in a variety of sciences, and thought to provide a unified formal framework for formulating explanations on such OSR-related issues as: representing the structure of scientific theories; the applicability of certain mathematical notions to scientific theories; and the structural realist’s ontological commitment to the shared structure possessed by successive scientific theories (throughout the theory change).

However, as it has been made clear by the critics (e.g. Psillos, 1995; 1999; 2001; Cao, 2003; Stachel, 2006; Esfeld & Lam, 2008), even if such a framework can be quite useful in, for example, analyzing the structures within particular scientific theories, it is also problematic when it comes to, e.g., extracting the structural realist’s ontological commitments, since we inevitably run into theoretical troubles while trying to talk about the set-structure made of relations without relata. Moreover, the detailed analysis of the motivations behind the set-theoretical approach shows that its foundation seems not to be fully justified as it contains such presumptions as, for example, set-theoretic (Bourbaki-inspired) foundationalism based on the belief that any mathematical theory (as expressed by its axioms) can be represented by its models as types of set-structures (Landry, 2007).

In recent years, voices saying that the set-theoretical approach, with all its advantages and drawbacks, does not have to be the “only right way” have been raised, and it has been pointed out that, from a mathematical point of view, there is no rational (devoid of dogmatism) reason to take for granted the claim about the fundamental character of set theory. What’s more, different philosophers and scientists (Landry & Marquis, 2005; Bain, 2013; Eva, 2016) have started to formulate alternative arguments and visions of scientific structuralism, framing it not within set theory, but by means of category theory, shifting from the well-established bottom-up approach to the more general and abstract top-down viewpointFootnote 1. Further reflections around alternative methods of representing relevant structures within scientific structuralism eventually lead to the conclusion that the category-theoretic framework (language), even if historically and genealogically rooted in set theory, to achieve an adequate level of accuracy in the analysis of the notion of ’model’ or ’shared structure’ for articulating OSR, does not depend in any way on the previous support or embedding in set theory (Landry & Marquis, 2005).

The debate concerning OSR evidently proceeds on two tracks. The ongoing discussion between advocates and critics of the position expands and becomes more detailed. This includes taking into account not only the previously assumed set-theoretic notion, but also the category-theoretic notion of structure (Bain, 2013; Wüthrich & Lam, 2014; Eva, 2016; Lal & Teh, 2017). On the other hand, one can also witness a kind of rivalry between the two approaches developing internally to the debate (Landry & Brading, 2006; Landry, 2007; French, 2012). The arguments and discussions concerning philosophical issues surrounding OSR become, in general, more framework-dependent and greater emphasis is put on certain weaknesses and advantages of bottom-up and top-down perspectives. Let me refer to an example. Set-theorists tend to emphasize their close relationship to contemporary scientific practice, representing the shift from a purely syntactic to a semantic view of theories. Indeed, the model-theoretic approach is today widely applied to account for the structure of scientific theories and show how those structures are connected to mathematics and the phenomena they represent. This ability to capture the hierarchical and horizontal relations between models is listed as the most important feature of the set-theoretic approach to representing structure within OSR.

In this spirit, French (1999, 2000) presents the role of group theory in quantum mechanics by appealing to the concept of shared structure, as formalized by a type of morphism between models. This example from contemporary science is thought to show that the applicability of a mathematical theory to a physical theory can be represented by employing “a model-theoretic framework in which ’physical’ structures are regarded as embedded in ’mathematical’ structures ... this then allows the possibility of representing the relation between mathematics and physics in terms of embedding a theory T in a mathematical structure M’, in the usual set-theoretic sense of their existing an isomorphism between T and a sub-structure M of M’" (French, 1999).

On the other hand, however, set-theorists seem to have no justification for this “Bourbaki/Suppesian assumption that all scientifically useful kinds of mathematical structures are types of set-structures.” (Landry, 2007). Landry argues that it is exactly this fundamentalist assumption that tempts the proponents of model-theoretic approach to make the ontological claim about the structure of the world, pressuming that ,,set theory cuts not only mathematics but, indeed, Nature at its joints” (Landry, 2007). This viewpoint has its own issues that have been pointed out by (Bain, 2013). “If the relata of a relation associated with a structure are identified with the elements of its domain, then the set-theoretic definition of structure as an isomorphism class of structured sets makes ineliminable reference to relata. In general, one might argue that any set-theoretic definition of structure does likewise, insofar as membership “\(\in \)” is a primitive concept in set theory. This ineliminable reference to relata in set-theoretic definitions of structure subsequently suggests a conceptual dependence between structures and relations on the one hand, and relata on the other” (Bain, 2013). He argues that the main critique of OSR (especially its radical version) has relied exactly on this set-theoretic notion of structure and that a category theoretic formulation of OSR is more useful in explicating the structure of physical theories, in particular, general relativity. As it turns out, set theory can be formulated as a category, Set, in which the objects are sets and the morphisms are functions defined on sets. Moreover, it is possible to adopt the strategy of identifying objects with their identity arrows, formally devoiding ’relations’ of the problematic ’relata’ (like in a first-order formulation of Lawvere’s elementary theory of the category of sets). To sum up, when it comes to representing structures in the physical world, in set-theoretic discourse, relata play an ineliminable role (so-called “surplus” mathematical structure), and category theory overcomes this obstacle since it removes this unnecessary surplus.

Both proposals to formally frame OSR by means of set theory and category theory have their advantages, and both give satisfying answers to some of the philosophical issues concerning structural representation and a realist attitude towards science. They embody two radically different ways of conducting scientific as well as philosophical inquiry. They adopt two different conceptual frameworks and many basic issues regarding the nature of the objects studied or the methods used have to be reevaluated. Both ideas, however, with all their advantages and drawbacks, aim at the same thing-to give us the most precise notion of the structure as provided by our best scientific theories.

3 Goals shape means

Is set theory still the best formal frame for OSR? Is category theory a better alternative for explicating the structural realist’s stance? The goal of the proposed study is not to provide an answer to any of those questions but rather to reveal them to be pseudo-questions, since a better articulation of the purpose the frameworks are supposed to serve will show that they are not in fact in real competition with each other. My general aim is to take a deeper look into philosophical practice and exercise a pluralist position, according to which the “either—or” viewpoint misses something substantial and limits our insight into the (structure of) reality postulated by our best scientific theories. As I will try to argue in this paper, by referring to the representative examples from contemporary scientific and philosophical practice, we should make use of the interplay between the powers of abstraction and detail of different formal methods, based on the goal we are aiming to achieve. This proposal is therefore a rather pragmatic one: the choice of a representational framework should not depend on our presumptions and assumed theoretical dogmas, but rather on the kind of problem we are trying to tackle.

The main motivation for such a pragmatically-oriented metaphilosophy is the noticeable progress of contemporary research techniques in science, combining different perspectives in the search for the best way to expand our knowledge of the world. This observation is closely related to the debate about the (dis)unity of science (Dupré, 1993; Cartwright, 1999; Ladyman & Ross, 2007; Cat, 2021). Is there a single, most fundamental, privileged way of representing the world, and if not, how are the different worldviews related? Can the various sciences be unified into a single general theory? Can different theories within a single science, such as general relativity and quantum theory (in physics) or models of evolution and development (in biology), ever be unified? What is the relationship between different research approaches that deal with the same phenomenon? When faced with a variety of viewpoints and methods, answers to these questions may range “from a monist perspective according to which always one of the approaches is privileged over the others, through an integrationist perspective according to which they must strive to form a unity greater than the sum of their parts, to an isolationist perspective according to which each of them has its own autonomous sphere of validity” (Gijsbers, 2016). This distinction has both philosophical and practical consequences, affecting every aspect of scientific practice, from the general attitude and motivation to the choice of specialization and research approach.

Today, the (dis)unity of science debate most often takes the form of a discussion about explanatory pluralism. According to the definition provided by (Kendler, 2005), explanatory pluralism “hypothesizes multiple mutually informative perspectives with which to approach natural phenomena”. The account of multi-perspectivity in science originates from the idea that different epistemic interests can lead to different research questions that are then best answered by applying different methods and levels of explanation. Advocates for explanatory pluralism naturally assume some kind of integration attitude, stating that the different research techniques “have to work together in order to achieve results that they could not achieve separately” (Gijsbers, 2016). They most often motivate their claims by referring to the ’methodological superiority’ of interdisciplinary and multi-method research, as well as various examples and case studies showing its actuality and fruitfulness in achieving its goals. This shows that success in modern science is very multi-dimensional and best pursued through a pluralist methodology.

I believe a similar, multi-perspective account of explanation and representation can be applied to philosophy, especially in the context of science-dependent questions, like those regarding the structure of the world. The combination of epistemic pluralism, grounded in contemporary scientific practice, and a success-based “no miracles” argument for realism points us to some kind of metaphysical pluralism, also on the structural level.Footnote 2

In order to dissect this main idea, I will attempt to draw an analogy between the practical usage of bottom-up and top-down approaches to problems occurring in science, and a kind of set theory vs. category theory rivalry present in the OSR debate. By analyzing the actual cases in which scientists choose between different representational tools in order to answer certain research questions, I extract the relevant criteria standing behind those particular choices and show how they can regulate similarly the usage of formal frameworks in the OSR context. The proposed case study, focused on a comparison between the Hilbert space and \(C^\star \)-algebra formalisms of quantum mechanics in the context of their practical applications, is thought to lay the foundation and build the necessary intuitions for further discussion including more complex examples of the direct use of bottom-up and top-down perspectives in scientific practice (e.g. in physics: Coecke et al., 2016; Beer et al., 2018; Gheorghiu & Heunen, 2019; and in biology: Tuyéras, 2018). This example, while appealing to the reader’s imagination, shows how the research setup – in one case, the need for performing calculations to test the theory, and in the other for investigating the structural similarities or differences between theories–guides us towards the “appropriate” formal framework.Footnote 3

3.1 Case study—Hilbert space and \(C^\star \)-algebra formalisms of quantum mechanics

Almost every introductory course in quantum mechanics begins with the fundamental postulate that the state of a physical system is modelled by a vector in some Hilbert space.Footnote 4 The choice of the specific Hilbert space depends on the physical problem that has to be investigated. The state is an object that contains all the information about the system at a given moment and is an element of a well-defined set determined by the details of the model; in some sense, it is "a prerequisite” one needs in order to make predictions about the results of measurements of physical quantities. At this point, one usually introduces the mathematical notion of an observable, which gives access to measurable physical quantities - namely, a linear, self-adjoint operator acting on a specific Hilbert space. This order of presenting the relevant notions reflects, in fact, the scientific practice in the majority of areas of both theoretical and experimental physics.Footnote 5 For example, in the area of condensed matter physics, the main objective (and usually the most difficult task technically) is to find the ground state of a system described by the given Hamiltonian; having the ground state, one can perform further computations for quantities, for example, magnetization or magnetic/electric susceptibility, which can be of crucial importance for engineering materials possessing desired properties. Another justification of the primary role of “the state” is its intuitive way of representation: it is quite simple to store a vector, or even a function, as an element of \(L^2(\mathbb {R})\) (square-integrable complex-valued functions defined on a real line) in computer memory; from this point of view, a matrix, or an operator in infinite-dimensional Hilbert space, is much more complicated to work with.

At this point, it is important to address the subtle issue of representing mathematical objects in a computer’s memory. It is a very vast and multi-layered topic that can be approached from different, bottom-up and top-down perspectives. I will discuss in detail the case of finite-dimensional Hilbert spaces. This restriction may seem quite radical at first glance, but in fact it allows us to cover most of the problems defined in modern science of quantum information, quantum computing and condensed matter. From this point of view, the complex vector representing a system’s size can be treated as a collection of real numbers (real and imaginary parts of the components of a vector). As such, at the lower level, it can be represented as an array of floating point numbers in a computer memory (usage of a normalized vector ensures picking up one of the representatives of an equivalence class, see footnote 4). In fact, such an approach is widely used in practice when creating numerical simulations. One can use this method to represent functions as well: depending on the desired accuracy, a memory can store a sufficiently large number of function values for different arguments (resources that are at the disposal of today’s supercomputers do not set significant limitations). At the higher level of abstraction, modern programming languages and computer science provide tools for the convenient representation and manipulation of different kinds of mathematical data through objective paradigms and flexible data structures (for example, C++ and Python), functional paradigms (like LISP) and, last but not least, all environments supporting symbolic algebra, like Matlab or Mathematica.

It is worth noting that the approach described above, conceiving a quantum theory as originating from states, despite many successful applications, has one crucial drawback: it narrows the field of view to one particular theory. It does not seem to encourage going deeper into the abstract mathematical structures hidden behind, supporting more practical applications. Therefore, physicists, mathematicians, and philosophers working on the foundations of science have developed an idea to suspend the paradigm assigning the primary role to states and to start with the observables equipped with the proper structure. It has soon turned out that such an approach allows not only to correctly recover the space of states—it also reveals the structural similarity to the formalism of classical physics and, therefore, opens new perspectives for generalizations.

The approach mentioned above starts with a separable and unital \(C^{\star }\)-algebra over the field of complex numbers (for a precise and general definition, see (Arveson, 1981)). In the following paragraphs, this algebra will be denoted as \(\mathcal {A}\). In order to set up the intuition, one can think about the algebra \(\mathcal {M}_N(\mathbb {C})\) of \(N \times N\) complex matrices—one can add and multiply matrices, multiply matrix by scalar and define the norm of a matrix. What really distinguishes \(C^{\star }\) algebra from just a Banach algebra is the additional operation \(^{\star }\) with the following properties:

  • It is an involution, that is for every \(a \in \mathcal {A}\):

    $$\begin{aligned} a^{\star \star } = a \end{aligned}$$
    (1)
  • For all \(a,b \in \mathcal {A}\):

    $$\begin{aligned} (a+b)^{\star }= & {} a^{\star } + b^{\star } \end{aligned}$$
    (2)
    $$\begin{aligned} (ab)^{\star }= & {} b^{\star } a^{\star } \end{aligned}$$
    (3)
  • For all \(a \in \mathcal {A}\) and every scalar \(\lambda \in \mathbb {C}\):

    $$\begin{aligned} (\lambda a)^{\star } = \bar{\lambda } a^{\star } \end{aligned}$$
    (4)
  • For every \(a \in \mathcal {A}\):

    $$\begin{aligned} \vert \vert a^{\star } a \vert \vert = \vert \vert a \vert \vert \, \vert \vert a^{\star } \vert \vert . \end{aligned}$$
    (5)

In case of the algebra of matrices one can easily check that Hermitian conjugation plays a role of involution. An element \(a \in \mathcal {A}\) is called self-adjoint, if \(a = a^{\star }\) and positive, then \(a = x\, x^{\star }\) for some \(x \in \mathcal {A}\). Linear functional \(\phi :\mathcal {A} \rightarrow \mathbb {C}\) is positive, if \(\phi (a) \ge 0\) for every positive element \(a \in \mathcal {A}\). Now we can formulate the basic postulate:

The observables of the system are all self-adjoint elements of a separable, unital \(C^{\star }\)-algebra \(\mathcal {A}\).

Note that the observables are the first entities introduced—states of the system are specified as secondary and can be recovered from the structure of \(\mathcal {A}\):

The states of quantum system defined by \(C^{\star }\)-algebra A are all positive, linear functionals \(\phi :\mathcal {A} \rightarrow \mathbb {C}\) such that \(\phi (1) =1\).

Note that the existence of multiplicative neutral element 1 is guaranteed by the unitality of \(\mathcal {A}\). As we will see later, condition \(\phi (1) =1\) ensures normalization of probability.

Let us see what the above prescription gives for algebra of matrices \(\mathcal {M}_N(\mathbb {C})\). First of all, one can identify positive elements of algebra \(\mathcal {M}_N(\mathbb {C})\) with positive-semidefinite matrices, that is matrices X satisfying \((u, Xu) \ge 0\) for all vectors \(u \in \mathbb {C}^N\) (Symbol \((\cdot ,\cdot )\) denotes usual scalar product in \(\mathbb {C}^N\)). Using the fact that \((A,B)_{HS} = \textrm{Tr}(A^{\star } B)\) is a scalar product in \(\mathcal {M}_N(\mathbb {C})\) (called Hilbert-Schmidt scalar product), one immediately gets that every positive linear functional on \(\mathcal {M}_N(\mathbb {C})\) has the following form:

$$\begin{aligned} \phi (A) = \textrm{Tr}(\rho \, A), \end{aligned}$$
(6)

for some positive-semidefinite matrix \(\rho \). The condition \(\phi (1)=1\) gives \(\textrm{Tr}(\rho ) = 1\). Thus, we arrived at the general set of mixed states, known, for example, from quantum information theory. These states describe finite level quantum systems, such as qubits. The set of pure states, known from the basic courses on quantum mechanics, is the subset of mixed states satisfying \(\rho ^2 = \rho \).

At this point, one could ask what is the point of introducing such complicated structure and traverse the whole route to obtain the states of the system. But let us try to take another \(C^{\star }\)-algebra. Namely, the set of all complex functions defined on the finite domain:

$$\begin{aligned} \mathcal {F}_{N} = \lbrace f :\lbrace 1,2, \ldots N \rbrace \rightarrow \mathbb {C} \rbrace . \end{aligned}$$
(7)

The set \(\mathcal {F}_N\) forms \(C^{\star }\)-algebra with usual addition, multiplication of functions and norm defined as \(\vert \vert f \vert \vert = \sum _{i=1}^N \vert f(i) \vert ^2\). The involution is just a complex conjugation. Self-adjoint elements are the real-valued functions. Therefore, this algebra represents, in principle, the set of observables of classical finite-level system. For example, for \(N=2\) one can think of a bit or a coin - an observable assigns to each, heads and tails, a particular reward. One can check that linear, positive functionals \(\phi :\mathcal {F}_N \rightarrow \mathbb {C}\) satisfying \(\phi (1)=1\) can be written in the form:

$$\begin{aligned} \phi (f) = \sum _{i=1}^N p_i \, f(i), \quad p_1, \ldots p_N \ge 0, \quad \sum _{i=1}^N p_i = 1. \end{aligned}$$
(8)

Therefore, as it turns out, the state space corresponding to this algebra is formed by all the probability distributions on a discrete N-level system. These probability distributions represent possible imbalances in the case of a coin.

The usual drawback of the top-down approach is that it makes it really hard to make any practical physical predictions. One possesses only an abstract structure of observables given initially; there is not much information on how to apply it to a concrete physical or experimental situation. This is the case in the standard formulation of quantum mechanics, starting from the universe of states.Footnote 6 In this context, the bottom-up approach is usually more popular since it seems better fitted for working on a specific system (extracting its properties, predicting the values of measurements, etc.).

On the other hand, the abstract and general top-down viewpoint opens a route for deep insight into the structures appearing in different scientific theories; it settles a method which can lead to other formulations, e.g. with the use of Jordan algebras (Niestegge, 2004)Footnote 7. The natural (though not necessary) framework for expressing the top-down perspective is category theory, since it provides various theoretical tools to compare and differentiate theories. An excellent example of how category theory can be used to compare the informative content of theories is given in (Feintzeig, 2017). This way of comparing the relevant structures in theories can also have a unifying power and provide novel axiomatic approaches to known theories, like in the cases of noncommutative geometry or the topos theory of quantum logic (Flori, 2013).

This standard example, involving \(C^{\star }\)-algebra formalism, shows how easily one can switch from quantum to classical theory within this abstract framework—it suffices to change the algebra from noncommutative to commutative one. In fact, one can go even further: using \(C^{\star }\)-algebra formalism, one can consider a whole spectrum of hypothetical physical theories, including quantum and classical theories; that makes it a very promising and convenient environment for foundational considerations. In mathematical and theoretical physics, it is quite usual to try to “prove” that a given theory is the only one satisfying certain, physically motivated conditions. A very neat and elegant example of such application of the top-down approach is provided by Clifton–Bub–Halvorson theorem (Clifton, 2003), which proves that among all theories that can be expressed in \(C^{\star }\) algebra language, quantum theory is the only one satisfying information-theoretic No-Go principlesFootnote 8 However, I would like to emphasize, that \(C^{\star }\)-algebra formalism is not the only right way to conduct this type of research. There are also works that interpolate between different theories using the geometrical properties of the set of states (Pfister, 2013). Moreover, one can argue that classical theory can be formulated in the language of Hilbert spaces via the Koopman-von Neumann approach (Koopman, 1931; von Neumann, 1932). Thus, there does not really exist a clear, sharp boundary that ultimately determines and limits the usage of top-down and bottom-up perspectives in contemporary physics. Based on scientific practice, however, one can notice how such choices are made—by taking into account features like flexibility, simplicity, and generality of a given framework when faced with a particular research problem. It’s the goal that is shaping the means, not the other way around—the idea that lies at the heart of the pragmatics-based approach to representation. Different formalisms are bringing different aspects of reality to the surface—but none of them is more ’fundamental’ than the other.Footnote 9

4 From scientific to philosophical practice

This interplay between the levels of concreteness and abstraction of different research methods (just as the case study from the previous section shows) is the main feature of the aim-oriented approach to representation within science. The choice of a formal framework is secondary; one can choose depending on the aspects one wants to examine. By viewing the theory from different perspectives, emphasizing different aspects of physical reality, we gain new insights and expand our understanding of the world that surrounds us. For example, having gathered the experimental data and wanting to check its consistency with predictions of quantum mechanics, one will look for the most direct way to calculate the mean value of the particular observable. Meanwhile, trying to gain a panoramic view of the theory and its surroundings (or different formulations of the theory), one searches for a language abstract enough to express the relevant structural similarities or differences, and this is exactly what the language of the category of \(C^\star \)-algebras does. Having different viewpoints on a theory may also help catalyze progress to newer and better theories.

I believe a similar situation occurs in contemporary philosophy of science. The variety of research questions one is faced with during philosophical investigations often requires methods sensible to the subtleties of the object of particular study. While trying to analyze the structure of a particular theory or test the adequacy of the mathematical notions used to describe a particular experimental setup, one needs a formalism emphasizing the most fundamental features of both systems. In this context, the set-theory-based notion of partial structures (Bueno & French, 2018), for example, seems to serve as an elegant way of offering a balance between formal and pragmatic considerations on the subject of the applicability of mathematics to empirical sciences. The same approach, however, turns out to be too narrow to comprehend and trace the structural similarities between successive theories throughout radical theory change—the problem which the abstract category-theoretic framework seems to be more suited for. Pre-deciding about the use of a particular representational framework in all possible contexts limits the theoretical possibilities the other framework may offer in the light of new research questions, forcing us to perform various kinds of ”maneuvers” in order to make them fit.

However, being aware of the advantages and drawbacks of those formal methods, discussed in both scientific and philosophical contexts, one can make a choice based on a more systematic consideration. Of course, while the selection of the most suitable framework for scientific purposes is motivated mainly by its formal and theoretical features, such as simplicity, generality, universality, level of abstraction, range of applicability, etc., a similar process in a philosophical setup may involve other types of attributes as well. The analysis of literature and case studies already shows some specific motivations standing behind such choices—not only of formal but also pragmatic and socio-psychological nature (see Fig. 1).

Fig. 1
figure 1

The general overview of the chosen advantages and disadvantages of two representational perspectives: bottom-up (set theory) and top-down (category theory)

When it comes to choosing set theory as a means for representing theoretical structure, important features seem to be especially those connected to the advancement and wide range of its applications (Rashevsky, 1959; Svozil, 1995; Karsai & Kampis, 2010). Many mathematical notions can be precisely defined by using only set theoretic concepts. For example, mathematical structures as diverse as graphs, manifolds, rings, and vector spaces, often used as means of representation in natural and formal sciences, can all be defined as sets satisfying various properties (Bourbaki 1950; 2004). It is not surprising that the theory that has received so much attention since the nineteenth century is much more popular and better known than the mid-twentieth century’s category theory (McLarty, 2018). The set-theoretic framework is also well rooted in research practice, especially because of the intuitive nature of its basic notions and, therefore, direct relation to experience. This close relationship has been noted by the early structuralists, who often emphasized it while stating their motivations towards a model-theoretic approach to representing scientific theories:

“When a branch of empirical science is stated in exact form, that is, when the theory is axiomatized within a standard set-theoretical framework, the familiar question raised about models of the theory in pure mathematics may also be raised for models of the precisely formulated empirical theory” (Suppes, 1960).

Set theory is also thought to be a promising foundational system for most of mathematics (e.g., mathematical analysis, topology, abstract algebra, discrete mathematics) and, therefore, constitutes a formal basis for a great number of scientific theories (Džamonja, 2017). This fact leads many to arbitrarily assume its superiority and exclude such alternatives as category theory from the discussion, viewing it as secondary, genealogically (and formally) rooted in set theory. (“Questions of set-theoretic size play an essential role in category theory, especially the distinction between sets and proper classes” (Shulman, 2008)). This kind of set-theoretic foundationalism has been criticized for its unjustified claims (Landry, 2007), especially since category theory on its own has the means to serve as a general framework, emphasizing the relationships among different structures as well as embodying the idea of unity in mathematics (Geroch, 1985; Peter, 1999; McLarty, 2006; Lurie 2009). This approach is also closely connected to the structuralism that governs modern mathematical practice. Awodey (1996, 2014) shows how the language and distinctive methods of category theory provide a fundamental notion of ’mathematical structure’ different than the one given by model theory and developed as a consequence of a structural approach to mathematics.

The most common critique of the set-theoretic framework raised in the philosophical context of OSR is related to the observation that it assumes the existence of objects—or rather that their existence is often treated as a consequence of set-theoretic formalism.Footnote 10 The intuitive and simple nature of its basic notions turns out to be the feature that, on the one hand, makes set theory very useful in representing the semantic structure of our best theories, at the same time causing trouble in extracting the structural realist’s ontological commitments towards ’the structure’ of those theories. This is the area where category theory starts to shine, formally representing the shift in focus from objects to structures (Bondecka-Krzykowska & Murawski, 2008; Marquis, 2006, 2013; Eva, 2016). As we have already observed in the presented case study, the shift from a bottom-up to a top-down perspective allows us to not only provide a clear representation of similarities and differences between structures, offering a panoramic view of many theories at once, but also reduce the number of theoretical concepts, making their meaning dependent on the context (Geroch, 1985; Landry, 2007; Riehl, 2016; Caramello, 2018). This level of abstraction, however, makes it difficult to see the structure’s relation to empirical models and to allow straightforward experimental verification, the apparent advantage of set-theoretical representations (Hellman, 2003). It is not a coincidence that we do not witness many category-theoretic structures in empirical studies, since they are focused mainly on particular experimental research setups.

Due to its formal features, category theory has also been widely used for investigating and testing theoretical equivalence.Footnote 11 For example, using the notion of categorical equivalence, Barrett (2019) comes to the conclusion that “there are actually a number of different theories that are standardly called Hamiltonian mechanics”. He shows, i.a., that Lagrangian mechanics and Hamiltonian mechanics defined on a general symplectic manifold are not categorically equivalent. It turns out that Hamiltonian mechanics on a symplectic manifold has ‘more models’ than Lagrangian mechanics and, therefore, it can be used to describe a wider range of physical systems. The same approach, however, while applied to Hamiltonian mechanics restricted to manifolds which are cotangent bundles, allows us to capture the standard view, showing its equivalence with Lagrangian mechanics. The general formulation using symplectic geometry is important because it acts as a formal “bridge” to other areas of classical physics, like geometric optics (Guillemin, 1984) or a starting point for geometric quantization (Woodhouse, 1992).

These are just a couple of examples showing which criteria seem important and how the choice of an “appropriate” formal framework can be and often is motivated. However, as we can easily see, those features are not all of the same type. Some, like e.g. offering a panoramic view on many theories at once or assuming the existence of objects are consequences (theoretical, philosophical) of the developed formalism, while other, like e.g. application to variety of formal and natural sciences are of more pragmatic nature, often dependable on social factors (science as a collective enterprise) or the state of the art in a particular field.Footnote 12 The hierarchy of the types of features that should be taken into account while deciding on the choice of formal framework in the philosophical context is definitely a subject calling for deeper consideration. I, personally, have an intuition that we should assign more value to non-pragmatic ones when we are about to decide whether one method or the other is better to represent the relevant structure in different research situations, from representing the semantic structure of scientific theory and the applicability of mathematics in science, to expressing the structural realist’s ontological commitments. As I have already discussed, this problem seems especially subtle in the OSR context, since it is supposed to equip us with a notion of structure that not only provides us with fragmentary explanations of various phenomena but also resonates with the vision of the dynamic and evolving world given to us by science. Set theory and category theory involve different formal apparatuses, which in the process can gain strong theoretical as well as philosophical relevance. Since different research situations expect different results, the choice of formal method should be predicated on and justified by the combination of features most relevant to the particular study.

5 A bridge to metaphysical pluralism

In this paper, I tried to briefly present the idea of a pragmatically-oriented metaphilosophy of formal methods, especially in the context of their use in framing the ontic structural realist stance. My aim was to show how contemporary scientific research practice, making use of and appreciating the variety of methods and perspectives, can serve as an inspiration to make similar decisions in philosophical setup as well.

As I have already discussed in the beginning of Sect. 3, this line of thought recalls the explanatory pluralism known from the epistemic level of the (dis)unity of science debate. This proposal has, however, a deeper metaphysical dimension as well. Witnessing the success of contemporary scientific research, equipped with variety of methods and multi-perspective approaches, one may need to take a closer look at the success-based, “no miracles” argument for realism and what it entails. Although OSR, and scientific realism in general, is usually associated with monist and isolationist perspectives, it turns out that arguments basing the realist stance on the success of science are fully compatible with pluralism. Some may even say that scientific realism is an inherently pluralist doctrine (pluralist realism, “plurealism”) (Scheffler, 1999).

The plurality of goals that science and scientists face gives plurality to the meaning of the notion of ’success’. Even just the paradigmatic example presented in Sect. 3.1 shows the different scopes and dimensions of a theory’s (empirical) success (van Fraassen, 1980) relevant in different research setups. Chang notes that if the success of science has many meanings and dimensions,

“[it is] not likely that various competing scientific systems of practice can be ranked in a single order of successfulness. In that situation, it will be very difficult to argue that any particular system of practice is surely the royal road to truth. So, it will be difficult to avoid epistemic pluralism. There will always be a methodological dimension since different systems of practice will typically involve different methods” (Chang, 2017).

What does it mean, however, for the world’s metaphysical picture? The discussion around the (dis)unity of science gives us several answers, varying from the vision of a “disordered” (Dupré, 1993) or “dappled” (Cartwright, 1999) world, to a unifying non-reductive physicalism and the idea of the “Primacy of Physics Constraint” proposed by Ladyman and Ross (2007). A structural realist, assuming the monist attitude, will argue that even though success in science comes in different flavors and is delivered by different practices, it should still point us to the one universal structure of the world. My intuitions, however, echo Chang’s (2014, 2017) idea that the contemporary versions of scientific realism are “best served by a certain kind of metaphysical pluralism as well as methodological pluralism”.Footnote 13

This pluralist realism idea, to make sure it’s properly grounded, requires also a careful placement in the context of theory of reality that takes into account the actual scientific, as well as philosophical practice. One of such contexts is Chang’s (2017) theory of reality that assumes the pragmatist coherence as its basis, making the underlying reality dependent on the success-driven consistent systems of epistemic activities.Footnote 14 This way, our worldview is not a product of arbitrarily presupposed claims about ’the structure’, but rather emerges from well-established practices governing the theory’s success. And after we accept the notion of Chang’s pragmatist coherence as a good criterion of what is ’real’, it becomes even more difficult to avoid some kind of metaphysical pluralism, also in a structuralist spirit.

The version of OSR that emerges from those considerations is a position that, like in its origins, honors the realist intuitions standing behind the “no miracles” arguments, still remaining skeptical about the scientific description of ’furnishings’ of the world. This time, however, it does not fall into the trap of “unnecessary constraints of monism”. By embracing the multi-dimensional and pluralist character of the epistemic tools in service of science’s success and aggregation of knowledge, it accepts and commits to the reality of various versions or aspects of the world as given by our best scientific theories.

In the OSR context, the metaphysical plurality postulate concerns different means of structural representation. As it was already shown using the example from Sect. 3.1, different formalisms of quantum mechanics serve different epistemic goals and, therefore, focus on different structural properties of the phenomena under investigation. Like those two approaches work together in order to provide us with the most informative and detailed vision of physical reality, philosophy should make use of the variety of formal methods as well. They should enjoy their distinctive features and functions, developed to bring us closer to the answers to the questions concerning the various dimensions of scientific representation.

6 Conclusions

Advocating for ontic structural realism, one wants to believe our best scientific theories in regard to their structural content. In the light of contemporary science, making use of different techniques and formal solutions to tackle various dimensions of experimental and theoretical problems, one may wonder which of those structures are real. The metaphilosophical attitude following from the proposed pragmatically-oriented approach aims to challenge the standard “either-or” answer to the question of the most appropriate formal framework for OSR and replace it with the pluralistic “both” view. The possible consequence of this approach is a kind of pluralist OSR, assuming metaphysical pluralism of structures and a theory of reality governed by the Chang’s pragmatist coherence criterion. Just like contemporary pluralism in science, providing us with more insightful results every day, we should make use of every means possible to tackle the important philosophical questions posed by science, adopting a critical stance without arbitrarily committing ourselves to dogmatic presumptions.