Functor example

72 Views Asked by At

I am reading about Algebraic Structure and in the book say

An algebraic structure, or simply structure, consists of a non-empty set of objects existing in the world $w$, called the domain and denoted below by $D$, and a function, called an interpretation and denoted below by $R$, that assigns to each constant an entity in $D$, to each predicate a relation among entities in $D$, and to each functor a function among entities in $D$.

Looking for some example I found this in wikipedia:

The rational numbers $Q$ as σ-structures in an obvious way: $\mathcal Q = (Q, \sigma_f, I_{\mathcal Q})$ where

$I_{\mathcal Q}(+)\colon Q\times Q\to Q$ is addition of rational numbers,

$I_{\mathcal Q}(\times)\colon Q\times Q\to Q$ is multiplication of rational numbers,

$I_{\mathcal Q}(-)\colon Q\to Q$ is the function that takes each rational number $x$ to $-x$, and ] $I_{\mathcal Q}(0)\in Q$ is the number 0 and

$I_{\mathcal Q}(1)\in Q$ is the number 1;

In this example I understand what is a constant (1 and 0) but my question is: what is a functor? what is a predicate?