Tucked in the recesses of the Sage documentation are the commands search_src, search_def, and search_doc. They take a string as argument and return all the files containing that string (well, one searches docstrings, one searches definitions, and the other searches all source code; you can probably guess which is which). So in addition to the other answers here, these commands can give you an idea of _which_ file to look at.