## 3 Mathematical Framework for Consistency
### Mathematical Representation of a Structural Model
#### 3.0.1 Port
Therefore, we can define an inverse to the component of F on C, and its ports, and this inverse is compatible with the ones defined for blocks of order 1. * We can associate two by two the remaining ports. When we add the compositions to these components, we obtain a functor \(G^{\prime}:M_{2}\longrightarrow M_{1}\), which is the inverse of F.  
Therefore, we have shown Theorem 2 by strong induction. A direct corollary of Theorem 2 is the following one. **Corollary 1**. : _Let \(A,B\in Ob(S2 ML+Cat)\), such that there exists injections \(F:A\longrightarrow B\) and \(G:B\longrightarrow A\)._  
_Then, \(F\) is an equivalence of categories._  
We can therefore give a simple definition of the equivalence of S2 ML models. **Definition 19**. : _Equivalence of S2 ML models_  
_Let \(A,B\in S2 ML+Cat\)._  
_We say that \(A\) and \(B\) are equivalent if there exists for \(F:A\longrightarrow B\) and \(G:B\longrightarrow A\) two injections._  
**Theorem 3**. : _The equivalence of S2 ML models is an equivalence relation over Ob(S2 ML+Cat)._  
Proof. : We need to show that this relation is reflexive, symmetric, and transitive. * Reflexivity: Let A be a S2 ML model. A is equivalent to A because the identity over A is an injection. Therefore, \(F=G=Id_{A}\) and \(\alpha\) composed of for each x, and \(\alpha_{x}:F(x)\longrightarrow G(x)\) with \(\alpha=id_{x}\) suits. * Symmetry: A is equivalent to B, so the injections \(F:A\longrightarrow B\) and \(G:B\longrightarrow A\) exist. Therefore, we have two injections between B and A, and as such, B is equivalent to A. The relation is symmetric. * Transitivity: Let A, B, C be three S2 ML, with A equivalent to B and B equivalent to C. Let \(F_{A,B}\) and \(G_{B,A}\), be the equivalence injections for A,B and \(F_{B,C},G_{C,B}\) be the equivalence injections for B,C. Then \(F:A\longrightarrow C=F_{B,C}\circ F_{A,B}\) and \(G:C\longrightarrow A=G_{B,A}\circ G_{C,B}\) are two injections between A and C. Therefore, A and C are equivalent. Another property of injection is that it, in a way, represents the fact that one model is bigger than another since it is a part of it. **Theorem 4**. : _The injection defines a partial order relation over the set of S2 ML models, given equivalences between models._  
**Proof. **  
* Reflexivity : Let \(X\) be a S2 ML model, and let \(Id_{X}\) be the identity over \(X\), i.e., the image of \(x\in Ob(X)\) is x and for \(g\in Hom_{X}(x,y)\) with \(x,y\in Ob(X)\) the image of g is g. Then \(Id_{X}\) is trivially an injection. Therefore, \(X\) is injected into X. * Antisymmetry: Assume \(X\) and \(Y\) are two S2 ML models such that \(X\) is injected in \(Y\) and \(Y\) is injected in \(X\), with \(F:X\longrightarrow Y\) and \(G:Y\longrightarrow X\) such injections. Then, we have two injections between X and Y, and therefore, X and Y are equivalent. * Transitivity Let X, Y, and Z be S2 ML models. Let \(F:X\longrightarrow Y\) and \(G:Y\longrightarrow Z\) be injections. Let \(H:X\longrightarrow Z\) be the composition of \(F\) and \(G\) on objects and morphisms, i.e., composed of: \(\left\{ \begin{array}{rl}H_{Ob}:&Ob(X)\longrightarrow Ob(Z)\\ &x\to G\circ F(x)\end{array} \right.\) and for each \(x,y\in Ob(X)\), \(\left\{ \begin{array}{rl}H_{x,y}:&Hom_{X}(x,y)\longrightarrow Hom_{Z}(H_{Ob }(x),H_{Ob}(y))\\ &f\to G_{F_{Ob}(x),F_{Ob}(y)}\circ F_{x,y}(x)\end{array} \right.\) Because each of the applications defined here are compositions of injective applications, they are injections. Therefore, H is an injection, and thus, \(X\) is injected in \(Y\). Therefore, the existence of these injections between S2 ML models defines a partial order relation.