\section{Differentiation With Respect to Sets}
\label{section:differentiation-set-system}

\begin{definition}[Small]
\label{definition:differentiation-small}
    Let $E, F$ be TVSs over $K \in \RC$, $\sigma \subset B(E)$ be an upward-directed family that contains all finite sets, $r: E \to F$, and $n \in \natz$, then the following are equivalent:
    \begin{enumerate}
        \item For each $A \in \sigma$, $r(th)/t^n \to 0$ uniformly on $A$.
        \item If $r_t(x) = r(tx)/t^n$, then $r_t \to 0$ as $t \to 0$ with respect to the $\sigma$-uniform topology on $F^E$.
        \item For each $A \in \sigma$, $\seq{a_k} \subset A$, and $\seq{t_k} \subset K \setminus \bracs{0}$ with $t_k \to 0$ as $n \to \infty$, $r(t_ka_k)/t_k^n \to 0$ as $n \to \infty$.
    \end{enumerate}
    If the above holds, then $r$ is \textbf{$\sigma$-small of order $n$}.

    The set $\mathcal{R}_\sigma^n(E; F)$ is the $K$-vector space of all $\sigma$-small functions of order $n$ from $E$ to $F$. For simplicity, $\mathcal{R}_\sigma(E; F)$ denotes $\mathcal{R}_\sigma^1(E; F)$.
\end{definition}

\begin{proposition}
\label{proposition:differentiation-sets}
    Let $E, F$ be TVSs over $K \in \RC$ with $F$ being separated, $\sigma \subset B(E)$ be an upward-directed family contains all finite sets, $B_\sigma(E; F)$ be the space of linear operators bounded on sets in $\sigma$, and $\mathcal{R}_\sigma(E; F)$ be the space of $\sigma$-small functions, then $(B_\sigma(E; F), \mathcal{R}_\sigma(E; F))$ is a system of derivatives and remainders.
\end{proposition}
\begin{proof}
    Let $T \in B_\sigma(E; F)$ and suppose that there exists $V \in \cn_E(0)$ circled and $r \in \mathcal{R}_\sigma(E; F)$ such that $T|_V = r|_V$. For any $x \in V$, $\bracs{x} \in \sigma$, so $T(x) = \lim_{t \downto 0}T(tx)/t = 0$ as $F$ is separated.
\end{proof}


\begin{definition}[Derivative]
\label{definition:derivative-sets}
    Let $E, F$ be TVSs over $K \in \RC$ with $F$ being separated, $\sigma \subset B(E)$ be an upward-directed family that contains all finite sets, $U \subset E$ be open, $f: U \to F$, and $x_0 \in U$, then $f$ is \textbf{$\sigma$-differentiable at $x_0$} if there exists $V \in \cn_E(0)$, $T \in L(E; F)$, and $r \in \mathcal{R}_\sigma(E; F)$ such that
    \[
    f(x_0 + h) = f(x_0) + Th + r(h)
    \]

    for all $h \in V$.

    The linear map $T \in L(E; F)$ is the \textbf{$\sigma$-derivative of $f$ at $x_0$}, denoted $D_{\sigma}f(x_0)$.
\end{definition}

\begin{definition}[Differentiable]
\label{definition:differentiable-sets}
    Let $E, F$ be TVSs over $K \in \RC$ with $F$ being separated, $\sigma \subset B(E)$ be an upward-directed family that contains all finite sets, $U \subset E$ be open, and $f: U \to F$, then $f$ is \textbf{$\sigma$-differentiable on $U$} if it is $\sigma$-differentiable at every point in $U$. In which case, the map $D_\sigma f: U \to L(E; F)$ is the \textbf{$\sigma$-derivative} of $f$.
\end{definition}

\begin{definition}
\label{definition:derivative-garden}
    Let $E, F$ be TVSs over $K \in \RC$ with $F$ being separated, $\sigma^E_{\text{Fin}}, \sigma^E_{c}, \sigma^E_b \subset 2^E$ be the collection of all finite, compact, and bounded subsets, respectively, then differentiability with respect to $\sigma^E_{\text{Fin}}, \sigma^E_{c}, \sigma^E_b$ correspond to \textbf{Gateaux}, \textbf{Hadamard}, and \textbf{Fréchet} differentiability.
\end{definition}


