This computation is done through the corresponding method for ring maps. See degreeOfRationalMap(RingMap) for more details and examples.