## 3 Mathematical Framework for Consistency
### Mathematical Representation of a Structural Model
#### 3.0.1 Port
Let R be the root object of \(M_{1}\) and \(R^{\prime}\) the root object of \(M_{2}\). The belonging morphism between the object and its parent will also be mapped to a belonging morphism. Therefore, as \(F\) is injective, any object of \(M_{1}\) which has a parent is mapped to an object of \(M_{2}\), which also has a parent. Therefore all objects of \(M_{2}\) that have a parent are the images of objects of \(M_{1}\) that have a parent, since \(card(Ob(M_{1}))=card(Ob(M_{2}))\). Thus, since \(F\) is injective on objects, \(R^{\prime}=F(R)\). Let \(X\in Ob(M1)\) be of order \(k\). By definition, there exists \(X_{1},\ldots,X_{k-1}\in Ob(M1)\) and \(r_{1}:X\longrightarrow X_{1},\ldots,r_{k}:X_{k-1}\longrightarrow R\) such that the \(r_{i}\) are direct belonging morphisms. Therefore, there exists \(X^{\prime},\ldots,X^{\prime}_{k-1}=F(X),\ldots,F(X_{k-1})\) and \(r^{\prime}_{1}:X^{\prime}\longrightarrow X^{\prime}_{1}\), \(\ldots\), \(r^{\prime}_{k-1}:X^{\prime}_{k-1}\longrightarrow R^{\prime}\), where the \(r^{\prime}_{i}\) are belonging morphisms, which are the images by F of the \(r_{i}\). This means that \(Order(X^{\prime})\geq Order(X)\). If we take the objects of maximum order in \(M_{1}\) and \(M_{2}\), we obtain \(Order(M_{1})\geq Order(M_{2})\) inversely. Therefore, \(Order(M_{1})=Order(M_{2})\). Let \(k=Order(M_{1})=Order(M_{2})\). Let \(n\) be the number of objects of order \(k\) in \(M_{1}\); then, \(M_{2}\) has at least \(n\) objects of order \(k\), since \(Order(F(X))\geq Order(X)\). Since the same holds for G, we have that \(M_{2}\) also has exactly n objects of order k.  
Assume this property (\(M_{1}\) and \(M_{2}\) have the same number of objects of a specific order and objects are mapped to objects of the same order) to be proven for any order above \(i\in[[0;k]]\). Let \(X\in Ob(M_{1})\) be an object of order \(i\); then, \(Order(F(X))\geq Order(X)\). Any object of \(M_{2}\) of an order superior to \(i\) is already the image of an object of \(M_{1}\) of an order superior to \(i\). Therefore, \(Order(F(X))=Order(X)=i\). We know that the property holds for objects of order \(k\). For \(i\in[[0;k]]\), if it holds for any order of \([\,i+1,k\,1\,]\), it holds for order \(i\); thus, by complete induction, it holds for any \(i\in[[0;k]]\). Let C be a connection of \(M_{1}\). Then \(card(F(C))\geq card(C)\); indeed, if \(C=\{P_{1},\ldots,P_{n}\}\) and \(F(C)=\{P^{\prime}_{1},\ldots,P^{\prime}_{m}\}\), then we have, for each \(i\in[[1,n]]\) a such that \(F(P_{i})=P^{\prime}_{1}\), because \(F\) preserves the reference morphisms, thus \(m\geq n\). This means that \(M_{2}\) has more connections than \(M_{1}\) for a certain order. In the same way as for objects' order, we obtain that the image of a connection by \(F\) and \(G\) is a connection with the same number of ports. We can now prove the theorem. Let us show by complete induction that we can build an inverse of \(F\). Let \(n\) be the order of \(M_{1}\) and \(M_{2}\). For \(n=0\), \(M_{1}\) and \(M_{2}\) only contain their root objects, which are elementary blocks that have no port or connection. Therefore, \(F\) and \(G\) are entirely defined by \(F(R)=R^{\prime}\) and \(G(R^{\prime})=R\); they are trivially inverse of eachother. Let \(n>0\), and assume that the property holds for any \(k<n\). Then:* F maps \(R\) to \(R^{\prime}\) and vice versa. * F maps each block \(B\in Ob(M_{1})\) of order 1 to a block \(B^{\prime}\in Ob(M_{2})\) of order 1. The component of F on B and its descendants corresponds to an injection \(F_{B}\) between the models (of order < \(n\)) that have B and B' as their root objects. Thus, we can associate an inverse \(G^{\prime}_{B}\) to this injection. * \(M_{1}\) and \(M_{2}\) have the same numbers of ports of order 1 and connections of order 1. * Let \(C\in Ob(M_{1})\) be a connection of order 1. We know that F(C) has the same number of ports as C and that the images of the ports of C are the ports of F(C).