They could be defined in any of a whole heap of files. The easy way to find out wich is to look at the functions page in the Codex and that will tell you where.
BUT…
You should never modify the core functions!!!
Any changes that you make will be over-written by any future updates, and there’s no guarantee that what you change will be compatible with any future updates as well.
There’s always a very good chance that you could use a filter or action call to make the modification that you’re trying to make, so I woudl suggest that you look through the source code to see what’s available.