# Structure (mathematical logic)

Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
In mathematical logic, the notion of a structure generalizes mathematical objects such as groups, rings, fields, lattices or ordered sets. A structure is a set equipped with any number of named constants, operations and relations. For example the ordered group of integers can be regarded as a structure consisting of the set of integers ${\displaystyle \mathbb {Z} =\{\dots ,-2,-1,0,1,2,\dots \}}$ together with the constant 0, the binary operation ${\displaystyle +}$ (addition), the unary function ${\displaystyle -}$ (which maps each integer to its inverse), and the binary relation ${\displaystyle <}$. This structure is often denoted by ${\displaystyle (\mathbb {Z} ,0,+,-,<)}$.
Like most mathematical objects, structures are typically not studied individually in isolation. Given two structures ${\displaystyle A}$ and ${\displaystyle B}$, a homomorphism from ${\displaystyle A}$ to ${\displaystyle B}$ is a map from the underlying set of ${\displaystyle A}$ to the underlying set of ${\displaystyle B}$ which respects the additional information given by the constants, operations and relations. For example the map ${\displaystyle f\colon \mathbb {Z} \rightarrow \mathbb {Z} }$ which multiplies every integer by 2 is a homomorphism from the structure ${\displaystyle (\mathbb {Z} ,0,+,-,<)}$ to itself, because ${\displaystyle f(0)=0}$, ${\displaystyle f(x+y)=f(x)+f(y)}$, ${\displaystyle f(-x)=-f(x)}$, and because ${\displaystyle x implies ${\displaystyle f(x). One only speaks of homomorphisms ${\displaystyle f\colon A\rightarrow B}$ when ${\displaystyle A}$ and ${\displaystyle B}$ have the same signature, i.e. when they both have the same number of constants and these have the same names, and the number, names and arities of functions and relations agree likewise.