\documentclass[12pt,titlepage]{article} \usepackage{amsmath} \usepackage{mathrsfs} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{mathtools} \usepackage{graphicx} \usepackage{color} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage{xparse} \usepackage{hyperref} %----Macros---------- % % Unresolved issues: % % \righttoleftarrow % \lefttorightarrow % % \color{} with HTML colorspec % \bgcolor % \array with options (without options, it's equivalent to the matrix environment) % Of the standard HTML named colors, white, black, red, green, blue and yellow % are predefined in the color package. Here are the rest. \definecolor{aqua}{rgb}{0, 1.0, 1.0} \definecolor{fuschia}{rgb}{1.0, 0, 1.0} \definecolor{gray}{rgb}{0.502, 0.502, 0.502} \definecolor{lime}{rgb}{0, 1.0, 0} \definecolor{maroon}{rgb}{0.502, 0, 0} \definecolor{navy}{rgb}{0, 0, 0.502} \definecolor{olive}{rgb}{0.502, 0.502, 0} \definecolor{purple}{rgb}{0.502, 0, 0.502} \definecolor{silver}{rgb}{0.753, 0.753, 0.753} \definecolor{teal}{rgb}{0, 0.502, 0.502} % Because of conflicts, \space and \mathop are converted to % \itexspace and \operatorname during preprocessing. % itex: \space{ht}{dp}{wd} % % Height and baseline depth measurements are in units of tenths of an ex while % the width is measured in tenths of an em. \makeatletter \newdimen\itex@wd% \newdimen\itex@dp% \newdimen\itex@thd% \def\itexspace#1#2#3{\itex@wd=#3em% \itex@wd=0.1\itex@wd% \itex@dp=#2ex% \itex@dp=0.1\itex@dp% \itex@thd=#1ex% \itex@thd=0.1\itex@thd% \advance\itex@thd\the\itex@dp% \makebox[\the\itex@wd]{\rule[-\the\itex@dp]{0cm}{\the\itex@thd}}} \makeatother % \tensor and \multiscript \makeatletter \newif\if@sup \newtoks\@sups \def\append@sup#1{\edef\act{\noexpand\@sups={\the\@sups #1}}\act}% \def\reset@sup{\@supfalse\@sups={}}% \def\mk@scripts#1#2{\if #2/ \if@sup ^{\the\@sups}\fi \else% \ifx #1_ \if@sup ^{\the\@sups}\reset@sup \fi {}_{#2}% \else \append@sup#2 \@suptrue \fi% \expandafter\mk@scripts\fi} \def\tensor#1#2{\reset@sup#1\mk@scripts#2_/} \def\multiscripts#1#2#3{\reset@sup{}\mk@scripts#1_/#2% \reset@sup\mk@scripts#3_/} \makeatother % \slash \makeatletter \newbox\slashbox \setbox\slashbox=\hbox{$/$} \def\itex@pslash#1{\setbox\@tempboxa=\hbox{$#1$} \@tempdima=0.5\wd\slashbox \advance\@tempdima 0.5\wd\@tempboxa \copy\slashbox \kern-\@tempdima \box\@tempboxa} \def\slash{\protect\itex@pslash} \makeatother % math-mode versions of \rlap, etc % from Alexander Perlis, "A complement to \smash, \llap, and lap" % http://math.arizona.edu/~aprl/publications/mathclap/ \def\clap#1{\hbox to 0pt{\hss#1\hss}} \def\mathllap{\mathpalette\mathllapinternal} \def\mathrlap{\mathpalette\mathrlapinternal} \def\mathclap{\mathpalette\mathclapinternal} \def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}} \def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}} \def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}} % Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2} \let\oldroot\root \def\root#1#2{\oldroot #1 \of{#2}} \renewcommand{\sqrt}[2][]{\oldroot #1 \of{#2}} % Manually declare the txfonts symbolsC font \DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n} \SetSymbolFont{symbolsC}{bold}{U}{txsyc}{bx}{n} \DeclareFontSubstitution{U}{txsyc}{m}{n} % Manually declare the stmaryrd font \DeclareSymbolFont{stmry}{U}{stmry}{m}{n} \SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n} % Manually declare the MnSymbolE font \DeclareFontFamily{OMX}{MnSymbolE}{} \DeclareSymbolFont{mnomx}{OMX}{MnSymbolE}{m}{n} \SetSymbolFont{mnomx}{bold}{OMX}{MnSymbolE}{b}{n} \DeclareFontShape{OMX}{MnSymbolE}{m}{n}{ <-6> MnSymbolE5 <6-7> MnSymbolE6 <7-8> MnSymbolE7 <8-9> MnSymbolE8 <9-10> MnSymbolE9 <10-12> MnSymbolE10 <12-> MnSymbolE12}{} % Declare specific arrows from txfonts without loading the full package \makeatletter \def\re@DeclareMathSymbol#1#2#3#4{% \let#1=\undefined \DeclareMathSymbol{#1}{#2}{#3}{#4}} \re@DeclareMathSymbol{\neArrow}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\neArr}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\seArrow}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\seArr}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\nwArrow}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\nwArr}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\swArrow}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\swArr}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\nequiv}{\mathrel}{symbolsC}{46} \re@DeclareMathSymbol{\Perp}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\Vbar}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\sslash}{\mathrel}{stmry}{12} \re@DeclareMathSymbol{\bigsqcap}{\mathop}{stmry}{"64} \re@DeclareMathSymbol{\biginterleave}{\mathop}{stmry}{"6} \re@DeclareMathSymbol{\invamp}{\mathrel}{symbolsC}{77} \re@DeclareMathSymbol{\parr}{\mathrel}{symbolsC}{77} \makeatother % \llangle, \rrangle, \lmoustache and \rmoustache from MnSymbolE \makeatletter \def\Decl@Mn@Delim#1#2#3#4{% \if\relax\noexpand#1% \let#1\undefined \fi \DeclareMathDelimiter{#1}{#2}{#3}{#4}{#3}{#4}} \def\Decl@Mn@Open#1#2#3{\Decl@Mn@Delim{#1}{\mathopen}{#2}{#3}} \def\Decl@Mn@Close#1#2#3{\Decl@Mn@Delim{#1}{\mathclose}{#2}{#3}} \Decl@Mn@Open{\llangle}{mnomx}{'164} \Decl@Mn@Close{\rrangle}{mnomx}{'171} \Decl@Mn@Open{\lmoustache}{mnomx}{'245} \Decl@Mn@Close{\rmoustache}{mnomx}{'244} \makeatother % Widecheck \makeatletter \DeclareRobustCommand\widecheck[1]{{\mathpalette\@widecheck{#1}}} \def\@widecheck#1#2{% \setbox\z@\hbox{\m@th$#1#2$}% \setbox\tw@\hbox{\m@th$#1% \widehat{% \vrule\@width\z@\@height\ht\z@ \vrule\@height\z@\@width\wd\z@}$}% \dp\tw@-\ht\z@ \@tempdima\ht\z@ \advance\@tempdima2\ht\tw@ \divide\@tempdima\thr@@ \setbox\tw@\hbox{% \raise\@tempdima\hbox{\scalebox{1}[-1]{\lower\@tempdima\box \tw@}}}% {\ooalign{\box\tw@ \cr \box\z@}}} \makeatother % \mathraisebox{voffset}[height][depth]{something} \makeatletter \NewDocumentCommand\mathraisebox{moom}{% \IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{% \IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}% }{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}% \mathpalette\@temp{#4}} \makeatletter % udots (taken from yhmath) \makeatletter \def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.} \mkern2mu\raise4\p@\hbox{.}\mkern1mu \raise7\p@\vbox{\kern7\p@\hbox{.}}\mkern1mu}} \makeatother %% Fix array \newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}} %% \itexnum is a noop \newcommand{\itexnum}[1]{#1} %% Renaming existing commands \newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}} \newcommand{\widevec}{\overrightarrow} \newcommand{\darr}{\downarrow} \newcommand{\nearr}{\nearrow} \newcommand{\nwarr}{\nwarrow} \newcommand{\searr}{\searrow} \newcommand{\swarr}{\swarrow} \newcommand{\curvearrowbotright}{\curvearrowright} \newcommand{\uparr}{\uparrow} \newcommand{\downuparrow}{\updownarrow} \newcommand{\duparr}{\updownarrow} \newcommand{\updarr}{\updownarrow} \newcommand{\gt}{>} \newcommand{\lt}{<} \newcommand{\map}{\mapsto} \newcommand{\embedsin}{\hookrightarrow} \newcommand{\Alpha}{A} \newcommand{\Beta}{B} \newcommand{\Zeta}{Z} \newcommand{\Eta}{H} \newcommand{\Iota}{I} \newcommand{\Kappa}{K} \newcommand{\Mu}{M} \newcommand{\Nu}{N} \newcommand{\Rho}{P} \newcommand{\Tau}{T} \newcommand{\Upsi}{\Upsilon} \newcommand{\omicron}{o} \newcommand{\lang}{\langle} \newcommand{\rang}{\rangle} \newcommand{\Union}{\bigcup} \newcommand{\Intersection}{\bigcap} \newcommand{\Oplus}{\bigoplus} \newcommand{\Otimes}{\bigotimes} \newcommand{\Wedge}{\bigwedge} \newcommand{\Vee}{\bigvee} \newcommand{\coproduct}{\coprod} \newcommand{\product}{\prod} \newcommand{\closure}{\overline} \newcommand{\integral}{\int} \newcommand{\doubleintegral}{\iint} \newcommand{\tripleintegral}{\iiint} \newcommand{\quadrupleintegral}{\iiiint} \newcommand{\conint}{\oint} \newcommand{\contourintegral}{\oint} \newcommand{\infinity}{\infty} \newcommand{\bottom}{\bot} \newcommand{\minusb}{\boxminus} \newcommand{\plusb}{\boxplus} \newcommand{\timesb}{\boxtimes} \newcommand{\intersection}{\cap} \newcommand{\union}{\cup} \newcommand{\Del}{\nabla} \newcommand{\odash}{\circleddash} \newcommand{\negspace}{\!} \newcommand{\widebar}{\overline} \newcommand{\textsize}{\normalsize} \renewcommand{\scriptsize}{\scriptstyle} \newcommand{\scriptscriptsize}{\scriptscriptstyle} \newcommand{\mathfr}{\mathfrak} \newcommand{\statusline}[2]{#2} \newcommand{\tooltip}[2]{#2} \newcommand{\toggle}[2]{#2} % Theorem Environments \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{prop}{Proposition} \newtheorem{cor}{Corollary} \newtheorem*{utheorem}{Theorem} \newtheorem*{ulemma}{Lemma} \newtheorem*{uprop}{Proposition} \newtheorem*{ucor}{Corollary} \theoremstyle{definition} \newtheorem{defn}{Definition} \newtheorem{example}{Example} \newtheorem*{udefn}{Definition} \newtheorem*{uexample}{Example} \theoremstyle{remark} \newtheorem{remark}{Remark} \newtheorem{note}{Note} \newtheorem*{uremark}{Remark} \newtheorem*{unote}{Note} %------------------------------------------------------------------- \begin{document} %------------------------------------------------------------------- \section*{variety of algebras} \hypertarget{varieties_of_algebras}{}\section*{{Varieties of algebras}}\label{varieties_of_algebras} \noindent\hyperlink{idea}{Idea}\dotfill \pageref*{idea} \linebreak \noindent\hyperlink{definitions}{Definitions}\dotfill \pageref*{definitions} \linebreak \noindent\hyperlink{generalisations}{Generalisations}\dotfill \pageref*{generalisations} \linebreak \noindent\hyperlink{examples}{Examples}\dotfill \pageref*{examples} \linebreak \noindent\hyperlink{as_algebraic_theories}{As algebraic theories}\dotfill \pageref*{as_algebraic_theories} \linebreak \noindent\hyperlink{free_algebras}{Free algebras}\dotfill \pageref*{free_algebras} \linebreak \noindent\hyperlink{literature}{Literature}\dotfill \pageref*{literature} \linebreak \hypertarget{idea}{}\subsection*{{Idea}}\label{idea} A variety of algebras is a classical notion from [[universal algebra]] that includes nearly all of the usual kinds of algebraic objects, such as [[groups]], [[rings]], [[vector spaces]] (over a fixed [[field]]), and so on. Those algebraic objects that don't form a variety of algebras, such as [[fields]], can still usually be easily described as a subcategory of some variety of algebras (in this case, [[commutative rings]]). A variety of algebras is not to be confused with an [[algebraic variety]], although in fact there is a connection: both concepts are (roughly speaking) given by a set of equations, but an algebraic variety is the set of elements (of a fixed generic structure) that satisfy the equations, while a variety of algebras is the class of structures in which \emph{every} element satisfies the equations. \hypertarget{definitions}{}\subsection*{{Definitions}}\label{definitions} A \textbf{signature} (in this context) is a [[set]], whose elements are called \textbf{operations}, to each of which is assigned a [[cardinal number]] ($0, 1, 2, \ldots$) called its \textbf{arity}. A signature is \textbf{finitary} if its set of operations is [[finite set|finite]] (in the strictest sense for the purposes of [[constructive mathematics]]) and every arity is finite (so a [[natural number]]); similar definitions apply to other [[arity classes]]. Given a signature $\sigma$ and a set $V$, whose elements are called \textbf{variables}\footnote{For a finitary signature, we may without loss of generality use the set $V \coloneqq \{x_0, x_1, x_2, \ldots\}$, effectively the set of [[natural numbers]], as the only set of variables; similar remarks apply to other arity classes.} , a \textbf{word} (in $\sigma$ using $V$) is a (well-founded directed rooted) [[tree]] in which each node is labelled by either a variable or an operation, such that every node labelled by a variable has no branches away from the root and every node labelled by an operation $o$ has as many branches away from the root as the arity of $o$. An \textbf{axiom} (in $\sigma$ using $V$) is a pair of such words; we write the axiom consisting of the words $v$ and $w$ as $v = w$ or $\vdash v = w$. A \textbf{theory} (in our sense) consists of a signature $\sigma$ and a set of axioms in $\sigma$. An algebraic theory is \textbf{finitary} if its signature is finitary and its set of equational axioms is finite ([[Kuratowski-finite]] in constructive mathematics); analogous remarks apply to other arity classes. A \textbf{variety of algebras} is given precisely by a theory in this sense, but it is more usual to think of the variety as being the class (or [[category]]) of models, so we continue with the definitions. Given a theory $T$, a \textbf{model} or \textbf{algebra} of $T$ consists of a [[set]] $A$ together with, for each operation of $T$ with arity $\kappa$, a [[function]] to $A$ from its $\kappa$th [[cartesian power]] $A^\kappa$ such that, for each axiom $\vdash v = w$ and each assignment of elements of $A$ to the variables in that axiom, the equation holds that is given by applying the operations to the elements of $A$ as indicated by the trees defining $v$ and $w$ (the meaning of which we hope is obvious). We say that $A$ \textbf{carries} the operations and \textbf{satisfies} the axioms. Given a algebras $A$ and $B$ of the same (quasi)-algebraic theory, a \textbf{homomorphism} from $A$ to $B$ consists of a [[function]] $f\colon A \to B$ such that, for each operation, the diagram \begin{displaymath} \array { A^\kappa & \stackrel{f^\kappa}\rightarrow & B^n \\ \downarrow & & \downarrow \\ A & \stackrel{f}\rightarrow & B } \end{displaymath} commutes. We say that $f$ \textbf{preserves} the operations. It is fairly straightforward to define a model (and homomorphisms) in any [[cartesian monoidal category]] $C$, replacing [[Set]] in the two paragraphs above. But note that the operations and axioms still form sets, not objects of $C$; the theory $T$ is independent of the modelling category. In any case, given any theory $T$ and any cartesian monoidal category $C$, the models of $T$ in $C$ (as [[objects]]) and the homomorphisms between them (as [[morphisms]]) form a [[category]], which is the the \textbf{variety of $T$-algebras in $C$}. \hypertarget{generalisations}{}\subsection*{{Generalisations}}\label{generalisations} A \textbf{sorted variety} or \textbf{many-sorted variety} is a generalisation. A \textbf{sorted signature} or \textbf{many-sorted signature} consists of a set, whose elements are called \textbf{sorts}, together with operations and arities as before, except that now an arity is a [[list]] of \textbf{input} sorts instead of merely a natural number (the length of the list) together with one \textbf{output} sort. Each variable in an axiom comes equipped with a sort, which we may also classify as an output sort; then each branch in (the tree reprsenting) a word must link output sort to input sort. The root of a word gives the entire word a sort; the two words in an equational axiom must have the same sort. Then a model of a sorted variety consists of one set for each sort, and the rest should be obvious. A sorted variety is \textbf{finitary} if it satisfies the finitarity conditions of a variety and its set of sorts is also finite. An ordinary variety as above may be called \textbf{unsorted} or \textbf{single-sorted} to avoid invoking the [[red herring principle]]; it is the same thing as a sorted variety with exactly one sort. Another generalisation is a \textbf{quasivariety}. While an axiom in a variety gives an equation, an axiom in a quasivariety is a [[Horn clause]], stating that one equation (the \textbf{consequent}) holds whenever each equation in some set of equations (the \textbf{premises}) holds. A Horn clause is \textbf{finitary} if this set of premises is (Kuratowski)-finite; a quasivariety is \textbf{finitary} if it satisfies the fintarity conditions of a variety and additionally each Horn clause is finitary. An ordinary variety is a quasivariety in which each Horn clause has an [[empty set]] of premises. \hypertarget{examples}{}\subsection*{{Examples}}\label{examples} For each definition of an appropriate algebraic object, there is a corresponding variety of algebras, a few of which are given below: \begin{itemize}% \item The variety of \emph{[[groups]]} is given by a theory with three operations $m,e,i$ (traditionally called multiplication, identity, and inverse), with respective arities $2,0,1$ (so multiplication is a binary operation, identity is a nullary operation, and inverse is a unary operation). There are five axioms, given by the following pairs of trees (with their traditional names): \begin{itemize}% \item associative law:\begin{equation} \array { & & & & m \\ & & & \nearrow & & \nwarrow \\ & & m & & & & z \\ & \nearrow & & \nwarrow \\ x & & & y } \;\;\;=\;\;\; \array { & & m \\ & \nearrow & & \nwarrow \\ x & & & & m \\ & & & \nearrow & & \nwarrow \\ & & y & & & & z } \label{ass}\end{equation} \item right unit law:\begin{equation} \array { & & m \\ & \nearrow & & \nwarrow \\ x & & & & e } \;\;\;=\;\;\; \array { x } \label{runit}\end{equation} \item left unit law:\begin{equation} \array { & & m \\ & \nearrow & & \nwarrow \\ e & & & & x } \;\;\;=\;\;\; \array { x } \label{lunit}\end{equation} \item right inverse law:\begin{equation} \array { & & m \\ & \nearrow & & \nwarrow \\ x & & & & i \\ & & & & \uparrow \\ & & & & x } \;\;\;=\;\;\; \array { e } \label{rinv}\end{equation} \item left inverse law:\begin{equation} \array { & & m \\ & \nearrow & & \nwarrow \\ i & & & & x \\ \uparrow \\ x } \;\;\;=\;\;\; \array { e } \label{linv}\end{equation} \end{itemize} Then a model of this variety is a set $A$ together with functions $m\colon A^2 \to A$, $e\colon 1 \to A$ (which may be identified with an element of $A$), and $i\colon A \to A$ such that, for all $x,y,z$ in $A$, $m(m(x,y),z) = m(x,m(y,z))$, $m(e,x) = x$, $m(x,e) = x$, $m(x,i(x)) = e$, and $m(i(x),x) = e$. In other words, an algebra in this variety is simply a [[group]]. Similarly, a homomorphism of such algebras is simply a [[group homomorphism]]. Also, an algebra in this variety in the category $C$ is a [[group object]] in $C$. \end{itemize} Note that it is not necessary to draw explicit trees; these can be recovered from the succinct equations like $m(m(x,y),z) = m(x,m(y,z))$; we will do this below. \begin{itemize}% \item The variety of \emph{[[monoids]]} is given by a subtheory of the theory of groups. It has only the operations $m,e$ and the axioms \eqref{ass},\eqref{runit},\eqref{lunit}. An algebra in this theory is a monoid, and a homomorphism of such algebras is a monoid homomorphism (including the condition that it preserve the identity). \item There is no variety of \emph{[[cancellative monoid]]s}, but there is a quasivariety of them. In addition to the axioms for a monoid, we have an axiom stating that the equation $x = y$ follows from the equation $m(x,z) = m(y,z)$, which we write succinctly as $m(x,z) = m(y,z) \vdash x = y$. \item The variety of \emph{[[abelian groups]]} is given by a supertheory of the theory of groups. In addition to the operations and axioms of the variety of groups, it has an additional axiom, the commutative law: $m(x,y) = m(y,x)$. \item The variety of (associative unital) \emph{[[rings]]} has five operations $a,z,n,m,e$, with respective arities $2,0,2,0,1$, and ten axioms. Five of these axioms are those of groups, applied to $a,z,n$ in place of $m,e,i$; three of these axioms are those of monoids (applied to $m,e$ as before). The remaining two axioms are: \begin{itemize}% \item left distributive law: $m(x,a(y,z)) = a(m(x,y),m(x,z))$, \item right distributive law: $m(a(x,y),z) = a(m(x,z),m(y,z))$. \end{itemize} \item There is no variety or quasivariety of [[fields]]; the elements with multiplicative inverses are not identified by an equation. One can, however, define fields as certain rings and then get the correct notion of field homomorphism as a ring homomorphism between rings that happen to be fields. \item The variety of (real) \emph{[[vector spaces]]} has infinitely many operations and axioms (so is not finitary). First, there are operations $a,z,n$ with the arities and axioms of an abelian group (as with rings). In addition, there is one operation $m_r$ of arity $1$ for each [[real number]] $r$, satisfying these axioms: \begin{itemize}% \item left distributive law: for each real number $r$, $m_r(a(x,y)) = a(m_r(x),m_r(y))$, \item right distributive law: for each real number $r$ and real number $s$, $m_{r+s}(x) = a(m_r(x),m_r(y))$ (where $r + s$ is the sum of $r$ and $s$ as real numbers), \item associative law: for each real number $r$ and real number $s$, $m_{r s}(x) = m_r(m_s(x))$ (where $r s$ is the product of $r$ and $s$ as real numbers), \item unit law: $m_1(x) = x$ (where $1$ the real number [[1]]). \end{itemize} \item There is a similar variety of vector spaces over any given [[ground field]], but there is no variety of vector spaces over arbitrary fields, since we would have to specify the field as well as the vector space. The problem is not really that there is no variety of fields; there is no variety of (left) [[modules]] over arbitrary [[commutative rings]] either. However, there is a \emph{sorted} variety of modules over arbitrary rings, with two types, one for the ring and one for the module. Even though this variety includes the non-finitary variety of real vector spaces, it is itself a finitary sorted variety. \end{itemize} \hypertarget{as_algebraic_theories}{}\subsection*{{As algebraic theories}}\label{as_algebraic_theories} A variety of algebras is one way to look at an [[algebraic theory]]. As a [[logic]]al theory, everything that we wish to say can be said in (typed or untyped, to match the variety) [[cartesian logic]] (although one might want to use something stronger, such as full classical or intuitionistic predicate logic with equality). We use one function symbol (of matching arity) for each operation, and each axiom in the variety becomes an axiom in the logic, a universally quantified equation. Then the [[models]] of this logical theory are the same as the algebras in the variety. As a [[Lawvere theory]], an untyped finitary variety of algebras defines a category $L$ whose objects are of the form $A^n$ for $n$ a natural number. The morphisms of the category are those which are necessary to make $A^n$ the $n$-fold [[product]] of $A$, along with one morphism for each operation in the variety. Each axiom of the variety corresponds to a commutative diagram, and $L$ is freely generated by these as a [[sketch]]. Then the models of the variety in a cartesian monoidal category $C$ are the same as the [[product-preserving functor|product-preserving]] functors from $L$ to $C$. Conversely, any [[locally small category|locally small]] (and hence [[small category|small]]) cartesian monoidal category whose objects are all of the form $A^n$ may be thought of as a Lawvere theory and defines an untyped variety of algebras, with operation for each morphism to $A$ and one axiom for each commutative diagram. (This can all be generalised to sorted varieties as well.) A variety of algebras can be seen as a cartesian version of a (typed or untyped) [[operad]]; whereas an operad has models in any [[symmetric monoidal category]], a variety of algebras has models only in a cartesian monoidal category. A variety of algebras is traditionally identified with its category $M$ of models in $Set$ (or even with simply the [[class]] of objects of this category), but it then becomes unclear what an algebra in the variety would be in some other category $C$. However, it is worth noting that $M$ is always an [[algebraic category]]; see below for the construction of free objects. \hypertarget{free_algebras}{}\subsection*{{Free algebras}}\label{free_algebras} Given a variety $V$ and a [[cartesian monoidal category]] $C$ (such as $Set$), let $C^V$ be the category of algebras in $V$ in $C$, with homomorphisms as morphisms. There is an obvious [[forgetful functor]] $U\colon C^V \to C$; $C$ is a [[cocomplete category|cocomplete]] $W$-[[W-pretopos|pretopos]] (or if $C$ is just a $W$-pretopos if $V$ is finitary), then $U$ has a [[left adjoint]], the [[free functor]] $F\colon C \to C^V$. In fact, this adjunction is [[monadic adjunction|monadic]]; we can identify the models of $V$ in $C$ with the [[module of a monad|modules/algebras]] of the [[monad]] $U \circ F$. Given an object $A$ of $C$, we construct the free algebra $F(A)$ as follows. First, let $W(A)$ be the [[inductive type]] in $C$ given by the signature of $V$, that is the [[initial algebra]] of the [[endofunctor]] $A \mapsto \sum_o A^{\#o}$, where $o$ ranges over the operations of $V$ and $\#o$ is the arity of $o$. Then each axiom specifies an internal binary [[relation]] on $W(A)$; the [[colimit]] of these is $F(A)$. Note that, if $C$ is $Set$ and $A$ is a set, then $W(A)$ consists precisely of the words (defined as trees above) with variables from $A$. The \textbf{word problem} for a variety $V$ consists of deciding, whenever $A$ is a [[finite set]], whether two elements of $W(A)$ are equal in $F(A)$. As a problem in algorithmic decidability, the word problem can be very difficult; for example, it is: \begin{itemize}% \item trivial for [[Boolean algebras]], \item impossible for [[Heyting algebras]], \item nontrivial but possible for [[lattices]], \end{itemize} even though each of these is a supertheory of the next. \hypertarget{literature}{}\subsection*{{Literature}}\label{literature} \begin{itemize}% \item J. Ad\'a{}mek, [[Lawvere|F.W. Lawvere]], J. Rosick\'y{}, \emph{On the duality between varieties and algebraic theories}, Algebra universalis 2003, \textbf{49}:1, pp 35--49 \href{https://doi.org/10.1007/s000120300002}{doi} \end{itemize} [[!redirects variety of algebras]] [[!redirects varieties of algebras]] [[!redirects quasivariety of algebras]] [[!redirects quasivarieties of algebras]] [[!redirects word problem]] [[!redirects word problems]] \end{document}