# Revision history [back]

Check if it is in Sage's source code:

search_doc('buchberger')


This reveals that there is a file

$SAGE_ROOT/devel/sage/sage/rings/polynomial/toy_buchberger.py  (where$SAGE_ROOT is your Sage root directory).

In this file there is a function buchberger and a function buchberger_improved.

Check if it is in Sage's source code:

search_doc('buchberger')


This reveals that there is a file

$SAGE_ROOT/devel/sage/sage/rings/polynomial/toy_buchberger.py  (where$SAGE_ROOT is your Sage root directory).

In this file there is a function buchberger and a function buchberger_improved.

To get the code for Buchberger's algorithm, type

sage: from sage.rings.polynomial.toy_buchberger import buchberger
sage: buchberger??


It uses a function to compute the S-polynomial of two polynomials, whose source code you can see by typing

sage: from sage.rings.polynomial.toy_buchberger import spol
sage: spol??