Keeping track of definitions I recently handed in my master's thesis (CS), and I did what you should not do for your own peace of mind's sake: I skimmed it again afterwards. I realized that I had not updated some statements to reflect the omission of some definitions that had existed in an earlier version, an error that I didn't catch despite proof-reading - I assume because I was in the mindset and knew what the statements were about, so I missed that some symbols were not defined in the relevant context during proof-reading.

I also recently came across this speech by Leslie Lamport on how to write clearly structured proofs, and the structure he suggests should lend itself very well to organizing mathematical publications in such a way that everything is easier to cross-reference as well as check for syntactical and semantic problems.

Has anyone else had the problem that only after they finished working on something, they realized that it had undefined symbols/statements that made sense in an earlier version, but need updating to the current one? If so, how to track those issues? An off-the-cuff way would be to have a dependency graph in the background, but I'm not sure something like that is available.
Whenever I am doing a mathematics-heavy piece of writing (in LaTeX, of course), I tend to track the formal notation with two tools:


Every piece of notation (symbol or otherwise) gets its own \newcommand, which is used religiously.
At the first point where formal notation starts to be used, I add a table of notation that includes all of the significant notation.


It is further typically the case that each of these is broken out into its file (e.g., notation.tex, symboltable.tex) that is input into the main document, so that there is no chance for the definitions to spread around into different parts of the document.

There are several nice things about using this approach:


Using LaTeX commands for notation ensure that notation will be consistent
It is easy to change notation by changing the contents of the command
When you remove a piece of notation, you can delete the old command and be assured of errors anywhere that the command remains
The commands file can be used as a checklist for completeness of the table, and the table as a checklist for completeness of the definitions in the text body.


In many cases, the table may not survive all the way to submission (though I very much like to have one, it is an easy thing to cut from an over-length paper), but adding or removing it is just one \input line to comment in the source file, so it can still be very much a part of the manuscript development process, even if it's not showing up in the final manuscript.