Conditions for chain rule for Gateaux derivatives Let $X,Y,Z$ be locally convex topological vector spaces over $\mathbb R$ (not necessarily Banach), $D_X \subseteq X$, $D_Y \subseteq Y$ and let $f \colon D_X \to D_Y$, $g \colon D_Y \to Z$. Let us assume that $f$ is Gateaux-differentiable in some $x \in D_X$ and $g$ is Gateaux-differentiable in $f(x)$.
Which are the least well-known additional conditions for the chain rule to hold? By the chain rule I mean the assertion that $g \circ f$ is Gateaux-differentiable and $\mathrm d(g \circ f)(x;\cdot) = \mathrm d g(f(x);\mathrm d f(x;\cdot))$.
Wikipedia says that continuity of the derivatives of $f$ and $g$ is required, but it does not specify whether this means that only $\mathrm df \colon D_X \times X \to Y$ should be continuous or, more than that, $x \mapsto \mathrm df(x,\cdot) \in L(X,Y)$ should be continuous (and, of course, the same for $g$).
And is it generally assumed that $D_X$ and $D_Y$ are open or is it enough to know that they are neighborhoods of $x$ and $f(x)$?
Please also help me to find a citable reference. I looked into some books, but have not found this chain rule.
This question has also been posted on math.stackexchange a few days ago, but got no answers so far.
 A: The general (necessary and sufficient) condition for the chain rule to hold at the given pair of points $x$ and $y=f(x)$ is that $g$ be Hadamard (also called compactly, or quasi-) differentiable at $y$. Generally the domains are assumed open but (almost trivially) one can loosen this to requiring ${\rm dom\,}f$ be "starlike" at $x$ and ${\rm dom\,}g$ be "sequentially tangential" at $y$. Here being "starlike" means that for every $u$ in $X$ there be $\delta\in\mathbb R^+$ such that $x+tu\in{\rm dom\,}f$ holds for $|t|<\delta$, and "sequentially tangential" means that for any sequences $v_n\to v$ in $Y$ and $t_n\to 0$ there is $n_0$ such that $y+t_nv_n\in{\rm dom\,}g$ holds for $n_0\le n$. For the details in the case of open domains see Yamamuro's Differential Calculus in Topological Linear Spaces, Springer LNM 374 (1974) 1.2.7, pp. 9−13. These result are already in Averbukh and Smolyanov "The various definitions of the derivative in linear topological spaces" Russian Math. Surveys 23 4 (1968) 67−113 and Sova "General theory of differentiability in linear topological spaces" Czech. Math. J. 14 (1964) 485−508.
