Isomorphism is central to the structure of mathematics. Mathematics is organized around concepts such as graphs, groups, topological spaces and manifolds each of which is associated with a notion of isomorphism. Each concept is associated with a classification problem — can we enumerate the instances of a given concept up to isomorphism
. We also have the related notions of symmetry and canonicality. There is no canonical point on a geometric circle — any point can be mapped to any other point by rotating the circle. A rotation of the circle is an isomorphism of the circle with itself — a symmetry or automorphism. Similarly, there is no canonical basis for a finite dimensional vector space. For any basis there is a symmetry (automorphism) of the vector space which moves the basis to a different basis — a situation precisely analogous to a point on a circle. Isomorphism is also central to understanding representation. A group can be represented by a family of permutations. Different (non-isomorphic) families of permutation can represent the same group (up to isomorphism).
At first isomorphism seems simple. The notion of isomorphic graphs, and the intuition that two isomorphic graphs are “the same”, seems intuitively clear to essentially anyone who encounters the concept. Indeed, for a broad class of concepts the notion of isomorphism is easily defined. More specifically we can consider concepts defined by a carrier set of “points” plus predicates, relations and functions providing structure on those points. A graph consists of a set of nodes (points) plus an edge relation on the nodes. For concepts defined by a carrier set plus structure, two instances are isomorphic if there exists a bijection between their points which identifies their structure — which “carries” the structure of one to the structure of the other. This notion of isomorphism is easily formalized for concepts defined as the models of a given (higher order) signature where a signature is a set of predicate symbols, relation symbols and function symbols operating over a carrier set of points.
But general mathematics is carried out in a language richer than that defined by a single higher order signature. Mathematical statements typically involve several different instances of several different concepts. For example, we can abstract a document — a sequence of words — to a multiset (bag) of words. When we do this we understand that structure has been lost. It is more subtle than simply noting that different sequences can map to the same bag. A bag fundamentally has less structure than a sequence. The grammatical (well typed) statements about a bag are more restricted than the grammatical statements about a sequence. We cannot talk about the first element of a bag.
Dependent type theory  is a formal system for specifying interfaces to objects and can be used as a formal foundation for mathematics . Unlike set theory, type theory handles concepts (types) with a specified interface to the instances of each concept. Type theory allows for statements relating concepts and their instances in a way that mirrors natural mathematical language.
Isomorphism has been formalized in dependent type theory using the groupoid model . The groupoid model replaces quantification over sets with quantification over groupoids — categories in which every morphism is an isomorphism. Homotopy type theory replaces quantification over sets with quantification over a form of infinity groupoid related to algebraic topology. The Morphoid model achieves compositionality by replacing quantification over sets with quantification over “morphoids” .
Here we achieve a treatment of isomorphism which preserves the intuitive concept of a set as a collection without internal structure — quantification over sets remains as quantification over sets. Isomorphism and groupoid structure then emerge naturally from simple but subtle syntactic restrictions on set-theoretic language. Functors and natural transformations also emerge naturally without any explicit introduction of groupoids or category theory.
From an AI or cognitive science perspective we seek to understand natural human mathematical thought. Understanding the special case of mathematical thought seems relevant to the problem of understanding thought more generally general.
2 Defining Notation
In rigorous mathematics one defines the meaning of notation before presenting arguments stated in terms of that notation. Meaning precedes inference. In this section we define the meaning of the notation of dependent type theory in the style common in mathematics but not at the level of rigor demanded by logicians. A more rigorous logician-style definition of meaning is given in section 3.
We start by reviewing the set/class distinction. We assume a Grothendeick universe . A Grothendeick universe is a set whose cardinality is inaccessible (definition omitted) and such that all subsets of of cardinality less than the cardinality of are elements of . We will use the term “class” to mean any subset of — possibly too large to be an element of . A class that is not an element of will be called a proper class. In the remainder of this paper we will reserve the term “set” to mean a class that is an element of .
Although we avoid giving a fully rigorous definition, it is possible to define a subclass of whose elements we will call basic values, where the basic values consist of the truth values and , pairs, functions and sets, and where each basic value is tagged as being in one of these four kinds so that truth values, pairs, functions and sets are disjoint subclasses of the basic values. This construction can be done in such a way that any pair of basic values is represented by a basic value pair, any function from a set of basic values to basic values is represented by a basic function value, and any set of basic values is represented by a basic set value. This can also be done in such a way that basicness is “hereditary” — the two components of a basic pair must be basic, the domain and range of a basic function value must contain only basic values, and the elements of a basic set value must be basic. The point of basic values is simply to ensure that every basic value can be uniquely identified as being either a truth value, a pair, a function or a set. This will be important in the definition of isomorphism in section 4 where we define a larger class of values capable of representing isomorphisms between basic values.
Graphs, Groups, topological spaces and manifolds can be all be represented with sets, functions and pairing. For example, a group can be represented by a pair of a set and a group operation on such that an identity element and inverse function exist and satisfying the axioms of group theory. The following definition gives notation for constructing sets and, more importantly, proper classes such as “graph”, “group” or “topological space”.
Definition 1 (Sets and Classes).
We will write for the class of all basic set values in .
If is a class, and for any we have that is a class, then is the class of all pairs with and .
If is a class, and for any we have that is a proposition, then is the class of all such that is true.
If is a set, and for any we have that is a set, then is the set of all functions such that the domain of is and for all we have . If does not occur in then we abbreviate as .
These class notations generate the concepts of mathematics. For example the concept “group” can be written as
where is the set of “Curried” binary operations on and where specifies that an identity and inverses exist and that the group axioms are satisfied.
Note that function spaces have been limited to sets — we are not providing notation for “functor spaces” — spaces of functions between proper classes. Functors arise naturally in a different manner discussed in section 7.
The goal here is to define isomorphism for each concept that can be defined in terms of the base class and the constructs given in definition 1 with a limitation on the notation used in forming formulas to ensure that formulas respect isomorphism. We limit formulas to those expressible with the notations of definition 2.
Definition 2 (Formulas).
We will write for the set containing the two values and . We use the standard Boolean operations , , , and on Boolean values.
If is a function (we take all functions to be in ), and is in the domain of , then denotes the value of on . For a predicate we have that is a formula.
If is a set and we have , then is a formula that is true iff and are the same element of (set-theoretic equality in ).
If is a set, and for all we have that is a truth value, then is true if for every we have that is true.
We will show that, if a formula can be expressed with just the notations of definitions 1, 2 and 3 in a manner that is meaningful for any , then if and are isomorphic elements of we have . While one might expect this to be immediate, it is actually quite subtle. The restriction on equality in definition 2 is essential and, within the restriction on equality, the set is implicitly restricted by definition 1. There is no notation in definition 1 for the set for arbitrary and — definition 1 does not support set-theoretic pairing. As an intuitive example of an ill-formed equality we note that the property of a graph having a node equal to the number 1 is not a graph-theoretic property — it is not preserved under graph isomorphism.
It is also important that functions are restricted to be set-level — the domain of a function must be a set. To see why consider a predicate . In the presence of such a predicate we have that is a meaningful formula for any group . In this case we need that for two isomorphic groups and we have . This requires that the notion of isomorphism is built into the semantics of the type . This is done in the groupoid model . Here we elect to take a different approach based on the observation that set-level function spaces require no such care — the fully naive definition of set-level function spaces just works. Functors then arise naturally as terms of the language. We show that functors defined by terms of the language automatically respect isomorphism — they are automatically functors between groupoids.
Finally we complete the set of notations considered in this paper with notations for forming pairs and functions.
Definition 3 (Pairs and Functions).
If is a set, and for all we have that is a value in , then is the function mapping to .
If and are values in then will denote the pair of those values.
If is a pair then is the first component of the pair and is the second component of the pair.
3 Formal Value Functions
We now increase the level of rigor by formally defining two semantic value functions. The first assigns a meaning to well-formed contexts where a context is a sequence of variable declarations and assumptions. For a well formed context we have that is a set of variable interpretations — the variable interpretations satisfying the declarations and assumption in . For a variable interpretation , and a well-formed expression , we define to be the value (meaning) of under the values assigned by to the variables in . The meaning functions and are defined by mutual structural induction on expressions.
It is important to note that each notation in definitions 1, 2 and 3 has conditions on when it is meaningful. For example is meaningful only when is a meaningful class and for all we have that is a meaningful class. Here “meaningful” is synonymous with well-formed. More formally, a context is well formed if and only if is defined and an expression is well formed under a well-formed context if and only if for all we have that is defined. We start by giving the clauses for definedness of contexts and the meaning of sequents (entailment).
Definition 4 (Contexts and Sequents).
is the set containing just the empty variable interpretation — the variable interpretation not assigning any value to any variable.
If is defined, and for all we have that is defined and is a class, and is a variable not declared in , then is the class of variable interpretations of the form for and and where is the variable interpretation extend to assign value to variable .
If is defined and for all we have that is defined and is a truth value, then is the class of variable interpretations such that .
We write to mean that is defined and for all we have that both and are defined with being a class and with .
We write to mean that is defined and for all we have that is defined and equals .
The partial function is defined by clauses which are straightforward formalizations of the clauses in definitions 1, 2 and 3.
Definition 5 (Sets and Classes).
For a variable declared in , and , we define to be .
is defined to be the class of all basic set values.
If for any we have that is defined and is a class, and for any and we have that is a class, then is defined to be the class of all pairs with and .
If for any we have that is defined and is a class, and for any and we have that is a truth value, then is defined to be the class of all such that .
If for any we have that is defined and is a set, and for any and we have that is a set, then is defined to be the set of all functions such that the domain of is and for all in the domain of we have .
Definition 6 (Formulas).
is defined to be the set containing and . If for all we have that is defined and is a truth value, and similarly for , then is defined to be if either or and otherwise. Similar definitions apply to the other Boolean operations.
If for all we have that is defined and is a function in and is defined and is in the domain of , then then is defined to the be the value that the function assigns to . (This includes applications of predicates).
If for any we have that is defined and is a set, and and are both defined with and then is defined and equals if and equals otherwise.
If for any we have that is defined and is a truth value, then is defined to be if for all we have that (and false otherwise).
Definition 7 (Pairs and Functions).
If for all we have that and are defined and are elements of , then is defined to be the pair of and .
If for all we have that is defined and is a pair, then is defined to the be the first component of and similarly for .
If for any we have that is defined and is a set, and for any and we have that is defined and is in , then is defined to be the function with domain and which maps to .
The value functions are undefined on any expression not given an explicit definition in some clause of definitions 3, 4 and 5. The clauses maintain the property that if is defined for some then it is defined for all such . We will say that is defined if and only if is defined for all . A context is well-formed if and only if is defined and an expression is well formed in context if and only if is defined.
To define isomorphism we introduce iso-pairs – pairs of basic values tagged as iso-pairs so that iso-pairs are disjoint from truth values, (normal) pairs, functions and sets. Basic values (as defined in section 2) do not contain iso-pairs and hence iso-pairs are not basic. We define the set of extended values by analogy with the basic value but including iso-pairs as another kind of tagged value. All basic values and all extended values are set-level, i.e., are elements of the universe . It is important that iso-pairs are pairs of basic values. We also have that every basic value is an extended value. We now define partial left and right projection functions on extended values.
Definition 8 (Left and Right Prjections).
We define a partial left projection function on extended values by the following clauses.
For an iso-pair we have .
For a (normal) pair we have
For an extended set we have defined if the mappings for forms a bijection in which case .
For a function we have that is defined if the set of mappings for in the domain of forms a function in which case is the function defined by these mappings.
For a truth value we have .
A partial right projection function is defined similarly.
We now have that if is defined then is a basic value and similarly for .
An extended value is projectable if and are defined.
Note that and are both the identity function on a basic values which implies that every basic value is projectable. Also note that for any projectable set we have that defines a bijection between the basic sets and .
Also note that for any bijection between two basic sets and we can construct the projectable set containing the iso-pairs for . We now introduce the constant into the language. We repeat the definition of for contrast and clarity.
is defined to be the class of all basic set values.
is defined to be the class of all projectable set values.
For a set declared with , the constructs listed in sections 2, and formalized in section 3, do not allow one to express properties of the elements of other than equality with other elements of . So in a strong sense the constants and are equivalent. But projectability allows us to define isomorphism. Once isomorphism is defined we can write inference rules — meaning precedes inference.
Lemma 1 (Projectability).
For defined, where and may contain the constant , if (is set-level) then is a projectable value. If is defined and is a proper class then every element of is projectable.
The proof will be given in a revision of this paper.
For a context possibly containing let be the result of replacing each occurrence of the constant in with the constant .
Lemma 2 (Projection Commutes with Evaluation).
If does not contain the constant then is defined if and only if is defined with and similarly for the right projection .
Again the Proof will be given in a revision.
Definition 11 (Morphism Class Expressions).
For a class expression not containing we define the morphism class expression to be the result of replacing each occurrence of the constant in with the constant .
Recall that we can write an expression for the type as follows.
The morphism class is then
It seems intuitively clear that if we consider a group in we have that is group isomorphic to both and . This suggests the following general definition of isomorphism.
Definition 12 (Isomorphism).
For and where the constant does not occur in , , or , we define to be if there exists a “morphism” such that and (and otherwise).
Lemma 3 (Isomorphics are Substitutable).
If where the constant does not occur in , or and does not appear free in , then implies .
Again the proof will be given in a revision.
Note that for we get implies .
5 Some Comments on Isomorphism
Classification is an organizing principle of mathematics generally — for any given concept we can ask what instances of that concept exist up to the notion of isomorphism associated. The natural numbers arise as the isomorphism classes of the finite sets. It is interesting to note that the type multiset of (bags of ) arize as isomorphism classes almost as naturally as the natural numbers. In this way classification yields the abstraction from a document — a sequence of words — to the associated bag of words. To see how this arises from classification consider the following class expression and the corresponding morphism class where the variable does not occur in the class .
A bag is then a pair where is a function in . We will call the index set of the pair. under the above definition of isomorphism we then get that two bags and are isomorphic if there is a bijection and function in such that and . This will happen if defines a bijection between the two index sets and with the property that if identities with then . Or treating as a function from to this is equivalent to saying that for we have . The desired bijection exists exactly when and yield the same number of occurrences of each element of .
It is important here that the definition of isomorphism treats bound set variables differently from free set variables. In the above definition of we can take to be a set variable. For a set we then get that
is defined to be the class of bags of elements of where the bags are intuitively the isomorphism classes. In defining bag isomorphism the set variable is treated differently from the set variable . To see the significance of this consider
This sequent says that for , for , and for the condition (or formula) stating that contains at least one occurrence is well formed. Since this statement is well formed, it must respect isomorphism. So, under the semantics presented here, clearly isomorphic bags in the type must either both contain or both not contain . While the index set is different under different but isomorphic elements of the type , the set is the same for any such bag.
A similar situation occurs when we define a vector space over a field . Here the field is the same for any such vector space although the set of vectors can be different for different but isomorphic vector spaces over .
6 Representation and Abstraction
Representation is ubiquitous in mathematics. For example, vectors can be represented by tuples of coordinate values. A group can be represented by a family of permutations on an underlying set, or by family of invertible linear operations on a vector space. A representation has more structure than the abstract object it represents. Abstract vectors have no natural or canonical coordinates — coordinates are only defined relative to an arbitrary choice of basis. Many different (non-isomorphic) families of permutations can yield the same (isomorphic) groups. As an example of representation consider the two sequents.
In the first sequent can be a representation such as a permutation group or a group of linear actions on a vector space. The context provides the “material” for building the representation. In the context the formula can depend on the structure of the representation, such as the cardinality of the set underling a permutation group, which are not group-theoretic properties of the group . However, under the context of the third sequent, must be defined for any group and hence can depend only on group-theoretic properties of .
7 Functors and Natural Transformations (Canonical Isomorphisms)
In the simple set-theoretic semantics of dependent type theory presented here, functors and natural transformations emerge naturally from simple well-formedness conditions on expressions. If and are proper classes and then the expression defines a functor from the class (groupoid) to the class (groupoid) . Functors from to emerge as well-formed terms of type with a free variable of type .
Natural transformations (canonical isomorphisms) similarly arise as well-formed expressions. An isomorphism is typically defined by a bijection where and are sets (as opposed to proper classes). A natural transformation corresponds to a sequent of the form
Here the terms and define two functors from the class (groupoid) to the class (groupoid) of sets. The term assigns a morphism between and in the set groupoid Isomorphisms in classes other than the class of sets are derived from set bijections. For example, it is traditional to define a group isomorphism to be a bijection between the group elements of the two groups. The set-theoretic well-formedness conditions guarantee that any sequent of the above form defines a natural transformation (a canonical isomorphism).
We have presented well formedness conditions on purely set theoretic notation guaranteeing that the expressions built from these notations respect isomorphism as commonly understood in mathematics. Isomorphism, symmetry, canonicality, functors and natural transformations all emerge from these well-formedness conditions on set-theoretic notations. This is all done without any reference to groupoids or category theory in the semantics of the set-theoretic notation.
-  B. Barras, S. Boutin, C. Cornes, J. Courant, J.C. Filliatre, E. Gimenez, H. Herbelin, G. Huet, C. Munoz, C. Murthy, et al. The coq proof assistant reference manual: Version 6.1. INRIA Research Report, 1997.
-  Martin Hofmann and Thomas Streicher. The groupoid interpretation of type theory. In Twenty-five years of constructive type theory (Venice, 1995). Oxford Univ. Press, New York, 1998.
-  HoTT-Authors. Homotopy type theory, univalent foundations of mathematics. http://hottheory.files.wordpress.com/2013/03/hott-online-611-ga1a258c.pdf, 2013.
-  Per Martin Löf. An intuitionistic theory of types: predicative part. In Logic Colloquium ’73 (Bristol, 1973), volume 80 of Studies in Logic and the Foundations of Mathematics. North-Holland, 1975.
-  David McAllester. Set-theoretic type theory. CoRR, abs/1407.7274, 2018.