n is the numerator, d is the denominator. Groebner bases only work with polynomials, not with rational functions, so we work with the numerator and denominator explicitly.
Yeah, this seems to be necessary, (although I suppose t*d - 1 would be as correct but more efficient than t*D - 1), even though excluding this equation doesn’t result in a wrong answer in this case. Here’s how I explain the extra equation to myself:
The polynomial d*N - D*n represents the equation {d \cdot N} = {D \cdot n}, which I initially thought would be equivalent to \frac{n}{d} = \frac{N}{D}. However it’s not equivalent, because the former has a symmetry between n and d which the latter lacks: in the latter, the denominator can’t be zero, while the numerator can. The additional equation {t \cdot d} = 1, represented as the polynomial t*d - 1 encodes this additional necessary constraint without constraining d otherwise. Substituting d = 0 into the equation {t \cdot d} = 1 results in the falsity 0 = 1.