To prove that if O is an optimal solution to a linear program, then O is a vertex of the feasible region, we can use the following argument:
Assume that O is an optimal solution to a linear program.
By definition, an optimal solution maximizes or minimizes the objective function while satisfying all the constraints.
Suppose O is not a vertex of the feasible region.
If O is not a vertex, it must lie on an edge or in the interior of a line segment connecting two vertices.
Consider two neighboring feasible solutions, A and B, that define the line segment containing O.
Since O is not a vertex, there exists a feasible solution on the line segment between A and B that has a higher objective function value (if maximizing) or a lower objective function value (if minimizing) than O.
This contradicts our assumption that O is an optimal solution since there exists a feasible solution with a better objective function value.
Therefore, our initial assumption that O is not a vertex must be false.
Thus, O must be a vertex of the feasible region.
By contradiction, we have shown that if O is an optimal solution to a linear program, then O must be a vertex of the feasible region.