\section{Linear Map}
\subsection{The Vector Space of Linear Maps}
  \paragraph{1.}
  \begin{proof}
    If $T$ is linear, then $T(0,0,0)=0$ and therefore $b=0$. Meanwhile,
    $T(2,2,2)=2T(1,1,1)$ implies $12+8c=12+2c$. Hence, $c=0$. The proof of the
    converse part is trivial.
  \end{proof}

  \paragraph{3.}
  \begin{proof}
    Let $e_i$ be the $i$-th vector in the standard base of $\mathbb{F}^n$ and
    suppose that $Te_i = \sum_{j=1}^n A_{1,j}e_j$. Then for $x=(x_1,\dots,x_n)^T
    \in\mathbb{F}^n$,
    \[
      Tx = T\left(\sum_{i=1}^n x_ie_i\right) = \sum_{i=1}^n x_iTe_i =
      \sum_{i=1}^n x_i\sum_{j=1}^nA_{j,i}e_j =
      \sum_{j=1}^n\left(\sum_{i=1}^nA_{j,i}x_i\right) e_j.
    \]
  \end{proof}

  \paragraph{5.}
  \begin{proof}
    Too lengthy to write it down...
  \end{proof}

  \paragraph{7.}
  \begin{proof}
    Let $\{x_0\}$ be a basis of $V$ and $\lambda$ be a scalar such that $Tx_0=
    \lambda x_0$. By the linearity of $T$, for every $x=kx_0$ in $V$, $Tx=kTx_0
    =k\lambda x_0=\lambda(kx_0)=\lambda x$.
  \end{proof}

  \paragraph{9.}
  \begin{solution}
    From the additivity condition we can derive that $\varphi(kz)=k\varphi(z)$
    for any $k\in\mathbb{Q}$. Hence we can try some functions where $\varphi(iz)
    =i\varphi(z)$ fails. It turns out that $\varphi(z)=\Im(z)$ is one of the
    maps required.
  \end{solution}

  \paragraph{11.}
  \begin{proof}
    Let $\{\alpha_1,\dots,\alpha_p\}$ and $\{\alpha_1,\dots,\alpha_p,\beta_1,
    \dots,\beta_q\}$ be bases of $U$ and $V$ respectively. Then the linear map
    which maps $\alpha_i$ to $T\alpha_i$ and maps $\beta$ to $0$. Clear that
    it is the desired linear map.
  \end{proof}

  \paragraph{13.}
  \begin{proof}
    Suppose that $v_k$ is in the span of the other vectors and let $w_i=0$ for
    each $i\ne k$ and $w_k\ne 0$. No $T\in\mathcal{L}(V, W)$ can maps $v_i$ to
    $w_i$ since the linearity of $T$ would force $w_k$ to be $0$, leading to a
    contradiction.
  \end{proof}

% end

\subsection{Null Spaces and Ranges}
  \paragraph{2.}
  \begin{proof}
    Since $S$ maps every vector of $V$ into the null space of $T$, the map $TS$
    is the zero map. Hence $(ST)^2 = S(TS)T = 0$.
  \end{proof}

  \paragraph{4.}
  \begin{proof}
    Suppose $S,T\in\mathcal{L}(\mathbb{R}^5,\mathbb{R}^4)$ maps and only maps
    $e_1,e_2,e_3$ and $e_3,e_4,e_5$ to the zero vector respectively. Then $e_1,
    e_2,e_4,e_5\notin\nul(S+T)$, implying that $\dim\nul(S+T)<2$. Hence $\{T\in
    \mathcal{L}(\mathbb{R}^5,\mathbb{R}^4\,:\,\dim\nul T>2)\}$ is not a subspace
    of $\mathcal{L}(\mathbb{R}^5,\mathbb{R}^4)$.
  \end{proof}

  \paragraph{6.}
  \begin{proof}
    It follows immediately from the rank-nullity theorem and the fact that $\dim
    \nul T$ and $\dim\range T$ are integers.
  \end{proof}

  \paragraph{8.}
  \begin{proof}
    Let $\{w_1,\dots,w_m\}$ be a basis of $W$ and $S,T\in\mathcal{L}(V,W)$ be
    two linear maps such that $\range S=\spn(w_1)$ and $\range T=\spn(w_2,\dots,
    w_n)$. Clear that $\range(S+T)=W$. Hence, the set described is not a
    subspace of $\mathcal{L}(V,W)$.
  \end{proof}

  \paragraph{10.}
  \begin{proof}
    For every $y\in\range T$ there exists some $x=\sum x_iv_i\in V$ such that
    \[
      y=Ty = T\left(\sum_{i=1}^n x_iv_i\right) = \sum_{i=1}^n x_iTv_i.
    \]
    Hence, $\range T=\spn(Tv_1,\dots,Tv_n)$.
  \end{proof}

  \paragraph{12.}
    For readers who familiar with the orbit-stabilizer theorem or just the
    (group) homomorphism, the proof should be straightforward.
  \begin{proof}
    For every nonzero $y$ in $\range T$, there exists some $x\in V$ such that
    $Tx=y$. For each $y\ne 0$, we choose one such $x$, put them all together and
    put $0$ into them to get $U$. By the construction, clear that $T(U) =
    \range T$ and , $U\cap\nul T=\{0\}$.
  \end{proof}

  \paragraph{14.}
  \begin{proof}
   By the rank-nullity theorem,
   \[
     \dim\nul T + \dim\range T = 8 \quad\Rightarrow\quad
     \dim\range T = 5 = \dim\mathbb{R}^5.
   \]
   Hence, $\range T = \mathbb{R}^5$ and therefore $T$ is surjective.
  \end{proof}

  \paragraph{16.}
    Actually, the cosets of the kernel partition the whole space.
  \begin{proof}
    Let $\{v_1,\dots,v_n\}$ be a basis of $\range T$ and $Tu_i=v_i$ for $i=1,2,
    \dots,n$. Denote $\spn(u_1,\dots,u_n)$ by $U$. We now prove that $V=U+\nul
    T$. For every $x\in V$, suppose that $Tx=y=\sum y_iv_i$ and $\tilde{x}=\sum
    y_iu_i$. Note that $\tilde{x}\in U$ and $T(x-\tilde{x})=Tx-T\tilde{x}=0$,
    i.e., $x-\tilde{x}\in\nul T$. Hence, $V=U+\nul T$. As both of $U$ and $\nul
    T$ are finite-dimensional, so is $V$.
  \end{proof}

  \paragraph{18.}
  \begin{proof}
    By the rank-nullity theorem, clear that $\dim V \ge \dim\range T =\dim W$ if
    there exists some surjective $T\in\mathcal{L}(V,W)$. \par
    Assume that $\dim V\ge\dim W$ and let $\{v_1,\dots,v_n\}$ and $\{w_1,\dots,
    w_m\}$ be bases of $V$ and $W$ respectively. Then the linear map which
    maps $v_i$ to $w_i$ for each $1\le i\le m$ is surjective.
  \end{proof}

  \paragraph{20.}
  \begin{proof}
    If $T$ is injective, then for every $y\in\range T$, there exists exactly
    one $x\in V$ such that $y=Tx$. Let $S$ be the map which maps $y$ to such
    $x$. It is linear since for every $y_1,y_2\in\range T$ and scalar $a,b$,
    supposing $Sy_i = x_i$,
    \[
      T(ax_1+bx_2) = aTx_1 + bTx_2 = ay_1 + by_2.
    \]
    implying $S(ay_1+by_2) = ax_1+bx_2 = aSy_1 + bSy_2$. For every $x\in V$,
    $(ST)x = S(Tx) = x$. \par
    Suppose there exists some $S\in \mathcal{L}(W,V)$ such that $ST=I$. Then
    \[
      Tx_1 = Tx_2 \quad\Rightarrow\quad
      STx_1 = STx_2 \quad\Rightarrow\quad
      x_1 = x_2.
    \]
    Hence, $T$ is injective.
  \end{proof}

  \paragraph{22.}
  \begin{proof}
    Let $\tilde{T}$ be the restriction of $T$ to $\nul ST$. It is still a linear
    map since $\nul ST$ is a subspace of $U$. Note that $x\in\nul ST$ iff $(ST)x
    =0$ iff $Tx\in\nul S$. Hence, $\range\tilde{T}\subset\nul S$. Thus, by the
    rank-nullity theorem,
    \[
      \dim\range\tilde{T} \le \dim\nul S \quad\Rightarrow\quad
      \dim\nul ST - \dim\nul\tilde{T} \le \dim\nul S.
    \]
    Since $\nul\tilde{T} \le \nul T$, this implies $\dim\nul ST \le \dim\nul S +
    \dim\nul T$.
  \end{proof}

  \paragraph{24.}
  \begin{proof}
    If there exists $S\in\mathcal{L}(W,W)$ such that $T_2=ST_1$, then $\nul T_2
    =\nul ST_1$. Hence for every $x\in\nul T_1$, as $S(T_1x)=S0 = 0$, $x\in\nul
    T_2$. Therefore, $\nul T_1\subset\nul T_2$.\par
    Now we suppose $\nul T_1\subset\nul T_2$ and construct $S$. Note that all we
    concerns is its behavior on some basis of $\range T_1$. Let $\{w_1, \dots,
    w_n\}$ be a basis of $\range T_1$ and $T_1v_i = w_i$ for $i=1,\dots,n$. For
    each $x\in V$, let $U_x = \{x+y\,:\,y\in\nul T_2\}$ and $Sw_k=T_2x$ if $v_k
    \in U_x$. It can be verified that $S$ is well-defined and does satisfy the
    requirement as long as $\nul T_1\subset\nul T_2$.
  \end{proof}

  \paragraph{26.}
  \begin{proof}
    Let $\mathcal{P}_n(\mathbb{R})=\{p\in\mathcal{P}(\mathbb{R})\,\,:\,\deg p
    \le n\}$, which are some subspaces of $\mathcal{P}(\mathbb{R})$. We now
    prove that $D$ is a surjective linear map onto $\mathcal{P}_n(\mathbb{R})$
    for every nonnegative integer $n$ by induction. \par
    Suppose $Dx = c_0 \ne 0$, then for any $0\ne c\in\mathcal{P}_0(\mathbb{R})$,
    $D(cx / c_0) = c$. Hence, $D$ is a surjective map onto $\mathcal{P}_0
    (\mathbb{R})$. Assume that $D$ is a surjective map onto $\mathcal{P}_{k-1}
    (\mathbb{R})$ and suppose $Dx^{k+1} = p=a_0 + a_1x + \cdots + a_kx^k$ where
    $a_k\ne 0$. For every nonzero $b_k$ and $q = b_0+b_1x+\cdots+b_kx^k \in
    \mathcal{P}_k(\mathbb{R})$, let $r$ be a polynomial with degree $\le k-1$
    such that $q=b_k/a_k p + r$. By our induction hypothesis, there exists some
    polynomial $\tilde{r}$ such that $D\tilde{r}=r$. Then
    \[
      D(b_k/a_k x^{k+1} + \tilde{r}) = \frac{b_k}{a_k}Dx^{k+1} + D\tilde{r} =
      \frac{b_k}{a_k}p+r = q.
    \]
    Hence, $D$ is also a surjective map onto $\mathcal{P}_k(\mathbb{R})$. Thus,
    $D$ is surjective.
  \end{proof}

  \paragraph{28.} TODO

  \paragraph{30.} TODO

% end

\setcounter{subsection}{3}
\subsection{Invertibility and Isomorphic Vector Spaces}

  \paragraph{1.}
  \begin{proof}
    Clear that the linear map $T\inv S\inv$ is right and left inverse of $ST$
    and therefore $ST$ is invertible. And by the uniqueness of the inverse,
    $(ST)\inv = T\inv S\inv$.
  \end{proof}

  \paragraph{3.}
  \begin{proof}
    First we suppose the existence of such an operator, then $T\inv$ is also the
    inverse of $S$. Hence $S$ is invertible and therefore injective. \par
    Now we suppose $S$ is injective. Let $\{u_1,\dots,u_m\}$ and $\{u_1,\dots,
    u_m, u_{m+1},\dots,u_n\}$ be bases of $U$ and $V$ respectively. $\{Su_1,
    \dots, Su_m\}$ is linearly independent as $S$ is injective and therefore we
    can expand it to a basis, $\{Su_1,\dots,Su_m,v_{m+1},\dots,v_n\}$, of $V$.
    Let $T\in\mathcal{L}(V)$ maps $u_i$ to $Su_i$ for $i=1,\dots,m$ and $u_j$ to
    $v_j$ for $j=m+1,\dots,n$. $T$ is obviously injective and therefore
    invertible as $V$ is finite-dimensional.
  \end{proof}

  \paragraph{5.}
  \begin{proof}
    Suppose that such an $S$ exists. Since $S$ is invertible, $\range S=V$.
    Hence, $\range T_2 = \range T_2S = \range T_1$. \par
    Now we suppose that $\range T_1=\range T_2$ and construct $S$ by defining
    its behavior on a basis of $V$. Let $\{v_1,\dots,v_m\}$ be a basis of $\nul
    T_1$. As $\range T_1=\range T_2$ implies $\dim\nul T_1=\dim\nul T_2$, we can
    set $Sv_i = u_i$ for $i=1,\dots,m$ where $\{u_1,\dots,u_m\}$ is a basis of
    $\nul T_2$. \par
    Let $\{v_1,\dots,v_m,v_{m+1},\dots,v_n\}$ be a basis of $V$. Clear that $\{
    T_1v_{m+1},\dots,T_1v_n\}$ spans $\range T_1$. It is linearly independent
    since
    \begin{align*}
      & x_{m+1}T_1v_{m+1}+\cdots+x_nT_1v_n = 0 \\
      \Rightarrow\quad& T_1(x_{m+1}v_{m+1}+\cdots+x_nv_n) = 0 \\
      \Rightarrow\quad& x_{m+1}v_{m+1}+\cdots+x_nv_n \in \nul T_1 \\
      \Rightarrow\quad& x_{m+1} = \cdots = x_n = 0.
    \end{align*}
    Hence, it is a basis of $\range T_1$. Since $\range T_1=\range T_2$, there
    exists $u_{m+1},\dots,u_n$ such that $T_2u_i = T_1v_i$ for $i=m+1,\dots,n$.
    It is easy to verify that $u_1,\dots,u_m,u_{m+1},\dots,u_n$ are linearly
    independent. Finally, for $i=m+1,\dots,n$, we also set $Sv_i = u_i$. Clear
    that $S$ is invertible and satisfies the requirement.
  \end{proof}

  \paragraph{7.}
  \begin{proof}
    $\,$\\
    (a) For any $A,B\in E$ and scalar $a,b$,
    \[
      (aA+bB)v = a(Av) + b(Bv) = 0.
    \]
    Hence, $E$ is a subspace of $\mathcal{L}(V,W)$. \\
    (b) Since $v\ne 0$, putting $v_1=v$, there exists some vectors in $V$ such
    that $\{v_1,\dots,v_n\}$ is a basis of $V$. Let $U=\spn(v_2,\dots,v_n)$. It
    can be shown that $E$ is isomorphic to $\mathcal{U,W}$. Hence, $\dim E =
    (\dim V-1)\dim W$.
  \end{proof}

  \paragraph{9.}
  \begin{proof}
    If $S$ and $T$ are invertible, then clear that $T\inv S\inv$ is the inverse
    of $ST$. Meanwhile, if $S$ or $T$ is not invertible, therefore not
    surjective, then
    \[
      \dim\range ST\le\min\{\dim\range S,\dim\range T\}<\dim V.
    \]
    Hence, $ST$ is not surjective and hence not invertible as $V$ is
    finite-dimensional. Thus, $ST$ is invertible iff $S$ and $T$ are invertible.
  \end{proof}

  \paragraph{11.}
  \begin{proof}
    Since $V$ is finite-dimensional and $S(TU)=(ST)U=I$, both $S$ and $U$ are
    invertible and the inverses of which are $TU$ and $ST$ respectively. Hence,
    \[
      STU=I \quad\Rightarrow\quad T = S\inv U\inv,
    \]
    implying that $T$ is also invertible and $T\inv = US$.
  \end{proof}

  \paragraph{13.}
  \begin{proof}
    It follows almost immediately from Exercise 9 that all of $R$, $S$ and $T$
    are invertible and therefore $S$ is injective.
  \end{proof}

  \paragraph{15.}
  \begin{proof}
    Let $\{e_1,\dots,e_n\}$ be the standard basis of $\mathbb{F}^{n,1}$ and
    suppose $Te_i = u_i$. It is easy to verify that $A=(u_1, \dots, u_n)$ is a
    $m$-by-$n$ matrix such that $Tx=Ax$ for every $x\in\mathbb{F}^{n,1}$.
  \end{proof}