\begin{proposition}[{{\cite[Proposition 4.5.2]{Bogachev}}}]
\label{proposition:chain-rule-sets}
    Let $E$, $F$, $G$, be TVSs over $K \in \RC$ with $F, G$ being separated, $\sigma \subset B(E)$ and $\tau \subset B(F)$ be upward-directed families that contain all finite sets. If:
    \begin{enumerate}
        \item[(a)] For any $r \in \mathcal{R}_\sigma(E; F)$ and $T \in L(F; G)$, $T \circ r \in \mathcal{R}_\sigma(E; G)$.
        \item[(b)] For any $r \in \mathcal{R}_\sigma(E; F)$, $T \in L(E; F)$, and $s \in \mathcal{R}_\tau(F; G)$, $s \circ (T + r) \in \mathcal{R}_\sigma(E; G)$.
    \end{enumerate}
    then for any $U \subset E$ and $V \subset F$ open, $f: U \to V$ $\sigma$-differentiable at $x_0 \in U$, $g: V \to F$ $\tau$-differentiable at $f(x_0) \in V$, $g \circ f: U \to F$ is $\sigma$-differentiable at $x_0$ with
    \[
    D_\sigma(g \circ f)(x_0) = D_\tau g(f(x_0)) \circ D_\sigma f(x_0)
    \]

\end{proposition}
\begin{proof}
    Since $g$ is $\tau$-differentiable at $f(x_0)$, there exists $s \in \mathcal{R}_\tau(F; G)$ such that
    \[
    g(f(x_0) + h) = g \circ f (x_0) + D_\tau g(f(x_0))h + s(h)
    \]

    for all $h \in F$ such that $f(x_0) + h \in V$. By differentiability of $f$, there exists $r \in \mathcal{R}_\sigma(E; F)$ such that
    \[
    f(x_0 + h) = f(x_0) + D_\sigma f(x_0)h + r(h)
    \]

    for all $h \in E$ such that $x_0 + h \in U$. Therefore for all $h \in E$ with $x_0 + h \in U$,
    \begin{align*}
    g \circ f(x_0 + h) &= g \circ f (x_0) + D_\tau g(f(x_0)) \circ D_\sigma f(x_0)h \\
    &+ D_\tau g(f(x_0)) \circ r(h) + s(D_\sigma f(x_0)h + r(h))
    \end{align*}
    where $D_\tau g(f(x_0)) \circ r \in \mathcal{R}_\sigma(E; G)$ by assumption (a), and $d \circ (D_\sigma f(x_0) + r) \in \mathcal{R}_\sigma(E; G)$ by assumption (b).
\end{proof}

\begin{proposition}[{{\cite[Corollary 4.5.4]{Bogachev}}}]
\label{proposition:chain-rule-sets-conditions}
    Let $E$, $F$, $G$, be TVSs over $K \in \RC$ with $F, G$ being separated. If $\sigma \subset B(E)$ and $\tau \subset B(F)$ correspond to the following families of sets on $E$ and $F$:
    \begin{enumerate}
        \item Compact sets.
        \item Bounded sets.
    \end{enumerate}
    then
    \begin{enumerate}
        \item For any $r \in \mathcal{R}_\sigma(E; F)$ and $T \in L(F; G)$, $T \circ r \in \mathcal{R}_\sigma(E; G)$.
        \item For any $r \in \mathcal{R}_\sigma(E; F)$, $T \in L(E; F)$, and $s \in \mathcal{R}_\tau(F; G)$, $s \circ (T + r) \in \mathcal{R}_\sigma(E; G)$.
    \end{enumerate}
    and by \autoref{proposition:chain-rule-sets}, $\sigma$-derivatives and $\tau$-derivatives satisfy the Chain rule.
