1
$\begingroup$

If I’m reading a paper and I want to try to rewrite the content in a math programming language like Sage, I’d like to search from within Sage for objects they have corresponding to a certain name, like “homological invariant”. It would be cool if objects were like Python libraries - they had internal functions and attributes, but also a natural language help doc explaining what they were.

Is there any way to search inside Sage for a certain object they might have?

$\endgroup$
2
  • 2
    $\begingroup$ Have you tried looking it up in the Sage reference manual? $\endgroup$ Commented Nov 20, 2021 at 2:04
  • $\begingroup$ I can Google and read documentation, but the idea is a function to search Sage from within the programming language. $\endgroup$ Commented Nov 20, 2021 at 12:29

1 Answer 1

2
$\begingroup$

The functions search_src, search_def, search_doc, browse_sage_doc might help.

Getting the Sage sources and using git grep is another way one can explore the code base.

Examples of using Sage functions:

sage: search_def('homological')
sage: search_def('invariant')
sage: search_doc('homological')
sage: search_src('homological')
sage: browse_sage_doc(j_invariant_qexp)

Examples of using git grep (in a terminal, from the Sage root directory):

$ git grep 'homological'
$ git grep 'homological' src/sage/schemes

(the first one searches everywhere, the second one only in src/sage/schemes).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .