Derivation of Swap rate formula

Assuming usual notation, I derive the floating rate and fixed rate payoffs and set them equal. The par swap rate I get thus is:

$$S_{mn}\mid_{t=0} = {\sum_{i=m}^{N-1} \tau_i L(0, T_{i-1}, T_i)Z_{0i} \over \sum_{n=m}^{N-1} \tau \cdot Z_{0i}}$$

When the $$L$$ and $$Z$$ curves are identical, the following can result as per the textbook - but I am not sure how?

$$S_{mn} = {Z_{0m} - Z_{0n} \over \sum_{i=0}^{N-1} \tau \cdot Z_{0i}}$$

If $$L$$ and $$Z$$ curves are identical, you are in a single curve frame work.

A swap can be seen as a long position in a fixed rate bond and a short position in a floating rate bond. (I'll use yearly payments 30/360 in order to be able to ignore the $$\tau$$ =1 and simplify the notation)

$$DF_1 \times C^{fixed} + ... + DF_n \times C^{fixed} + DF_n - (DF_1 \times C_1^{float} + ... + DF_n \times C_n^{float} + DF_n ) = 0$$

But because in a single curve framework (forward curve = discount curve) a floating rate bond with zero spread will always be at par, you have:

$$DF_1 \times C_1^{float} + ... + DF_n \times C_n^{float} + DF_n = 1$$

and so you only have to worry about the fixed leg:

$$DF_1 \times C^{fixed} + ... + DF_n \times C^{fixed} + DF_n - 1 = 0$$

$$DF_1 \times C^{fixed} + ... + DF_n \times C^{fixed} + DF_n = 1$$

If you rearrange this in terms of the fixed rate ($$C^{fixed}$$), you get:

$$C^{fixed} = \frac{1 - DF_n}{\sum^n_{i=1}DF_i}$$

Which is the formula you showed, just with a different notation.

The intuition of this formula is that you are determining the fixed rate on a bond where the sum of the present value of the interest payments plus the price of the zero coupon bond will be one.

You can also easily adjust this for a forward starting swap.