\end{proposition}
\begin{proof}
    (1): Let $A \in \sigma$ and $U \in \cn_G(0)$. Since $T$ is continuous, there exists $V \in \cn_F(0)$ such that $T(V) \subset U$. Since $r \in \mathcal{R}_\sigma(E; G)$, there exists $t > 0$ such that $r(sA)/s \in V$ for all $s \in (0, t)$. In which case, $T \circ r(sA)/s \in U$ for all $s \in (0, t)$.

    (2): To show that $s \circ (T + r) \in \mathcal{R}_\sigma(E; G)$, it is sufficient to show that for every $A \in \sigma$, $\seq{t_n} \subset \real_{> 0}$ with $t_n \downto 0$ as $n \to \infty$, and $\seq{a_n} \subset A$,
    \[
    \limv{n} \frac{1}{t_n}s \circ (T + r)(t_na_n) = \limv{n}\frac{1}{t_n}s\braks{t_n\paren{Ta_n + \frac{r(t_na_n)}{t_n}}} = 0
    \]

    Since $\bracs{t_n^{-1}r(t_na_n)|n \in \natp}$ is a convergent sequence, it is contained in a compact set. Thus
    \[
    B = \bracs{Ta_n + \frac{r(t_na_n)}{t_n}\bigg | n \in \natp} \subset T(A) + \bracs{\frac{r(t_na_n)}{t_n}|n \in \natp}
    \]

    is contained in a compact set if $A$ is compact, and bounded if $A$ is bounded. Given that $s \in \mathcal{R}_\sigma(E; F)$, $t^{-1}s(tx) \to 0$ as $t \downto 0$ uniformly on $B$. Therefore
    \[
    \limv{n}\frac{1}{t_n}s\braks{t_n\paren{Ta_n + \frac{r(t_na_n)}{t_n}}} = 0
    \]
\end{proof}




\begin{remark}
\label{remark:differentiation-bornology}

    In \autoref{definition:differentiation-small}, the system $\sigma$ can be chosen based on the bornology of $E$, and the definition of small-ness depends exclusively on $\sigma$. As such, there is an apparent disconnect between differentiation and the topology of the domain.

    Consider for example a Hilbert space equipped with its norm and weak topology. The norm itself is differentiable with respect to both topologies, because the bounded sets coincide. Moreover, the data for differentiability needs to only come from a neighbourhood of $0$ in the norm topology. As such, a function may be differentiable even if its domain is too small to have an interior.

    A method of extending this sense of differentiability is to require that \textit{every} extension of the function to some open set, or to the entire space is differentiable. Given that this paves way to confusion for related definitions of differentiability, this definition is not formally included here.
\end{remark}



\begin{proposition}
\label{proposition:derivative-sets-real}
    Let $E$ be a separated topological vector space and $\sigma \subset B(\real)$ be an upward-directed system that contains finite sets, then
    \begin{enumerate}
        \item $\mathcal{R}_{\sigma}(\real; E) = \mathcal{R}_{B(\real)}(\real; E)$. Hence, all forms of $\sigma$-differentiability on $\real$ are equivalent.
        \item For any $U \subset \real$ open, $f: U \to E$, and $x_0 \in U$, $f$ is differentiable at $x_0$ if and only if
        \[
        \lim_{t \to 0}\frac{f(x + t) - f(x)}{t}
        \]

        exists. In which case, the above limit is identified with the derivative of $f$ at $0$.
        \item For any $U \subset \real$ open, $f: U \to E$, and $x_0 \in U$, if $f$ is differentiable at $x_0$, then $f$ is continuous at $x_0$.
    \end{enumerate}
\end{proposition}
\begin{proof}
    (1): Let $r \in \mathcal{R}_\sigma(\real; E)$. For any $R > 0$ and $U \in \cn_E(0)$, there exists $\delta > 0$ such that $t^{-1}r(tR), t^{-1}r(-tR) \in U$ for all $t \in (0, \delta)$. Thus $t^{-1}r(tB(0, R)) \subset U$, and $r \in \mathcal{R}_{B(\real)}(\real; E)$.

    (2): Suppose that $f$ is differentiable at $x_0$, then there exists $r \in \mathcal{R}_\sigma$ such that for any $t \in \real$ with $x_0 + t \in U$,
    \begin{align*}
        f(x_0 + t) - f(x_0) &= Df(x_0)(t) + r(t) \\
        \frac{f(x_0 + t) - f(x_0)}{t} &= Df(x_0)(1) + t^{-1}r(t) \\
        \lim_{t \to 0}\frac{f(x_0 + t) - f(x_0)}{t} &= Df(x_0)(1)
    \end{align*}
    Now suppose that $v = \lim_{t \to 0}\frac{f(x + t) - f(x)}{t}$ exists. Let $T: \real \to E$ be defined by $t \mapsto tv$, then
    \[
    \lim_{t \to 0}\frac{f(x_0 + t) - f(x_0) - Tt}{t} = \lim_{t \to 0}\frac{f(x_0 + t) - f(x_0)}{t} - v = 0
    \]

    and $Df(x_0) = T$.
\end{proof}
