% -----------------------acknowledge for overleaf and designer of this template-----------------------
\documentclass[12pt]{exam}
\usepackage{amsthm}
\usepackage{libertine}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{ascmac}
\usepackage{multicol}
\usepackage[shortlabels]{enumitem}
\usepackage{siunitx}
\usepackage{cancel}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage{listings}
\usepackage[all]{xy}

% automata
%\usepackage{tikz}
%\usetikzlibrary{automata, positioning, arrows}


\pgfplotsset{width=10cm,compat=1.9}
\usepgfplotslibrary{external}
\tikzexternalize

\newcommand{\class}{\Large Logic and Foundations I, Autumn 2023 } % This is the name of the course
\newcommand{\examnum}{Homework No.2} % This is the index of the homework
\newcommand{\examdate}{Due: 2023.10.09 }% This is the due date
\newcommand{\examname}{Name:    }
% Your name here





\begin{document}
\pagestyle{plain}
\thispagestyle{empty}

\noindent
\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} r @{\extracolsep{8pt}} l}
\textbf{\class} & & \textit{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}\\
&&\\
\textbf{\examnum} & &\textit{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}\\
\textbf{\examdate} &&\\
\textbf{\examname} &&\\
\end{tabular*}\\
\rule[2ex]{\textwidth}{2pt}
% ---

\noindent \textbf{Problem 1}\\
Let $\mathcal{L}=\{\mathtt{g}_1,\mathtt{g}_2, \mathtt{h}\}$. We define the set of equations $E$ as follows.
$$E=\{\mathtt{h}(\mathtt{g}_1(x), \mathtt{g}_2(x))=x, \ \mathtt{g}_1(\mathtt{h}(x ,y))=x, \ \mathtt{g}_2(\mathtt{h}(x,y))=y\}$$
Let $\mathcal{K}$ be $\mathrm{Mod}(E)$, the class of  models of $E$.
Show that all finitely generated free $\mathcal{K}$-algebras are isomorphic.
\bigskip

\noindent\underline{\textsf{Solution:}}


\newpage
\noindent \textbf{Problem 2}\\
\begin{itembox}[l]{Boolean algebra}
The theory of Boolean algebra ($\rm{BA}$) is defined in language $\mathcal{L}_{\mathrm B} = \{ \vee , \wedge, \neg, \mathtt{0}, \mathtt{1}\}$ with the following axioms.
\begin{enumerate}
\item [(1)] All the lattice axioms and the following distributive law:

$$(x\vee y)\wedge z = (x\wedge z) \vee (y \wedge z), \quad
(x\wedge y)\vee z = (x\vee z) \wedge (y \vee z).$$

\item [(2)] $x\vee \mathtt{0}=x, \quad x\vee (\neg x)=\mathtt{1}, \quad x\wedge \mathtt{1}=x, \quad x\wedge (\neg x)=\mathtt{0}.$
\end{enumerate}
A model of theory $\rm{BA}$ is called a Boolean algebra.
\end{itembox}

In the definition of Boolean algebra, reduce (1) to only the commutative law and distributive law, and then prove the Idempotent, absorption law, and associative law.
\bigskip

\noindent\underline{\textsf{Solution:}}

\end{document}




