Example 31 (2004 China Mathematical Olympiad) $M$ is a set of $n$ points in the plane, satisfying:
(1) $M$ contains 7 points which are the 7 vertices of a convex heptagon;
(2) For any 5 points in $M$, if these 5 points are the 5 vertices of a convex pentagon, then this convex pentagon contains at least one point of $M$ in its interior.
Find the minimum value of $n$.


First, prove that $n \geqslant 11$.
Consider a convex heptagon $A_{1} A_{2} \cdots A_{7}$ with vertices in $M$, and connect $A_{1} A_{5}$. By condition (2), there is at least one point in $M$ within the convex pentagon $A_{1} A_{2} A_{3} A_{4} A_{5}$, denoted as $P_{1}$. Connect $P_{1} A_{1}$ and $P_{1} A_{5}$, then there is at least one point in $M$ within the convex pentagon $A_{1} P_{1} A_{5} A_{6} A_{7}$, denoted as $P_{2}$, and $P_{2}$ is different from $P_{1}$. Connect $P_{1} P_{2}$, then at least 5 of the vertices $A_{1}, A_{2}, \cdots, A_{7}$ are not on the line $P_{1} P_{2}$. By the pigeonhole principle, there must be 3 vertices on one side of the line $P_{1} P_{2}$, and these 3 vertices, together with points $P_{1}$ and $P_{2}$, form a convex pentagon that contains at least one point $P_{3}$ in $M$.

Next, draw the lines $P_{1} P_{3}$ and $P_{2} P_{3}$. Let the region $\Pi_{3}$ be the half-plane (excluding the line $P_{1} P_{2}$) on the side of the line $P_{1} P_{2}$ that is opposite to $\triangle P_{1} P_{2} P_{3}$. Similarly, define regions $\Pi_{1}$ and $\Pi_{2}$. Thus, the regions $\Pi_{1}$, $\Pi_{2}$, and $\Pi_{3}$ cover all points on the plane except for $\triangle P_{1} P_{2} P_{3}$. By the pigeonhole principle, among the 7 vertices $A_{1}, A_{2}, \cdots, A_{7}$, there must be $\left[\frac{7}{3}\right]+1=3$ vertices in the same region (say $\Pi_{3}$). These 3 vertices, together with $P_{1}$ and $P_{2}$, form a convex pentagon with vertices in $M$, and its interior contains at least one point $P_{1}$ in $M$. Therefore, $n \geqslant 11$.
Next, construct an example to show that $n=11$ is possible.
As shown in Figure 4-7, the heptagon $A_{1} A_{2} \cdots A_{7}$ is an integer-point heptagon, and the point set $M$ consists of the 7 vertices $A_{1}, A_{2}, \cdots, A_{7}$ and 4 interior integer points. Clearly, this point set $M$ satisfies condition (1). This point set $M$ also satisfies condition (2), as proven below.

Assume there exists an integer-point convex pentagon whose interior does not contain any integer points. Since the area of any integer-point polygon can be expressed as $\frac{n}{2}\left(n \in \mathbf{N}_{+}\right)$, by the principle of the smallest number, there must be a smallest area integer-point convex pentagon $A B C D E$ whose interior does not contain any integer points. Considering the parity of the coordinates of the vertices, there are only 4 cases: (odd, even), (even, odd), (odd, odd), (even, even). Thus, among the vertices of the pentagon $A B C D E$, there must be two vertices with the same parity for both coordinates. Therefore, the midpoint $P$ of the line segment connecting these two vertices is also an integer point. Since $P$ is not in the interior of the convex pentagon $A B C D E$, $P$ must lie on one of the sides of the pentagon. Without loss of generality, assume $P$ lies on side $A B$, then $P$ is the midpoint of $A B$. Connect $P E$, then $P B C D E$ is a smaller area integer-point convex pentagon whose interior does not contain any integer points. This is a contradiction.
In conclusion, the minimum value of $n$ is 11.