Deriving and using the pricing equation I'm a mathematician who's trying to learn some economics from Cochrane's Asset Pricing book.

I don't have any background in economics.

In chapter 1, he derives the basic pricing equation
$$ p_t = \mathbb{E}_t \left[ \beta \frac{u'(c_{t+1})}{u'(c_t)} x_{t+1}\right] $$
as follows:

Consider the problem of
$$\max_{\xi} u(c_t) + \mathbb{E}_t \left[ \beta u (c_{t+1}) \right]$$
where
$$c_t = e_t - p_t \xi, \qquad c_{t+1} = e_{t+1} + x_{t+1}\xi$$.

The pricing equation is the first order condition of this optimisation problem.

In words, you're trying to maximise your utility by buying some number $\xi$ of an asset with a random future payoff $x_{t+1}$ that sells for $p_t$ today. $e_t$ and $e_{t+1}$ are your original consumptions levels.

It's weird to me that even though the equation is a formula for $p_t$, both sides of the pricing equation depend on $p_t$. Namely, the denominator
$u'(c_t) = u'(e_t-p_t \xi) $ is actually a 1-to-1 function of $p_t$. So I feel like the formula tells me how to find $p_t$, given that already know what $p_t$ is.



The first application Cochrane presents is the risk-free rate.
Here $x_{t+1} = R^f$ is known at time $t$ and $p_t = 1$. Therefore

$$R^f =  1/\mathbb{E}_t \left[ \beta \frac{u'(c_{t+1})}{u'(c_t)}\right] $$

But $c_{t+1} = e_{t+1}+R^f \xi$ so there's no randomness inside the expectation. How can we go on to then assume that consumption growth $c_{t+1}/c_t$ is lognormally distributed, when it appears to be a constant?



In next application, the discount factor $m = \beta \frac{u'(c_{t+1})}{u'(c_t)}$ is treated as the same across different assets. But $c_t$ and $c_{t+1}$ are my optimal consumption levels for a given single asset, so I would expect $m$ to vary across assets.



So my question is, is it possible to reconcile the derivation of the pricing equation with the way it's applied in the examples?
As regards the first question, the "$p_t=...$" expression is conceptually and qualitatively useful because, at the optimum, it relates price with consumption and expectations. Mathematically it is an implicit function of course, so it is not a "closed-form solution" to "tell us how to find $p_t$". 

Cochrane acknowledges this as he writes in p. 6


  "We have stopped short of a complete solution to the model, i.e., an expression with exogenous items on the right-hand side. We relate one
  endogenous variable, price, to two other endogenous variables,
  consumption and payoffs. One can continue to solve this model and
  derive the optimal consumption choice $c_t , c_{t+1}$ in terms of more
  fundamental givens of the model. In the model I have sketched so far,
  those givens are the income sequence $e_t , e_{t+1}$ and a specification of
  the full set of assets that the investor may buy and sell. We will in
  fact study such fuller solutions below. However,
   for many purposes one can stop short of specifying (possibly wrongly) all
  this extra structure, and obtain very useful predictions about asset prices
  from (1.2), even though consumption is an endogenous variable."


Regarding the first example, the "no-investment consumption" sequence $\{e_t\}$ is in general considered random, due to factors unmodeled at this introductory level, like an income stream that is affected by exogenous random shocks etc, so the use of the expected value relates to the existence of $e_{t+1}$  in there.

Regarding the second example, Cochrane writes p. 7 (my emphasis)


  "In this context, equation (1.4) is obviously a generalization, and it says something deep: one can incorporate all risk corrections by
  defining a single stochastic discount factor—the same one for each
  asset—and putting it inside the expectation. $m_{t+1}$ is stochastic
  or random because it is not known with certainty at time $t$. The
  correlation between the random components of the common discount
  factor $m$ and the asset-specific payoff $x_i$ generate asset-specific
  risk corrections."