\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{xcolor}

%\usepackage{systeme}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}

\usepackage{tikz}
%\usepackage{pgfplots}
%\tikzstyle{ball} = [circle,shading=ball, ball color=black,
%    minimum size=1mm,inner sep=1.3pt]
%\usetikzlibrary{arrows.meta}
%\tikzset{>={Latex[length=2mm,width=1.5mm]}}

%\usepackage{graphicx}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage{enumitem}
%\setlist[enumerate]{leftmargin=*}

\allowdisplaybreaks

%\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\newcommand{\incid}{\mathcal{I}(P)}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}

\parskip = 0.05in
\parindent = 0.0in

%\pagestyle{empty}

\begin{document}
\centerline{Math 372 lecture for Wednesday, Week 8}
\bigskip

\centerline{\bf M\"obius inversion for posets}
\bigskip

Let~$P$ be a finite poset with M\"obius function~$\mu$ and zeta
function~$\zeta$. Let~$K$ be a field, and recall that~$\incid$ is the incidence
algebra of~$P$ whose elements are functions~$\xi\colon\mathrm{Int}(P)\to K$, and
if~$\xi,\eta\in\incid$, then
\[
  (\xi\eta)(x,y):=\sum_{z\in[x,y]}\xi(x,z)\eta(z,y)
\]
for all intervals~$[x,y]\in \mathrm{Int}(P)$. We now define right and left actions
of~$\incid$ on~$K^P$.  If~$f\in K^{P}$, i.e., if $f\colon P\to K$,
and~$\xi\in\incid$, let
\[
  (f\xi)(t)=\sum_{s:s\leq t}f(s)\xi(s,t)
\]
and
\[
  (\xi f)(t)=\sum_{s:s\geq t}f(s)\xi(t,s),
\]
respectively, for all~$f\in K^P$,~$\xi\in\incid$, and~$t\in P$.
\medskip

{\bf Theorem.} (M\"obius inversion) For all~$f,g\in K^P$
\begin{align*}
  g(t)&= \sum_{s:s\leq t}f(s)\quad\forall t\in P
  \quad\Leftrightarrow\quad
  f(t)=\sum_{s:s\leq t}\mu(s,t)g(s)\quad\forall t\in P\\[8pt]
  g(t)&= \sum_{s:s\geq t}f(s)\quad\forall t\in P
  \quad\Leftrightarrow\quad
  f(t)=\sum_{s:s\geq t}\mu(t,s)g(s)\quad\forall t\in P.
\end{align*}
\smallskip

{\bf Proof.} Since~$\mu=\zeta^{-1}$,
\begin{align*}
  g&= f\zeta\quad\Leftrightarrow\quad f = g\mu\\[5pt]
  g&= \zeta f\quad\Leftrightarrow\quad f = \mu g.
\end{align*}
\hfill$\Box$


\textbf{The principle of inclusion-exclusion as an instance of M\"obius inversion.}
\medskip

{\em Product posets.} Given posets~$P$ and~$Q$, define their
product~$P\times Q$ to be the Cartesian product with ordering
\[
(p,q)\leq (p',q')\quad\Leftrightarrow\quad p\leq q\ \text{ and }\ p'\leq q'.
\]
If~$P$ and~$Q$ are locally finite, then so is~$P\times Q$, and we have the
following equation for M\"obius functions:
\[
  \mu_{P\times Q}( (p,q),(p',q'))=\mu_P(p,p')\mu_Q(q,q').
\]
To see this, compute:
\begin{align*}
  \sum_{(p,q)\leq(a,b)\leq(p',q')}\mu_P(p,a)\mu_Q(q,b)
  &= 
  \left(\,\sum_{p\leq a\leq p'}\mu_P(p,a) \right)\left(\, \sum_{q\leq b\leq
  q'}\mu_Q(q,b) \right)\\[8pt]
  &= \delta_P(p,p')\delta_Q(q,q')\\[8pt]
  &= \delta_{P\times Q}((p,q),(p',q')).
\end{align*}
\medskip
 
{\em M\"obius function of the boolean poset~$B_n$.} Define the poset~$\mathbf{2}:=\left\{ 0,1 \right\}$
with~$0<1$.  Then~$\mu(0,0)=\mu(1,1)=1$, and~$\mu(0,1)=-1$.  We have an
isomorphism of posets
\begin{align*}
  \mathbf{2}^n=\mathbf{2}\times\cdots\times\mathbf{2}
  &\xrightarrow{\sim}
  B_n\\[5pt]
  (a_1,\dots,a_n)
  &\mapsto \left\{ i\in[n]:a_i=1 \right\}.
\end{align*}
Let~$T\subseteq S\subseteq[n]$, and use the above isomorphism to identify~$T$ with~$\left( t_1,\dots,t_n
\right)$ and~$S$ with~$(s_1,\dots,s_n)$ where~$t_i,s_i\in\left\{0,1
\right\}$ for all~$i$.  Then,
\[
  \mu_{B_n}(T,S)=\prod_{i=1}^n\mu_{\mathbf{2}}(t_i,s_i)=(-1)^{|S|-|T|}.
\]

{\em Principle of inclusion-exclusion (PIE).} Letting~$K$ be any field, M\"obius
inversion then says that for all~$f,g\colon B_n\to K$
\[
  g(S)=\sum_{T:T\subseteq S}f(T)\quad\forall S\subseteq[n]
  \quad\Leftrightarrow\quad
  f(S)=\sum_{T:T\subseteq S}(-1)^{|S|-|T|}g(T)\quad\forall S\subseteq[n],
\]
and dually,
\[
  g(S)=\sum_{T:T\supseteq S}f(T)\quad\forall S\subseteq[n]
  \quad\Leftrightarrow\quad
  f(S)=\sum_{T:T\supseteq S}(-1)^{|T|-|S|}g(T)\quad\forall S\subseteq[n].
\]
As an instance, suppose that~$A_1,\dots,A_n$ are subsets of some finite
set~$A$.  Define~$f\colon B_n\to\Q$ by
\[
  f(S)=|\left\{ a\in A:a\in A_i \text{ iff } i\in S\right\}|.
\]
for all~$S\subseteq[n]$.  Thus,~$f(S)$ is the cardinality of the set of elements
of~$A$ that form a region in the Venn diagram for~$A_1,\dots,A_n$.  The
``outer'' region is counted by
\[
  f(\emptyset)=|A\setminus\left( \cup_{i\in[n]A_i}
  \right)|
  =|A|-|A_1\cup\dots\cup A_n|
  = |A_{1}^{c}\cap\cdots\cap A_{n}^{c}|.
\]
In particular, if~$A=\cup_{i\in[n]A_i}$, then~$f(\emptyset)=0$.
\begin{center}
  \includegraphics[height=2in]{08wed_diagram.png}
\end{center}
Define
\[
  g(S)=\sum_{T:T\supseteq S}f(T).
\]
Then
\[
  g(S)=
  \begin{cases}
    |\cap_{i\in S}A_i|&\text{if~$S\neq\emptyset$}\\
    \hfill|A|\hfill&\text{if~$S=\emptyset$}.
  \end{cases}
\]
Apply the (second version) of M\"obius inversion to get
\begin{align*}
  f(\emptyset)
  &= 
  \sum_{T:T\supset\emptyset}(-1)^{|T|}g(T)\\[8pt]
  &=  |A|-\sum_{i}|A_i|+\sum_{i<j}|A_i\cap A_j|-\sum_{i<j<k}|A_i\cap A_j\cap A_k|
  +\dots+(-1)^n|A_1\cap\dots\cap A_n|.
\end{align*}
On the other hand, we have,~$f(\emptyset)=|A|-|A_1\cup\dots\cup A_n|$. The
{\bf principle of inclusion-exclusion} follows:
\[
  |A_1\cup\dots\cup A_n|=
\sum_{i}|A_i|-\sum_{i<j}|A_i\cap A_j|+\sum_{i<j<k}|A_i\cap A_j\cap A_k|
+\dots+(-1)^{n-1}|A_1\cap\dots\cap A_n|.
\]
\end{document}


