7. Let the dihedral angle between a lateral face and the base of a regular quadrilateral pyramid $P-ABCD$ be $\alpha$, and the dihedral angle between two adjacent lateral faces be $\beta$. Then $2 \cos \beta + \cos 2 \alpha =$
7. -1 As shown in the figure, draw $PO \perp$ plane $ABCD$, then $O$ is the center of the square $ABCD$.

Let the side length of the base $ABCD$ be $a$, and the side length of the lateral edge be $b$.
Since the projection of the lateral face $\triangle PCD$ on the base $ABCD$ is $\triangle OCD$,
by the projection area theorem, we have $\cos \alpha = \frac{S_{\triangle OCD}}{S_{\triangle PCD}} = \frac{a^2}{4 S_{\triangle PCD}} = \frac{a^2}{2 b \cdot CF}$.
Draw $CF \perp DP$ from point $C$, and connect $AF$, it is easy to see that $AF \perp DP$,
thus the plane angle of the dihedral angle formed by two adjacent lateral faces is $\angle AFC = \beta$.
Therefore, $\cos \beta = \frac{AF^2 + CF^2 - AC^2}{2 AF \cdot CF} = 1 - \frac{2 OO^2}{CF^2} = 1 - \frac{a^2}{CF^2}$.
In $\triangle PCD$, by the area relationship, we have $\frac{1}{2} b \cdot CF = \frac{1}{2} a \cdot \sqrt{b^2 - \left(\frac{a}{2}\right)^2}$, so $\frac{a^2}{CF^2} = \frac{4 b^2}{4 b^2 - a^2}$.
Thus, $\cos \beta = \frac{-a^2}{4 b^2 - a^2}$, and $\cos^2 \alpha = \left(\frac{a}{2 b}\right)^2 \cdot \frac{a^2}{CF^2} = \left(\frac{a}{2 b}\right)^2 \cdot \frac{4 b^2}{4 b^2 - a^2} = \frac{a^2}{4 b^2 - a^2}$,
hence $\cos^2 \alpha + \cos \beta = 0$, which means $\cos 2\alpha + 2 \cos \beta = -1$.