# Ticket #12211: trac_12211_fix_bug.2.patch

File trac_12211_fix_bug.2.patch, 1.4 KB (added by davideklund, 17 months ago)

Fix bug, contains doctest (patch made with Sage 4.7.2).

• ## sage/schemes/generic/algebraic_scheme.py

```# HG changeset patch
# User davideklund <daek@kth.se>
# Date 1324555111 -3600
# Node ID 4aabf4dfb1288da77d7cdb1c076b0e0aa244bfd4
# Parent  9e29a3d84c48c399daaf3920bcb8b17273a0e876
Trac 12211: Fix bug in equation check.

diff --git a/sage/schemes/generic/algebraic_scheme.py b/sage/schemes/generic/algebraic_scheme.py```
 a x^2 - y and Y is defined by: x - y TESTS: The bug reported at #12211 has been fixed:: sage: P. = ProjectiveSpace(3, QQ) sage: S = P.subscheme([x]) sage: T = P.subscheme([y, z]) sage: U = T.complement(S) sage: U._check_satisfies_equations([0, 0, 1, 1]) True """ coords = list(v) for f in self.__X.defining_polynomials(): if f(coords) != 0: raise TypeError, "Coordinates %s do not define a point on %s"%(v,self) for f in self.__Y.defining_polynomials(): if f(coords) == 0: raise TypeError, "Coordinates %s do not define a point on %s"%(v,self) return True if f(coords) != 0: return True raise TypeError, "Coordinates %s do not define a point on %s"%(v,self) def rational_points(self, F=None, bound=0): """