A square paper napkin is folded so that the corner $P$ coincides with the midpoint of an opposite edge, as shown in the diagram.