Gröbner Bases

Gröbner Bases

Grobner¨ Bases Martin R. Albrecht DTU Crypto Group óó October óþÕì Contents Sage Polynomial Rings Ideals Grobner¨ Bases Buchberger’s Algorithm Quotient Rings Solving Polynomial Systems with Grobner¨ Bases e F¦ Algorithm Why not ... is course involves implementing algorithms in multivariate polynomial rings for which we will be using the Sage mathematics soware. You already know Maple, so why not use it? Õ. I do not know Maple so I could not help you with problems you might encounter. ó. Maple is an expensive piece of soware that you might not have access to outside of this university, cutting you o the tool you know. Sage does not have this problem. ì. Maple is a closed source piece of soware which means you cannot study, learn from and improve it. is goes against fundamental principles of reproducible science. Blurb Sage open-source mathematical soware system “Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.” Sage is a free open-source mathematics soware system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface. First release óþþ¢ Latest version ¢.ÕÕ released óþÕì-þ-Õì > ìþþ releases Shell, webbrowser (GUI), library > Õþ developers ∼ Õþþ components > óþþ papers cite Sage > óÕþþ subscribers [sage-support] > Õþþ,þþþ web visitors/month > ä, ¢þþ downloads/month Python & Cython Sage does not come with yet-another ad-hoc mathematical programming language, it uses Python instead. ▸ one of the most widely used programming languages (Google, IML, YouTube, NASA), ▸ easy for you to dene your own data types and methods on it (bitstreams, ciphers, rings, whatever), ▸ very clean language that results in easy to read code, ▸ a huge number of libraries: statistics, networking, databases, bioinformatic, physics, video games, ìd graphics, numerical computation (scipy), and serious “pure” mathematics (via Sage) ▸ easy to use existing C/C++ libraries from Python (via Cython) How to use SageI Use Sage via ▸ as a command line programme, ▸ as a webapp hosted on your local computer and ▸ as a webapp on the Internet How to use SageII To install Sage on your computer head to http://sagemath.org and download the right version for your operating system (Mac OS X, Windows, Linux ...) You can then either run Sage on the command line or start a local webapp. How to use Sage III Calling sage How to use SageIV Calling sage -notebook How to use SageV You can also use Sage online: http://www.sagenb.org/ and https://cloud.sagemath.com/ How to use SageVI If you just want to do a quick calculation (and share it with others), try http://aleph.sagemath.org How to use Sage VII You can access a Sage ¢.Õþ installed on IMM servers using your account credentials. malb@road:~ $ ssh [email protected] Password : Last login: Mon Oct 7 17:20:54 2013 from 10.16.166.157 Sun Microsystems Inc. SunOS 5.10 Generic January 2005 sunray4 :~ $ gridterm perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LC_CTYPE ="iso_8859_1", LANG ="en_US.utf8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Last login: Mon Oct 7 17:30:24 CEST 2013 from sunray4.imm.dtu.dk on pts/18 grid03 :~ $ sage +--------------------------------------------------------------------+ |SageVersion5.10,ReleaseDate:2013-06-17 | | Type"notebook()" for the browser-based notebook interface. | | Type"help()" forhelp. | +--------------------------------------------------------------------+ sage : 1+1 2 Intro to Programming in Sage Go to Sage Worksheet. See also http://sagemath.org/doc/thematic_tutorials/tutorial-programming-python.html Contents Sage Polynomial Rings Ideals Grobner¨ Bases Buchberger’s Algorithm Quotient Rings Solving Polynomial Systems with Grobner¨ Bases e F¦ Algorithm NotationI ▸ By F we denote any eld eld in which we can eectively compute, e.g. Q, or ▸ Fq is the nite eld of order q where q is a prime power, e.g. Fóì or Fß ▸ P = F[xÕ ,..., xn] is the polynomial ring in xÕ ,..., xn over F. ▸ We assume n is nite in this lecture. sage: P.<x,y,z> = PolynomialRing(FiniteField(7)) sage: f = x*y + 3*y*z -3 sage: g = x^2 - 2*y^2 sage:f*g x^3*y - 2*x*y^3 + 3*x^2*y*z + y^3*z - 3*x^2 - y^2 sage:f+g x^2 + x*y - 2*y^2 + 3*y*z - 3 NotationII Let f = ìxy + ó, we call monomials ìxy + ó ⋅ Õ coecientsì xy + ó ⋅ Õ terms ìxy + ó is follows [Cox et al., óþþß] and is consistent with the usage in Sage. sage: P.<x,y> = PolynomialRing(FiniteField(7)) sage: f = 2*x*y +3 sage: f.monomials() [x*y, 1] sage: f.coefficients() [2, 3] But [Becker and Weispfenning, ÕÉÉÕ] swap the notion of term and monomial. Monomial OrderingsI We will have to make decisions based on the “leading monomial” of a polynomial, which begs the question what that is. i j ▸ In F[x] this question is straight-forward: x > x i i > j. ▸ But what about F[x, y] is xó or xy bigger? ▸ Hence, we adjoin a monomial ordering to our ring F[xÕ ,..., xn] Monomial OrderingsII Denition (Lexicographical) Let αÕ αó αn mÕ = xÕ xó ⋯xn with α = (αÕ ,..., αn) and βÕ βó βn mó = xÕ xó ⋯xn with β = (βÕ ,..., βn). n We say mÕ >lex mó if, in the vector dierence α − β ∈ Z , the lemost nozero entry is positive. Like in the dictionary: rst you check x, then y .... ¢ ì ó É (þ, ¢, ì) − (þ, ó, É) = (þ, ì, −ä) ⇒ y z >lex y z ∈ F[x, y, z] Monomial Orderings III Denition (Degree Lexicographical) Let αÕ αó αn mÕ = xÕ xó ⋯xn with α = (αÕ ,..., αn) and βÕ βó βn mó = xÕ xó ⋯xn with β = (βÕ ,..., βn). We say mÕ >deglex mó if, n n SαS = Q αi > SβS = Q βi, or SαS = SβS and α >lex β. i=Õ i=Õ We rst check for degrees and only if those are equal we compare lexicographically. ó É ¢ ì y z >deglex y z ∈ F[x, y, z] Monomial OrderingsIV Denition (Degree Reverse Lexicographical) Let αÕ αó αn mÕ = xÕ xó ⋯xn with α = (αÕ ,..., αn) and βÕ βó βn mó = xÕ xó ⋯xn with β = (βÕ ,..., βn). We say mÕ >degrevlex mó if, n n SαS = Q αi > SβS = Q βi, or i=Õ i=Õ n SαS = SβS and the rightmost nonzero entry of α − β ∈ Z is negative. >deglex is not >degrevlex with reversed variables: ó ó ì ó ó ì x yz >>~degrevlex xy z vs. x yz >deglex xy z. Monomial OrderingsV sage: P.<x,y,z> = PolynomialRing(FiniteField(7), order="lex") sage: x^2*y*z^2 > x*y^3*z True sage: P.<x,y,z> = PolynomialRing(FiniteField(7), order="deglex") sage: x^2*y*z^2 > x*y^3*z True sage: P.<x,y,z> = PolynomialRing(FiniteField(7), order="degrevlex") sage: x^2*y*z^2 > x*y^3*z False Monomial OrderingsVI ▸ We write > for any monomial ordering (such as >lex) when it is clear from context which we mean ▸ LM (f ): We call leading monomial of f that monomial in f which is largest wrt to >. ▸ LC (f ), LT (f ): We dene the leading coecient and leading term of f analogously. ▸ We extend the notion of > to polynomials f , g in the natural way by comparing LM (f ) and LM (g) rst and move on to smaller monomials if they are equal. ▸ deg(f ): We call the degree of f the maximal degree of any monomial in f . In particular, deg(f ) can be ≠ deg(LM (f )). Exercises ▸ Construct Fß[x, y, z] with term order deglex in Sage ▸ Reorder the monomials of f = ¦x¢yz¦ + óxóy − xy¦ + xyzì + ¦yz + ìx wrt to the ▸ lexicographical, ▸ degree lexicographical and ▸ degree reverse lexicographical ordering. Check your result with Sage. Polynomial DivisionI We will need to divide polynomials (with remainder) later: αÕ αn βÕ βn Division of monomials is easy: xÕ ⋯xn is divisible by xÕ ⋯xn if α − β ≥ (þ, . , þ) where α = (αÕ ,..., αn) and β = (βÕ ,..., βn). But what about polynomials? Polynomial DivisionII Example Õ begin p = ìxóy + óyó + x + Õ, ó ó aÕ ,..., as ← þ, . , þ; r ← þ; fÕ = óx + Õ, ì while p ≠ þ do fó = y + Õ ∈ Fß[x, y] with deglex ¦ division ← False; Õ. xó S xóy ∶ ¢ for Õ ≤ i ≤ s do ó aÕ = −óy, p = óy + x + óy + Õ ä if LM (fi) divides LM (p) then ß ai ← ai + LT (p) ~LT (fi); ó. break and jump to line ì. ó p ← p − LT (p) ~LT (fi) ⋅ fi; ì. y S y ∶ É division ← True; aó = óy, p = x + Õ Õþ break; ¦. break and jump to line ì. ó ÕÕ if division = False then ¢. Neither y nor x divide x: Õó r ← r + LT (p); division = False Õì p ← p − LT (p); ä. r = x, p = Õ ß. Neither y nor xó divide x: Algorithm Õ: Polynomial Division division = False . r = x + Õ, p = þ Polynomial Division III sage: P.<x,y> = PolynomialRing(FiniteField(7),order="deglex") sage: f = 3*x^2*y + 2*y^2 + x + 1 sage: f1 = 2*x^2 + 1 sage:f2=y+1 sage: f == (-2*y)*f1 + (2*y)*f2 + (x+1) True Exercises ß ó ì ó ó ì ▸ Let f = x y + x y − y + Õ, fÕ = xy − x and fó = x − y ∈ Fß[x, y] with deglex. Divide f by (fÕ , fó). en use lex and divde again. ▸ ó ó Let f = xy − x, fÕ = xy + Õ and fó = y − Õ ∈ Fß[x, y] with >lex.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    84 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us