The declaration command is applicable to a name that refers to a declaration. It causes the declaration of the name to be selected.
In the case of references to schema components, there can be several declarations of the same name - these being merged together by the schema text. If there is more than one declaration of the referenced name, the entire schema text is selected. If the sole declaration is introduced via a schema inclusion, that schema inclusion is selected.
When applied to a name in a type, the declaration command selects the declaration of the corresponding type in the specification.
The declaration command can also be applied to a node in the proof tree that corresponds to the application of a tactic, in which case the declaration of that tactic is selected.