% end

\subsection{Products and Quotients of Vector Spaces}
  \paragraph{2.}
  \begin{proof}
    We only prove the result for $m=2$. It is easy to prove it for arbitrary $m$
    in a similar manner. Suppose that $V=V_1\times V_2$ is finite-dimensional.
    Then $V_1\times\{0\}$, a subspace of $V$, is finite-dimensional. Clear that
    $V_1$ is isomorphic to $V_1\times \{0\}$ and hence it is also of finite
    dimension. Similarly, $V_2$ is finite-dimensional.
  \end{proof}

  \paragraph{4.}
  \begin{proof}
    We construct the isomorphism $S:\mathcal{L}(V_1\times\cdots\times V_n,W)\to
    \mathcal{L}(V_1,w)\times\cdots\times\mathcal{L}(V_n,W)$ explicitly. For
    every $T\in\mathcal{L}(V_1\times\cdots\times V_n,W)$, suppose $T(v_1,\dots,
    v_n) = w$. Let $T_i(v_i)=w$ for $i=1,\dots,n$ and $ST = (T_1,\dots, T_n)$.
    Clear that $T_i\in\mathcal{L}(V_i, W)$ and $S$ is invertible.
  \end{proof}

  \paragraph{6.}
  \begin{proof}
    We may interpret the elements in $\mathcal{L}(\mathbb{F}^n,V)$ as mappings
    from the "coordinates" to "abstract vectors". With this in mind, we
    construct the isomorphism $S$. For every $(v_1,\dots,v_n)\in V^n$ and $(x_1,
    \dots,x_n)^T\in\mathbb{F}^n$, let
    \[
      (S(v_1,\dots,v_n))
      \begin{bmatrix}
        x_1 \\ \vdots \\ x_n
      \end{bmatrix}
      = \sum_{i=1}^n x_iv_i.
    \]
    It is easy to verify that $S$ does satisfy the requirement.
  \end{proof}

  \paragraph{8.}
    We may interpret the set of all possible $\lambda v+(1-\lambda w)$ as the
    "line" through $v$ and $w$. And the idea behind the proof is illustrated in
    the picture below.
    \begin{figure}[htbp]
      \centering
      \includegraphics[height=5cm]{./image/3-d-8.png}
    \end{figure}
  \begin{proof}
    If $A$ is an affine subset, i.e., there exists some subspace $U$ and $a\in
    V$ such that $A=a+U$, then for all $\lambda\in\mathbb{F}$ and $v,w\in A$,
    \[
      \lambda v+(1-\lambda)w = \lambda(a+u_1) + (1-\lambda)(a+u_2) =
      a + (u_1+(1-\lambda)u_2) \in A
    \]
    where $u_1$ and $u_2$ are some elements in $U$. \par
    Now we suppose $\lambda v+(1-\lambda)w\in A$ holds, fix $a\in A$ and let $U=
    \{a_1-a \,:\, a_1\in A\}$. By the hypothesis, for every scalar $\lambda$ and
    $a_1\in A$, $a + \lambda(a_1-a)\in A$. Therefore, for every $u_1 = a_1-a \in
    U$, $\lambda u_1\in U$. Meanwhile, let $u_2=a_2-a\in U$, $(u_1 +u_2)/2\in U$
    as
    \[
      a+\frac{1}{2}(u_1+u_2) = a + \frac{1}{2}(a_1+a_2-2a) =
      \frac{1}{2}a_1+\frac{1}{2}a_2.
    \]
    Hence, by the previous result, $u_1+u_2\in U$. Thus, $U$ is a subspace and
    $A=a+U$ is an affine subset.
  \end{proof}

  \paragraph{10.}
  \begin{proof}
    Let $A$ be the intersection of every collection of affine subsets of $V$ and
    suppose $A$ is nonempty. Let $v,w\in A$ and $\lambda\in\mathbb{F}$. Then, by
    Exercise 8, for every affine subset $A_{\alpha}$ of $V$, $\lambda v+ (1-
    \lambda)w\in A_\alpha$. Hence it also belongs to $A$. Thus, $A$ is also an
    affine subset of $A$ (as long as nonempty).
  \end{proof}

  \paragraph{12.}
  \begin{proof}
    Let $\{a_1+U,\dots, a_m+U\}$ be a basis of $V/U$ and we first prove a small
    result: for every $v\in V$, there exists an unique list of $v_1,\dots,v_m\in
    \mathbb{F}$ such that $v - (v_1a_1 + \cdots v_ma_m)\in U$. Suppose that
    $v_1\hp,\dots, v_m\hp$ is such a list as well. Then
    \[
      (v - (v_1a_1+\cdots+v_ma_m))-(v - (v_1\hp a_1+\cdots+v_m\hp a_m)) \in U.
    \]
    Therefore,
    \[
      (v_1-v_1\hp)a_1+\cdots+(v_m-v_m\hp)a_m \in U = 0+U,
    \]
    Hence $v_i\hp = v_i$ for each $i=1,\dots,m$, completing the proof.\par
    Therefore, for every $v\in V$, denoting $v_1a_i+\cdots+v_ma_m$ as $a_v$, we
    may define $S$ to be map which maps $v$ to $(v-a_v,a_v+U)$. Now we show that
    $S$ is linear and bijective. For every $u,v\in V$ and scalar $a, b$,
    \begin{align*}
      aSu + bSv
      &= a(u-a_u,a_u+U) + b(v-a_v,a_v+U)  \\
      &= ((au+bv)-(aa_u+ba_v), (aa_u+ba_v) + U) \\
      &= S(au+bv).
    \end{align*}
    $Su = 0$ iff $(u-a_u,a_u+U) = 0$ iff $u=a_u=0$ and therefore $S$ is
    injective. Clear that $S$ is surjective. Thus, $S$ is an isomorphism and
    $V$ is isomorphic to $U\times(V/U)$.
  \end{proof}

  \paragraph{16.}
  \begin{proof}
    Clear that every vector space with dimension $1$ over field $\mathbb{F}$ is
    isomorphic to $\mathbb{F}$. Hence, it suffices to prove there exists
    $\varphi\in\mathcal{L}(V,V/U)$ such that $\nul\varphi = U$ and the quotient
    map is just the map we want.
  \end{proof}
% end

\subsection{Duality}
  \paragraph{1.}
  \begin{proof}
    Suppose that $\varphi\in V\hp$ and is not the zero map. Then, $\varphi(v)=c
    \ne 0$ for some $v\in V$. By the linearity of $\varphi$, for every $0\ne a
    \in\mathbb{F}$, $\varphi(av/c)=a$ and $\varphi(0)=0$, completing the proof.
  \end{proof}

  \paragraph{3.}
  \begin{proof}
    It suffices to prove that there exists $\varphi\in V\hp$ which maps $v$ to
    a nonzero element of $\mathbb{F}$. We argue by contradiction. Assume that
    for all $\varphi\in V\hp$, $\varphi(v)=0$. Then $\{v\}^0 = V\hp$. Hence,
    $\dim \{v\} = \dim V-\dim \{v\}^0 = 0$, implying that $v=0$. Contradiction.
  \end{proof}

  \paragraph{9.}
  \begin{proof}
    For every $v=\sum x_iv_i \in V$ and $\psi\in V\hp$,
    \begin{align*}
      \psi(v)
      &= \psi(x_1v_1+\cdots+ x_nv_n) \\
      &= \psi(v_1)x_1 + \cdots + \psi(v_n)x_n \\
      &= \psi(v_1)\varphi_1(v) + \cdots + \psi(v_n)\varphi_n(v) \\
      &= (\psi(v_1)\varphi_1 + \cdots + \psi(v_n)\varphi_n)(v),
    \end{align*}
    where the third equality comes from the definition of the dual space and the
    last one comes from the linearity of $\varphi_1,\dots,\varphi_n$.
  \end{proof}

  \paragraph{11.}
  \begin{proof}
    $\rank A = 1$ iff there exists some nonzero $\alpha\in\mathbb{F}^m$ such
    that $A = [d_1\alpha\,\dots\, d_n\alpha]$ iff $A = \alpha [d_1\, \dots \,
    d_n]$.
  \end{proof}

  \paragraph{15.}
  \begin{proof}
    $T\hp=0$ iff $\dim W\hp = \dim\nul T\hp$ iff $\dim W = \dim(\range T)^0$ iff
    $\range T = 0$ iff $T=0$.
  \end{proof}

  \paragraph{19.}
  \begin{proof}
    As $U\subset V$ and $V$ is finite-dimensional, $U=V$ iff $\dim U=\dim V$ iff
    $\dim U^0 = 0$ by 3.106 iff $U^0 = \{0\}$.
  \end{proof}

  \paragraph{25.}
  \begin{proof}
    Note that the RHS of the equality equals to
    \[
      \tilde{U} = \bigcap_{\varphi\in U^0}\nul\varphi.
    \]
    For every $u\in U$, since $u\in\nul\varphi$ for every $\varphi\in U^0$ by
    definition. Hence, $U\subset\tilde{U}$. And let $\psi\in U^0$ be a linear
    functional such that $\nul\psi = U$. Then $\dim\tilde{U}\le\dim\nul\psi=
    \dim U$. Hence, $U=\tilde{U}$.
  \end{proof}

  \paragraph{29.}
  \begin{proof}
    By the hypothesis, for every $\psi\in W\hp$, $T\hp(\psi)=\psi\circ T
    =k\varphi$ for some scalar $k$. By 3.109, $\dim\range T =\dim\range T\hp=1$.
    Hence, there exists $\psi\in W\hp$ whose restriction to $\range T$ is an
    one-to-one map to $\mathbb{F}$. Thus,
    \[
      \nul\varphi = \nul k\varphi = \nul(\psi\circ T) = \nul T.
    \]
  \end{proof}

  \paragraph{31.}
    In brief, we choose an arbitrary basis of $V$ and try to express the
    required basis with it by solving a system of linear equations.
  \begin{proof}
    Let $u_1,\dots,u_n$ be a basis of $V$ and $A=[\varphi_i(u_j)]$. Now we prove
    that $A$ is invertible. Suppose
    \[
      x_1\begin{bmatrix}
        \varphi_1(u_1) \\ \vdots \\ \varphi_n(u_1)
      \end{bmatrix}
      + \cdots +
      x_n\begin{bmatrix}
        \varphi_1(u_n) \\ \vdots \\ \varphi_n(u_n)
      \end{bmatrix}
      = 0.
    \]
    and $u=x_1u_1+\cdots+x_nu_n$. Then, $\varphi_i(u) = 0$ for $i=1,\dots,n$.
    As $\varphi_1,\dots,\varphi_n$ is a basis of $V\hp$, this implies
    $(\spn(u))^0 = V\hp$. Hence, by 3.106, $\dim\spn(u)=0$ and therefore $u=0$.
    Thus, the columns of $A$ are linearly independent and therefore $A$ is
    invertible.  \par
    Let
    \begin{equation}
      \label{eq:3.F.31.1}
      \begin{bmatrix}
        v_1 & \cdots & v_n
      \end{bmatrix} =
      \begin{bmatrix}
        u_1 & \cdots & u_n
      \end{bmatrix}A\inv
    \end{equation}
    and now we prove that $v_1,\dots,v_n$ is a basis of $V$ and the dual basis
    of it is exactly $\varphi_1,\dots,\varphi_n$. Since $u_1,\dots,u_n$ are
    linearly independent and $A\inv$ is nonsingular, so do $v_1,\dots,v_n$.
    Hence, $v_1,\dots,v_n$ is a basis of $V$. \eqref{eq:3.F.31.1} also implies
    \[
      u_k = \varphi_1(u_k)v_1 + \cdots + \varphi_n(u_1)v_n.
    \]
    Applying $\varphi_i$ on the both sides for each $k=1,\dots,n$ yields
    \[
      \begin{bmatrix}
        \varphi_i(u_1) \\ \vdots \\ \varphi_i(u_n)
      \end{bmatrix} =
      \begin{bmatrix}
        \varphi_1(u_1) & \cdots & \varphi_n(u_1) \\
        \vdots         & \ddots & \vdots         \\
        \varphi_1(u_n) & \cdots & \varphi_n(u_n)
      \end{bmatrix}
      \begin{bmatrix}
        \varphi_i(v_1) \\ \vdots \\ \varphi_i(v_n)
      \end{bmatrix}.
    \]
    Again, since $A$ is nonsingular, the system of linear equations has exactly
    one solution $\varphi_i(v_j) = 0$ for $i\ne j$ and $\varphi_i(v_i)=1$.
    Namely, $\varphi_1,\dots,\varphi_n$ is the dual basis of $v_1,\dots,v_n$.
  \end{proof}

  \paragraph{37.}
  \begin{proof}
    $\,$\\
    (a) Since $\pi$ is surjective, $\pi\hp$ is injective by 3.108. \\
    (b) $\range\pi\hp = (\nul\pi)^0 = U^0$. \\
    (c) It follows immediately from (a) and (b).
  \end{proof}
