Local controllability and optimality. (July 2021)