Attachment 'dirty_model.patch'

Download

   1 # HG changeset patch
   2 # User Armin Straub <[email protected]>
   3 # Date 1277826449 18000
   4 # Node ID 651e1568354b8fd2661308c7e6c6be92d0b887dd
   5 # Parent  8dec8b43ccca5f104b1e280cb33c8f4c2c1b8f85
   6 Adding a flag to minimal_model() to return the EC as returned by Tate's algorithm (that is before "tidying" it)
   7 
   8 diff -r 8dec8b43ccca -r 651e1568354b sage/schemes/elliptic_curves/ell_local_data.py
   9 --- a/sage/schemes/elliptic_curves/ell_local_data.py	Wed Jun 23 20:40:43 2010 -0700
  10 +++ b/sage/schemes/elliptic_curves/ell_local_data.py	Tue Jun 29 10:47:29 2010 -0500
  11 @@ -294,12 +294,17 @@
  12          red_type = "good"
  13          if not self._reduction_type is None:
  14              red_type = ["bad non-split multiplicative","bad additive","bad split multiplicative"][1+self._reduction_type]
  15 -        return "Local data at %s:\nReduction type: %s\nLocal minimal model: %s\nMinimal discriminant valuation: %s\nConductor exponent: %s\nKodaira Symbol: %s\nTamagawa Number: %s"%(self._prime,red_type,self._Emin,self._val_disc,self._fp,self._KS,self._cp)
  16 +        return "Local data at %s:\nReduction type: %s\nLocal minimal model: %s\nMinimal discriminant valuation: %s\nConductor exponent: %s\nKodaira Symbol: %s\nTamagawa Number: %s"%(self._prime,red_type,self.minimal_model(),self._val_disc,self._fp,self._KS,self._cp)
  17  
  18 -    def minimal_model(self):
  19 +    def minimal_model(self, tidy=True):
  20          """
  21          Return the (local) minimal model from this local reduction data.
  22  
  23 +        INPUT:
  24 +
  25 +        - ``tidy`` -- (default: True) if set to True the EC returned by Tate's algorithm will be 
  26 +          "tidied" as specified in _tidy_model() for curves over number fields.
  27 +
  28          EXAMPLES::
  29  
  30              sage: from sage.schemes.elliptic_curves.ell_local_data import EllipticCurveLocalData
  31 @@ -310,8 +315,25 @@
  32              Elliptic Curve defined by y^2 = x^3 + 1 over Rational Field
  33              sage: data.minimal_model() == E.local_minimal_model(2)
  34              True
  35 +
  36 +        To demonstrate the behaviour when ``tidy`` is set to False::
  37 +
  38 +            sage: K.<a> = NumberField(x^3+x+1)
  39 +            sage: E = EllipticCurve(K, [0, 0, a, 0, 1])
  40 +            sage: E.local_data(K.ideal(a-1)).minimal_model()
  41 +            Elliptic Curve defined by y^2 + a*y = x^3 + 1 over Number Field in a with defining polynomial x^3 + x + 1
  42 +            sage: E.local_data(K.ideal(a-1)).minimal_model(tidy=False)
  43 +            Elliptic Curve defined by y^2 + (a+2)*y = x^3 + 3*x^2 + 3*x + (-a+1) over Number Field in a with defining polynomial x^3 + x + 1
  44          """
  45 -        return self._Emin
  46 +        if tidy:
  47 +            try:
  48 +                return self._Emin_tidy
  49 +            except AttributeError:
  50 +                pass
  51 +            self._Emin_tidy = self._Emin._tidy_model()
  52 +            return self._Emin_tidy
  53 +        else:
  54 +            return self._Emin
  55  
  56      def prime(self):
  57          """
  58 @@ -938,7 +960,6 @@
  59                  pie *= pi # now pie=pi^6
  60                  a6 /= pie
  61                  verbose("Non-minimal equation, dividing out...\nNew model is %s"%([a1, a2, a3, a4, a6]), t, 1)
  62 -        C = C._tidy_model()
  63          return (C, p, val_disc, fp, KS, cp, split)
  64      
  65      

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2010-07-03 03:22:50, 3.8 KB) [[attachment:badcop.sws]]
  • [get | view] (2010-07-03 03:24:43, 9.3 KB) [[attachment:demo.sage]]
  • [get | view] (2010-07-03 03:16:27, 3.1 KB) [[attachment:dirty_model.patch]]
  • [get | view] (2010-07-03 03:22:11, 3.5 KB) [[attachment:goodcop.sws]]
  • [get | view] (2010-07-03 03:23:40, 1.4 KB) [[attachment:magma.sage]]
  • [get | view] (2010-07-04 19:16:17, 37.3 KB) [[attachment:project.pdf]]
  • [get | view] (2010-07-03 03:12:33, 11.1 KB) [[attachment:root_number.sage]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.