...but then again (1) nobody has ever seen an idealized perfectly competitive market; (2) it's by no means clear that an idealized perfectly competitive market even serves as a useful approximation to the ones we have; (3) efficiency (in the narrow sense defined by efficient markets) is not the goal we want to be pursuing anyway.
There's a proof. The theorem is called the "First Welfare Theorem". There's also a "Second Welfare Theorem" that says that you can achieve any Pareto efficient outcome through a perfectly competitive market and lump-sum taxes.