Formally define temperature as derivative of max Gibbs entropy? This question asks whether we can define the temperature in terms of the Gibbs entropy in the case of the canonical ensemble. In this question I want to ask whether we can define temperature in terms of Gibbs entropy in general, by choosing the maximum entropy ensemble consistent with a set of macro-variables.
First, Let $p$ be a ensemble, or distribution over micro-states $S$ of a system. Define the Gibbs entropy of the ensemble as $H(p)= -\sum_ip_i \log(p_i)$. Now assume we have a set of macro-variables $\mathcal V$, such as energy, i.e. $E \in \mathcal V$. For a given value $V=(E,...)$ of the variables, let $H(V)= \max_{p\in P_V}H(p)$, where $P_V$ is the set of distributions $p$ such that $\sum_ip_i E_i=E$, where $E_i$ is the energy in microstate $i$, and similarly for the other variables in $\mathcal V$. 
Then define temperature as the derivative of "maximum entropy" w.r.t. energy:
$$\frac 1 T = \frac {\partial H(V)}{\partial E}$$
Is this a correct general way to define temperature?
 A: If you use the average energy $E = \sum p_i E_i$ of the canonical ensemble as independent variable, yes, your final formula  is a correct way to get the temperature of that state, although your notation and description may hide the important fact that the maximum is a constrained maximum, equivalent to the unconstrained maximization of a function differing from $H$ by the sum of the constraint equations multiplied by Lagrange multipliers. 
The equation $\frac 1 T = \frac {\partial H(V)}{\partial E}$ is simply the thermodynamic definition of temperature in term of entropy and energy and it follows directly from the identification of $H$ as the thermodynamic entropy (true in the  thermodynamic limit).
However, I would say that the description in term of $E$ sounds quite artificial, since the natural description of the canonical ensemble is in term of $T$ and not $E$ as independent variable. Therefore, the previous equation should be seen as an implicit definition of the $E=E(T)$ relation, allowing to rewrite  $H$ and the $\{ p_i \}$ as functions of $T$.