% end


\documentclass[12pt,leqno]{amsart}

\usepackage{rcs}

\usepackage{amsmath,amssymb,amsfonts,amsthm}
\usepackage{eucal,graphicx}
\usepackage{color}
\usepackage[pdftex]{hyperref}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.4in}

%\renewcommand{\baselinestretch}{2}     % Activate for double spacing.
%\renewcommand{\baselinestretch}{1.6}   % Activate for 1-1/2 spacing.
%\renewcommand{\baselinestretch}{1.3}   % Activate for 1-1/3 spacing.

\newcommand \comment[1]{}			%  Silent version.
%\renewcommand \comment[1]{\emph{#1}}		%  Comment revealed.
\newcommand \dateadded[1]{\comment{[Date added: #1.]}}
\newcommand \mylabel[1]{\label{#1}\comment{{\rm \{#1\} }}}
\newcommand \myref[1]{\ref{#1}\comment{{\{#1\}}}}

\newtheorem{lem}{Lemma}
\newtheorem{cor}[lem]{Corollary}
\newtheorem{prop}[lem]{Proposition}
\newtheorem{thm}[lem]{Theorem}
\newtheorem{definition}[lem]{Definition}

\theoremstyle{remark}
\newtheorem{exam}{Example}%[section]
\newcommand \myexam[1]{\smallskip\begin{exam}[\emph{#1}]}

%\renewcommand{\phi}{\varphi}
\newcommand\eset{\varnothing}
\newcommand\inv{^{-1}}
\newcommand\setm{\setminus}
\newcommand\chiz{\chi^\bbZ}
\newcommand\bbR{\mathbb{R}}
\newcommand\bbZ{\mathbb{Z}}
\newcommand\cH{\mathcal{H}}

\newcommand\Ueloop{\ensuremath{U^e_{0}}}
\newcommand\Uecoloop{\ensuremath{U^e_{1}}}
\newcommand\Uefdyad{\ensuremath{U^{ef}_{1}}}
\newcommand\Uefgtriad{\ensuremath{U^{efg}_{1}}}
\newcommand\Uefgtriangle{\ensuremath{U^{efg}_{2}}}

%   Disjoint Union
%\newcommand{\dunion}{\uplus}
\newcommand{\dunion}
%{\mbox{\hbox{\hskip4pt$\cdot$\hskip-4.62pt$\cup$\hskip2pt}}}
{\mbox{\hbox{\hskip6pt$\cdot$\hskip-5.50pt$\cup$\hskip2pt}}}
%
% Dot inside a cup.
% If there is a better, more Latex like way
% (more invariant under font size changes) way,
% I'd like to know.
\newcommand{\dunionsubscript}
{\mbox{\scriptsize\hbox{\hskip4pt$\cdot$\hskip-4.35pt$\cup$\hskip2pt}}}

\newcommand{\Bases}[1]{\ensuremath{{\mathcal{B}}(#1)}}
\newcommand{\Reals}{\ensuremath{\mathbb{R}}}
\newcommand{\FieldK}{\ensuremath{K}}
\newcommand{\Perms}{\ensuremath{\mathfrak{S}}}
\newcommand{\rank}{{\rho}}% {{\mbox{rank}}}
\newcommand{\Rank}{{\rho}}% {{\mbox{rank}}}
\newcommand{\Card}[1]{\ensuremath{{\left|#1\right|}}}
\newcommand{\ext}[1]{\ensuremath{\mathbf{#1}}}

% Set Complement
% command to mess with overline, bar or custom
% alternatives for sequence or set complement
%
%\newcommand{\scomp}[1]{\ensuremath{\;\overline{#1}\;}}
%\newcommand{\scomp}[1]{\ensuremath{\bar{#1}}}
%\newcommand{\scomp}[1]{\ensuremath{\genfrac{}{}{}{}{}{#1}}}
\newcommand{\scomp}[1]{\ensuremath{\overline{#1}}}

\allowdisplaybreaks

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\title[Ported Separator-Strong Parametrized Tutte Functions]
{Ported Separator-Strong
Parametrized Tutte Functions}

\author{Seth Chaiken}
\address{Computer Science Department\\
The University at Albany (SUNY)\\
Albany, NY 12222, U.S.A.}
\email{\tt sdc@cs.albany.edu}

\begin{abstract}
We discuss Tutte functions of parametrized matroids in which
certain ``port'' elements have been distinguished.
The port elements are held back from deletion and contraction
during Tutte decompositions.  We prove conditions, specified on the parameters
and other relevant values,
that are necessary and sufficient for a ported Tutte function to be well-defined
on ported minor-closed classes.
They generalize together known
conditions for definedness on minor-closed sets but with no ports, and
for definedness everywhere but with the port restriction.

The ported Tutte functions might have different values
on different orientations of the same matroid.
The
application to graphs where these
differences do occur is motivated by
expressions of solutions to electrical resistive network
and other discrete Laplacian-based problems by new kinds of Tutte functions.

An activities based expression and the corresponding
interval partition of the boolean lattice of port-free subsets
are
given for any recursive computation of a Tutte function value,
not just one based on an element order.  These are then specialized to
a corank-nullity and a geometric lattice expansion for the ported
generalization of normal Tutte functions.
\end{abstract}

\subjclass[2000]{Primary 05B35; Secondary 05C99, 05C15, 57M25, 94C05}

\keywords{Tutte function, Tutte polynomial, Kirchhoff, Oriented Matroid,
pointed, restricted, relative, ported}

\thanks{New Version \today.}

\maketitle
\pagestyle{headings}

\RCSID $Id: ParamTutteNew.tex,v 1.28 2010/12/31 06:05:05 seth Exp $

%%%%%%%%%%%%%%%%%%%%%%%%

\section{Introduction}

Two natural and useful generalizations
of the Tutte equations and the resulting
Tutte polynomials $T$ and decompositions are known wherein:
\begin{enumerate}
\item A set $P$ of distinguished elements, which
we call ``ports'', is specified.  The
operations of deleting and contracting
non-separator $e$,
and of removing a separator $e$
so that $T(G\oplus e)=XT(G)$ or $YT(G)$ depending
on whether $e$ is a coloop or loop, are then
restricted only to $e\not\in P$.  See \cite{SetPointedLV,MR0419272}
where the Tutte polynomials are called ``set-pointed'',
\cite{sdcPorted}, and Brylawsky's early work
\cite{BrylawskiPointed} on the $|P|=1$ case.
\item
Four parameters $x_e, y_e, X_e, Y_e$ are
given for each element $e$.  $x_e$ and $y_e$
are coefficients in the additive Tutte
equation for contracting and deleting
$e$ when $e$ is a non-separator.  $X_e$
and $Y_e$ generalize the common $X$ and $Y$
in (1) to different parameters for
different $e$.
The resulting additive
Tutte equation is $T(G)=x_eT(G/e)+y_eT(G\setminus e)$.
When a set $P$ of port elements (1) is specified,
parameters are given only for $e\not\in P$.
\end{enumerate}

We use the separator multiplicative Tutte equation shown
in (1) because the general multiplicative equation
$T(G_1\oplus G_2) = T(G_1)T(G_2)$ can be derived from it given
additional assumptions, in particular
$T(\emptyset)=T(\emptyset)T(\emptyset)$ when $P=\emptyset$
\cite[Corollary 2.3]{Ellis-Monaghan-Traldi}.
For this note, we only address consequences of generalizations
(1) and (2).  We adopt Zaslavsky's terminology\cite{MR93a:05047} to
call the resulting functions \textbf{separator
strong Tutte functions}.
Ported generalizations of
the
formula
$T(\emptyset) T(G_1\oplus G_2)
= T(G_1) T(G_2))$ \cite{Ellis-Monaghan-Traldi}
and related results about strong Tutte functions\cite{MR93a:05047},
direct sums
and graphs (based on
\cite{MR93a:05047,BollobasRiordanTuttePolyColored,Ellis-Monaghan-Traldi}) are
left for future publication.

The underlying problem with the parametrized generalizion (2)
is that different computations of $T(G)$ from the separator
multiplicative and additive Tutte equations and the value of $T$ on $\emptyset$
give different results.  Only for special
parameter values (such as $X_e = X$, $Y_e = Y$ and $x_e = y_e = 1$
for all $e$,
which define classical Tutte polynomials) do the Tutte equations have a
solution.
This problem has been resolved by Zaslavsky
who published the so-called ZBR conditions\cite{Ellis-Monaghan-Traldi}
on the parameter values for collections of Tutte equations to
have a solution
\cite{MR93a:05047,Ellis-Monaghan-Traldi}.
Those conditions were applied to classify the Tutte functions into
fields\cite{MR93a:05047} and rings\cite{BollobasRiordanTuttePolyColored}.
Two equivalent algebraic formulations
of the ZBR conditions have been given.  One can specify a set of
polynomial equations on the
parameters necessary and sufficient for $T(G)$ to be defined from
the Tutte equations for all $G$ in a given domain.  Alternatively, given the
domain, the range of
$T$ can be specified by the quotient module or ring
$R[\{x_e, y_e, X_e, Y_e\}]/I$
%$R[\Lambda]/I$
where
$I$ is the ideal generated by the polynomials $f$, for each equation
$f = 0$ in the set.

In either formulation, a solution to the Tutte equations on some domain
is called a Tutte function.  A polynomial expression for a Tutte function
that is universal for all those Tutte functions is called a Tutte polynomial.
When the parameters (for us, the $x_e, y_e, X_e, Y_e$) and
values ($T(Q)$ for indecomposibles $Q$) are considered to be the variables,
the Tutte polynomial is non-unique\cite{TomJul09}.  We can then
say that the ZBR conditions (on the values of the parameters
and the $T(Q)$) are necessary and sufficient for all the
Tutte polynomials for the same graph or matroid to express the same value.

The subject of this note is extending the ZBR conditions
to the combination of generalizations of (1) and (2) slightly
beyond the work of Diao and Hetyei, together with
ported generalizations of various expansions of Tutte functions,
and the emergance of paramatrized Tutte functions depending
on matroid orientation when the port constraint (1) is imposed.
The development suggests that it is more natural to consider
a Tutte function to be determined by the separator multiplicative
equations with parameters ($X_e$ and $Y_e$)
plus the \textbf{initial value} $T(\emptyset)$
rather than by considering the loop and coloop graphs or matroids
to be the indecomposible objects.
With the port constraint, our indecomposibles
are (or in the case of graphs, have) matroids, including $\emptyset$,
on zero or more port elements only.

\subsection{ZBR conditions and indecomposibles}

The first step towards characterizing Tutte functions
over various choices of field or ring values and function domain
was taken by Zaslavsky\cite{MR93a:05047}. He used induction on the
number of matroid elements to show that the conditions are exactly
those for the existance of Tutte functions on only three very simple
kinds of matroids and all their minors:
The ``dyad'' or uniform rank 1 matroid on two elements, the
``triad'' or uniform rank 1 matroid on three elements and the
``triangle'' or uniform rank 2 matroid
on three elements.  See the top of
figure \ref{small}.
Diao and Hetyei found that the three ZBR conditions on the
parameters are necessary
and sufficient for ported (which they called ``relative'')
Tutte functions to be defined
for all graphs and matroids.  Our generalization consists of
ZBR-type conditions that apply to five simple kinds of
configurations within an appropriately restricted minor closed
class.  These conditions are necessary and sufficient for
ported Tutte functions to be defined on the given class.
They are illustrated in the bottom of figure \ref{small}.
Each condition applies to only certain
matroids in the class with only two or three non-port elements.
The minor $Q$ mentioned in the condition is an
\textbf{indecomposible}, which means that
none of the Tutte equations apply to $T(Q)$.

When $T(G)$ is well-defined, it can then
be expressed by a not necessarilly unique polynomial in the parameters
and $T(Q)$ on indecomposibles $Q$.  Generalizing $T(\emptyset)$, we call
such $T(Q)$ \textbf{initial values}.
Generally speaking, a function $T$,
not necessarilly a classical
polynomial, is called a \textbf{separator-strong} \cite{JoAndTom}
\textbf{ported} \cite{sdcPorted} \textbf{Tutte function} when it
satisfies the parametrized additive and separator multiplicative
Tutte equations.
Such functions are sometimes only defined
on a particular domain of matroids, graphs, and
certain matroid representations\cite{TutteEx}.

%\begin{enumerate}
%\item

Theorem \ref{BigTheorem} demonstrates how
the
characterizations\cite{MR93a:05047,BollobasRiordanTuttePolyColored,Ellis-Monaghan-Traldi} of Tutte functions
defined on minor-closed subsets $\mathcal{G}$ generalize the
conditions given by Diao and Hetyei for relative
Tutte functions\footnote{It is unfortunate that the term ``Tutte polynomial''
is often used in the sense of our usage of ``Tutte function'', even in
situations where the difference matters.}
to be defined everywhere.  Thus the
programs of Zaslavsky \cite{MR93a:05047},
and of Bollob\'{a}s and Riordan
\cite{BollobasRiordanTuttePolyColored} of classifying
all Tutte functions may be carried out in the
ported or relative case.

Diao and Hetyei's conditions consist
of Zaslavsky's
conditions on all dyads, triads and
triangles\footnote{When the conditions apply to \textit{all} dyads
and triads over a ground set, it is immediate that they apply to all
the triangles also.}
of non-port elements
together with a ``block invariant'' property of
the Tutte function restricted to graphs or matroids with
port elements only.

Our's consist of
one equation $T(Q)f=0$ for each instance of
of one of five types of $G\in\mathcal{G}$, where
all but two or three of $G$'s elements
are ports
and $Q$ is a minor of $G$ obtained by removing
the non-port elements.  In the first three,
$f=0$ expresses Zaslavsky's conditions on dyads,
triangles and triads on non-ports.  The last two resemble the
triangle and triad conditions in that one of the
three elements is replaced with a quotient $Q$ of
$Q_0$, where $Q_0$ is connected to the other two elements
in either a series or parallel pair.  See figure \ref{small}.

\begin{figure}
\input{smallmatroids.pdf_t}
\caption{\label{small} Dyad, triangle and triad
\cite{MR93a:05047} represented by graphs.
Below them are the five kinds of matroids for which our conditions
are derived by using that two computations from Tutte equations
must give the same value.  Each condition has the
form $T(Q)f=0$ where $f$ is a polynomial in the parameters
for $e$, $f$, and, in two of the five cases, $g$.
In the last case, $f=(x_eY_f+y_ex_f)-(x_fY_e+y_fx_e)$.}
\end{figure}

We defer our proof to the end because the
result is such a mild generalization of
Diao and Hetyei's work.  Our proof avoids
introducing an activities-based expression
based on a linear ordering of the elements.

It should be noted that if Tutte functions
over proper subclasses of matroids or graphs are considered,
then each condition derives from a particular subclass
member.  The three independent kinds of conditions found by
Zaslavsky must be replaced by five independent kinds when we
generalize with a non-empty set of ports.
We were surprised that although each condition
is $F=0$ for some a polynomial $F$ that includes
parameters for 2 or 3 elements of $E$,
each such $F=T(Q)f$ includes
\emph{one and only one $T(Q)$} which occurs as
a factor.

%\item
\subsection{Tutte functions depending on orientations}

The resulting
ported Tutte functions might depend on the orientation
of an oriented matroid $M$, not just on the
underlying matroid.  Here is the simplest case.
Let $Q^+$ be the oriented matroid
on port elements $\{p,q\}$ consisting of a 2-circuit
with signature $\pm(+,+)$ and $Q^-$ be the one with
signature $\pm(+,-)$.  An example is any ported Tutte
function $T$ with $T(Q^+)=1$ and $T(Q^-)=-1$.  Note that
the distinct oriented matroids $Q^{\pm}$ have identical
underlying matroids.

An electrical resistor network is one of many analogs
modeled by the
discrete Laplacian matrix\cite{DoyleSnellBook}.
It has been known from Kirchhoff\cite{Kirchhoff} that
the transfer resistance
(called transpedance in \cite{BSST,TutteGraphBook}),
is the ratio of two polynomials whose monomials
are $\pm$ products of conductances $g_e$ over sets of edges,
where each set is a kind of forest.
Transfer resistance is usually defined given two
pairs of nodes.  It is the potential difference
across one pair due to unit current flowing in and
out at the other pair.
Suppose two new edges $\{p,q\}$ are introduced
solely to demark the two given pairs of nodes.
We take $p$ and $q$ to be ports and we do not
supply parameters or conductances $g$ for them.
The denominator is the ported Tutte function that enumerates
the spanning trees containing neither $p$ nor $q$.
Although the number of terms in the numerator
is also ported Tutte function of the underlying graphic, non-oriented
matroid\cite{sdcPorted},
the numerator itself cannot be because the signs of the terms
vary.

It is an immediate result of our explicit extension of
Diao and Hetyei's theory to oriented matroids
that the above numerator is \textit{also} a ported Tutte function.
It is the extension of $T$ above with $T(Q')=0$ for
all decomposibles except for $U^r_{pq}$ and
all $x_e=X_e=g_e$, $y_e=Y_e=1$.   The positive terms
(multiples of $T(U^+_{ef})=1$) correspond to spanning forests
$F$ with exactly two trees such that $F\cup \{p,q\}$ contains
a unique circuit and, when oriented, that signed circuit contains
$p$ and $q$ in the same direction.  The negative terms
include $T(U^-_{ef})=-1$.
%are analogous.

We had developed this subject in \cite{TutteEx}
where the Tutte equations had to be verified directly.
We had demonstrated and applied a variation of Tutte functions
of linear matroids whose values lie in an exterior algebra,
so this is not subsumed by the present work.

%\item
\subsection{Tree-based activity expressions}

When the conditions are satisfied, all recursive
computations based on the ported Tutte equations give the
same result.  The Tutte computation tree based formulation
of activities
\cite{GordonMcMachonGreedoid}
enables us to
define an activities-type expansion for every such
computation, not just those based on a linear
ordering of $E$.  The known theory generalizes to
the ported case, including for example, interval
partitions of the Boolean lattice $2^{E}$.
There is
one term and boolean interval for
each independent subset $F\subseteq E$ for
which $F\cup P$ is spanning; such $F$ specialize
to bases when $P=\emptyset$.
The blocks
of such interval partitions are then partitioned according
to the common $Q=M/A|P$ for $A$ in each block.

Our inductive, non-activities proof
facilitates
the generalization Diao and Hetyei's activities based
expression of $T(G)$ (needed in their proof)
so that the activities are not based on a fixed
ordering of elements.  Instead, the activities
are based on an arbitrary recursive calculation of
$T(G)$ expressed as a tree as in \cite{NegamiPoly}.  This result applies the
idea of the ``computation tree'' based activities expression
for Tutte polynomials of greedoids given
by Gordon and MacMahon to ported or restricted Tutte
polynomials of matroids or graphs\cite{GordonMcMachonGreedoid}.

%\item
\subsection{Ported normal Tutte functions}
We conclude the note by addressing the
ported generalization
of \textbf{normal} Tutte functions, named by
Zaslavsky as those that have corank-nullity expressions,
in contrast
to the activity-based expressions that exist for every
Tutte function.

%\end{enumerate}

\section{Matroid Tutte Function Characterization}
\label{ParamTutteSec}

\begin{definition}
\label{SSTMDefinition}
Let $P$ be a set of \textbf{ports} and $\mathcal{C}$ be a class of matroids or
oriented matroids closed under taking minors or oriented minors
by deleting or contracting only elements $e\not\in P$.
Such a $\mathcal{C}$ is called a \textbf{$P$-family}.
Suppose $\mathcal{C}$ is
given with four parameters $(x_e,y_e,X_e,Y_e)$,
each in a commutative ring $R$, for each $e\not\in P$ that is an element
in some $M\in\mathcal{C}$.

The ground set of $M\in\mathcal{C}$ is denoted by $S(M)$ and
$E(M) = S(M)\setminus P$, the ground set elements of $M$ that are
not ports.

A \textbf{separator-strong parametrized $P$-ported Tutte function}
$T$ maps $\mathcal{C}$ to $R$ or to an $R$-module and satisfies
conditions
\eqref{TA} and \eqref{TSSM} below for all $M\in\mathcal{C}$ and
all $e$ in $E(M)$.

\begin{equation}
\label{TA}
\tag{TA}
\begin{gathered}
T(M) = x_e T(M/e) + y_e T(M\setminus e) \\
\text{ if $e\not\in P$ and $e$ is a non-separator,
       i.e., neither a loop nor a coloop.}
\end{gathered}
\end{equation}

\begin{equation}
\label{TSSM}
\tag{TSSM}
\begin{gathered}
\text{If } e\not\in P\text{ is a coloop in }M\text{ then }
T(M)=X_e T(M/e).\\
\text{If } e\not\in P\text{ is a loop in }M\text{ then }
T(M)=Y_e T(M\setminus e).
\end{gathered}
\end{equation}

\end{definition}
The $Q\in \mathcal{C}$ for which neither \eqref{TA} nor
\eqref{TSSM} apply, equivalently, $E(Q)=\emptyset$,
are called the \textbf{indecomposibles} or
\textbf{$P$-quotients} in $\mathcal{C}$.
$U^{ef\ldots}_r$ denotes the uniform rank $r$ matroid
on $\{e,f,\ldots\}\subseteq E$.

\subsection{Paramaters and Initial Values}

Classifications of parametrized Tutte functions $T$ for
given rings (or fields as rings) and given function domain
are partly based on the value $T(\emptyset)$.  For example,
Tutte functions traditionally satisfy
$T(G_1\oplus G_2) = T(G_1)T(G_2)$ for all direct summands,
while in \cite{MR93a:05047} separator-strong Tutte functions are
the generalization where $G_1$ or $G_2$ is required to be a
separator.   Hence $T(\emptyset)\neq T(\emptyset)T(\emptyset)$ is
possible for separator-strong Tutte functions.

Here we take a different approach which seems to be more natural for
separator-strong ported Tutte functions with $P\neq \emptyset$.
Instead of specifying a Tutte function by parameters denoted above by
$x_e, y_e$ together with ``initial values'' $T(U^r_e)$ for each rank $r=0$ or
$r=1$ matroid on a singleton ground set $\{e\}$, we provide
four parameters $x_e,y_e, X_e, Y_e$ for each $e\in E$, and
$T(U^r_e)$ is determined by a Tutte equation $T(U^0_e)=Y_eT(\emptyset)$
or $T(U^0_e)=Y_eT(\emptyset)$.  We consider $\emptyset$ (assuming
$\emptyset\in\mathcal{G}$) to be an indecomposible.  The
separator multiplicative Tutte equations
$T(U^0_e\oplus G)=Y_eT(G)$
and
$T(U^1_e\oplus G)=X_eT(G)$ therefore subsume the special case
of an ``initial value'' needed for a loop or coloop $e$ when $e\not\in P$.

We use the term \textbf{initial value} for $T(Q)$ whenever $Q$ is
an indecomposible.  (In \cite{MR93a:05047}, the $T(U^r_e)$ are called initial
values, whereas for us, for example, $T(U^1_e)=X_eT(\emptyset)$ where
$X_e$ is called a parameter and $T(\emptyset)$ is called an initial value.)

\subsection{Ported Matroid ZBR Theorem}

Proposition \ref{SameMinorProp} helps simplify the statement
of Theorem \ref{BigTheorem}

\begin{prop}
\label{SameMinorProp}
Suppose $e,f$ are in series, or are in parallel, in matroid or
oriented matroid $M$.
%\begin{enumerate}
%\item
(1) The minors $M/e\setminus f=M/f\setminus e$
are equal as matroids.
%\item
(2) If $M$ is oriented, the oriented minors
$M/e\setminus f=M/f\setminus e$ are equal as oriented matroids.
%\end{enumerate}
\end{prop}

\begin{proof}
If $e,f$ are in series, note that $M/e\setminus f$ $=$
$M\setminus f/e$.  $e$ is a coloop in $M\setminus f$,
so $M\setminus f/e$ $=$ $M\setminus\{e,f\}$, which is
clearly the same matroid or oriented matroid if $e,f$
are interchanged.  The relevant theory of minors of oriented matroids
can be found in \cite{OMBOOK}.

If $e,f$ are in parallel, $e,f$ are in series in
the matroid or oriented matroid dual $M^*$ of $M$.
By the first case, $M^*\setminus e/ f$ $=$
$M^*\setminus f/e$ as matroids or as oriented matroids.
Thus $M/e\setminus f$ $=$ $(M^*\setminus e/ f)^*$ $=$
$(M^*\setminus f/ e)^*$ $=$ $M/f\setminus e$ as matroids or
as oriented matroids.
\end{proof}

\begin{thm}
\label{BigTheorem}
The following two statements are equivalent.
\begin{enumerate}
\item
Given an initial value $T(Q)$ in an $R$-module for each
$P$-quotient $Q\in\mathcal{C}$, the Tutte equations
\eqref{TA} and \eqref{TSSM}
extend $T$ to a unique $P$-ported separator-strong
parametrized Tutte function with
with $R$-parameters $(x, y, X, Y)$.
\item
\begin{enumerate}
\item For every $M=U^{ef}_1\oplus Q\in\mathcal{C}$ with
$P$-quotient $Q$ ($U^{ef}_1$ is a dyad),
\[
T(Q)(x_e Y_f + y_e X_f) =
T(Q)(x_f Y_e + y_f X_e).
\]
\item
For every $M=U^{efg}_2\oplus Q\in\mathcal{C}$ with
$P$-quotient $Q$ ($U^{efg}_2$ is a triangle),
\[
T(Q)X_g(x_e y_f + y_e X_f) =
T(Q)X_g(x_f y_e + y_f X_e).
\]
\item
For every $M=U^{efg}_1\oplus Q\in\mathcal{C}$ with
$P$-quotient $Q$  ($U^{efg}_1$ is a triad),
\[
T(Q)Y_g(x_e Y_f + y_e x_f) =
T(Q)Y_g(x_f Y_e + y_f x_e).
\]
\item
If $\{e,f\}=E(M)$ is a parallel pair connected to $P$,
\[
T(Q)(x_e Y_f + y_e x_f) =
T(Q)(x_f Y_e + y_f x_e)
\]
where $P$-quotient $Q=M/e\setminus f=M/f\setminus e$.
\item
If $\{e,f\}=E(M)$ is a series pair connected to $P$,
\[
T(Q)(x_e y_f + y_e X_f) =
T(Q)(x_f y_e + y_f X_e)
\]
where $P$-quotient $Q=M/e\setminus f=M/f\setminus e$.
\end{enumerate}
\end{enumerate}
\end{thm}

When $P=\emptyset$, this reduces to the
Zaslavsky-Bollob\'{a}s-Riordan theorem
for matroids\cite{Ellis-Monaghan-Traldi}:
In that case, only $Q=\emptyset$ occurs and the last two conditions become
vacuous.

\subsection{Universal Tutte Polynomial}
\label{UniversalSec}
It is easy to follow
\cite{BollobasRiordanTuttePolyColored,Ellis-Monaghan-Traldi} to define
a universal, i.e., most general $P$-ported parametrized
Tutte function $T^{\mathcal{C}}$ for $\mathcal{C}$.
We take indeterminates $x_e, y_e, X_e, Y_e$ for each $e\in E(M),
M\in\mathcal{C}$
and an indeterminate $[Q]$ for each $P$-quotient $Q\in\mathcal{C}$.
Let $\mathbb{Z}[x,y,X,Y]$ denote the integer polynomial ring generated by
the $x_e,y_e,X_e,Y_e$ indeterminates, and define $\widetilde{\mathbb{Z}}$
to be the $\mathbb{Z}[x,y,X,Y]$-module generated by the $[Q]$.
Let $I^{\mathcal{C}}$ denote the ideal of $\widetilde{\mathbb{Z}}$
generated by the identities of Theorem \ref{BigTheorem}, comprising
for example $[Q](x_eY_f+y_eX_f-x_fY_e-y_fX_e)$ for each instance of
case (a), etc.  The universal Tutte function has values in the
quotient module $\widetilde{\mathbb{Z}}/I^{\mathcal{C}}$.  Finally,
observe that the range of Tutte function $T$  can be considered to be the
$R$-module generated by the values $T(Q)$ where ring $R$ contains the
$x,y,X,Y$ parameters. If the $T(Q)\in R$, consider
the ring $R$ to be the $R$-module generated by $R$.
We follow \cite{Ellis-Monaghan-Traldi} to write
the corresponding consequence of Theorem \ref{BigTheorem}:

\begin{cor}
\label{UniversalCor}
Let $\mathcal{C}$ be a $P$-minor closed class of matroids or
oriented matroids.  Then there is a
$\widetilde{\mathbb{Z}}/I^{\mathcal{C}}$-valued function
$T^{\mathcal{C}}$ on $\mathcal{C}$ with $T^{\mathcal{C}}(Q)=[Q]$ for each $P$-quotient
$Q\in\mathcal{C}$ that is a $P$-ported parametrized Tutte function
on $\mathcal{C}$ where the parameters are the
$x, y, X, Y \in \widetilde{\mathbb{Z}}$.  Moreover, if $T$ is any $R$-parametrized
Tutte function with parameters $x'_e, y'_e, X'_e, Y'_e$, then $T$ is the
composition of $T^{\mathcal{C}}$ with the homomorphism determined by
$[Q]\rightarrow T(Q)$ for $P$-quotients $Q$ and
$x_e\rightarrow x'_e$, etc., for each $e\in E(\mathcal{C})$.
\end{cor}

%\section{A Tutte function depending on matroid orientation}

%Our synthesis began with
%\cite{TutteEx}, where the term ``port'' is
%motivated by an application;

%{\LARGE Whoppie!  Write me soon!  OR DELETE ME!! UGH...}

\section{Tutte Computation Trees and Activities}
\label{Activity}

Zaslavsky\cite{MR93a:05047} noted that the
\emph{basis} or \emph{activities}
expansion, introduced by Tutte
\cite{TutteDich,TutteGraphBook} for graphs, applies
to all well-defined parametrized
Tutte functions whereas the
parametrized corank-nullity generating function
expresses only a proper subset of them, which he called
normal.  We show
how to give activities-type expansions comprised of
one expansion for every recursive computation of
a ported Tutte function value, not just those
determined by a linear element ordering.
We apply to
ported matroids the expansions based on
activities defined with Tutte computation trees, which
Gordon and McMahon \cite{GordonMcMachonGreedoid}
used to demonstrate
that a definition of Tutte polynomials
of greedoids is consistant with Tutte equations.
Unlike matroids, some greedoids
do not have activities expansions for their Tutte polynomials
that derive from element orderings\cite{GordonMcMachonGreedoid}.
When we have $P\neq\emptyset$,
each tree leaf is generally one of many indecomposibles.
The use of trees whose leaves are indecomposibles
for analyzing a variation of Tutte decompositions for graph
appears in \cite{NegamiPoly}.

Ellis-Monaghan and
Traldi \cite{Ellis-Monaghan-Traldi} remarked that the Tutte equation
approach appears to give a shorter proof of the ZBR theorem
than the activities expansion approach.
The proofs by induction on $|E|$
demonstrate that every calculation of $T(M)$ from Tutte equations
produces the same result when the conditions on the parameters
and initial values are satisfied.  We then know immediately that
the polynomial expression
resulting from
a particular calculation equals the Tutte function value.
We suggest a heuristic reason why
the Tutte equation approach is more succinct:
The induction assures that
\emph{every} computation
with smaller $|E|$ gives the same result, not just those
computations that are determined by linear orders on $E$.
%
Proofs of activities expansions for matroids, and their generalizations
for $P$-ported matroids, seem more informative and certainly
no harder when the expansions are derived from a general Tutte
computation tree, than when the expansions are only those
that result from an element order.
From the retrospective that the Tutte equations
specify a non-deterministic recursive computation
\cite{Garey-Johnson}, it seems artificial to start with
element-ordered computations and then prove
first that all linear orders give the same result and
second that it
satisfies the Tutte equations, in order prove that
all recursions give the same result.
We therefore
take advantage of the Tutte computation tree formalism
and the more general expansions it enables.

\subsection{Computation Tree Expansion}
\begin{definition}
Given $P$-ported matroid or oriented matroid $M$,
a \textbf{$P$-subbasis} $F$
is an independent set  with $F\subseteq E(M)$
(so $F\cap P=\emptyset$) for which $F\dunion P$ is a spanning set
for $M$
(in other words, $F$ spans $M/P$).
$\mathcal{B}_P(M)$ denotes the set of $P$-subbases.
\end{definition}

Equivalent definitions were given in \cite{SetPointedLV}
and in \cite{RelTuttePoly}.   In the latter, $F$ is called a
``contracting set.'' The following is immediate and
useful:

\begin{prop}
For every $P$-subbasis $F$ there exists an independent set $Q\subseteq P$
that extends $F$ to a basis $F\dunion Q\in \mathcal{B}(M)$ of $M$.
Conversely, if $B\in\mathcal{B}(M)$ then $F=B\cap E=B\setminus P$
is a $P$-subbasis.
\end{prop}

\begin{definition}[Computation Tree, following \cite{GordonMcMachonGreedoid}]
\label{CompTreeDef}
A $P$-ported (Tutte) computation tree for $M$ is a
binary tree whose root is labeled by $M$ and which satisfies:
\begin{enumerate}
\item If $M$ has non-separating elements not in $P$, then
the root has two subtrees and there exists one such element $e$ for which
one subtree is a computation tree
for $M/e$ and the other subtree is a computation tree for
$M\setminus e$.

The branch to $M/e$ is labeled with ``$e$ contracted'' and
the other branch is labeled ``$e$ deleted''.
\item Otherwise (i.e., every element in $E(M)$
is separating) the root is a leaf.

Each leaf is labelled with a $P$-quotient $Q$ plus a direct sum
of loop or coloop matroids on elements respectively $e$ or $f$ in $E$,
expressed
as $[Q]\prod X_e \prod Y_f$.
\end{enumerate}
\end{definition}

%Figure \ref{c4p2TwoFigure} illustrates two computation trees; it
%is conventional to slant contraction edges to the left and
%deletion edges to the right.

\begin{definition}[Activities with respect to a leaf]
\label{ActivityTreeDef}
For a $P$-ported Tutte computation tree for $M$,
a given leaf, and the path from the root to this leaf:
\begin{itemize}
\item Each $e\in E(M)$ labeled ``contracted'' along this path
is called \textbf{internally passive}.
\item Each coloop $e\in E(M)$ in the leaf's matroid is
called \textbf{internally active}.
\item Each $e\in E(M)$ labeled ``deleted'' along this path
is called \textbf{externally passive}.
\item Each loop $e\in E(M)$ in the leaf's matroid is
called \textbf{externally active}.
\end{itemize}
\end{definition}

\begin{prop}
Given a leaf of a $P$-ported Tutte computation tree for $M$,
the set of internally active or internally passive elements
constitutes a
$P$-subbasis of $M$ which we say
\textbf{belongs to the leaf}.
Furthermore, every $P$-subbasis $F$ of $N$ belongs to a unique leaf.
\end{prop}

\begin{proof}
For the purpose of this proof, let us extend Definition \ref{ActivityTreeDef}
so that, given a computation tree with a given node $i$
labeled by matroid $M_i$,
$e\in E$ is called internally passive when $e$ is labeled
``contracted'' along the path from root $M$ to
node $i$.  Let $IP_i$ denote the set of such internally passive
elements.

It is easy to prove by induction on the length of the root to node $i$ path
that
(1) $IP_i\cup S(M_i)$ spans $M$ and
(2) $IP_i$ is an independent set in $M$.  The proof
of (1) uses the fact that elements labeled deleted are non-separators.  The
proof of (2) uses the fact that for each non-separator
$f\in M/IP_i$, $f\cup IP_i$ is independent in $M$.

These properties applied to a leaf demonstrate the first conclusion,
since each $e\in E$ in the leaf's matroid must be a separator by Definition
\ref{CompTreeDef}.

Given a $P$-subbasis $F$, we can find the unique leaf with the
algorithm below.  Note that it also operates on arbitrary subsets of $E$.

\textbf{Tree Search Algorithm:} Beginning
at the root, descend the tree according to the rule: At each branch node,
descend along the edge labeled ``$e$-contracted'' if $e\in F$ and along
the edge labeled ``$e$-deleted'' otherwise (when $e\not\in F$).
\end{proof}

We leave the reader to check that
the classsical element-order based activities
expansion, as extended with ports explicitly
in\cite{RelTuttePoly}, is reproduced with
the unique $P$-ported
computation tree in which the greatest non-separator $e\in E$ is
deleted and contracted in the matroid at each tree node,
when the elements are ordered
so $p\in P$ is
before each $e\not\in P$.

\begin{definition}
\label{ActivitySymbolsDef}
Given a computation tree for
$P$-ported (oriented) matroid $M$,
each $P$-subbasis $F\subseteq E$
is associated with the following subsets of non-port elements
defined according to Definition \ref{ActivityTreeDef}
from the unique leaf determined by the algorithm given above.
\begin{itemize}
\item $IA(F)\subseteq F$ denotes the set of internally active elements,
\item $IP(F)\subseteq F$ denotes the set of internally passive elements,
\item $EA(F)\subseteq E\setminus F$
denotes the set of externally active elements,
and
\item $EP(F)\subseteq E\setminus F$ denotes the set of externally
passive elements.
\item $A(F)=IA(F)\dunion EA(F)$ denotes the set of active elements.
\end{itemize}
\end{definition}

\begin{prop}
\label{PartitionProposition}
Given a $P$-ported Tutte computation tree for
$M$,
the boolean lattice of subsets of $E=E(M)$
is partitioned by the collection of
intervals $[IP(F),F\dunion EA(F)]$
determined from the collection
of $P$-subbases $F$, which correspond to the leaves.
(Note $F\dunion EA(F)=IP(F)\dunion A(F)$.)

Each $A\in [IP(F),F\dunion EA(F)]$ in one interval determines the
same matroid or oriented matroid  $P$-quotient
by $M/A|P=M/IP(F)|P$.

The boolean lattice of subsets of $E=E(M)$
is also partitioned by the collection of
intervals $[EP(F),(E\setminus F)\dunion IA(F)]$.
(Note $(E\setminus F)\dunion IA(F)$ $=$ $EP(F)\dunion A(F)$.)

Each $A'\in [EP(F), (E\setminus F)\dunion IA(F)]$ of one of these
intervals determines the same matroid or oriented matroid
$P$-quotient by $M\setminus B'/(E\setminus B')$
$=$ $M/F|P$.

For a given $F\in\mathcal{B}_P(M)$, $A\subseteq E$ satisfies
$A\in [IP(F),F\dunion EA(F)]$ if and only if
$(E\setminus A)\in [EP(F),(E\setminus F)\dunion IA(F)]$.
\end{prop}

\begin{proof}
Every subset $A\subseteq E=E(M)\setminus P$ belongs to the
unique interval corresponding to the unique leaf found by the tree search
algorithm given at the end of the previous proof.

$P$-quotient $M/A|P$ is independent of the order of the
deletions and contractions.  So let $IP(F)\subseteq A$ be contracted
and $(E\setminus EA(F))\subseteq (E\setminus A)$ be deleted first.
The remaining elements of $E$ are loops or coloops, so the $P$-quotient
is independent of whether they are deleted or contracted.

The dual of that tree search algorithm, which descends along
the edge labelled ``$e$-deleted'' if $e\in A'$, etc., will find the
unique leaf whose interval $[EP(F),E\setminus F\cup IA(F)]$ contains
$A'$.

When $A\in[IP(F),F\cup EA(F)]$, the dual algorithm applied to
$A'=E\setminus A$ will find the same leaf.  The $P$-quotient is
determined by $IP(F)$.
\end{proof}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following generalizes the activities expansion expression given
in \cite{MR93a:05047} to ported (oriented) matroids, as well as
Theorem 8.1 of \cite{SetPointedLV}.

\begin{prop}
\label{TuttePolyExpression}
Given parameters $x_e$, $y_e$, $X_e$, $Y_e$, and
$P$-ported matroid or oriented matroid $M$
the Tutte polynomial expression
determined by the sets in Definition
\ref{ActivitySymbolsDef}
from a computation tree is
given by
\begin{equation}
\tag{PAE}
\label{PAE}
\sum_{F\in \mathcal{B}_P}[M/F|P]
\;X_{IA(F)}\;x_{IP(F)}\;Y_{EA(F)}\;y_{EP(F)}.
\end{equation}
\end{prop}

\begin{proof}
\eqref{PAE} is an expression constructed by applying some of the
Tutte equations.  One monomial results from each leaf.
In that leaf's matroid,
each active element is a separator, and the active elements
contribute $X_{IA(F)}Y_{EA(F)}$ to the monomial.
The passive elements which contribute
$x_{IP(F)}y_{EP(F)}$
are the tree
edge labels in the path from the root to the leaf.
Each $M/F|P$ denotes a $P$-quotient of $M$, so the
expression is a polynomial in the parameters and in the
initial values.
Therefore, \eqref{PAE} expresses the result of
the calculation when one substitutes
$[M/F|P]=T(M/F|P)$.
\end{proof}

From Corollary \ref{UniversalCor} we conclude:
\begin{thm}
\label{ActivitiesTheorem}
For every $P$-ported parametrized Tutte function $T$
on $\mathcal{C}$ into
ring $R$ or an $R$-module,
for every computation tree for $M\in\mathcal{C}$,
(and so for every ordering of $E(M)$),
the polynomial expression \eqref{PAE} equals
$T^{\mathcal{C}}(M)$ of Corollary \ref{UniversalCor}.
\end{thm}

\subsection{Expansions of Normal Tutte Functions}
\label{NormalSubSec}
After a notational translation,
Zaslavsky's \cite{MR93a:05047} definition of {\bf normal} Tutte
functions discriminates
those for which $T(\emptyset)=1$, and those for which there exist
$u$, $v\in R$ so that for each $e\in E(M)$,

\begin{equation}
\tag{CNF}
\label{CNF}
X_e = x_e + uy_e \text{ and } Y_e = y_e + vx_e.
\end{equation}

The equations of
Theorem \ref{BigTheorem} are readily verified and
so we naturally extend this definition, with the
$T(\emptyset)=1$ condition dropped, to
ported separator-strong parametrized Tutte functions.
All the expressions for normal Tutte
functions are therefore in the ring freely generated by
$u$, $v$, the $x_e, y_e$ and the $[Q]$.
We can now generalize some known
expansions for the Tutte polynomial $T^{\mathcal{C}}$
after the \eqref{CNF} substitution.
The rank function for $M$ is denoted by $r$.

\begin{cor}[Boolean Interval Expansion]
\label{NormalActProp}
The following activities and boolean interval expansion formula
is universal for normal Tutte functions:
\[
T^{\mathcal{C}}(M)=
\sum_{F\in \mathcal{B}_P}[M/F|P]
%\left(
\Big(
\sum_{\substack{
       IP(F)\subseteq K \subseteq F\\
       EP(F)\subseteq L \subseteq E\setminus F
      }}
 x_{K\cup (E\setminus F\setminus L)}\;
 v^{\Card{E\setminus F\setminus L}}\;
 y_{L\cup (F\setminus K)}\;
 u^{\Card{F\setminus K}}\;\;
%\right)
\Big)
\]
\end{cor}

\begin{proof}
Substitute
\eqref{CNF}
into $T^{\mathcal{C}}(M)$
and use
$IP(F)\dunion IA(F) =F$ and
$EP(F)\dunion EA(F)=E\setminus F$
from
Definition \ref{ActivitySymbolsDef}.
\end{proof}

\begin{lem}
\label{KLAlemma}
Given $F\in\mathcal{B}_P$,
$IP(F)$ spans $EA(F)$.

The pairs $(K,L)$ for which
       $IP(F)\subseteq K \subseteq F$ and
       $EP(F)\subseteq L \subseteq E\setminus F$
are in a one-to-one correspondance
with the $A$ satisfying $IP(F)\subseteq A\subseteq F\dunion EA(F)$
given by $A=K\dunion (E\setminus F)\setminus L$.

For every such $A$,
\[
\Card{F\setminus K}=r(M)-r(M/F|P)-r(A)
\]
and
\[
\Card{E\setminus F\setminus L} = \Card{A}-r(A).
\]
\end{lem}

\begin{proof}
(See Figure \ref{Venn} in Appendix.) By our definition of activities,
after all the elements of $IP(F)$ are contracted, all elements
in $EA(F)$ are loops.
(Note none of these elements are ports.)

Let
$A=K\dunion (E\setminus F\setminus L)$.
By our definition of activities,
$IP(F)\dunion IA(F)=F$, so $IP(F)\subseteq A$.
Similarly,
$EP(F)\dunion EA(F)=E\setminus F$, so
$A\cap(E\setminus F)\subseteq EA(F)$.
Hence
$IP(F)\subseteq A\subseteq F\dunion EA(F)$.
Conversely, given such an $A$,
take $K=A\cap F$ and $L=(E\setminus F)\setminus A$.

Since $IP(F)$ spans $EA(F)$ and $K\supseteq IP(F)$, $K$ spans $EA(F)$.
Since $A\subseteq K\dunion EA(F)$, $K$ spans $A$.
$K\subseteq F$, $F$ is a $P$-subbasis, so $K$ and $F$ are independent,
hence $\Card{K}=r(K)=r(A)$ and $\Card{F}=r(F)$.
Therefore, $\Card{F\setminus K}=r(F)-r(A)$.

Since $F$ is a $P$-subbasis, $r(F\cup P)=r(M)$.
By definition of contraction, $r(M/F|P)=r(F\cup P) - r(F)$,
so $r(M/F|P)=r(M)-r(F)$.  We conclude
$\Card{F\setminus K}=r(M)-r(M/F|P)-r(A)$.

$E\setminus F\setminus L = A\setminus K$, so
$\Card{E\setminus F\setminus L} = \Card{A}-\Card{K}$.
As above, $\Card{K}=r(A)$, so the last equation follows.
\end{proof}

\begin{cor}
\begin{equation}
\label{FIntervalExpansion}
T^{\mathcal{C}}(M)=
\sum_{F\in \mathcal{B}_P}[M/F|P]
%\left(
\Big(
\sum_{IP(F)\subseteq A \subseteq (F\!\dunionsubscript\! EA(F))}
 x_{A}
 y_{E\setminus A}
 u^{r(M)-r(M/F|P)-r(A)}
 v^{\Card{A}-r(A)}
%\right)
\Big)
\end{equation}
\end{cor}

\begin{proof}
Apply Lemma \ref{KLAlemma} to the inner sum in
Proposition \ref{NormalActProp}.
\end{proof}

\begin{thm}[Corank-nullity expansion]
\begin{equation}
\tag{PGF}
\label{PGF}
T^{\mathcal{C}}(M) = \sum_{A\subseteq E(M)}[M/A \mid P]x_A y_{E\setminus A}
u^{r(M)-r(M/A\mid P)-r(A)}
v^{|A|-r(A)}.
\end{equation}
\end{thm}

Remark: This extends to separator-strong ported Tutte functions
with parameters on possibly oriented matroids
an expression from \cite{MR0419272} reproduced in \cite{sdcPorted}.  It can
also be proved by corank-nullity generating function methods.

\begin{proof}
By Proposition \ref{PartitionProposition}, given any Tutte computation tree,
the lattice of subsets of $E(M)$ is partitioned
into intervals corresponding to $P$-subbases $\mathcal{B}_P$.
In each interval,
$P$-quotient $M/F|P$ is equal to
$M/A|P$ (as a matroid or oriented matroid)
for
$A\in [IP(F),F\cup EA(F)]$.
Hence we can
interchange the summations in \eqref{FIntervalExpansion} and write
\eqref{PGF}.
\end{proof}

\begin{prop}[Geometric Lattice Flat Expansion]
\label{GFlatProp}
Let $M$ be an oriented or unoriented.
In the formula below,
$F$ and $G$ range over the geometric lattice of flats
$\mathcal{L}=\mathcal{L}(M|E)$ contained
in $M$ restricted to $E = E(M)$.
($E$ is the top of $\mathcal{L}$ and $\le$
is its partial order.)
\[
T^{\mathcal{C}}(M) = \sum_{Q} [Q]
      \sum_{\substack{F\leq E\\
                     [M/F|P]=[Q]
           }}
                   u^{r(M)-r(Q)-r(F)}
                   v^{-r(F)}
                   \sum_{G\le F}
                   \mu(G,F)
                   \prod_{e\in G}
                    (y_e+x_ev)
\]
\end{prop}

\begin{proof}
This
generalizes and
follows the steps for theorem 8 in \cite{sdcPorted}.  (See Appendix.)
\end{proof}

\section{Proof of the Ported ZBR Theorem}

The proof is independent of Diao and Hetyei's.  It is different in
that it is not based on element activities determined by a linear element
order.
It results from adding considerations of ports to
Zaslavsky's proofs in \cite{MR93a:05047}.  We base our sketch
below on the ``straightforward adaption'' presented by
Ellis-Monaghan and Traldi \cite{Ellis-Monaghan-Traldi}, giving
a few details and pointing out differences.

\begin{proof}
As in \cite{Ellis-Monaghan-Traldi},
the necessary relations are easy to deduce by
applying \eqref{TA} and \eqref{TSSM} in two different
orders to a general configuration in each of the five families.

Now on to the converse.
As in \cite{Ellis-Monaghan-Traldi}, the strategy
is to first verify
that the conditions imply $T(M)$ is well-defined for
$n = \Card{E(M)} = 0, 1$ and $2$.  Note that
for us, the count $n$ does not include $|P\cap S(M)|$.
Second, we rely on the hypothesis the $\mathcal{C}$ is closed under
$P$-minors in order to verify
that in a larger minimum $n$ counterexample, the elements of
$E(M)$ are either all in series or all in parallel,
and then the conditions
imply that all calculation orders give the same result.  All the cases involve
two different combinations of deleting and contracting of several elements
in $E(M)$ where both combinations produce the same $P$-quotients.

Let $M\in\mathcal{C}$ be a counterexample with minimum $n=|E(M)|$.
Therefore, whenever $M'$ is a proper $P$-minor of $M$,
$T(M')$ is well-defined.  \eqref{TA} and \eqref{TSSM}
have the property that given $M$ and $e\in E(M)$, exactly one equation
applies.  Therefore,
calculations that yield different values for $T(M)$ must start with
reducing by different elements of $E(M)$.  Since $T(M)$ is an already given
initial value when $n=0$,
we can assume $n\geq 2$.

$M$ cannot contain a separator $e\in E(M)$, because
this $e$ is a separator in every $P$-minor of $M$ containing $e$.
Therefore, as observed in \cite{Ellis-Monaghan-Traldi}, every
computation has the same result $X_e T(M/e)$ or $Y_e T(M\setminus e)$
depending on whether $e$ is a coloop or a loop.

Let $e$ be one element in $E(M)$.  Since no element in $E(M)$ is a
separator, $V=x_{e} T(M/{e}) + y_{e} T(M\setminus {e})$ is well-defined,
and so is $x_{e'} T(M/{e'}) + y_{e'} T(M\setminus {e'})$
for each other $e'\in E$.
We follow \cite{Ellis-Monaghan-Traldi} and define
$D=\{e'\in E(M) \mid V=x_{e'} T(M/{e'}) + y_{e'} T(M\setminus {e'})\}$.  The
induction
hypothesis then tells us
that there is at least
one  $f\in E(M)\setminus D$.
(Recall $e, e', f\not\in P$.)

Suppose that $e$ is a separator in both $M\setminus f$ and
$M/f$ and $f$ is a separator in both
$M\setminus e$ and $M/e$.  Then,
$T$ would
be well-defined for all four of these $P$-minors and so
we can write
\[
T(M)=x_e x_f T(M/\{e,f\}) + x_e y_f T(M/e\setminus f)
+ y_e x_f T(M\setminus e/f)
+ y_e y_f T(M\setminus\{e,f\}).
\]
Both computations give the same value because in this situation
the reductions by $e$ and $f$ commute.
So, for $M$ to be a counterexample, there must be $e\in D$
and $f\not\in D$ ($e, f\not\in P$)
to which one case of the following lemma applies:

\begin{lem}
\cite{MR93a:05047}
Let $e , f$ be nonseparators in a matroid $M$. Within each column the
statements are equivalent:

\begin{minipage}{0.5\textwidth}
\begin{enumerate}
\item
$e$ is a separator in $M\setminus f$.
\item
$e$ is a coloop in $M\setminus f$.
\item
$e$ and $f$ are in series in $M$.
\item
$f$ is a separator in $M\setminus e$.
\end{enumerate}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{enumerate}
\item
$e$ is a separator in $M/ f$.
\item
$e$ is a loop in $M/ f$.
\item
$e$ and $f$ are in parallel in $M$.
\item
$f$  is a separator in $M/e$.
\end{enumerate}
\end{minipage}
\end{lem}

We claim that one of the following five cases must be satisfied:
\begin{enumerate}
\item
$n=2$ and $E(M)=\{e,f\}$ is a dyad.
\item
$n\geq 3$ and $E(M)$ is a circuit not connected to $P$.
\item
$n\geq 3$ and $E(M)$ is a cocircut not connected to $P$.
\item
$n\geq 2$ and for some $\emptyset\neq P'\subseteq P$,
$P'\cup E(M)$ is a cocircuit.
\item
$n\geq 2$ and for some $\emptyset\neq P'\subseteq P$,
$P'\cup E(M)$ is a circuit.
\end{enumerate}

As in  \cite{Ellis-Monaghan-Traldi}, we draw the conclusion that
if $e\in D$ and $f\not\in D$ then $e, f$ are either series or parallel.
It was further proven that a series pair and a parallel pair cannot
have exactly one element in common.  Therefore, the pairs $e,f$ satisfying
the conditions are either all series pairs or all parallel pairs.  By
minimality of $n$, $E(M)$ is either an $n$-element parallel class or an
$n$-element series class.  The last two cases are distinguished from
the first three according to whether or not $E(M)$ is disconnected or not
from elements of $P$ in matroid $M$.  We now use \eqref{TA} and \eqref{TSSM}
to show that, in each case, the calculations that start with $e$ and
those that start with $f$
have the same result, which contradicts $e\in D$ and $f\not\in D$.

We give the details for case (d).  By hypothesis,
each of $T(M/e)$, $T(M\setminus e)$, $T(M/f)$, $T(M\setminus f)$,
$T(M/f/e)=T(M/e/f)$, $T(M/e\setminus f)$ and
$T(M/f\setminus e)$ is well-defined.  (Remark:
By Proposition \ref{SameMinorProp},
$M\setminus f/e$ $=$
$M\setminus e/f$.

Starting with $e$ and with $f$, \eqref{TA} gives the two expressions:
\[
V= x_e T(M/e) + y_e x_f T(M\setminus e /f) + y_e y_f T(M\setminus e\setminus f)
\]
\[
V\neq
   x_f T(M/f) + y_f x_e T(M\setminus f /e) + y_f y_e T(M\setminus f\setminus e)
\]
Let $M'$ be the $P$-minor obtained by deleting each element
in $E(M)$ except for $e$ and $f$ ($M'=M$ if $n=2$.)
Since
$E(M')=\{e,f\}$ and $e,f$ are in parallel connected to $P$ within
$M'$, (d) of the hypotheses  tells us that
\[
T(Q) (x_e Y_f - y_f x_e) =
T(Q') (x_f Y_e - y_e x_f ),
\]
where $Q=M'/e \setminus f$, $Q'=M'/f \setminus e$.
Since $e,f$ are in parallel within $M'$,
matroids
or oriented matroids $Q=Q'$ by Proposition \ref{SameMinorProp}.
Since $A=E(M)\setminus\{e,f\}$ is a set of loops ($\emptyset$ if $n=2$)
in
$M/e\setminus f$ ($N/e\setminus f$) and
in $M/f\setminus e$ ($N/f\setminus e$), we
write $Y_A=\prod_{a\in A}Y_a$ ($1$ if $A=\emptyset$)
and use \eqref{TSSM} to write
\[
T(M/e\setminus f) = Y_A T(Q ),\;\;
T(M/f\setminus e) = Y_A T(Q' ),
\]
\[
T(M/e) = Y_f Y_A T(Q ),\;\;\text{ and }\;\;
T(M/f) = Y_e Y_A T(Q' ).
\]
So, since $M\setminus f\setminus e=M\setminus e\setminus f$,
\[
x_e T(M/e) + y_e x_f T(M\setminus e /f)
=
x_f T(M/f) + y_f x_e T(M\setminus f /e)
\]
contradicts
$V\neq
x_f T(M/f) + y_f x_e T(M\setminus f /e) + y_f y_e T(M\setminus f\setminus e)$
The remaining cases can be completed analogously.  It might be
noted that our proof differs slightly from \cite{Ellis-Monaghan-Traldi}
in that the cases of $n=3$ and $n\ge 4$ are not distinguished.
\end{proof}

\section{Acknowledgements}

I thank
the Newton Institute for Mathematical Sciences
of Cambridge University for hospitality and support of my
participation in the Combinatorics and Statistical Mechanics
Programme, January to July 2008, during which some of this
work and many related subjects were reviewed and discussed.

I thank Lorenzo Traldi for bringing to my attention and
discussing Diao and Hetyei's work, as well as
Joanne Ellis-Monaghan, Gary Gordon, Elizabeth McMahon
and Thomas Zaslavsky for helpful conversations and communications
at the Newton Institute and elsewhere.

This work is also supported by a Sabbatical leave granted
by the University at Albany, Sept. 2008 to Sept. 2009.

\bibliographystyle{abbrv}
\bibliography{ParamTutteNew}

\appendix

\begin{figure}
\input{Venn.pdf_t}
\caption{\label{Venn} Illustration for proof of Lemma \ref{KLAlemma}.}
\end{figure}

\section{Proof of Proposition \ref{GFlatProp}}

For each subset $A\subseteq E$,
$[Q] = [M/A|P] = [M/F|P]$ is determined by the unique flat $F$
in $L(E)$ spanned by $A\subseteq E$.  So, we write \eqref{PGF}
by
\[
T^{\mathcal{C}}(M) =
     \sum_{Q} [Q] \sum_{\substack{
                     F\in \mathcal{L}\\
                     [M/F|P]=[Q]
                      }}
      \sum_{\substack{
             A\subseteq F\\
             A\text{ spans }F
          }}
      x_A y_{E\setminus A}
      u^{r(M)-r(M/A\mid P)-r(A)}
      v^{|A|-r(A)}.
\]
Factoring, we get
\[
T^{\mathcal{C}}(M) =
     \sum_{Q} [Q] \sum_{\substack{
                     F\in \mathcal{L}\\
                     [M/F|P]=[Q]
                      }}
      u^{r(M)-r(Q)-r(F)}
      v^{-r(F)}
      \sum_{\substack{
             A\subseteq F\\
             A\text{ spans }F
          }}
      x_A y_{E\setminus A}
      v^{|A|}.
\]
$A$ is summed over the spanning sets of $F$.  Let $Z(F)$ denote
this last sum.  Since every subset of $F$ spans some flat
in $\mathcal{L}$,
\[
\sum_{0\le G \le F}Z(G) = \sum_{e\in F}(y_e + x_ev).
\]
M\"{o}bius inversion gives
\[
Z(F)= \sum_{0\le G\le F}\mu(G,F)(y_e +  x_ev).
\]

\end{document}

``Let $G$ be a connected graph and $H\subseteq E(G)$.
Assume we are given a
mapping $c$ from $E(G) \setminus H$ to a color set $\Lambda$.
Assume further that $\psi$ is a
block invariant associating an element of a fixed integral domain $R$a to
each connected graph. For any contracting set $C$ of $G$ with respect to
$\mathcal{H}$, let $\mathcal{H}_C$
be the graph obtained by deleting all edges in $D$ and
contracting all edges in $C$ (so that the only edges left in $\mathcal{H}_C$
are the zero edges).''


\subsection{15.1 Lie Groups, Invariant Vector Fields and Forms}

\subsubsection{15.1a Lie Groups}

Topological $GL(n,\mathbb{R})$ is an open subset of $\mathbb{R}^{n^2}$ and as such is a $n^2$-dim. manifold. \\
(cf. pp. 392) \\
\subsubsection*{Examples}
4. $G = Sl(n,\mathbb{R})$.  $Sl(n,\mathbb{R})$ subgroup of $Gl(n,\mathbb{R})$, $\text{det}{x} = 1$.  Prob. 1.1(3). Submanifold of $\text{dim}{Sl(n,\mathbb{R})} = n^2 - 1$ \\
5. $G = O(n)$, Sec. 1.1. Submanifold of $\text{dim}{\frac{n(n-1)}{2} }$.  \\
6. $G = U(n)$.  Sec. 1. submanifold of complex $n^2$ space or real $2n^2$ space.  \\
8. $G = T^n$ abelian group of diagonal matrices of form $z = \text{diag}{[e^{i\theta_1} \dots e^{i \theta_n}]}$ (15.2) \\
\phantom{8. } This group is topologically $S^1 \times \dots \times S^1$, $n$-torus.  Since circle connected, $T^n$ connected.  From this, $U(n)$ also connected!

\subsubsection{15.1b. Invariant Vector Fields and Forms}

\subsection{15.2 One-parameter subgroups}

\paragraph{15.2(1) Generator of rotations}
\beq{
	   e^{\vartheta J}
	&= \sum_{k=0}^\inf \frac{\vartheta^kJ^k}{k!}
	 = \sum_{k=0}^\inf \frac{\vartheta^{2k}J^{2k}}{(2k)!} + \sum_{k=0}^\inf \frac{\vartheta^{2k+1}J^{2k+1}}{(2k+1)!}
	 = \sum_{k=0}^\inf \frac{\vartheta^{2k}(J^2)^k}{(2k)!} + \sum_{k=0}^\inf \frac{\vartheta^{2k+1}J(J^2)^k}{(2k+1)!} \\
	&= I\sum_{k=0}^\inf \frac{\vartheta^{2k}(-1)^k}{(2k)!} + J\sum_{k=0}^\inf \frac{\vartheta^{2k+1}(-1)^k}{(2k+1)!}
	 = I\cos\vartheta + J\sin\vartheta
}

\paragraph{15.2(2) Generator of A(1)}

\beq{
	X &= \matrixp{a&b\\0&0} \\
	X^2 &= \matrixp{a&b\\0&0}\matrixp{a&b\\0&0} = \matrixp{aa&ab\\0&0} = a\matrixp{a&b\\0&0} = aX \\
	\Rightarrow X^n &= \Cases{I & n=0\\a^{n-1}X & n>0}
}
\beq{
	\Rightarrow e^{tX}
	&= \sum_{k=0}^\inf \frac1{k!}t^kX^k
	 = I + \sum_{k=1}^\inf \frac1{k!}t^ka^{k-1}X
	 = I + \frac1aX\sum_{k=1}^\inf \frac1{k!}t^ka^k \\
	&= I + \frac1aX\left(\sum_{k=0}^\inf \frac1{k!}t^ka^k - \frac{t^0a^0}{0!}\right)
	 = \matrixp{1&0\\0&1} + \matrixp{1&\frac ba\\0&0}e^{ta} - \matrixp{1&\frac ba\\0&0} \\
	&= \matrixp{e^{ta}&\frac bae^{ta}-\frac ba\\0&0}
}

\paragraph{15.3(1) Maurer-Cartan equations}

\beqN{
	   \d\sigma^U(\vec X_R,\vec X_S)
	&= \cancel{\vec X_R(\sigma^U(\vec X_S))} - \cancel{\vec X_S(\sigma^U(\vec X_R))} - \sigma^U([\vec X_R,\vec X_S]) \notag\\
	&= -\sigma^U(C^T_{RS}\vec X_T) = -C^U_{RS} \label{dsigma_maurer_cartan}
}
\beq{
	\Rightarrow \d\sigma^U = \frac12\d\sigma^U(\vec X_R,\vec X_S)\sigma^R\wedge\sigma^S \overset{(\ref{dsigma_maurer_cartan})}= -\frac12C^U_{RS}\sigma^R\wedge\sigma^S
}
\beq{
	\Rightarrow
	   0
	&= \d(\d\sigma^U)(\vec X_L,\vec X_M,\vec X_S) \\
	&\overset{\text{(4.27)}}= \vec X_L(\d\sigma^U(\vec X_M,\vec X_S)) - \vec X_M(\d\sigma^U(\vec X_L,\vec X_S)) + \vec X_S(\d\sigma^U(\vec X_L,\vec X_M)) \\
		&\qquad - \d\sigma^U([\vec X_L,\vec X_M],\vec X_S) + \d\sigma^U([\vec X_L,\vec X_S],\vec X_M) - \d\sigma^U([\vec X_M,\vec X_S],\vec X_L) \\
	&= \cancel{\vec X_L(-C^U_{MS})} - \cancel{\vec X_M(-C^U_{LS})} + \cancel{\vec X_S(-C^U_{LM})} \\
		&\qquad - \d\sigma^U(C^R_{LM}\vec X_R,\vec X_S) + \d\sigma^U(C^R_{LS}\vec X_R,\vec X_M) - \d\sigma^U(C^R_{MS}\vec X_R,\vec X_L) \\
	&= C^U_{RS}C^R_{LM} + C^U_{RM}C^R_{SL} + C^U_{RL}C^R_{MS}
}

\subsection{The Lie Algebra of a Lie Group}

\subsubsection{15.3a. The Lie Algebra}

\subsubsection{15.3b. The Exponential Map}

\begin{theorem}[15.27] map $\exp : g \to G$ sending $A \mapsto e^A$ diffeomorphism of some neighborhood of $0\in g$ onto neighborhood of $e \in G$.
\end{theorem}

%\begin{proof}
Pf. \\
        vector $X \in g$ \\
        \[
\exp_*(X) = \left. \frac{d}{dt} (\exp{ tX}) \right|_{t=0} = \frac{d}{dt} \left. \left( 1 + tX + \frac{1}{2} t^2 X^2 + \dots \right) \right|_{t=0} = X
\]

$\exp{}_* : g \to g$ is the identity, $\exp{}$ local diffeomorphism by inverse function thm. (The Jacobian is nonsingular).   \\

If $G$ not a matrix group, \\
given $X$ at $e$, $e^{tX} = \exp{(tX)}$ curve through $e$ whose tangent vector at $t=0$ is vector $X$ (recall $e^{tX}$ is the integral curve through $e$ of left invariant vector field $X$).  \\
Thus $\exp_*{(X)} = X$
%\end{proof}

LaTeX_and_pdfs/the geometry of physics problems/15liegroups.tex


\section{Simulation preparation}
Now that we have the equations that govern the motion of a satellite in place we can proceed to write a computer program that will simulate the trajectory a satellite takes after it is put in orbit. When a satellite is placed in its orbit it will have values of \(r\) and \(\nu\) change as time goes by. This coupled with inclination of the orbit will aid in locating the position of the satellite in its orbit.

The diagram below illustrates the elements used to locate a satellite in its orbit;
\begin{figure}[h]
	\centering
	\includegraphics[width=0.4\textwidth]{orbit}
	\caption{Orbital elements for a satellite.}
	\label{fig:six-orbital-elements}
\end{figure}

\subsection{Satellite launch data acquisition}
For each satellite launched into space the data of it's launch variables are provided by NASA and can be acquired from \textcite{http://celestrak.com}. Of particular interest is the Kenyan satellite launched into space in the year 2018. The particular launch data is at \textcite{http://celestrak.com/satcat/tle.php?CATNR=43467}. This will give us a two-line-element from which we will extract the particular values for the satellite of interest.

From the Two-Line-Element we will be able to deduce the orbital elements of 1KUNS-PF namely its eccentricity, mean anomaly, mean motion and the Argument of Perigee.

The Two-Line-Element for 1KUNS-PF is this;\\
\textcite{1KUNS-PF}\\
\textcite{1 43467U 98067NQ  18290.48306199  .00009882  00000-0  13782-3 0  9995}\\
\textcite{2 43467  51.6385 126.6004 0002599 213.4711 146.6117 15.57589009 24750}\\

From this we are able to define inclination=51.6385, eccentricity=0.002599, mean anomaly=146.6117, mean motion=15.57589009 and the Argument of Perigee=213.4711.

We will use this values to write a computer program that will simulate the trajectory that 1KUNS-PF will follow.

We also use celestrak to acquire more data for cubesats that were launched in 2018. This data will be used to simulate multiple satellites orbiting the earth.

\subsection{Position Simulation Algorithmn}
The algorithmn we will use to determine the position of the satellite;\\
\begin{description}
	\item[1.] Set the values that define the satellite orbit.
	\item[2.] Set the time to the required start position and set the time step for simulation.
	\item[3.] Get the initial values for the orbital elements for the satellite.
	\item[4.] Convert these values from polar coordinates to cartesian coordinates.
	\item[5.] Plot the cartesian values in a 3 dimensional graph.
	\item[6.] Plot the orbit for the satellite.
	\item[7.] Plot the earth in 3 dimensions using the standard lengths.
	\item[8.] Increment the time step.
	\item[9.] Repeat step 1-8 with updated values for the satellite position.
\end{description}

The code that implements this algorithmn has been further discussed in the appendix in much detail. The language of choice used in this simulation is Python as it is rich with scientific tools, has a good community and fully-fledged libraries. Matplotlib, numpy and jupyter notebook were employed in the creation of these simulations.

Numpy has been used to work the numbers into a suitable format to work with. Matplotlib has been used for the plotting and simulation itself. Jupyter was used for development purposes.
\subsection{Time step}
For this particular case we will use the default timestep provided by matplotlib FuncAnimation library. This will ensure that we only get to worry about the position itself and not how the display of the animation works.
\\
\\
\\
\section{Simulation}
\subsection{Dummy satellite simulation}
The simulation was done for a dummy satellite as shown below;
\begin{figure}[h]
	\centering
	\includegraphics[width=1.2\textwidth]{3d_satellite}
	\caption{Dummy satellite: elev=10., azim=-60.}
	\label{fig:dummy-satellite}
\end{figure}

The values used for this satellite were; dummy-sat = Satellite(1, 0.01, 7500, 145, 69)   where Satellite(mass, eccentricity, semi-major-axis, inclination, true-anomaly) is the python class that defines the satellite.

The satellite is moving in a medium earth orbit \textbf{LEO} with a retrogade motion\big(moving in a different direction as the rotation of the earth). The altitude of the satellite of the satellite at perigee is 1046.85km.

\subsection{1KUNS-PF satellite simulation}
The simulation was done for 1KUNS-PF satellite, with semi-major axis being 6778.8km, as shown below in Figure 4.3.
\begin{figure}[h]
	\centering
	\includegraphics[width=1.2\textwidth]{1kuns-pf}
	\caption{1KUNS-PF: elev=-10., azim=5.}
	\label{fig:1KUNS-PF}
\end{figure}

The values used for this satellite were; kuns = Satellite(1, 0.002599, 6778.8, 51.6385, 146.6117)   where Satellite(mass, eccentricity, semi-major-axis, inclination, true-anomaly) is the python class that defines the satellite.

The satellite is moving in a low earth orbit \textbf{LEO} with a posgrade motion, moving in the same direction as the rotation of the earth. The altitude of the satellite of the satellite at perigee is 383.04km. This is quite close as compared with the actual figure which 398.9 km according to
\textbf{https://www.n2yo.com/satellite/?s=43466}.
\subsection{3-Body simulation: 1KUNS-PF and Dummy-Sat satellite simulation}
The simulation was done for 1KUNS-PF satellite and the dummy sat as shown in Figure 4.4. The values used for this satellite were; kuns = Satellite(1, 0.002599, 6778.8, 51.6385, 146.6117)  and dummy-sat = Satellite(1, 0.01, 7500, 145, 69) where Satellite(mass, eccentricity, semi-major-axis, inclination, true-anomaly) is the python class that defines the satellite.

For this case we have use matplolib's plot-wireframe method to represent the earth in 3-d dimensions.

In this case we define \(r_{kuns}\) and \(r_{dummy}\) for 1KUNS-PF and dummy-sat respectively as;
\[r_{kuns}=\frac{a_{kuns}\big(1-e_{kuns}^2)}{1+e_{kuns} \cos \nu_{kuns}} \]
\[r_{dummy}=\frac{a_{dummy}\big(1-e_{dummy}^2)}{1+e_{dummy} \cos \nu_{dummy}} \]

This will give a wireframe figure as an attempt towards simulation of the three body-problem.
\begin{figure}[h]
	\includegraphics[width=1.2\textwidth]{3body}
	\caption{3-body simulation: 1KUNS-PF and Dummy-sat elev=-10., azim=5.}
	\label{fig:3body-sim}
\end{figure}


%<<setup-child, include = FALSE>>=
%library(knitr)
%library(qrmix)
%library(mlr)
%library(quantreg)
%library(reshape2)
%set_parent("../style/preamble.Rnw")
%@

\input{../../style/preamble}
\input{../../latex-math/basic-math}
\input{../../latex-math/basic-ml}

\newcommand{\titlefigure}{figure/residuals_plot_L1_title.png}
\newcommand{\learninggoals}{
	\item Learn the correspondence between a Laplacian error distribution and the L1 loss
	\item Learn that there is no error distribution for the Huber loss
	\item Learn the correpondence between Bernoulli-distributed targets and the Bernoulli loss

}

\title{Introduction to Machine Learning}
% \author{Bernd Bischl, Christoph Molnar, Daniel Schalk, Fabian Scheipl}
\institute{\href{https://compstat-lmu.github.io/lecture_i2ml/}{compstat-lmu.github.io/lecture\_i2ml}}
\date{}

\begin{document}

\lecturechapter{Maximum Likelihood Estimation vs.
Empirical Risk Minimization}
\lecture{Introduction to Machine Learning}

\begin{vbframe}{Laplace Errors - L1-Loss}

Let us assume that errors are Laplacian, i.e. $\eps$ follows a Laplace distribution which has the density

$$
 \frac{1}{2\sigma} \exp\left(-\frac{|x|}{\sigma}\right)\,, \sigma > 0.
$$

Then

$$
y = \ftrue(\xv) + \eps
$$

follows a Laplace distribution with mean $\fxit$ and scale parameter $\sigma$.

\framebreak

The likelihood is then

\begin{eqnarray*}
\LL(\thetab) &=& \prod_{i=1}^n \pdf\left(\yi ~\bigg|~ \fxit, \sigma\right) \\ &\propto& \exp\left(-\frac{1}{\sigma}\sumin \left|\yi - \fxit\right|\right)\,.
\end{eqnarray*}

The negative log-likelihood is

$$
- \loglt \propto - \sumin \left|\yi - \fxit\right|.
$$

Minimizing the negative log-likelihood for Laplacian error terms corresponds to empirical risk minimization with L1-loss.

\framebreak

\begin{footnotesize}
\begin{itemize}
	\item We simulate data $y ~|~\xv \sim \text{Laplacian}\left(\ftrue(\xv), 1\right)$ with $\ftrue = 0.2 \cdot \xv$.
\item We can plot the empirical error distribution, i.e. the distribution of the residuals after fitting a regression model w.r.t. $L1$-loss.
\item With the help of a Q-Q-plot we can compare the empirical residuals vs. the theoretical quantiles of a Laplacian distribution.
\end{itemize}
\end{footnotesize}
\includegraphics{figure_man/residuals_plot_L1.pdf}

\end{vbframe}

\begin{vbframe}{Other Error Distributions}

\begin{itemize}
\item There are losses that do not correspond to \enquote{real} error densities, like the Huber loss. (In the QQ-plot below we show residuals against quantiles of a normal. )
\end{itemize}

\begin{center}
\includegraphics{figure_man/residuals_plot_Huber_L1.pdf}
\end{center}

% \framebreak

% However, intuitively, we see that a certain type of loss function corresponds to a certain error distribution.

% \begin{table}[]
% \begin{tabular}{ll}
% Loss function & Error Distribution \\
% \hline
% $L2$-Loss & Gaussian Errors \\
% $L1$-Loss & Laplace Errors \\
% Huber Loss & \enquote{Huber Errors}
% \end{tabular}
% \end{table}

\end{vbframe}

\begin{vbframe}{Maximum Likelihood in Classification}

Let us assume the outputs $y$ to be Bernoulli-distributed, i.e.

$$
  y ~|~ \xv \sim \text{Ber}(\pi_\text{true}(\xv)).
$$

The negative log likelihood is

\begin{eqnarray*}
- \loglt &=& -\sumin \lpdfyigxit \\
&=& - \sumin \log \left[\pi\left(\xi\right)^{y^{(i)}} \cdot \left(1 - \pi\left(\xi\right)\right)^{(1 - y^{(i)})} \right]\\
&=& \sumin -\yi \log[\pi\left(\xi\right)] - \left(1-\yi\right) \log [1 - \pi\left(\xi\right)].
\end{eqnarray*}

\framebreak

This gives rise to the following loss function

$$
  L(y, \pix) = -y\ln(\pix)-(1-y)\ln(1-\pix), \quad y \in \{0, 1\}
$$

which we introduced as \textbf{Bernoulli} loss.

\vspace{0.2cm}

\begin{center}
\includegraphics[width = 11cm ]{figure_man/bernoulli-loss.png} \\
\end{center}

% \framebreak

% The Bernoulli loss is used in \textbf{logistic regression} in combination with the hypothesis space of linear functions

% \vspace*{-0.3cm}

% \begin{eqnarray*}
%   \Hspace = \left\{f: \Xspace \to \R ~|~\fx = \thetab^\top \xv\right\}
% \end{eqnarray*}

% Scores are afterwards transformed into probabilities by the logistic function $\pix = \left(1 + \exp(- \fx)\right)^{-1}$

% \begin{center}
%   \includegraphics[width = 0.4\textwidth]{figure_man/logreg-2vars-data.png}~~\includegraphics[width = 0.4\textwidth]{figure_man/logreg-2vars-score-vs-prob.png}
% \end{center}

% \framebreak

% \begin{center}
%   \includegraphics[width=0.8\textwidth]{figure_man/logreg-2vars-surface.png}
% \end{center}

\end{vbframe}

% \begin{vbframe}{Classification Losses: Bernoulli Loss}
% \begin{itemize}
%   \item $L(y, \pix) = -y\ln(\pix)-(1-y)\ln(1-\pix) $
%   % \item Also called \textbf{Bernoulli Loss}
%   \item Convex, differentiable (gradient methods can be used), not robust
%   \item Also called logarithmic loss or cross-entropy loss (which will be motivated later)
% \end{itemize}

% \framebreak

% \lz

% The constant model $\pix =< \theta$ that is optimal w.r.t. the empirical risk is the fraction of class $1$ observations

% $$
% \hat \pi (\xv) = \frac{1}{n}\sumin \yi.
% $$

% \textbf{Proof:} Exercise.

% \end{vbframe}

% \begin{vbframe}{Classification Losses: Cross-Entropy Loss}

% \begin{itemize}
%   \item The cross entropy loss
%   $$
%   \Lxy = -y\ln(\pix)-(1-y)\ln(1-\pix)$$
%   % is equivalent to logistic loss when
%   \item  The cross entropy loss is closely related to the Kullback-Leibler divergence, which will be introduced later in the chapter.
%   \item Very often used in neural networks with binary output nodes for classification.
% \end{itemize}

% \end{vbframe}

% \section{Outlook}

% \begin{vbframe}{Outlook}

% When introducing different learning algorithms, we will come back to the loss functions introduced in this chapter or even introduce new ones. For example:

% \begin{itemize}
%   \item Ordinary Linear Regression: L2-loss
%   \item Logistic Regression: Logistic loss
%   \item Support Vector Machine Classification: Hinge-Loss (to be introduced) (see \textbf{SVM} chapter)
%   \item Support Vector Machine Regression: $\epsilon$-insensitive loss (see \textbf{SVM} chapter)
%   \item AdaBoost: Exponential loss (see \textbf{Boosting} chapter)
% \end{itemize}

% Once knowing the theory of risk minimization and properties of loss functions, we can combine model classes and loss functions as needed or even tailor loss functions to our needs.

% \end{vbframe}

% \framebreak

% we get the risk function

% \begin{eqnarray*}
% \risk(f) &=& \mathbb{E}_x [\max\{0, 1 - \fx\} \pix + \max\{0, 1 + y\fx\} (1-\pix)].
% \end{eqnarray*}

% The minimizer of $\risk(f)$ for the hinge loss function is

% \begin{eqnarray*}
  % $fh(x) =  \footnotesize \begin{cases} 1 \quad \text{ if } \pix > 1/2 \\ -1 \quad \pix < 1/2  \end{cases}$
% \end{eqnarray*}

% \section{Selected methods for regression and classification}

% \begin{vbframe}{Normal linear and additive regression}

% For $i \in \nset$ (simple case and with basis functions):
% \begin{eqnarray*}
% \yi & = & \fxi + \epsi = \theta_0 + \theta^T \xi + \epsi\\
% \yi & = & \fxi + \epsi = \theta_0 + \theta^T \phi(\xi) + \epsi
% \end{eqnarray*}

% \begin{itemize}
% \item basis functions $\phi(x)=(\phi_1(x), \ldots, \phi_m(x))^T$
% \item assumption: $\epsi \iid N(0, \sigma^2)$
% \end{itemize}

% \lz

% Given observed data $\D$  we want to address the questions
% \begin{itemize}
% \item  Given basis functions, how to find $\theta$? ({\bf Parameter estimation})
% \item  How to select basis functions for my problem? ({\bf Model selection} )
% \end{itemize}

% \framebreak

% We'll address the model selection problem later, for now leave it at:
% Doing this \enquote{manually} is rather frowned upon...

% \lz

% A typical ML way to estimate the parameters is to not require the assumption
% $\epsi \iid N(0, \sigma^2)$, but instead assume the that prediction error is measured
% by \emph{squared error} as our \emph{loss function} in \emph{risk minimization}:

% $$
% \riske(\thetab) = SSE(\thetab) = \sumin \Lxyit = \sumin \left(\yi - \theta^T \xi\right)^2
% $$

% NB: We assume here and from now on that $\theta_0$ is included in $\theta$.

% Using matrix notation the empirical risk can be written as
% $$
% SSE(\thetab) = (\ydat - \Xmat\thetab)^T(\ydat - \Xmat\thetab).
% $$

% Differentiating w.r.t $\theta$ yields the so-called \emph{normal equations}:
% $$
% \Xmat^T(\ydat - \Xmat\thetab) = 0
% $$
% The optimal $\theta$ is
% $$
% \thetah = (\Xmat^T \Xmat)^{-1} \Xmat^T\ydat
% $$

% In statistics, we would start from a maximum-likelihood perspective
% $$
% \yi = \fxi + \epsi \sim N\left(\fxi, \sigma^2\right)
% $$
% $$
% \LLt = \prod_{i=1}^n \pdf\left(\yi | \fxit, \sigma^2\right) \propto \exp\left(-\frac{\sumin (\yi - \fxit)^2}{2\sigma^2}\right)
% $$
% It's easy to see that minimizing the neg. log-likelihood is equivalent to the
% loss minimization approach since
% $$
% \llt \propto - \sumin \left(\yi - \fxit\right)^2.
% $$

% \framebreak

% <<lm-mtcars-plot>>=
% data(mtcars)
% regr.task = makeRegrTask(data = mtcars, target = "mpg")
% plotLearnerPrediction("regr.lm", regr.task, features = "disp")
% @
% \end{vbframe}

% \begin{vbframe}{Example: Linear Regr. with L1 vs L2 loss}

% <<l1-vs-l2-loss-prep>>=
% set.seed(123)

% # prediction with f, based on vec x and param vec beta
% f = function(x, beta) {
%   crossprod(x, beta)
% }

% # L1 and L2 loss, based on design mat X, vec, param vec beta, computed with f
% loss1 = function(X, y, beta) {
%   yhat = apply(X, 1, f, beta = beta)
%   sum((y - yhat)^2)
% }
% loss2 = function(X, y, beta) {
%   yhat = apply(X, 1, f, beta = beta)
%   sum(abs(y - yhat))
% }

% # optimize loss (1 or 2) with optim
% # yes, neldermead not really the best, who cares it is 1d
% optLoss = function(X, y, loss) {
%   start = rep(0, ncol(X))
%   res = optim(start, loss, method = "Nelder-Mead", X = X, y = y)
%   res$par
% }

% # plot data and a couple of linear models
% plotIt = function(X, y, models = list()) {
%   gd = data.frame(x = X[, 2],  y = y, outlier = c(TRUE, rep(FALSE, length(y) - 1)))
%   pl = ggplot(data = gd, aes(x = x, y = y, shape = outlier))
%   pl = pl + geom_point(alpha = .8) + guides(shape = FALSE)
%   for (i in seq_along(models)) {
%     m = models[[i]]
%     pl = pl + geom_abline(intercept = m$beta[1], slope = m$beta[2],
%       col = m$col, lty = m$lty, alpha = .8)
%   }
%   return(pl)
% }

% # generate some data, sample from line with gaussian errors
% # make the leftmost obs an outlier
% n = 10
% x = sort(runif(n = n, min = 0, max = 10))
% y = 3 * x + 1 + rnorm(n, sd = 5)
% X = cbind(x0 = 1, x1 = x)
% y[1] = 50
% @

% L1 loss is less sensitive to outliers than L2 loss:
% <<l1-vs-l2-loss-plot, fig.height=4.5>>=
% # fit l1/2 models on data without then with outlier data
% b1 = optLoss(X[-1,], y[-1], loss = loss1)
% b2 = optLoss(X[-1,], y[-1], loss = loss2)
% b3 = optLoss(X, y, loss = loss1)
% b4 = optLoss(X, y, loss = loss2)

% # plot all 4 models
% pl = plotIt(X, y, models = list(
%   list(beta = b1, col = pal_2[1], lty = "solid"),
%   list(beta = b2, col = pal_2[2], lty = "solid"),
%   list(beta = b3, col = pal_2[1], lty = "dashed"),
%   list(beta = b4, col = pal_2[2], lty = "dashed")
% ))
% print(pl)
% @
% Violet = L2, green = L1 loss.\\
% Solid = fit without, dashed = fit with outlier ($\blacktriangle$ at (\Sexpr{c(x[1], y[1])})).
% \end{vbframe}

\endlecture
\end{document}


\par
\section{Data Structure}
\label{section:BPG:dataStructure}
\par
A bipartite graph is a triple $(X,Y,E)$
where $X$ and $Y$ are disjoint sets of vertices
and $E \subseteq X \times Y$ is a set of edges connecting vertices
in $X$ and $Y$.
The {\tt BPG} structure has three fields.
\begin{itemize}
\item {\tt int nX} : number of vertices in $X$
\item {\tt int nY} : number of vertices in $Y$
\item {\tt Graph *graph}
: pointer to a graph object $G = (X \cup Y), E)$.
\end{itemize}