Small nitpick: I think you mean the second law of thermodynamics.
Also the second law of thermodynamics is an empirical law. It is based on observations and not proven. To say, that a perpetual motion machine can't exist because of the 2nd law, is circular logic, since the 2nd law was established precisely because a perpetual motion machine was never observed.
That's from the POV of thermodynamics, though, you can show with statistical mechanics, that the probability for a process that defies this laws goes to zero.