#10529: dimension() and is_smooth() for algebraic subschemes of toric varieties
----------------------------------+-----------------------------------------
Reporter: vbraun | Owner: AlexGhitza
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.6.2
Component: algebraic geometry | Keywords:
Author: Volker Braun | Upstream: N/A
Reviewer: Andrey Novoseltsev | Merged:
Work_issues: |
----------------------------------+-----------------------------------------
Comment(by novoselt):
Glanced through the main patch. What is "the best affine patch" and why?
Regarding checking global smoothness in affine varieties, I got very
annoyed by "speed" of affine patches recently and the following
dramatically works:
{{{
diff -r b749e0edc82b sage/schemes/generic/algebraic_scheme.py
--- a/sage/schemes/generic/algebraic_scheme.py Mon Feb 21 09:35:33 2011
-0700
+++ b/sage/schemes/generic/algebraic_scheme.py Tue Feb 22 19:47:20 2011
-0700
@@ -1498,7 +1498,7 @@
phi_p = ambient_patch.embedding_morphism().defining_polynomials()
patch = ambient_patch.subscheme(
[p(phi_p) for p in
self.defining_polynomials()])
- patch._embedding_morphism = patch.hom(phi_p, self)
+ patch._embedding_morphism = patch.hom(phi_p, self, check=False)
self._affine_patches[i] = patch
return patch
diff -r b749e0edc82b sage/schemes/generic/scheme.py
--- a/sage/schemes/generic/scheme.py Mon Feb 21 09:35:33 2011 -0700
+++ b/sage/schemes/generic/scheme.py Tue Feb 22 19:47:20 2011 -0700
@@ -459,7 +459,7 @@
"""
return morphism.SchemeMorphism_id(self)
- def hom(self, x, Y=None):
+ def hom(self, x, Y=None, check=True):
"""
Return the scheme morphism from self to Y defined by x. If x is a
scheme, try to determine a natural map to x.
@@ -480,7 +480,7 @@
return self.Hom(x).natural_map()
else:
raise TypeError, "unable to determine codomain"
- return self.Hom(Y)(x)
+ return self.Hom(Y)(x, check)
def _Hom_(self, Y, category=None, check=True):
"""
}}}
Feel free to add it to your patch (with documentation and examples ;-)),
but I have not spend much time thinking about implications and what can go
wrong with such changes. I think I had at least one doctest failure, but
for now I am using it anyway since it works fine for toric varieties and
makes a difference between interactive work and coffee breaks.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10529#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.