An obligatory prayer should be specifically identified. A vague idea of praying does not distinguish Dhuhr fard from voluntary rak'ahs.
Validity rests on the inward resolve, not repeating a formula. The legal issue of intervening acts concerns whether the intended prayer remained connected to the opening.