# 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
|
b
|
|
| 744 | 744 | x^2 - y |
| 745 | 745 | and Y is defined by: |
| 746 | 746 | x - y |
| | 747 | |
| | 748 | TESTS: |
| | 749 | |
| | 750 | The bug reported at #12211 has been fixed:: |
| | 751 | |
| | 752 | sage: P.<x, y, z, w> = ProjectiveSpace(3, QQ) |
| | 753 | sage: S = P.subscheme([x]) |
| | 754 | sage: T = P.subscheme([y, z]) |
| | 755 | sage: U = T.complement(S) |
| | 756 | sage: U._check_satisfies_equations([0, 0, 1, 1]) |
| | 757 | True |
| 747 | 758 | """ |
| 748 | 759 | coords = list(v) |
| 749 | 760 | for f in self.__X.defining_polynomials(): |
| 750 | 761 | if f(coords) != 0: |
| 751 | 762 | raise TypeError, "Coordinates %s do not define a point on %s"%(v,self) |
| 752 | 763 | for f in self.__Y.defining_polynomials(): |
| 753 | | if f(coords) == 0: |
| 754 | | raise TypeError, "Coordinates %s do not define a point on %s"%(v,self) |
| 755 | | return True |
| | 764 | if f(coords) != 0: |
| | 765 | return True |
| | 766 | raise TypeError, "Coordinates %s do not define a point on %s"%(v,self) |
| 756 | 767 | |
| 757 | 768 | def rational_points(self, F=None, bound=0): |
| 758 | 769 | """ |