Gravar-mail: On the Noether theorem for optimal control