1-pyrroline-5-carboxylate dehydrogenase activity of P5C dehydrogenase [mitochondrial matrix]