Upgrade to Pro — share decks privately, control downloads, hide ads and more …

わかったつもりになる Gröbner 基底

わかったつもりになる Gröbner 基底

Haskell で計算機代数勉強会(http://partake.in/events/451a51b0-b18e-4e01-bda4-423bf57f4051 )での発表資料です。Gröbner 基底についての簡単な導入と計算法についての紹介です。

Hiromi Ishii

May 04, 2013
Tweet

More Decks by Hiromi Ishii

Other Decks in Technology

Transcript

  1. Θ͔ͬͨͭ΋ΓʹͳΔ
    Gröbnerجఈ
    ੴҪ େւ
    13೥5݄4೔౔༵೔

    View full-size slide

  2. ࣗݾ঺հ
    ੴҪେւʢa.k.a. @mr_konnʣ
    Twitter: @mr_konn
    Blog: http:/
    /blog.konn-san.com/
    Web: http:/
    /konn-san.com/
    Haskell lover
    ૣҴాେֶ਺ֶՊ࢛೥
    ຊ౰͸ϩδοΫͷਓؒͷഺ͕ࠓ೥͸ԑ͋ͬͯ୅
    ਺زԿʢಛʹ Gröbner جఈʣ ͷݚڀࣨʹ
    computational-algebra ͷ࡞ऀ
    13೥5݄4೔౔༵೔

    View full-size slide

  3. Table of Contents
    Gröbner جఈͷ؆୯ͳಋೖ
    Gröbner جఈͷܭࢉ๏
    Buchberger ΞϧΰϦζϜ
    ࠷దԽख๏ɿsyzygy, sugar strategy
    Haskell ͷܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    13೥5݄4೔౔༵೔

    View full-size slide

  4. Table of Contents
    Gröbner جఈͷ؆୯ͳಋೖ
    Gröbner جఈͷܭࢉ๏
    Buchberger ΞϧΰϦζϜ
    ࠷దԽख๏ɿsyzygy, sugar strategy
    Haskell ͷܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    13೥5݄4೔౔༵೔

    View full-size slide

  5. Gröbner جఈ ͷ؆୯ͳಋೖ
    13೥5݄4೔౔༵೔

    View full-size slide

  6. Gröbner جఈͷԠ༻
    ߴ࣍࿈ཱํఔࣜͷจࣈফڈ
    ॳ౳زԿͷࣗಈূ໌
    ౷ܭʹ΋Կ͔Ԡ༻͕͋ΔΒ͍͠
    ϩϘςΟΫε
    ܭࢉػ୅਺ɺ୅਺زԿֶ
    13೥5݄4೔౔༵೔

    View full-size slide

  7. Gröbner جఈ
    13೥5݄4೔౔༵೔

    View full-size slide

  8. Gröbner جఈ
    “άϨϒφʔ͖͍ͯ” ͱಡΉ
    13೥5݄4೔౔༵೔

    View full-size slide

  9. Gröbner جఈ
    “άϨϒφʔ͖͍ͯ” ͱಡΉ
    1960s: ኍதฏ༞ɺB. Buchberger Β͕ಠཱʹൃݟ
    13೥5݄4೔౔༵೔

    View full-size slide

  10. Gröbner جఈ
    “άϨϒφʔ͖͍ͯ” ͱಡΉ
    1960s: ኍதฏ༞ɺB. Buchberger Β͕ಠཱʹൃݟ
    Gröbner ͸ Buchberger ͷࢣঊͷ໊લ
    13೥5݄4೔౔༵೔

    View full-size slide

  11. Gröbner جఈ
    “άϨϒφʔ͖͍ͯ” ͱಡΉ
    1960s: ኍதฏ༞ɺB. Buchberger Β͕ಠཱʹൃݟ
    Gröbner ͸ Buchberger ͷࢣঊͷ໊લ
    ኍத͸ಛҟ఺ղফͷͨΊʹߟ͑ͨ
    13೥5݄4೔౔༵೔

    View full-size slide

  12. Gröbner جఈ
    “άϨϒφʔ͖͍ͯ” ͱಡΉ
    1960s: ኍதฏ༞ɺB. Buchberger Β͕ಠཱʹൃݟ
    Gröbner ͸ Buchberger ͷࢣঊͷ໊લ
    ኍத͸ಛҟ఺ղফͷͨΊʹߟ͑ͨ
    ٕज़ͷਐาͰܭࢉग़དྷΔΑ͏ʹͳΓԠ༻͕ग़Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  13. Gröbner جఈ
    “άϨϒφʔ͖͍ͯ” ͱಡΉ
    1960s: ኍதฏ༞ɺB. Buchberger Β͕ಠཱʹൃݟ
    Gröbner ͸ Buchberger ͷࢣঊͷ໊લ
    ኍத͸ಛҟ఺ղফͷͨΊʹߟ͑ͨ
    ٕज़ͷਐาͰܭࢉग़དྷΔΑ͏ʹͳΓԠ༻͕ग़Δ
    ମ্ଟ߲ࣜ؀ͷΠσΞϧͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide

  14. ମ্ଟ߲ࣜ؀ͷΠσΞϧ
    ͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide

  15. ʁʁʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  16. ମ্ଟ߲ࣜ؀ͷΠσΞϧ
    ͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide

  17. ମ্ଟ߲ࣜ؀ͷΠσΞϧ
    ͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide


  18. ͍ͨʢ≠͔ΒͩʣͱಡΉ
    ଍͠ࢉɺҾ͖ࢉɺֻ͚ࢉɺׂΓࢉʢ0Ҏ֎ʣ͕ग़͖ΔΑ
    ͏ͳߏ଄
    ྫɿ༗ཧ਺ମ ℚ ͱ͔ෳૉ਺ମ ℂ ͱ͔
    ྫɿ੔਺શମ ℤ ͸ମͰͳ͍ʢ1/2͸੔਺͡Όͳ͍ʣ
    ҎԼͰ͸খจࣈͷ k ͰମΛද͢
    13೥5݄4೔౔༵೔

    View full-size slide

  19. ମ্ଟ߲ࣜ؀ͷΠσΞϧ
    ͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide

  20. ମ্ͷଟ߲ࣜ؀
    k[X1
    , …, Xn
    ] = {k Λ܎਺ͱ͢Δ n-ม਺ଟ߲ࣜશମ}
    ม਺ͷ਺͕ࣗ໌ͳ࣌͸ k[] = k[X1
    , …, Xn
    ] ͱॻ͘
    ࣗવʹ଍͠ࢉɺҾ͖ࢉɺֻ͚ࢉ͕ఆٛͰ͖Δʢׂ
    Γࢉ͸ग़དྷΔͱ͸ݶΒͳ͍ʣ
    ྫɿX1
    2 + 2 X1
    X2
     + X2
    2 ∈ k[X1
    , X2
    ], y2 − x ∈ k[x, y]
    13೥5݄4೔౔༵೔

    View full-size slide

  21. ମ্ଟ߲ࣜ؀ͷΠσΞϧ
    ͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide

  22. ΠσΞϧ
    ؀ R ͷ෦෼ू߹ I ͕ ΠσΞϧ Ͱ͋Δͱ͸
    1. ೚ҙͷ x, y ∈ I ʹ͍ͭͯ x − y ∈ I
    2.೚ҙͷ c ∈ R, x ∈ I ʹ͍ͭͯ cx ∈ I
    ഒ਺֓೦ͷ҃ΔछͷҰൠԽʹͳ͍ͬͯΔ
    ΠσΞϧ I ʹଐ͢Δ ⇔ I ͷݩͰׂΕΔ
    a ͕ b ͷഒ਺ ⇔ ⟨a⟩ ⊆ ⟨b⟩
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  23. ͳͥΠσΞϧʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  24. ͳͥΠσΞϧʁ
    ΠσΞϧ͸زԿతʹ͸ͦͷྵ఺ͷ੒͢ਤܗͱରԠ͢Δ
    ʢਖ਼֬ʹ͸ࠜجΠσΞϧ͕ରԠʣ
    13೥5݄4೔౔༵೔

    View full-size slide

  25. ͳͥΠσΞϧʁ
    ΠσΞϧ͸زԿతʹ͸ͦͷྵ఺ͷ੒͢ਤܗͱରԠ͢Δ
    ʢਖ਼֬ʹ͸ࠜجΠσΞϧ͕ରԠʣ
    ⟨y − x2⟩ɿ์෺ઢ
    13೥5݄4೔౔༵೔

    View full-size slide

  26. ͳͥΠσΞϧʁ
    ΠσΞϧ͸زԿతʹ͸ͦͷྵ఺ͷ੒͢ਤܗͱରԠ͢Δ
    ʢਖ਼֬ʹ͸ࠜجΠσΞϧ͕ରԠʣ
    ⟨y − x2⟩ɿ์෺ઢ
    ⟨y2 + x2 − 1, y + 2x − 1⟩ɿԁͱ௚ઢͷަ఺
    13೥5݄4೔౔༵೔

    View full-size slide

  27. ͳͥΠσΞϧʁ
    ΠσΞϧ͸زԿతʹ͸ͦͷྵ఺ͷ੒͢ਤܗͱରԠ͢Δ
    ʢਖ਼֬ʹ͸ࠜجΠσΞϧ͕ରԠʣ
    ⟨y − x2⟩ɿ์෺ઢ
    ⟨y2 + x2 − 1, y + 2x − 1⟩ɿԁͱ௚ઢͷަ఺
    ަ఺ 㱻 ࿈ཱํఔࣜͷղ
    13೥5݄4೔౔༵೔

    View full-size slide

  28. ͳͥΠσΞϧʁ
    ΠσΞϧ͸زԿతʹ͸ͦͷྵ఺ͷ੒͢ਤܗͱରԠ͢Δ
    ʢਖ਼֬ʹ͸ࠜجΠσΞϧ͕ରԠʣ
    ⟨y − x2⟩ɿ์෺ઢ
    ⟨y2 + x2 − 1, y + 2x − 1⟩ɿԁͱ௚ઢͷަ఺
    ަ఺ 㱻 ࿈ཱํఔࣜͷղ
    ΠσΞϧ͸࿈ཱ͞Εͨؔ܎ࣜͱ΋ݟΔ͜ͱ͕ग़དྷΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  29. ͳͥΠσΞϧʁ
    ΠσΞϧ͸زԿతʹ͸ͦͷྵ఺ͷ੒͢ਤܗͱରԠ͢Δ
    ʢਖ਼֬ʹ͸ࠜجΠσΞϧ͕ରԠʣ
    ⟨y − x2⟩ɿ์෺ઢ
    ⟨y2 + x2 − 1, y + 2x − 1⟩ɿԁͱ௚ઢͷަ఺
    ަ఺ 㱻 ࿈ཱํఔࣜͷղ
    ΠσΞϧ͸࿈ཱ͞Εͨؔ܎ࣜͱ΋ݟΔ͜ͱ͕ग़དྷΔ
    Gröbner جఈΛ࢖͏ͱ৭Μͳਤܗɾ࿈ཱํఔࣜʹ
    ؔ͢Δܭࢉ͕؆୯ʹग़དྷΔΑ͏ʹͳΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  30. ମ্ଟ߲ࣜ؀ͷΠσΞϧ
    ͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide

  31. ੜ੒ݩ
    ্ͷ ⟨f1
    ,…, fr
    ⟩ ͸͖ͬ͞ͷΠσΞϧͷఆٛΛຬͨ͢ɻ
    ٯʹɺମ্ଟ߲ࣜ؀ͷΠσΞϧ͸ɺద౰ͳ f1
    ,…, fr
    ʹ
    ΑΓɺ͢΂ͯ͜ͷܗͰॻ͚ΔʢHilbert ͷجఈఆཧʣ
    f1
    , … , fr
    ∈ k[ ] ʹ͍ͭͯɺ
    ⟨f1
    ,…, fr
    ⟩ := {a1
    f1
     +…+ ar
    fr
    ∣ ai
     ∈ k[] (i = 1, …
    r)}
    Λ f1
    ,…, fr
    ʹΑΓੜ੒͞ΕΔΠσΞϧͱ͍͏ɻ
    I = ⟨f1
    ,…, fr
    ⟩ ͷ࣌ɺ f1
    ,…, fr
    Λ I ͷجఈɺ·ͨ͸
    ੜ੒ݩͱݺͿɻ
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  32. Hilbert ͷجఈఆཧ
    Noether ؀্ͷଟ߲ࣜ؀͸ Noether ؀Ͱ͋Δ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  33. Hilbert ͷجఈఆཧ
    Noether ؀ͱ͸ʮ೚ҙͷΠσΞϧ͕༗ݶݸͷੜ੒ݩͰॻ͚Δʢʹ༗
    ݶੜ੒ʣʯͱ͍͏৚݅Λຬͨ͢؀
    Noether ؀্ͷଟ߲ࣜ؀͸ Noether ؀Ͱ͋Δ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  34. Hilbert ͷجఈఆཧ
    Noether ؀ͱ͸ʮ೚ҙͷΠσΞϧ͕༗ݶݸͷੜ੒ݩͰॻ͚Δʢʹ༗
    ݶੜ੒ʣʯͱ͍͏৚݅Λຬͨ͢؀
    ܭࢉػͰѻ͏ʹ͸ɺଟ߲ࣜ؀ͷΠσΞϧ͸༗ݶݸͷଟ߲ࣜͷ૊ͱ͠
    ͯఆٛ͢Ε͹े෼
    Noether ؀্ͷଟ߲ࣜ؀͸ Noether ؀Ͱ͋Δ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  35. Hilbert ͷجఈఆཧ
    Noether ؀ͱ͸ʮ೚ҙͷΠσΞϧ͕༗ݶݸͷੜ੒ݩͰॻ͚Δʢʹ༗
    ݶੜ੒ʣʯͱ͍͏৚݅Λຬͨ͢؀
    ܭࢉػͰѻ͏ʹ͸ɺଟ߲ࣜ؀ͷΠσΞϧ͸༗ݶݸͷଟ߲ࣜͷ૊ͱ͠
    ͯఆٛ͢Ε͹े෼
    ূ໌͸Ή͔͍͕ͣ͠ɺମͷ৔߹ʹ͍ͭͯ͸ Gröbner جఈΛ࢖͏ͱ
    ؆୯ʹࣔͤΔɻ
    ʢূ໌ɿGröbner جఈΛऔΕ͹Α͍■ʣ
    Noether ؀্ͷଟ߲ࣜ؀͸ Noether ؀Ͱ͋Δ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  36. ମ্ଟ߲ࣜ؀ͷΠσΞϧ
    ͷੑ࣭ͷΑ͍ੜ੒ݩ
    13೥5݄4೔౔༵೔

    View full-size slide

  37. Α͍ੑ࣭ʁ
    ࠨͷ໰୊Λߟ͑Δ
    f1
    ͱ f2
    ͷ “࠷େެ໿ࣜ”
    f = GCD(f1
    ,  f2
    ) ͕Θ
    ͔Ε͹Α͍
    I = ⟨ f ⟩ ͱͳΔͷͰɺ
    ͋ͱ͸ g, h Λ f Ͱׂ
    Γ੾ΕΔ͔ݟΔ
    f1
     = x3 + x2 + x + 1
    f2
     = x2 − x − 2
    I = ⟨ f1
    ,  f2
    ⟩ ⊆ k[x]
    ͱ͢Δͱɺg = x3 − 1, 
    h = x2 + 1 ͸ͦΕͧΕ
    I ʹଐ͔͢ʁ
    ໰୊ 1
    13೥5݄4೔౔༵೔

    View full-size slide

  38. ࠷େެ໿ࣜͷٻΊํ
    Euclid ͷޓআ๏Λ࢖͏
    ੔਺͚ͩͰͳ͘ɺׂΓࢉݪཧ͕੒ཱ͢Δ೚
    ҙͷ؀Ͱ࢖͑Δ
    ੔਺ͷ৔߹ɿ͋Δݩ͕ ⟨a, b⟩ ʹଐ͢Δ
    ɹ㱻 a, b ͰׂΕΔ
    ɹ㱻 a, b ͷ࠷େެ໿਺ͰׂΕΔ
    ಉ༷ͷ͜ͱ͕Ұม਺ଟ߲ࣜ؀Ͱ΋੒ཱ
    13೥5݄4೔౔༵೔

    View full-size slide

  39. Euclid ͷޓআ๏
    ೖྗɿf, g
    1. f  Λ g ͰׂΓࢉͨ͠༨ΓΛ r0
    ͱ͢Δ
    2.g  Λ r0
    ͰׂΓࢉͨ͠༨ΓΛ r1
    ͱ͢Δ
    3.r0
      Λ r1
    ͰׂΓࢉͨ͠༨ΓΛ r2
    ͱ͢Δ
    4.ҎԼθϩʹͳΔ·Ͱ܁Γฦ͠
    ग़ྗɿθϩͰͳ͍࠷ޙͷ rn
    13೥5݄4೔౔༵೔

    View full-size slide

  40. Ұม਺ଟ߲ࣜͷׂΓࢉ
    ઌఔͷ໰୊Ͱ Euclidͷ
    ޓআ๏Λ࢖͏ͱ͖ͷ࠷
    ॳͷεςοϓ
    ߱ႈͷॱʹฒ΂Δ
    େ͖͍߲ͱͷா৲Λ߹
    Θ͍ͤͯ͘
    x +2
    x2 x 2 x3 +x2 +x +1
    x3 x2 2x
    2x2 +3x +1
    2x2 2x 4
    5x +5
    13೥5݄4೔౔༵೔

    View full-size slide

  41. ͜ΕΛଟม਺ʹ
    ҰൠԽͰ͖ͳ͍͔ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  42. ଟม਺ͷ৔߹
    13೥5݄4೔౔༵೔

    View full-size slide

  43. ଟม਺ͷ৔߹
    f1
     = X2Y − 1
    f2
     = X3 − Y2 − X
    I = ⟨ f1
    ,  f2
    ⟩ ⊆ k[X, Y]
    ͱ͢Δͱɺ
    g = X2Y2 − X3Y − XY − 1
    ͸ I ʹଐ͔͢ʁ
    ໰୊ 2
    13೥5݄4೔౔༵೔

    View full-size slide

  44. ଟม਺ͷ৔߹
    ೋม਺ͷ৔߹Λߟ͑Δ
    f1
     = X2Y − 1
    f2
     = X3 − Y2 − X
    I = ⟨ f1
    ,  f2
    ⟩ ⊆ k[X, Y]
    ͱ͢Δͱɺ
    g = X2Y2 − X3Y − XY − 1
    ͸ I ʹଐ͔͢ʁ
    ໰୊ 2
    13೥5݄4೔౔༵೔

    View full-size slide

  45. ଟม਺ͷ৔߹
    ೋม਺ͷ৔߹Λߟ͑Δ
    f1
    ͱ f2
    ͷ “࠷େެ໿ࣜ”
    ͷΑ͏ͳ෺Λߟ͑ΒΕ
    Δ͔ʁ
    f1
     = X2Y − 1
    f2
     = X3 − Y2 − X
    I = ⟨ f1
    ,  f2
    ⟩ ⊆ k[X, Y]
    ͱ͢Δͱɺ
    g = X2Y2 − X3Y − XY − 1
    ͸ I ʹଐ͔͢ʁ
    ໰୊ 2
    13೥5݄4೔౔༵೔

    View full-size slide

  46. ଟม਺ͷ৔߹
    ೋม਺ͷ৔߹Λߟ͑Δ
    f1
    ͱ f2
    ͷ “࠷େެ໿ࣜ”
    ͷΑ͏ͳ෺Λߟ͑ΒΕ
    Δ͔ʁ
    f1
     = X2Y − 1
    f2
     = X3 − Y2 − X
    I = ⟨ f1
    ,  f2
    ⟩ ⊆ k[X, Y]
    ͱ͢Δͱɺ
    g = X2Y2 − X3Y − XY − 1
    ͸ I ʹଐ͔͢ʁ
    ໰୊ 2
    ➡ ग़དྷͳ͍ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  47. ࠷େެ໿ࣜ͸औΕͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  48. ࠷େެ໿ࣜ͸औΕͳ͍
    ࠷େެ໿͕ࣜඞͣऔΕΔͳΒɺ೚ҙͷΠσΞ
    ϧ͸Ұͭͷଟ߲ࣜʹΑΓ⟨ f ⟩ ͷܗͰॻ͚Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  49. ࠷େެ໿ࣜ͸औΕͳ͍
    ࠷େެ໿͕ࣜඞͣऔΕΔͳΒɺ೚ҙͷΠσΞ
    ϧ͸Ұͭͷଟ߲ࣜʹΑΓ⟨ f ⟩ ͷܗͰॻ͚Δ
    ͔͠͠ɺྫ͑͹⟨x, y⟩ʹ্͍ͭͯͷΑ͏ͳ f
    ͸ଘࡏ͠ͳ͍ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  50. ࠷େެ໿ࣜ͸औΕͳ͍
    ࠷େެ໿͕ࣜඞͣऔΕΔͳΒɺ೚ҙͷΠσΞ
    ϧ͸Ұͭͷଟ߲ࣜʹΑΓ⟨ f ⟩ ͷܗͰॻ͚Δ
    ͔͠͠ɺྫ͑͹⟨x, y⟩ʹ্͍ͭͯͷΑ͏ͳ f
    ͸ଘࡏ͠ͳ͍ʂ
    ผͷखஈΛߟ͑Δ΂͠
    13೥5݄4೔౔༵೔

    View full-size slide

  51. ࠷େެ໿ࣜ͸औΕͳ͍
    ࠷େެ໿͕ࣜඞͣऔΕΔͳΒɺ೚ҙͷΠσΞ
    ϧ͸Ұͭͷଟ߲ࣜʹΑΓ⟨ f ⟩ ͷܗͰॻ͚Δ
    ͔͠͠ɺྫ͑͹⟨x, y⟩ʹ্͍ͭͯͷΑ͏ͳ f
    ͸ଘࡏ͠ͳ͍ʂ
    ผͷखஈΛߟ͑Δ΂͠
    ׂΓࢉͷ༨Γ͕ॏཁͩͬͨ
    13೥5݄4೔౔༵೔

    View full-size slide

  52. ࠷େެ໿ࣜ͸औΕͳ͍
    ࠷େެ໿͕ࣜඞͣऔΕΔͳΒɺ೚ҙͷΠσΞ
    ϧ͸Ұͭͷଟ߲ࣜʹΑΓ⟨ f ⟩ ͷܗͰॻ͚Δ
    ͔͠͠ɺྫ͑͹⟨x, y⟩ʹ্͍ͭͯͷΑ͏ͳ f
    ͸ଘࡏ͠ͳ͍ʂ
    ผͷखஈΛߟ͑Δ΂͠
    ׂΓࢉͷ༨Γ͕ॏཁͩͬͨ
    ➡ ׂΓࢉΛҰൠԽͯ͠ΈΑ͏ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  53. ׂΓࢉͷҰൠԽ
    13೥5݄4೔౔༵೔

    View full-size slide

  54. ׂΓࢉͷҰൠԽ
    ෳ਺ͷଟ߲ࣜͰҰͭͷଟ߲ࣜΛׂΖ͏ʂ
    ଟ߲ࣜΛฒ΂͓͍ͯͯॱʹׂΕͳ͍͔ࢼ͢
    Ұม਺ଟ߲ࣜͷ৔߹ͷ߱ႈͷॱͷΑ͏ʹɺԿ
    ͔౎߹ͷΑ͍ฒ΂ํΛߟ͑Δඞཁ͕͋Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  55. ׂΓࢉͷҰൠԽ
    ෳ਺ͷଟ߲ࣜͰҰͭͷଟ߲ࣜΛׂΖ͏ʂ
    ଟ߲ࣜΛฒ΂͓͍ͯͯॱʹׂΕͳ͍͔ࢼ͢
    Ұม਺ଟ߲ࣜͷ৔߹ͷ߱ႈͷॱͷΑ͏ʹɺԿ
    ͔౎߹ͷΑ͍ฒ΂ํΛߟ͑Δඞཁ͕͋Δ
    ➡ ୯߲ࣜॱংʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  56. ଟ߲ࣜͷදݱ
    13೥5݄4೔౔༵೔

    View full-size slide

  57. ଟ߲ࣜͷදݱ
    ୯߲ࣜॱংͷલʹɺଟ߲ࣜͷදݱʹ͍ͭͯ
    13೥5݄4೔౔༵೔

    View full-size slide

  58. ଟ߲ࣜͷදݱ
    ୯߲ࣜॱংͷલʹɺଟ߲ࣜͷදݱʹ͍ͭͯ
    จࣈͱࢦ਺ͷྻʢ1, x2, xy, y2 ͳͲʣΛ୯߲ࣜͱ͍
    ͍ɺͦΕͧΕʹ܎਺Λॻ͚ͯՃ͑ͨ΋ͷΛଟ߲ࣜ
    ͱݺͿͷͩͬͨ
    13೥5݄4೔౔༵೔

    View full-size slide

  59. ଟ߲ࣜͷදݱ
    ୯߲ࣜॱংͷલʹɺଟ߲ࣜͷදݱʹ͍ͭͯ
    จࣈͱࢦ਺ͷྻʢ1, x2, xy, y2 ͳͲʣΛ୯߲ࣜͱ͍
    ͍ɺͦΕͧΕʹ܎਺Λॻ͚ͯՃ͑ͨ΋ͷΛଟ߲ࣜ
    ͱݺͿͷͩͬͨ
    จࣈͷؒʹॱ൪ΛܾΊΕ͹ɺ୯߲ࣜ͸੔਺ͷϕΫ
    τϧͱಉҰࢹग़དྷΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  60. ଟ߲ࣜͷදݱ
    ୯߲ࣜॱংͷલʹɺଟ߲ࣜͷදݱʹ͍ͭͯ
    จࣈͱࢦ਺ͷྻʢ1, x2, xy, y2 ͳͲʣΛ୯߲ࣜͱ͍
    ͍ɺͦΕͧΕʹ܎਺Λॻ͚ͯՃ͑ͨ΋ͷΛଟ߲ࣜ
    ͱݺͿͷͩͬͨ
    จࣈͷؒʹॱ൪ΛܾΊΕ͹ɺ୯߲ࣜ͸੔਺ͷϕΫ
    τϧͱಉҰࢹग़དྷΔ
    x > y ͱ͢Ε͹ɺx2 ↔ (2, 0), xy ↔ (1, 1), 
    1 ↔ (0, 0) ͱݴ͏۩߹ʹରԠ͢Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  61. ଟ߲ࣜͷදݱ
    ୯߲ࣜॱংͷલʹɺଟ߲ࣜͷදݱʹ͍ͭͯ
    จࣈͱࢦ਺ͷྻʢ1, x2, xy, y2 ͳͲʣΛ୯߲ࣜͱ͍
    ͍ɺͦΕͧΕʹ܎਺Λॻ͚ͯՃ͑ͨ΋ͷΛଟ߲ࣜ
    ͱݺͿͷͩͬͨ
    จࣈͷؒʹॱ൪ΛܾΊΕ͹ɺ୯߲ࣜ͸੔਺ͷϕΫ
    τϧͱಉҰࢹग़དྷΔ
    x > y ͱ͢Ε͹ɺx2 ↔ (2, 0), xy ↔ (1, 1), 
    1 ↔ (0, 0) ͱݴ͏۩߹ʹରԠ͢Δ
    ͦ͜Ͱ n-ม਺୯߲ࣜશମΛℤn
    ≥0
    ͱಉҰࢹ͢Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  62. ୯߲ࣜॱং
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  63. ୯߲ࣜॱং
    ℤn
    ≥0
    ্ͷॱংؔ܎ > ͸ɺ࣍ͷࡾͭͷ৚݅Λຬͨ
    ͢ͱ͖୯߲ࣜॱংͰ͋Δͱݴ͏ɿ
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  64. ୯߲ࣜॱং
    ℤn
    ≥0
    ্ͷॱংؔ܎ > ͸ɺ࣍ͷࡾͭͷ৚݅Λຬͨ
    ͢ͱ͖୯߲ࣜॱংͰ͋Δͱݴ͏ɿ
    1. શॱংੑɿ (α < β) or (α = β) or (α > β)
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  65. ୯߲ࣜॱং
    ℤn
    ≥0
    ্ͷॱংؔ܎ > ͸ɺ࣍ͷࡾͭͷ৚݅Λຬͨ
    ͢ͱ͖୯߲ࣜॱংͰ͋Δͱݴ͏ɿ
    1. શॱংੑɿ (α < β) or (α = β) or (α > β)
    2.Ճ๏ੑɿα ≤ β ⇒ α + γ ≤ β + γ
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  66. ୯߲ࣜॱং
    ℤn
    ≥0
    ্ͷॱংؔ܎ > ͸ɺ࣍ͷࡾͭͷ৚݅Λຬͨ
    ͢ͱ͖୯߲ࣜॱংͰ͋Δͱݴ͏ɿ
    1. શॱংੑɿ (α < β) or (α = β) or (α > β)
    2.Ճ๏ੑɿα ≤ β ⇒ α + γ ≤ β + γ
    3.ඇෛੑɿα ≥ 0 (೚ҙͷ α ∈ ℤn
    ≥0
    ʹ͍ͭͯ)
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  67. ୯߲ࣜॱংͷิ଍
    13೥5݄4೔౔༵೔

    View full-size slide

  68. ୯߲ࣜॱংͷิ଍
    3 ͷඇෛੑͷ৚݅͸ɺશॱংੑͱՃ๏ੑͷԼͰ
    ҎԼͷೋͭͱಉ஋
    13೥5݄4೔౔༵೔

    View full-size slide

  69. ୯߲ࣜॱংͷิ଍
    3 ͷඇෛੑͷ৚݅͸ɺશॱংੑͱՃ๏ੑͷԼͰ
    ҎԼͷೋͭͱಉ஋
    ੔ྻੑɿ೚ҙͷۭͰͳ͍ ℤn
    ≥0
    ͷ෦෼ू߹͕
    < ʹؔͯ͠࠷খ஋Λ࣋ͭ
    13೥5݄4೔౔༵೔

    View full-size slide

  70. ୯߲ࣜॱংͷิ଍
    3 ͷඇෛੑͷ৚݅͸ɺશॱংੑͱՃ๏ੑͷԼͰ
    ҎԼͷೋͭͱಉ஋
    ੔ྻੑɿ೚ҙͷۭͰͳ͍ ℤn
    ≥0
    ͷ෦෼ू߹͕
    < ʹؔͯ͠࠷খ஋Λ࣋ͭ
    ߱࠯৚݅ɿ > ʹؔ͢ΔແݶԼ߱ྻ
    " " " α0
     > α1
     > α2
     > ⋯ > αn
     > ⋯
    ͸ଘࡏ͠ͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  71. ୯߲ࣜॱংͷิ଍
    3 ͷඇෛੑͷ৚݅͸ɺશॱংੑͱՃ๏ੑͷԼͰ
    ҎԼͷೋͭͱಉ஋
    ੔ྻੑɿ೚ҙͷۭͰͳ͍ ℤn
    ≥0
    ͷ෦෼ू߹͕
    < ʹؔͯ͠࠷খ஋Λ࣋ͭ
    ߱࠯৚݅ɿ > ʹؔ͢ΔແݶԼ߱ྻ
    " " " α0
     > α1
     > α2
     > ⋯ > αn
     > ⋯
    ͸ଘࡏ͠ͳ͍
    ͜ΕΒ͸ɺΞϧΰϦζϜͷఀࢭੑͷূ໌Ͱ࢖͏
    13೥5݄4೔౔༵೔

    View full-size slide

  72. ୯߲ࣜॱংͷྫ
    ҎԼ α = (a1
    , …, an
    ), β = (b1
    , …, bn
    ) ͱ͢Δ
    ࣙॻࣜॱং >lex
    ͸୯߲ࣜॱং
    α >lex
    β :⟺ a1
     = b1
    , …, ai−1
     = bi−1
    ,  ai
     > bi
    ٯࣙॻࣜॱং >revlex
    ͸୯߲ࣜॱংͰͳ͍
    α >revlex
    β :⟺ ai+1
     = bi+1
    , …, an
     = bn
    ,  ai
     < bi
    ʢ※࠷ޙͷෆ౳߸ͷ޲͖ʹ஫ҙʂʣ
    13೥5݄4೔౔༵೔

    View full-size slide

  73. ୯߲ࣜॱংͷྫ
    ࣍਺෇͖ࣙॻࣜॱং >grlex
    ͸୯߲ࣜॱং
    α >grlex
    β :⟺ ∣α∣ > ∣β∣ or (∣α∣=∣β∣ and α >lex
    β)
    ͨͩ͠ ∣α∣ = a1
     + ⋯ + an
    ʢશ࣍਺ʣ
    ࣍਺෇͖ٯࣙॻࣜॱং >grevlex
    ͸୯߲ࣜॱং
    α >grevlex
    β :⟺ ∣α∣>∣β∣ or (∣α∣=∣β∣ and α >revlex
    β)
    13೥5݄4೔౔༵೔

    View full-size slide

  74. ໿ଋ
    ୯߲ࣜॱং > Λݻఆ͢Δɻଟ߲ࣜ f ʹݱΕΔ
    ʢ܎਺ൈ͖ͷʣ୯߲ࣜͷதͰɺ> ʹ͍ͭͯ࠷
    େͱͳΔ΋ͷΛઌ಄୯߲ࣜͱӠ͍ɺLM(f) Ͱ
    ද͢ɻLM(f) ͷ܎਺Λઌ಄܎਺ͱ͍͍ɺLC(f)
    Ͱද͢ɻLT(f) = LC(f) LM(f) Λઌ಄߲ͱݺͿɻ
    13೥5݄4೔౔༵೔

    View full-size slide


  75. f = x + 2y2w + 3z3 (x > y > z >w)
    >lex
    ɿLM(f) = x, LC(f) = 1, LT(f) = x
    >grlex
    ɿLM(f) = y2w, LC(f) = 2, LT(f) = 2y2w
    >grevlex
    ɿLM(f) = z3, LC(f) = 3, LT(f) = 3z3
    13೥5݄4೔౔༵೔

    View full-size slide

  76. ଟม਺ͷׂΓࢉ
    Ҏ্Λ༻͍ͯଟ߲ࣜ൛ͷׂΓࢉΛఆٛ͢Δ
    ୯߲ࣜॱংΛҰܾͭΊɺׂΔࣜɺׂΒΕΔࣜ
    ͱ΋ʹେ͖͍୯߲ࣜॱʹ੔ྻ͓ͯ͘͠
    Ͳͷॱ൪ͰׂΔ͔͸ݻఆ͢Δʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  77. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     = 
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    XY − 1, Y2 − 1
    Ͱ X2Y + XY2 + Y2
    ΛׂΔɻࣙॻࣜॱংΛ࢖͏ɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  78. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     = 
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    ઌ಄߲ʹ஫໨ɻ࠷ॳͷࣜͰׂΕΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  79. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    X Λֻ͚Ε͹ઌ಄߲͕ফ͑Δɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  80. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X 
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X
    Ҿ͘ɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  81. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X 
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    ্͔ΒҰͭ߱Ζͯ͠ɺ߱ႈͷॱʹฒ΂Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  82. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  + 
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    ઌ಄߲ʹ஫໨ɻ XY − 1 ͰׂΕΔɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  83. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 + Y
    ઌఔͱಉ༷ʹܭࢉɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  84. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     = 
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 − Y
    ઌ಄߲ʹ஫໨ɻXY, Y2 ͲͪΒͰ΋ׂΕͳ͍ɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  85. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     =  1
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 − Y X
    ׂΕͳ͍ͷͰ X ͸༨Γͱͯ͠ԣʹΑ͚Δ
    Y2 − Y
    13೥5݄4೔౔༵೔

    View full-size slide

  86. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     =  1
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 − Y X
    Y2 − Y
    ઌ಄߲ʹ஫໨ɻ XY ͸ແཧͩ
    13೥5݄4೔౔༵೔

    View full-size slide

  87. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     =  1
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 − Y X
    Y2 ͰׂΕΔͷͰɺׂΔɻ
    Y2 − Y
    Y2 − 1
    Y + 1
    13೥5݄4೔౔༵೔

    View full-size slide

  88. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     =  1
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 − Y X
    Y2 − Y
    Y2 − 1
    Y + 1 Y
    1
    0
    1
    Y, 1 ڞʹͲͷ߲Ͱ΋ׂΕͳ͍ͷͰԣʹΑ͚Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  89. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     =  1
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 − Y X
    Y2 − Y
    Y2 − 1
    Y + 1 Y
    1
    0
    1
    r = X + Y + 1
    Α͚ͨͷΛ଍ͯ͠ɺ༨Γ r ͕ग़Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  90. ࣮ྫɿଟม਺ͷׂΓࢉ
    a1
     =  X  +  Y
    a2
     =  1
    XY − 1
    Y2 − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − Y
    X + Y2 − Y X
    Y2 − Y
    Y2 − 1
    Y + 1 Y
    1
    0
    1
    r = X + Y + 1
    X2Y + XY2 + Y2 = (XY − 1) (X+Y) + (Y2 − 1) ⋅1 + X + Y + 1
    13೥5݄4೔౔༵೔

    View full-size slide

  91. ଟม਺ׂΓࢉ
    ͜ΕͰ͍͍ͷͰ͸……ʂʁ
    ͱ͜Ζ͕ɺ ͋·Γ خ͘͠ͳ͍͜ͱ͕……
    13೥5݄4೔౔༵೔

    View full-size slide

  92. ͋·Γ ͷ໰୊
    a1
     = 
    a2
     = 
    Y2 − 1
    XY − 1
    X2Y + XY2 + Y2
    ׂΔॱ൪Λม͑ɺY2 − 1, XY − 1Ͱ X2Y + XY2 + Y2
    ΛׂΔɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  93. ༨Γͷ໰୊
    a1
     =  X + 1
    a2
     = X 
    Y2 − 1
    XY − 1
    X2Y + XY2 + Y2
    X2Y − X
    XY2 + X + Y2
    XY2 − X
    2X + Y2 2X
    Y2
    Y2 − 1
    1
    0
    1
    r = 2X + 1
    X2Y + XY2 + Y2 = (XY − 1) X + (Y2 − 1)(X + 1) + 2X + 1
    13೥5݄4೔౔༵೔

    View full-size slide

  94. ༨Γ͕ҧ͏ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  95. ༨Γ͕ҧ͏ʂ
    ଟ߲ࣜͷׂΓࢉ͸ ׂΔॱ൪Ͱ༨Γ͕มΘΔʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  96. ༨Γ͕ҧ͏ʂ
    ଟ߲ࣜͷׂΓࢉ͸ ׂΔॱ൪Ͱ༨Γ͕มΘΔʂ
    ୯ʹʮׂͬͯ༨Γθϩ㱺ΠσΞϧʹೖΔʂʯͱ
    ͸ग़དྷͳ͍ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  97. ༨Γ͕ҧ͏ʂ
    ଟ߲ࣜͷׂΓࢉ͸ ׂΔॱ൪Ͱ༨Γ͕มΘΔʂ
    ୯ʹʮׂͬͯ༨Γθϩ㱺ΠσΞϧʹೖΔʂʯͱ
    ͸ग़དྷͳ͍ʂ
    ༩͑ΒΕͨΠσΞϧʹରͯ͠ɺׂΓࢉͷ༨Γ͕
    ॱ൪ʹґΒͳ͍Α͏ͳੜ੒ݩΛऔΕͳ͍͔ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  98. ༨Γ͕ҧ͏ʂ
    ଟ߲ࣜͷׂΓࢉ͸ ׂΔॱ൪Ͱ༨Γ͕มΘΔʂ
    ୯ʹʮׂͬͯ༨Γθϩ㱺ΠσΞϧʹೖΔʂʯͱ
    ͸ग़དྷͳ͍ʂ
    ༩͑ΒΕͨΠσΞϧʹରͯ͠ɺׂΓࢉͷ༨Γ͕
    ॱ൪ʹґΒͳ͍Α͏ͳੜ੒ݩΛऔΕͳ͍͔ʁ
    ➡ Gröbner جఈʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  99. Gröbner جఈ
    ୯߲ࣜॱং > ΛҰͭݻఆ͢Δɻଟ߲ࣜ؀ͷΠσΞ
    ϧ I ⊆ k[] ʹ͍ͭͯɺI ͷ༗ݶ෦෼ू߹ G = {g1,
    …,
    gn
    } ⊆ I ͕࣍ͷ৚݅Λຬͨ͢ͱ͖ɺG ͸ > ʹؔ͢
    Δ I ͷ Gröbner جఈ Ͱ͋Δͱݴ͏ɻ
    ⟨LT(I)⟩ = ⟨LT(g1
    ), …, LT(gn
    )⟩
    (i.e. ⟨LT(f) ∣ f ∈ I ⟩ = ⟨LT(g1
    ), …, LT(gn
    )⟩)
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  100. Gröbner جఈͷੑ࣭
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  101. Gröbner جఈͷੑ࣭
    ೚ҙͷଟ߲ࣜ؀ΠσΞϧʹର͠ Gröbner جఈ͕ଘࡏ͢Δ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  102. Gröbner جఈͷੑ࣭
    ೚ҙͷଟ߲ࣜ؀ΠσΞϧʹର͠ Gröbner جఈ͕ଘࡏ͢Δ
    ΠσΞϧ I ͷ Gröbner جఈ G = {g1
    , …, gk
    } ͸ I Λੜ੒
    ͢ΔɻଈͪɺI = ⟨g1
    , …, gk

    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  103. Gröbner جఈͷੑ࣭
    ೚ҙͷଟ߲ࣜ؀ΠσΞϧʹର͠ Gröbner جఈ͕ଘࡏ͢Δ
    ΠσΞϧ I ͷ Gröbner جఈ G = {g1
    , …, gk
    } ͸ I Λੜ੒
    ͢ΔɻଈͪɺI = ⟨g1
    , …, gk

    Gröbner جఈʹΑΔׂΓࢉͷ༨Γ͸ॱ൪ʹґΒͳ͍ɻ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  104. Gröbner جఈͷੑ࣭
    ೚ҙͷଟ߲ࣜ؀ΠσΞϧʹର͠ Gröbner جఈ͕ଘࡏ͢Δ
    ΠσΞϧ I ͷ Gröbner جఈ G = {g1
    , …, gk
    } ͸ I Λੜ੒
    ͢ΔɻଈͪɺI = ⟨g1
    , …, gk

    Gröbner جఈʹΑΔׂΓࢉͷ༨Γ͸ॱ൪ʹґΒͳ͍ɻ
    Gröbner جఈͰׂͬͨ༨Γ͕θϩͰ͋Δࣄͱ I ʹଐ͢Δ
    ͜ͱ͸ಉ஋ɿ r = f ̅G = 0 ⟺ f ∈ I
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  105. ·ͱΊ
    Gröbner جఈ͸ମ্ଟ߲ࣜ؀ͷΠσΞϧͷྑ͍ੑ
    ࣭Λ࣋ͬͨੜ੒ݩ
    ୯߲ࣜॱংΛܾΊΔͱܭࢉग़དྷΔ
    ׂΓࢉͷ༨Γ͕ॱ൪ʹґΒͳ͍
    ΠσΞϧॴଐ໰୊ʹ࢖͑Δ
    ଞʹ΋Ԡ༻ଟ਺
    13೥5݄4೔౔༵೔

    View full-size slide

  106. ͜͜·ͰͰ࣭໰ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  107. Table of Contents
    Gröbner جఈͷ؆୯ͳಋೖ
    Gröbner جఈͷܭࢉ๏
    Buchberger ΞϧΰϦζϜ
    ࠷దԽख๏ɿsyzygy, sugar strategy
    Haskell ͷܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    13೥5݄4೔౔༵೔

    View full-size slide

  108. Gröbner جఈͷܭࢉ๏
    13೥5݄4೔౔༵೔

    View full-size slide

  109. Buchberger ΞϧΰϦζϜ
    13೥5݄4೔౔༵೔

    View full-size slide

  110. Buchberger ΞϧΰϦζϜ
    Gröbner جఈ͕ศརͦ͏ͳͷ͸Θ͔ͬͨ
    13೥5݄4೔౔༵೔

    View full-size slide

  111. Buchberger ΞϧΰϦζϜ
    Gröbner جఈ͕ศརͦ͏ͳͷ͸Θ͔ͬͨ
    ۩ମతͳܭࢉ๏ɿBuchberger ΞϧΰϦζϜ
    13೥5݄4೔౔༵೔

    View full-size slide

  112. Buchberger ΞϧΰϦζϜ
    Gröbner جఈ͕ศརͦ͏ͳͷ͸Θ͔ͬͨ
    ۩ମతͳܭࢉ๏ɿBuchberger ΞϧΰϦζϜ
    ४උతͳఆٛɿf, g ∈ k[] ͷ S-ଟ߲ࣜ
    13೥5݄4೔౔༵೔

    View full-size slide

  113. Buchberger ΞϧΰϦζϜ
    Gröbner جఈ͕ศརͦ͏ͳͷ͸Θ͔ͬͨ
    ۩ମతͳܭࢉ๏ɿBuchberger ΞϧΰϦζϜ
    ४උతͳఆٛɿf, g ∈ k[] ͷ S-ଟ߲ࣜ
    S(f, g) := ɹɹ ɹɹ f − ɹɹ  ɹɹg
    LCM(LT(f), LT(g))
    LT(f)
    LCM(LT(f), LT(g))
    LT(g)
    13೥5݄4೔౔༵೔

    View full-size slide

  114. Buchberger ΞϧΰϦζϜ
    Gröbner جఈ͕ศརͦ͏ͳͷ͸Θ͔ͬͨ
    ۩ମతͳܭࢉ๏ɿBuchberger ΞϧΰϦζϜ
    ४උతͳఆٛɿf, g ∈ k[] ͷ S-ଟ߲ࣜ
    S(f, g) := ɹɹ ɹɹ f − ɹɹ  ɹɹg
    f, g ͷઌ಄߲ಉ࢜Λଧফ͠߹Θͤͨ෺
    LCM(LT(f), LT(g))
    LT(f)
    LCM(LT(f), LT(g))
    LT(g)
    13೥5݄4೔౔༵೔

    View full-size slide

  115. Buchberger ΞϧΰϦζϜ
    Gröbner جఈ͕ศརͦ͏ͳͷ͸Θ͔ͬͨ
    ۩ମతͳܭࢉ๏ɿBuchberger ΞϧΰϦζϜ
    ४උతͳఆٛɿf, g ∈ k[] ͷ S-ଟ߲ࣜ
    S(f, g) := ɹɹ ɹɹ f − ɹɹ  ɹɹg
    f, g ͷઌ಄߲ಉ࢜Λଧফ͠߹Θͤͨ෺
    ͨͩ͠ LCM((a1
    , …, an
    ), (b1
    , …, bn
    )) 
    := (max{a1
    , b1
    }, …, max{an
    , bn
    })
    LCM(LT(f), LT(g))
    LT(f)
    LCM(LT(f), LT(g))
    LT(g)
    13೥5݄4೔౔༵೔

    View full-size slide

  116. Buchberger ൑ఆ๏
    I ⊆ k[]ɿΠσΞϧɹɹ >ɿ୯߲ࣜॱং
    G = {g1
    , …, gk
    } ⊆ IɿI ͷੜ੒ݩ
    G’ = (g1
    , …, gk
    )ɿG ͷݩΛద౰ʹฒ΂ͨ΋ͷ
    ͜ͷͱ͖ҎԼͷೋͭ͸ಉ஋ɿ
    1. G ͸ > ʹؔ͢Δ I ͷ Gröbner جఈ
    2.S(gi
    , gk
    )G’ = 0ɹ(∀ i < j)
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  117. Buchberger ΞϧΰϦζϜ
    ೖྗɿG = (f1
    , …, fs
    )
    R ← {S(p, q)G’ ∣ p ≠ q ∈ G} \ {0}
    G ← (G, R)
    R ≠ ∅
    ग़ྗɿG
    R = ∅
    13೥5݄4೔౔༵೔

    View full-size slide

  118. ؆୯ͳ࣮૷
    buchberger :: [Polynomial k ord n] → [Polynomial k ord n]
    buchberger ideal =
    fst $ until (null ∘ snd) loop (ideal, calc ideal)
    where
    loop (ggs, acc) =
    let cur = nub $ ggs ++ acc
    in (cur, calc cur)
    calc acc =
    [ q | f ← acc, g ← acc, f ≠ g
    , let q = sPolynomial f g `mod` acc
    , q ≠ zero
    ]
    13೥5݄4೔౔༵೔

    View full-size slide

  119. ܭࢉྫ
    13೥5݄4೔౔༵೔

    View full-size slide

  120. ܭࢉྫ
    I = ⟨x2y − 1, x3 − y2 − x⟩ ͷ Gröbner جఈ
    13೥5݄4೔౔༵೔

    View full-size slide

  121. ܭࢉྫ
    I = ⟨x2y − 1, x3 − y2 − x⟩ ͷ Gröbner جఈ
    Grevlex Ͱܭࢉ
    G = {x2y − 1, x3 − y2 − x, y3 + xy − x,  − y3 − xy + x}
    13೥5݄4೔౔༵೔

    View full-size slide

  122. ܭࢉྫ
    I = ⟨x2y − 1, x3 − y2 − x⟩ ͷ Gröbner جఈ
    Grevlex Ͱܭࢉ
    G = {x2y − 1, x3 − y2 − x, y3 + xy − x,  − y3 − xy + x}
    ׂΔॱ൪Ͱ౴͕͑มΘΒͳ͍͜ͱ͸ɺ·͋ɺ֬
    ͔Ίͱ͍͍ͯͩ͘͞ɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  123. lex Ͱܭࢉ͢Δͱʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  124. lex Ͱܭࢉ͢Δͱʁ
    G = {x2y − 1, x3 − y2 − x, y3 + xy − x,  − y3 − xy + x, y5 + y4 + 
    y3 + x2 − x − 1,  − y5 − y4 − y3 − x2 + x + 1,  − y6 − y5 − y4 − 
    y3 + x + y − 1, y7 + 2y6 + 2y5 + 2y4 + 2y3 − y2 − 2x + 1, y6 + 
    y5 + y4 + y3 − x − y + 1,  − y7 − 2y6 − 2y5 − 2y4 − 2y3 + y2 + 
    2x − 1,  − y9 − 2y8 − 3y7 + y4 − 4y + 3,  − 1 / 2y10 − 3 / 2y9 − 
    5 / 2y8 − 7 / 2y7 + 1 / 2y5 + 1 / 2y4 − 9 / 2y + 7 / 2, y7 − y2 + 2y 
    − 1, 1 / 2y8 + y7 − 1 / 2y3 + 3 / 2y − 1,  − y7 + y2 − 2y + 1,  − 
    y8 − 2y7 + y3 − 3y + 2,  − 1 / 2y9 − 3 / 2y8 − 5 / 2y7 + 1 / 2y4 + 
    1 / 2y3 − 7 / 2y + 5 / 2, y9 + 2y8 + 3y7 − y4 + 4y − 3, y8 + 2y7 − 
    y3 + 3y − 2, 1 / 2y7 − 1 / 2y2 + y − 1 / 2, 1 / 2y10 + 3 / 2y9 + 5 / 
    2y8 + 7 / 2y7 − 1 / 2y5 − 1 / 2y4 + 9 / 2y − 7 / 2,  − 1 / 2y8 − y7 
    + 1 / 2y3 − 3 / 2y + 1, 1 / 2y9 + 3 / 2y8 + 5 / 2y7 − 1 / 2y4 − 1 / 
    2y3 + 7 / 2y − 5 / 2,  − 1 / 2y7 + 1 / 2y2 − y + 1 / 2}
    13೥5݄4೔౔༵೔

    View full-size slide

  125. Ͱ͔ͬʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  126. ޮ཰ͷ໰୊
    Grevlex ͕Ұ൪଎ͯ͘جఈ΋៉ྷͳ΋ͷ͕ٻ·Γ
    ΍͍͢ͱ͞ΕΔ
    lex ͸جఈ΋ෳࡶʹͳΔ͕͔͔࣌ؒ͠Δ
    ෺ʹΑͬͯ͸ Grevlex ͷํ͕஗͍͜ͱ΋͋Δ
    ͕ɺ΄΅େ఍͸ Grevlex ͕ѹ౗తʹ଎͍
    Ԡ༻෼໺ʹΑͬͯ͸ grevlex Ͱ͸ͳ͘ lex Λ࢖͏
    13೥5݄4೔౔༵೔

    View full-size slide

  127. ۃখɾඃ໿Gröbnerجఈ
    13೥5݄4೔౔༵೔

    View full-size slide

  128. ۃখɾඃ໿Gröbnerجఈ
    Buchberger ΞϧΰϦζϜͰٻΊͨجఈʹ͸ແବ͕͋Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  129. ۃখɾඃ໿Gröbnerجఈ
    Buchberger ΞϧΰϦζϜͰٻΊͨجఈʹ͸ແବ͕͋Δ
    ۃখɾඃ໿ Gröbner جఈʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  130. ۃখɾඃ໿Gröbnerجఈ
    Buchberger ΞϧΰϦζϜͰٻΊͨجఈʹ͸ແବ͕͋Δ
    ۃখɾඃ໿ Gröbner جఈʂ
    Gröbnerجఈ G ͕ۃখ ⇔ ೚ҙͷ i ʹ͍ͭͯ
    LC(gi
    ) = 1, LT(gi
    ) ͸Ͳͷ LT(gj
    ) (j ≠ i) Ͱ΋ׂΕͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  131. ۃখɾඃ໿Gröbnerجఈ
    Buchberger ΞϧΰϦζϜͰٻΊͨجఈʹ͸ແବ͕͋Δ
    ۃখɾඃ໿ Gröbner جఈʂ
    Gröbnerجఈ G ͕ۃখ ⇔ ೚ҙͷ i ʹ͍ͭͯ
    LC(gi
    ) = 1, LT(gi
    ) ͸Ͳͷ LT(gj
    ) (j ≠ i) Ͱ΋ׂΕͳ͍
    G ͕ඃ໿  ⇔ ೚ҙͷ i ʹ͍ͭͯ LC(gi
    ) = 1 ͔ͭ
     gi
    ͷͲͷ߲΋ LT(gj
    ) (j ≠ i) Ͱ΋ׂΕͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  132. ඃ໿ Gröbner جఈͷҰҙੑ
    13೥5݄4೔౔༵೔

    View full-size slide

  133. ඃ໿ Gröbner جఈͷҰҙੑ
    Gröbner جఈ͸ෳ਺ଘࡏ͠͏Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  134. ඃ໿ Gröbner جఈͷҰҙੑ
    Gröbner جఈ͸ෳ਺ଘࡏ͠͏Δ
    buchberger ͰٻΊͨ෺ɺͦ
    ͷۃখԽ……etc
    13೥5݄4೔౔༵೔

    View full-size slide

  135. ඃ໿ Gröbner جఈͷҰҙੑ
    Gröbner جఈ͸ෳ਺ଘࡏ͠͏Δ
    buchberger ͰٻΊͨ෺ɺͦ
    ͷۃখԽ……etc
    ͦΕΒ͸ඃ໿Խ͢Ε͹Ұக͢
    Δʂʢ୯߲ࣜॱং͕ಉ͡ͳΒʣ
    I ⊆ k[]ɿΠσΞϧ
    >ɿ୯߲ࣜॱং
    I ͷ > ʹ͍ͭͯͷඃ
    ໿ Gröbner جఈ͸Ұ
    ҙʹఆ·Δ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  136. ඃ໿ Gröbner جఈͷҰҙੑ
    Gröbner جఈ͸ෳ਺ଘࡏ͠͏Δ
    buchberger ͰٻΊͨ෺ɺͦ
    ͷۃখԽ……etc
    ͦΕΒ͸ඃ໿Խ͢Ε͹Ұக͢
    Δʂʢ୯߲ࣜॱং͕ಉ͡ͳΒʣ
    ΠσΞϧ͕౳͍͔͠Ͳ͏͔Λɺ
    ඃ໿ Gröbner جఈͷੜ੒ݩ͕
    ౳͍͔͠Ͱ൑ఆग़དྷΔʂ
    I ⊆ k[]ɿΠσΞϧ
    >ɿ୯߲ࣜॱং
    I ͷ > ʹ͍ͭͯͷඃ
    ໿ Gröbner جఈ͸Ұ
    ҙʹఆ·Δ
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  137. ඃ໿Խͷखଓ
    13೥5݄4೔౔༵೔

    View full-size slide

  138. ඃ໿Խͷखଓ
    ·ͣۃখԽΛߦ͏
    1. G ͷ֤ݩΛ࠷ߴ࣍܎਺Ͱׂͬͯ LC(p) = 1
    2. (2) ͷ৚݅Λຬͨ͞ͳ͍෺ΛऔΓআ͘
    13೥5݄4೔౔༵೔

    View full-size slide

  139. ඃ໿Խͷखଓ
    ·ͣۃখԽΛߦ͏
    1. G ͷ֤ݩΛ࠷ߴ࣍܎਺Ͱׂͬͯ LC(p) = 1
    2. (2) ͷ৚݅Λຬͨ͞ͳ͍෺ΛऔΓআ͘
    ͦΕΛඃ໿Խ͢Δ
    1. p ∈ G ΛऔΓɺp’ = p̅G \ {p}, G’ = G \ {p} ∪ {p’} ͱ͢Δ
    2. q ∈ G’ \ {p’} ʹ͍ͭͯಉ༷ͷࣄΛ͢ΔɻҎԼಉจɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  140. ܭࢉྫ
    13೥5݄4೔౔༵೔

    View full-size slide

  141. ܭࢉྫ
    ઌఔͷΠσΞϧʹ͍ͭͯ
    13೥5݄4೔౔༵೔

    View full-size slide

  142. ܭࢉྫ
    ઌఔͷΠσΞϧʹ͍ͭͯ
    Grevlex ʹؔ͢Δඃ໿جఈ
    G = {y3 + xy − x, x2y − 1, x3 − y2 − x}
    13೥5݄4೔౔༵೔

    View full-size slide

  143. ܭࢉྫ
    ઌఔͷΠσΞϧʹ͍ͭͯ
    Grevlex ʹؔ͢Δඃ໿جఈ
    G = {y3 + xy − x, x2y − 1, x3 − y2 − x}
    Lex ʹؔ͢Δඃ໿جఈ
    G = {y7 − y2 + 2y − 1,  − y6 − y5 − y4 − y3 + x 
    + y − 1}
    13೥5݄4೔౔༵೔

    View full-size slide

  144. ܭࢉྫ
    ઌఔͷΠσΞϧʹ͍ͭͯ
    Grevlex ʹؔ͢Δඃ໿جఈ
    G = {y3 + xy − x, x2y − 1, x3 − y2 − x}
    Lex ʹؔ͢Δඃ໿جఈ
    G = {y7 − y2 + 2y − 1,  − y6 − y5 − y4 − y3 + x 
    + y − 1}
    ͏Θͬ…φΠʔϒͳجఈɺແବଟ͗͢…ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  145. ܭࢉྫ
    ઌఔͷΠσΞϧʹ͍ͭͯ
    Grevlex ʹؔ͢Δඃ໿جఈ
    G = {y3 + xy − x, x2y − 1, x3 − y2 − x}
    Lex ʹؔ͢Δඃ໿جఈ
    G = {y7 − y2 + 2y − 1,  − y6 − y5 − y4 − y3 + x 
    + y − 1}
    ͏Θͬ…φΠʔϒͳجఈɺແବଟ͗͢…ʁ
    ࠷ॳ͔Βඃ໿άϨϒφʔجఈΛ࢈ΉΞϧΰϦζ
    Ϝ΋͋Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  146. ࣮૷ྫ
    దٓΞοϓσʔτ͢Δඞཁ͕͋ΔͷͰ ST Ͱָͯ͠ॻ͍ͨ
    ඃ໿Խͷ࣮૷΋ಉ༷
    minimizeGroebnerBasis :: (Field k, IsPolynomial k n, IsMonomialOrder order)
    ⇒ [OrderedPolynomial k ord n] → [OrderedPolynomial k ord n]
    minimizeGroebnerBasis bs = runST $ do
    left ← newSTRef bs
    right ← newSTRef []
    whileM_ (not . null <$> readSTRef left) $ do
    f : xs ← readSTRef left
    writeSTRef left xs
    ys ← readSTRef right
    if any (λg → leadingMonomial g `divs` leadingMonomial f) xs ∨
    any (λg → leadingMonomial g `divs` leadingMonomial f) ys
    then writeSTRef right ys
    else writeSTRef right (monoize f : ys)
    readSTRef right
    13೥5݄4೔౔༵೔

    View full-size slide

  147. Table of Contents
    Gröbner جఈͷ؆୯ͳಋೖ
    Gröbner جఈͷܭࢉ๏
    Buchberger ΞϧΰϦζϜ
    ࠷దԽख๏ɿsyzygy, sugar strategy
    Haskell ͷܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    13೥5݄4೔౔༵೔

    View full-size slide

  148. ࠷దԽख๏
    φΠʔϒͳ࣮૷ͩͱ஗͍ʂ
    ୅දతͳ࣮૷Ͱ͋Δ SINGULAR ͷઍഒ͘Β͍
    ஗͍ʢਪఆʣ
    Կͱ͔ඦഒ͘Β͍ʹ͢Δํ๏
    ࢦ਺ΦʔμʔͳͷͰʙഒ͍ͬͯ͏දݱ͸͓
    ͔͍͠ͷ͚ͩͲɾɾɾ
    13೥5݄4೔౔༵೔

    View full-size slide

  149. ঺հ͢Δख๏
    θϩ؆໿ؔ܎
    syzygy ͷجఈ
    sugar strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  150. ঺հ͢Δख๏
    θϩ؆໿ؔ܎
    syzygy ͷجఈ
    sugar strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  151. θϩ؆໿ؔ܎
    13೥5݄4೔౔༵೔

    View full-size slide

  152. θϩ؆໿ؔ܎
    Buchberger ͸Կނ஗͍ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  153. θϩ؆໿ؔ܎
    Buchberger ͸Կނ஗͍ʁ
    Buchberger ͸ׂΓࢉͷ͔ͨ·Γ
    13೥5݄4೔౔༵೔

    View full-size slide

  154. θϩ؆໿ؔ܎
    Buchberger ͸Կނ஗͍ʁ
    Buchberger ͸ׂΓࢉͷ͔ͨ·Γ
    lex ΑΓ grevlex ͕଎͍ͷ͸ɺͦͬͪͷ΄
    ͏ׂ͕Γࢉͷεςοϓ͕খ͍͔͞Β
    13೥5݄4೔౔༵೔

    View full-size slide

  155. θϩ؆໿ؔ܎
    Buchberger ͸Կނ஗͍ʁ
    Buchberger ͸ׂΓࢉͷ͔ͨ·Γ
    lex ΑΓ grevlex ͕଎͍ͷ͸ɺͦͬͪͷ΄
    ͏ׂ͕Γࢉͷεςοϓ͕খ͍͔͞Β
    ׂΓࢉͷճ਺Λ΋ͬͱݮΒͤͳ͍ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  156. θϩ؆໿ؔ܎
    ʮׂͬͯ༨ΓθϩʯΛҰൠԽͨ͠ͷ͕࣍
    13೥5݄4೔౔༵೔

    View full-size slide

  157. θϩ؆໿ؔ܎
    ʮׂͬͯ༨ΓθϩʯΛҰൠԽͨ͠ͷ͕࣍
    ଟ߲ࣜ f ∈ k[] ͕ G = {g1
    , …, gk
    } ⊆ k[] Λ
    ๏ͱͯ͠θϩʹ؆໿ʢه߸ɿ f →G
    0ʣ͞ΕΔ
     ⇔ f = a1
    g1
     + ⋯ + ak
    gk
    (ai
     ∈ k[]) ͔ͭ
    [ai
    gi
     = 0 ·ͨ͸ deg(f) ≥ deg(ai
    gi
    )]
    ୠ͠ɺdeg(f) ͸ f ͷଟॏ࣍਺ deg(f) = LM(f)
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  158. վྑ Buchberger ൑ఆ๏
    ࣮͸ Buchberger ൑ఆ๏͸θϩ؆໿Ͱे෼ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  159. վྑ Buchberger ൑ఆ๏
    ࣮͸ Buchberger ൑ఆ๏͸θϩ؆໿Ͱे෼ʂ
    I ⊆ k[]ɿΠσΞϧɹɹ >ɿ୯߲ࣜॱং
    G = {g1
    , …, gk
    } ⊆ IɿI ͷੜ੒ݩ
    ͜ͷͱ͖ҎԼͷೋͭ͸ಉ஋ɿ
    1. G ͸ > ʹؔ͢Δ I ͷ Gröbner جఈ
    2. S(gi
    , gj
    )  →G
      0ɹ(∀ i < j)
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  160. ۩ମతʹ͍ͭθϩ؆໿ʁ
    I ⊆ k[]ɿΠσΞϧɹɹ >ɿ୯߲ࣜॱং
    G = {g1
    , …, gk
    } ⊆ IɿI ͷੜ੒ݩ
    ໋୊
    13೥5݄4೔౔༵೔

    View full-size slide

  161. ۩ମతʹ͍ͭθϩ؆໿ʁ
    I ⊆ k[]ɿΠσΞϧɹɹ >ɿ୯߲ࣜॱং
    G = {g1
    , …, gk
    } ⊆ IɿI ͷੜ੒ݩ
    S̅(f̅, ̅g̅)̅G’ = 0 ⇒ S(f, g) →G
    0
    ໋୊
    13೥5݄4೔౔༵೔

    View full-size slide

  162. ۩ମతʹ͍ͭθϩ؆໿ʁ
    I ⊆ k[]ɿΠσΞϧɹɹ >ɿ୯߲ࣜॱং
    G = {g1
    , …, gk
    } ⊆ IɿI ͷੜ੒ݩ
    S̅(f̅, ̅g̅)̅G’ = 0 ⇒ S(f, g) →G
    0
    LCM(LM(f), LM(g)) = LM(f) LM(g) ⇒ S(f, g) 
    →G
    0
    ʢf, g ͕ ޓ͍ʹૉ ͳΒ S-ଟ߲ࣜ͸θϩʹ؆໿͞ΕΔʣ
    ໋୊
    13೥5݄4೔౔༵೔

    View full-size slide

  163. ޓ͍ʹૉ൑ఆ
    ೋ൪໨ͷ৚͕݅࢖͑Δʂ
    x3 ͱ z4 ͸ޓ͍ʹૉͳͷͰ S(x3 + y, z4) →G
    0 ͱͳΔ
    ɹɹɹ S(x3 + y, z4) = yz4
    ɹɹɹ∴  S(x3 + y, z4)G = y ≠ 0
    ࠓ·Ͱͷ൑ఆ๏ͩͱແବʹׂΓࢉΛ͢Δʂ
    ͲΕ͘Β͍վળʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  164. Benchmark
    simple prime
    I1
     = ⟨x2 + y2 + z2 − 1, x2 + y2 + z2 − 2x, 2x − 3y − z⟩
    I2
     = ⟨x2y − 2xy − 4z − 1, z − y2, x3 − 4zy⟩
    I3
     = ⟨2S − ay, b2 − (x2 + y2), c2 − ((a − x)2 + y2)⟩" I4
     = ⟨z5 + y4 + x3 − 1, z3 + y3 + x2 − 1⟩
    13೥5݄4೔౔༵೔

    View full-size slide

  165. Benchmark
    lex01
    grlex01
    grevlex01
    lex03
    grlex03
    grevlex03
    0ms 22.5ms 45ms 67.5ms 90ms
    simple prime
    grlex02
    grevlex02
    0.9s 1s 1.1s 1.2s 1.3s
    grlex04
    grevlex04
    0μs 150μs 300μs 450μs 600μs
    I1
     = ⟨x2 + y2 + z2 − 1, x2 + y2 + z2 − 2x, 2x − 3y − z⟩
    I2
     = ⟨x2y − 2xy − 4z − 1, z − y2, x3 − 4zy⟩
    I3
     = ⟨2S − ay, b2 − (x2 + y2), c2 − ((a − x)2 + y2)⟩" I4
     = ⟨z5 + y4 + x3 − 1, z3 + y3 + x2 − 1⟩
    13೥5݄4೔౔༵೔

    View full-size slide

  166. ঺հ͢Δख๏
    θϩ؆໿ؔ܎
    syzygy ͷجఈ
    sugar strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  167. syzygy ͷجఈ
    ͦ΋ͦ΋ S-ଟ߲ࣜͱ͸Կͳͷ͔ʁ
    ࣮͸ syzygy ͱݺ͹ΕΔ΋ͷͷجఈʂ
    Gröbner جఈͷجఈͱ͸ҙຯ͕एׯҧ͏
    “syzygy ͷ΋ͱ” ͱࢥ͑͹Α͍
    13೥5݄4೔౔༵೔

    View full-size slide

  168. syzygy
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  169. syzygy
    (h1
    , …, hs
    ) ∈ k[]s ͕ F = (f1
    , …, fs
    ) ⊆ k[]s ͷ ઌ಄߲ͷ
    syzygy  :⇔ h1
    LT(f1
    ) + ⋯ + hs
    LT(fs
    ) = 0
    F ͷઌ಄߲ syzygy ͷશମΛ S(F) ͱॻ͘ɻ
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  170. syzygy
    (h1
    , …, hs
    ) ∈ k[]s ͕ F = (f1
    , …, fs
    ) ⊆ k[]s ͷ ઌ಄߲ͷ
    syzygy  :⇔ h1
    LT(f1
    ) + ⋯ + hs
    LT(fs
    ) = 0
    F ͷઌ಄߲ syzygy ͷશମΛ S(F) ͱॻ͘ɻ
    T ⊆ S(F) ͕ S(F) ͷجఈ  ⇔ S(F) ͷͲͷݩ΋ T ͷݩͷ༗
    ݶݸͷ࿨Ͱॻ͚Δɻ
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  171. syzygy
    (h1
    , …, hs
    ) ∈ k[]s ͕ F = (f1
    , …, fs
    ) ⊆ k[]s ͷ ઌ಄߲ͷ
    syzygy  :⇔ h1
    LT(f1
    ) + ⋯ + hs
    LT(fs
    ) = 0
    F ͷઌ಄߲ syzygy ͷશମΛ S(F) ͱॻ͘ɻ
    T ⊆ S(F) ͕ S(F) ͷجఈ  ⇔ S(F) ͷͲͷݩ΋ T ͷݩͷ༗
    ݶݸͷ࿨Ͱॻ͚Δɻ
    ei
     = (0, …, 0, 1, 0, …, 0) (i ൪໨͚ͩ 1) ͱॻ͘͜ͱʹ͢
    Δɻ͜ͷͱ͖
    ͱஔ͘ͱɺ S(fi
    , fj
    ) = Sij
     ⋅ F ʢ಺ੵʣͱͳΔɻ
    LCM(LT(fi
    ), LT(fj
    ))
    LT(fi)
    LCM(LT(fi
    ), LT(fj
    ))
    LT(fj)
    Sij
     :=  ei
    −   ej
    ఆٛ
    13೥5݄4೔౔༵೔

    View full-size slide

  172. syzygy ͷجఈͱθϩ؆໿
    13೥5݄4೔౔༵೔

    View full-size slide

  173. syzygy ͷجఈͱθϩ؆໿
    I ⊆ k[]ɿΠσΞϧɹɹ >ɿ୯߲ࣜॱং
    G = {g1
    , …, gk
    } ⊆ IɿI ͷੜ੒ݩ
    S ⊆ S(G)ɿG ͷઌ಄߲ syzygy ͷجఈ
    ͜ͷͱ͖ҎԼͷೋͭ͸ಉ஋ɿ
    1. G ͸ > ʹؔ͢Δ I ͷ Gröbner جఈ
    2.೚ҙͷ T ∈ S ʹର͠ɺ
    T ⋅ G = ∑ k
    i = 1
    ti
    gi
     →G
      0ɹ(∀ i < j)
    ఆཧ
    13೥5݄4೔౔༵೔

    View full-size slide

  174. S-ଟ߲ࣜͱ syzygy
    13೥5݄4೔౔༵೔

    View full-size slide

  175. S-ଟ߲ࣜͱ syzygy
    ࣮͸ Sij
    ͷશମ͸ S(G) ͷجఈ
    13೥5݄4೔౔༵೔

    View full-size slide

  176. S-ଟ߲ࣜͱ syzygy
    ࣮͸ Sij
    ͷશମ͸ S(G) ͷجఈ
    ༨෼ͳجఈ΋͍ࠞͬͯ͡Δ
    F = (x2y2 + z, xy2 − y, x2y + yz)
    S12
     = (1,  -x, 0) S13
     = (1, 0,  -y) S23
     = (0, x,  -y)
    S13
     − S12
     = (0, x,  -y) = S23
    ∴ S23
    ͸ཁΒͳ͍ࢠ
    13೥5݄4೔౔༵೔

    View full-size slide

  177. S-ଟ߲ࣜͱ syzygy
    ࣮͸ Sij
    ͷશମ͸ S(G) ͷجఈ
    ༨෼ͳجఈ΋͍ࠞͬͯ͡Δ
    F = (x2y2 + z, xy2 − y, x2y + yz)
    S12
     = (1,  -x, 0) S13
     = (1, 0,  -y) S23
     = (0, x,  -y)
    S13
     − S12
     = (0, x,  -y) = S23
    ∴ S23
    ͸ཁΒͳ͍ࢠ
    ༨෼ͳجఈΛ༧Ί൑ఆग़དྷͳ͍͔ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  178. ແବͳ syzygy جఈͷ൑ఆ
    13೥5݄4೔౔༵೔

    View full-size slide

  179. ແବͳ syzygy جఈͷ൑ఆ
    G = (g1
    , …, gs
    ) gi
    , gj
    , gk
     ∈ G
    ⊆ {Sij
    ∣ 1 ≤ j < k ≤ s}ɿS(G) ͷجఈ
    LT(gk
    ) ∣ LCM(LT(gi
    ), LT(gj
    )) ͔ͭ Sik
    , Sjk
     ∈ 
    ⇒  S \ {Sij
    } ΋ S(G) ͷجఈ
    ໋୊
    13೥5݄4೔౔༵೔

    View full-size slide

  180. ແବͳ syzygy جఈͷ൑ఆ
    G = (g1
    , …, gs
    ) gi
    , gj
    , gk
     ∈ G
    ⊆ {Sij
    ∣ 1 ≤ j < k ≤ s}ɿS(G) ͷجఈ
    LT(gk
    ) ∣ LCM(LT(gi
    ), LT(gj
    )) ͔ͭ Sik
    , Sjk
     ∈ 
    ⇒  S \ {Sij
    } ΋ S(G) ͷجఈ
    ໋୊
    ͜ΕͰׂΓࢉͷճ਺Λେ෯ʹݮΒͤΔʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  181. վྑ൛ Buchbergerɾվ
    13೥5݄4೔౔༵೔

    View full-size slide

  182. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    13೥5݄4೔౔༵೔

    View full-size slide

  183. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    13೥5݄4೔౔༵೔

    View full-size slide

  184. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    13೥5݄4೔౔༵೔

    View full-size slide

  185. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    1. (i, j) ∈ B Λ೚ҙʹબͿ
    13೥5݄4೔౔༵೔

    View full-size slide

  186. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    1. (i, j) ∈ B Λ೚ҙʹબͿ
    2. LCM(LT(fi
    ), LT(fj
    ))  ≠  LT(fi
    ) LT(fj
    ) ͔ͭ Test(fi
    , fj
    , B) ِ͕ͳΒ
    13೥5݄4೔౔༵೔

    View full-size slide

  187. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    1. (i, j) ∈ B Λ೚ҙʹબͿ
    2. LCM(LT(fi
    ), LT(fj
    ))  ≠  LT(fi
    ) LT(fj
    ) ͔ͭ Test(fi
    , fj
    , B) ِ͕ͳΒ
    1. S := S(fi
    , fj
    )G
    13೥5݄4೔౔༵೔

    View full-size slide

  188. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    1. (i, j) ∈ B Λ೚ҙʹબͿ
    2. LCM(LT(fi
    ), LT(fj
    ))  ≠  LT(fi
    ) LT(fj
    ) ͔ͭ Test(fi
    , fj
    , B) ِ͕ͳΒ
    1. S := S(fi
    , fj
    )G
    2. S ≠ 0 ͳΒ͹
    t = t + 1, ft
     = S, G = G ∪ {ft
    }, B = B ∪ {(i, t)∣1 ≤ i ≤ t − 1}
    13೥5݄4೔౔༵೔

    View full-size slide

  189. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    1. (i, j) ∈ B Λ೚ҙʹબͿ
    2. LCM(LT(fi
    ), LT(fj
    ))  ≠  LT(fi
    ) LT(fj
    ) ͔ͭ Test(fi
    , fj
    , B) ِ͕ͳΒ
    1. S := S(fi
    , fj
    )G
    2. S ≠ 0 ͳΒ͹
    t = t + 1, ft
     = S, G = G ∪ {ft
    }, B = B ∪ {(i, t)∣1 ≤ i ≤ t − 1}
    3. B = B \ {(i, j)}
    13೥5݄4೔౔༵೔

    View full-size slide

  190. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    1. (i, j) ∈ B Λ೚ҙʹબͿ
    2. LCM(LT(fi
    ), LT(fj
    ))  ≠  LT(fi
    ) LT(fj
    ) ͔ͭ Test(fi
    , fj
    , B) ِ͕ͳΒ
    1. S := S(fi
    , fj
    )G
    2. S ≠ 0 ͳΒ͹
    t = t + 1, ft
     = S, G = G ∪ {ft
    }, B = B ∪ {(i, t)∣1 ≤ i ≤ t − 1}
    3. B = B \ {(i, j)}
    ग़ྗɿG
    13೥5݄4೔౔༵೔

    View full-size slide

  191. վྑ൛ Buchbergerɾվ
    ೖྗɿ F = (f1
    , …, fs
    )
    ॳظԽɿB := {(i, j)∣1 ≤ i < j ≤ s}ʢsyzygyجఈͷީิʣ
    G := F t := s
    खॱɿ B = ∅ ͱͳΔ·Ͱ࣍Λ܁Γฦ͢ɿ
    1. (i, j) ∈ B Λ೚ҙʹબͿ
    2. LCM(LT(fi
    ), LT(fj
    ))  ≠  LT(fi
    ) LT(fj
    ) ͔ͭ Test(fi
    , fj
    , B) ِ͕ͳΒ
    1. S := S(fi
    , fj
    )G
    2. S ≠ 0 ͳΒ͹
    t = t + 1, ft
     = S, G = G ∪ {ft
    }, B = B ∪ {(i, t)∣1 ≤ i ≤ t − 1}
    3. B = B \ {(i, j)}
    ग़ྗɿG
    ୠ͠Test(fi
    , fj
    , B) ⇔ ∃ k ≠ i, j [(i, k), (i, j) ∉ B, LT(fk
    ) ∣ LCM(LT(fi
    ), LT(fj
    ))]
    13೥5݄4೔౔༵೔

    View full-size slide

  192. ࣮૷
    syzygyBuchberger ideal = runST $ do
    bases ← newSTRef { Entry LM(f) f | f ← ideal }
    pairs ← newSTRef {(f, g) | (f, g) ← combinations ideal }
    len ← newSTRef $ length ideal
    whileM_ (not . null <$> readSTRef pairs) $ do
    Just ((f, g), rest) ← viewMin <$> readSTRef pairs
    bases0 ← readSTRef bases
    b .= rest
    let redundant =
    any (λ(Entry _ h) → h ∉ {f, g} ∧ (all (∉ rest) [(f, h), (g, h)])
    ∧ LM(h) | LCM(LM(f), LM(g))) bases
    when (LCM(LM(f), LM(g)) ≠ LM(f) LM(g) ∧ not redundant) $ do
    len0 ← readSTRef len
    let s = S(f, g) `mod` map payload (toList bases0)
    when (s ≠ zero) $ do
    pairs += { (q, s) | Entry _ q ← qs }
    bases %= insert (Entry LM(s) s)
    len *= 2
    map payload . toList <$> readSTRef bases
    13೥5݄4೔౔༵೔

    View full-size slide

  193. ࣮૷ͷղઆ
    13೥5݄4೔౔༵೔

    View full-size slide

  194. ࣮૷ͷղઆ
    ޮ཰ͷͨΊ ST Ϟφυʹͨ͠
    13೥5݄4೔౔༵೔

    View full-size slide

  195. ࣮૷ͷղઆ
    ޮ཰ͷͨΊ ST Ϟφυʹͨ͠
    {} Ͱғ·Ε͍ͯΔͷ͸༏ઌ౓Ωϡʔͷͭ΋Γ
    13೥5݄4೔౔༵೔

    View full-size slide

  196. ࣮૷ͷղઆ
    ޮ཰ͷͨΊ ST Ϟφυʹͨ͠
    {} Ͱғ·Ε͍ͯΔͷ͸༏ઌ౓Ωϡʔͷͭ΋Γ
    ܦݧతʹɺׂΓࢉΛ͢Δࡍ͸ઌ಄߲Λঢॱʹฒ΂͓ͯ
    ͘ͱΑ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  197. ࣮૷ͷղઆ
    ޮ཰ͷͨΊ ST Ϟφυʹͨ͠
    {} Ͱғ·Ε͍ͯΔͷ͸༏ઌ౓Ωϡʔͷͭ΋Γ
    ܦݧతʹɺׂΓࢉΛ͢Δࡍ͸ઌ಄߲Λঢॱʹฒ΂͓ͯ
    ͘ͱΑ͍
    ͲΜͲΜׂΕͯճ਺͕গͳ͘ͳΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  198. ࣮૷ͷղઆ
    ޮ཰ͷͨΊ ST Ϟφυʹͨ͠
    {} Ͱғ·Ε͍ͯΔͷ͸༏ઌ౓Ωϡʔͷͭ΋Γ
    ܦݧతʹɺׂΓࢉΛ͢Δࡍ͸ઌ಄߲Λঢॱʹฒ΂͓ͯ
    ͘ͱΑ͍
    ͲΜͲΜׂΕͯճ਺͕গͳ͘ͳΔ
    جఈީิΛઌ಄߲Λ༏ઌ౓ͱ͢ΔΩϡʔͱͯ࣋ͬ͠
    ͓͍ͯͯɺׂΔͱ͖ʹ toList Ͱঢॱʹฒ΂͍ͯΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  199. Benchmark
    simple prime syzygy
    13೥5݄4೔౔༵೔

    View full-size slide

  200. Benchmark
    lex01
    grlex01
    grevlex01
    lex03
    grlex03
    grevlex03
    0ms 22.5ms 45ms 67.5ms 90ms
    simple prime syzygy
    grlex02
    grevlex02
    0s 0.375s 0.75s 1.125s 1.5s
    grlex04
    grevlex04
    0μs 150μs 300μs 450μs 600μs
    13೥5݄4೔౔༵೔

    View full-size slide

  201. Benchmark
    lex01
    grlex01
    grevlex01
    lex03
    grlex03
    grevlex03
    0ms 22.5ms 45ms 67.5ms 90ms
    simple prime syzygy
    grlex02
    grevlex02
    0s 0.375s 0.75s 1.125s 1.5s
    grlex04
    grevlex04
    0μs 150μs 300μs 450μs 600μs
    ଎͗ͯ͢ݟ͑ͳ͍……
    13೥5݄4೔౔༵೔

    View full-size slide

  202. ޓ͍ʹૉ൑ఆͱͷൺֱ
    lex01
    grlex01
    grevlex01
    lex03
    grlex03
    grevlex03
    0ms 2.5ms 5ms 7.5ms 10ms
    grlex02
    grevlex02
    0s 0.375s 0.75s 1.125s 1.5s
    grlex04
    grevlex04
    58μs 59.25μs60.5μs61.75μs 63μs
    prime syzygy
    13೥5݄4೔౔༵೔

    View full-size slide

  203. ޓ͍ʹૉ൑ఆͱͷൺֱ
    lex01
    grlex01
    grevlex01
    lex03
    grlex03
    grevlex03
    0ms 2.5ms 5ms 7.5ms 10ms
    grlex02
    grevlex02
    0s 0.375s 0.75s 1.125s 1.5s
    grlex04
    grevlex04
    58μs 59.25μs60.5μs61.75μs 63μs
    prime syzygy
    ͦΕͰ΋଎͍ ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  204. ঺հ͢Δख๏
    θϩ؆໿ؔ܎
    syzygy ͷجఈ
    sugar strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  205. Buchberger ͷࣗ༝౓
    13೥5݄4೔౔༵೔

    View full-size slide

  206. Buchberger ͷࣗ༝౓
    جఈͷީิ (i, j) Λݕ౼͍ͯ͘͠ॱ൪͸ࣗ༝
    13೥5݄4೔౔༵೔

    View full-size slide

  207. Buchberger ͷࣗ༝౓
    جఈͷީิ (i, j) Λݕ౼͍ͯ͘͠ॱ൪͸ࣗ༝
    ͜ͷॱ൪ͷબͼํΛͲ͏͢Δ͔ʁ = selection
    strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  208. Buchberger ͷࣗ༝౓
    جఈͷީิ (i, j) Λݕ౼͍ͯ͘͠ॱ൪͸ࣗ༝
    ͜ͷॱ൪ͷબͼํΛͲ͏͢Δ͔ʁ = selection
    strategy
    ώϡʔϦεςΟοΫͳઓུ͕஌ΒΕ͍ͯΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  209. selection strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  210. selection strategy
    normal strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  211. selection strategy
    normal strategy
    ઌ಄߲ͷ LCM ͕ৗʹ࠷খʹͳΔ΋ͷ
    13೥5݄4೔౔༵೔

    View full-size slide

  212. selection strategy
    normal strategy
    ઌ಄߲ͷ LCM ͕ৗʹ࠷খʹͳΔ΋ͷ
    lex ॱংͳͲ࣍਺Λอͨͳ͍ॱংͰ͸ٯޮՌ
    13೥5݄4೔౔༵೔

    View full-size slide

  213. selection strategy
    normal strategy
    ઌ಄߲ͷ LCM ͕ৗʹ࠷খʹͳΔ΋ͷ
    lex ॱংͳͲ࣍਺Λอͨͳ͍ॱংͰ͸ٯޮՌ
    sugar strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  214. selection strategy
    normal strategy
    ઌ಄߲ͷ LCM ͕ৗʹ࠷খʹͳΔ΋ͷ
    lex ॱংͳͲ࣍਺Λอͨͳ͍ॱংͰ͸ٯޮՌ
    sugar strategy
    Ծ૝తͳ੪࣍Խ࣍਺͕࠷খͷ෺ΛબͿ
    13೥5݄4೔౔༵೔

    View full-size slide

  215. selection strategy
    normal strategy
    ઌ಄߲ͷ LCM ͕ৗʹ࠷খʹͳΔ΋ͷ
    lex ॱংͳͲ࣍਺Λอͨͳ͍ॱংͰ͸ٯޮՌ
    sugar strategy
    Ծ૝తͳ੪࣍Խ࣍਺͕࠷খͷ෺ΛબͿ
    ͍ͣΕ΋ಉ཰ҰҐ͕ग़ͨΒૣ͘ग़ͯདྷͨํΛબͿ
    13೥5݄4೔౔༵೔

    View full-size slide

  216. selection strategy
    normal strategy
    ઌ಄߲ͷ LCM ͕ৗʹ࠷খʹͳΔ΋ͷ
    lex ॱংͳͲ࣍਺Λอͨͳ͍ॱংͰ͸ٯޮՌ
    sugar strategy
    Ծ૝తͳ੪࣍Խ࣍਺͕࠷খͷ෺ΛબͿ
    ͍ͣΕ΋ಉ཰ҰҐ͕ग़ͨΒૣ͘ग़ͯདྷͨํΛબͿ
    ͜ͷ৚݅Λൈ͔͢ͱڪ͘͠஗͘ͳΔ……
    13೥5݄4೔౔༵೔

    View full-size slide

  217. ੪࣍Խ࣍਺
    13೥5݄4೔౔༵೔

    View full-size slide

  218. ੪࣍Խ࣍਺
    ੪࣍ࣜʢ֤୯߲ࣜͷશ࣍਺͕౳͍͠ଟ߲ࣜʣΛੜ੒ݩͱ͢ΔΠ
    σΞϧͷܭࢉ͸ܦݧతʹ଎͍
    13೥5݄4೔౔༵೔

    View full-size slide

  219. ੪࣍Խ࣍਺
    ੪࣍ࣜʢ֤୯߲ࣜͷશ࣍਺͕౳͍͠ଟ߲ࣜʣΛੜ੒ݩͱ͢ΔΠ
    σΞϧͷܭࢉ͸ܦݧతʹ଎͍
    ༨෼ͳม਺Ͱੜ੒ݩΛ੪࣍Խ͔ͯ͠Βܭࢉ͢Δͱ͍͏ώϡʔ
    ϦεςΟΫε͕஌ΒΕ͍ͯΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  220. ੪࣍Խ࣍਺
    ੪࣍ࣜʢ֤୯߲ࣜͷશ࣍਺͕౳͍͠ଟ߲ࣜʣΛੜ੒ݩͱ͢ΔΠ
    σΞϧͷܭࢉ͸ܦݧతʹ଎͍
    ༨෼ͳม਺Ͱੜ੒ݩΛ੪࣍Խ͔ͯ͠Βܭࢉ͢Δͱ͍͏ώϡʔ
    ϦεςΟΫε͕஌ΒΕ͍ͯΔ
    ੪࣍Խͷྫɿxy + 2x + y3 + 3  ⇒  xyz + 2xz2 + y3 + 3z3
    13೥5݄4೔౔༵೔

    View full-size slide

  221. ੪࣍Խ࣍਺
    ੪࣍ࣜʢ֤୯߲ࣜͷશ࣍਺͕౳͍͠ଟ߲ࣜʣΛੜ੒ݩͱ͢ΔΠ
    σΞϧͷܭࢉ͸ܦݧతʹ଎͍
    ༨෼ͳม਺Ͱੜ੒ݩΛ੪࣍Խ͔ͯ͠Βܭࢉ͢Δͱ͍͏ώϡʔ
    ϦεςΟΫε͕஌ΒΕ͍ͯΔ
    ੪࣍Խͷྫɿxy + 2x + y3 + 3  ⇒  xyz + 2xz2 + y3 + 3z3
    ໰୊఺ɿಘΒΕͨجఈ͔Β༨෼ͳม਺Λফڈͯ͠΋
    Gröbner جఈʹͳΔͱ͸ݶΒͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  222. ੪࣍Խ࣍਺
    ੪࣍ࣜʢ֤୯߲ࣜͷશ࣍਺͕౳͍͠ଟ߲ࣜʣΛੜ੒ݩͱ͢ΔΠ
    σΞϧͷܭࢉ͸ܦݧతʹ଎͍
    ༨෼ͳม਺Ͱੜ੒ݩΛ੪࣍Խ͔ͯ͠Βܭࢉ͢Δͱ͍͏ώϡʔ
    ϦεςΟΫε͕஌ΒΕ͍ͯΔ
    ੪࣍Խͷྫɿxy + 2x + y3 + 3  ⇒  xyz + 2xz2 + y3 + 3z3
    ໰୊఺ɿಘΒΕͨجఈ͔Β༨෼ͳม਺Λফڈͯ͠΋
    Gröbner جఈʹͳΔͱ͸ݶΒͳ͍
    ੪࣍Խͯ͠ಘΒΕͨݩʹରͯ͠΋͏Ұ౓ Buchberger
    Λ࢖͏͜ͱʹͳΔʢͦΕͰ΋ଟগ͸଎͘ͳΔ৔߹͕
    ͋ΔΒ͍͠ʣ
    13೥5݄4೔౔༵೔

    View full-size slide

  223. sugar strategy
    13೥5݄4೔౔༵೔

    View full-size slide

  224. sugar strategy
    ී௨ʹ Buchberger Λܭࢉ͢Δ͕ɺ(i, j) Λબ
    ୒͢Δͱ͖͚ͩԾ૝తͳ੪࣍ԽΛߦ͍ɺͦͷ
    ࣍਺࠷খͷ΋ͷΛબͿ
    13೥5݄4೔౔༵೔

    View full-size slide

  225. sugar strategy
    ී௨ʹ Buchberger Λܭࢉ͢Δ͕ɺ(i, j) Λબ
    ୒͢Δͱ͖͚ͩԾ૝తͳ੪࣍ԽΛߦ͍ɺͦͷ
    ࣍਺࠷খͷ΋ͷΛબͿ
    ͜ͷԾ૝తͳ࣍਺ͷ͜ͱΛ sugar ͱ͍͏
    13೥5݄4೔౔༵೔

    View full-size slide

  226. sugar
    ଟ߲ࣜ (fi
    , fj
    ) ͷ sugar Λ࣍ͷΑ͏ʹఆΊΔɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  227. sugar
    ଟ߲ࣜ (fi
    , fj
    ) ͷ sugar Λ࣍ͷΑ͏ʹఆΊΔɻ
    Sfᵢ
     = deg(fi
    ), Sfⱼ
     = deg(fj
    )
    13೥5݄4೔౔༵೔

    View full-size slide

  228. sugar
    ଟ߲ࣜ (fi
    , fj
    ) ͷ sugar Λ࣍ͷΑ͏ʹఆΊΔɻ
    Sfᵢ
     = deg(fi
    ), Sfⱼ
     = deg(fj
    )
    Sf
    ɿgiven Ͱ t ͕୯߲ࣜͳΒ Stf
     = deg(t) + Sf
    13೥5݄4೔౔༵೔

    View full-size slide

  229. sugar
    ଟ߲ࣜ (fi
    , fj
    ) ͷ sugar Λ࣍ͷΑ͏ʹఆΊΔɻ
    Sfᵢ
     = deg(fi
    ), Sfⱼ
     = deg(fj
    )
    Sf
    ɿgiven Ͱ t ͕୯߲ࣜͳΒ Stf
     = deg(t) + Sf
    f = g + h ͷ࣌ɺSf
     = max(Sg
    , Sf
    )
    13೥5݄4೔౔༵೔

    View full-size slide

  230. sugar
    ଟ߲ࣜ (fi
    , fj
    ) ͷ sugar Λ࣍ͷΑ͏ʹఆΊΔɻ
    Sfᵢ
     = deg(fi
    ), Sfⱼ
     = deg(fj
    )
    Sf
    ɿgiven Ͱ t ͕୯߲ࣜͳΒ Stf
     = deg(t) + Sf
    f = g + h ͷ࣌ɺSf
     = max(Sg
    , Sf
    )
    (fi
    , fj
    ) ͷ sugar ͸ɺ্ʹैͬͯܭࢉͨ͠ S-ଟ
    ߲ࣜͷ sugar ͱ͢Δɻ
    13೥5݄4೔౔༵೔

    View full-size slide

  231. ࣮ࡍͷ࣮૷
    13೥5݄4೔౔༵೔

    View full-size slide

  232. ࣮ࡍͷ࣮૷
    ͓͋ͭΒ͑޲͖ʹ༏ઌ౓ΩϡʔΛ࢖͍ͬͯͨ
    13೥5݄4೔౔༵೔

    View full-size slide

  233. ࣮ࡍͷ࣮૷
    ͓͋ͭΒ͑޲͖ʹ༏ઌ౓ΩϡʔΛ࢖͍ͬͯͨ
    “selection strategy = ༏ઌ౓ͷܭࢉํ๏”
    ͱͯ͠ந৅Խग़དྷΔʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  234. ࣮ࡍͷ࣮૷
    ͓͋ͭΒ͑޲͖ʹ༏ઌ౓ΩϡʔΛ࢖͍ͬͯͨ
    “selection strategy = ༏ઌ౓ͷܭࢉํ๏”
    ͱͯ͠ந৅Խग़དྷΔʂ
    double sugar ͱ͍͏ख๏͸͜Ε͚ͩͰ͸ແཧ
    ʢͰ΋ͦ͜·ͰޮՌ͕ͳ͍Β͍͠ͷͰແࢹʣ
    13೥5݄4೔౔༵೔

    View full-size slide

  235. ࣮ࡍͷ࣮૷
    ͓͋ͭΒ͑޲͖ʹ༏ઌ౓ΩϡʔΛ࢖͍ͬͯͨ
    “selection strategy = ༏ઌ౓ͷܭࢉํ๏”
    ͱͯ͠ந৅Խग़དྷΔʂ
    double sugar ͱ͍͏ख๏͸͜Ε͚ͩͰ͸ແཧ
    ʢͰ΋ͦ͜·ͰޮՌ͕ͳ͍Β͍͠ͷͰແࢹʣ
    (i, j) Λอଘ͢Δ࣌ʹॏΈ΋อଘ͓ͯ͘͠
    13೥5݄4೔౔༵೔

    View full-size slide

  236. ࣮૷
    syzygyBuchbergerWithStrategy strategy ideal = runST $ do
    let gens = zip [1..] ideal
    bases ← newSTRef { Entry LM(f) f | (_, f) ← gens }
    pairs ← newSTRef { Entry (calcWeight strategy f g, j) (f, g)
    | ((i, f), (j, g)) ← combinations ideal }
    len ← newSTRef $ length ideal
    whileM_ (not . null <$> readSTRef pairs) $ do
    Just (Entry _ (f, g), rest) ← viewMin <$> readSTRef pairs
    -- தུ
    when (s ≠ zero) $ do
    pairs += { Entry (calcWeight strategy q s, j) (q, s)
    | Entry _ q ← qs | j ← [len0 + 1 ..] }
    bases %= insert (Entry LM(s) s)
    len *= 2
    map payload . toList <$> readSTRef bases
    ॏΈΛ௥Ճ͢Δ͚ͩͰ࣮૷ग़དྷͯ͠·ͬͨ……
    13೥5݄4೔౔༵೔

    View full-size slide

  237. Benchmark
    syzygy sugar
    13೥5݄4೔౔༵೔

    View full-size slide

  238. Benchmark
    lex01
    grlex01
    grevlex01
    lex03
    grlex03
    grevlex03
    0ms 0.15ms 0.3ms 0.45ms 0.6ms
    grlex02
    grevlex02
    16ms 17ms 18ms 19ms 20ms
    grlex04
    grevlex04
    58μs 58.1μs 58.2μs58.3μs58.4μs
    syzygy sugar
    13೥5݄4೔౔༵೔

    View full-size slide

  239. Benchmarkʢ࿦จ൛ʣ
    syzygy sugar
    I1
     = ⟨35y4 − 10xy2 − 210y2z + 3x2 + 30xz − 105z2 + 140yt − 21u,
     5xy3 − 140y3z − 3x2y + 45xyz − 420yz2 + 210y2t − 25xt + 70zt + 126yu⟩
    I2
     = ⟨x + y + z + w, xy + yz + zw + wx, xyz + yzw + zwx + wxy, xyzw − 1⟩ɹ
    I3
     = ⟨x31 − x6 − x − y, x8 − z, x10 − t⟩
    13೥5݄4೔౔༵೔

    View full-size slide

  240. Benchmarkʢ࿦จ൛ʣ
    grevlex01
    lex02
    grevlex02
    0ms 10ms 20ms 30ms 40ms
    grevlex03
    0ms 700ms1400ms2100ms
    2800ms
    syzygy sugar
    lex01
    0ms 0.5ms 1ms 1.5ms 2ms
    I1
     = ⟨35y4 − 10xy2 − 210y2z + 3x2 + 30xz − 105z2 + 140yt − 21u,
     5xy3 − 140y3z − 3x2y + 45xyz − 420yz2 + 210y2t − 25xt + 70zt + 126yu⟩
    I2
     = ⟨x + y + z + w, xy + yz + zw + wx, xyz + yzw + zwx + wxy, xyzw − 1⟩ɹ
    I3
     = ⟨x31 − x6 − x − y, x8 − z, x10 − t⟩
    13೥5݄4೔౔༵೔

    View full-size slide

  241. ߟ࡯
    13೥5݄4೔౔༵೔

    View full-size slide

  242. ߟ࡯
    ࿦จʹग़ͯ͘Δྫʹ͍ͭͯ͸ sugar ͕଎͍
    13೥5݄4೔౔༵೔

    View full-size slide

  243. ߟ࡯
    ࿦จʹग़ͯ͘Δྫʹ͍ͭͯ͸ sugar ͕଎͍
    ͦΕͰ΋ڻ͘΄Ͳ଎͍Α͏ʹ͸ݟ͑ͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  244. ߟ࡯
    ࿦จʹग़ͯ͘Δྫʹ͍ͭͯ͸ sugar ͕଎͍
    ͦΕͰ΋ڻ͘΄Ͳ଎͍Α͏ʹ͸ݟ͑ͳ͍
    ͪ͜ΒͰબΜͩσʔληοτʹؔͯ͠͸
    sugar ͷ΄͏͕஗͍৔߹΋͋Δʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  245. ߟ࡯
    ࿦จʹग़ͯ͘Δྫʹ͍ͭͯ͸ sugar ͕଎͍
    ͦΕͰ΋ڻ͘΄Ͳ଎͍Α͏ʹ͸ݟ͑ͳ͍
    ͪ͜ΒͰબΜͩσʔληοτʹؔͯ͠͸
    sugar ͷ΄͏͕஗͍৔߹΋͋Δʁ
    ௥੻ௐࠪ༧ఆ
    13೥5݄4೔౔༵೔

    View full-size slide

  246. ͜͜·ͰͰ࣭໰ʁ
    13೥5݄4೔౔༵೔

    View full-size slide

  247. Table of Contents
    Gröbner جఈͷ؆୯ͳಋೖ
    Gröbner جఈͷܭࢉ๏
    Buchberger ΞϧΰϦζϜ
    ࠷దԽख๏ɿsyzygy, sugar strategy
    Haskell ͷܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    13೥5݄4೔౔༵೔

    View full-size slide

  248. Haskell ͷ
    ܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    13೥5݄4೔౔༵೔

    View full-size slide

  249. Haskell ͷ
    ܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    computational-algebra Ͱ͸ܕػೳΛ;ΜͩΜʹ
    ར༻͍ͯ͠Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  250. Haskell ͷ
    ܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    computational-algebra Ͱ͸ܕػೳΛ;ΜͩΜʹ
    ར༻͍ͯ͠Δ
    ม਺ͷ਺ɺମͷछྨɺ୯߲ࣜॱংɺબ୒ઓུ…
    13೥5݄4೔౔༵೔

    View full-size slide

  251. Haskell ͷ
    ܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    computational-algebra Ͱ͸ܕػೳΛ;ΜͩΜʹ
    ར༻͍ͯ͠Δ
    ม਺ͷ਺ɺମͷछྨɺ୯߲ࣜॱংɺબ୒ઓུ…
    શͯܕʹύϥϝτϥΠζ
    13೥5݄4೔౔༵೔

    View full-size slide

  252. Haskell ͷ
    ܕϨϕϧϓϩάϥϛϯάͷݱࡏ
    computational-algebra Ͱ͸ܕػೳΛ;ΜͩΜʹ
    ར༻͍ͯ͠Δ
    ม਺ͷ਺ɺମͷछྨɺ୯߲ࣜॱংɺબ୒ઓུ…
    શͯܕʹύϥϝτϥΠζ
    ґଘܕͱূ໌ͷΦϯύϨʔυ
    13೥5݄4೔౔༵೔

    View full-size slide

  253. ґଘܕͱূ໌ͷ
    ΦϯύϨʔυ
    13೥5݄4೔౔༵೔

    View full-size slide

  254. ґଘܕͱূ໌ͷ
    ΦϯύϨʔυ
    DataKinds ΍ GADTs ͱ͍֦ͬͨுػೳΛଟ༻
    13೥5݄4೔౔༵೔

    View full-size slide

  255. ґଘܕͱূ໌ͷ
    ΦϯύϨʔυ
    DataKinds ΍ GADTs ͱ͍֦ͬͨுػೳΛଟ༻
    ୯߲ࣜ͸ࢦ਺ϕΫτϧͰදݱ͍ͯ͠ΔͷͰɺม਺ͷ਺ͷ۠
    ผΛ͔ͬ͠Γ͚͍ͭͨ
    13೥5݄4೔౔༵೔

    View full-size slide

  256. ґଘܕͱূ໌ͷ
    ΦϯύϨʔυ
    DataKinds ΍ GADTs ͱ͍֦ͬͨுػೳΛଟ༻
    ୯߲ࣜ͸ࢦ਺ϕΫτϧͰදݱ͍ͯ͠ΔͷͰɺม਺ͷ਺ͷ۠
    ผΛ͔ͬ͠Γ͚͍ͭͨ
    ௕͖ͭ͞ϕΫτϧʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  257. ґଘܕͱূ໌ͷ
    ΦϯύϨʔυ
    DataKinds ΍ GADTs ͱ͍֦ͬͨுػೳΛଟ༻
    ୯߲ࣜ͸ࢦ਺ϕΫτϧͰදݱ͍ͯ͠ΔͷͰɺม਺ͷ਺ͷ۠
    ผΛ͔ͬ͠Γ͚͍ͭͨ
    ௕͖ͭ͞ϕΫτϧʂ
    ڥք৚݅΋ূ໌͠Α͏ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  258. ґଘܕͱূ໌ͷ
    ΦϯύϨʔυ
    DataKinds ΍ GADTs ͱ͍֦ͬͨுػೳΛଟ༻
    ୯߲ࣜ͸ࢦ਺ϕΫτϧͰදݱ͍ͯ͠ΔͷͰɺม਺ͷ਺ͷ۠
    ผΛ͔ͬ͠Γ͚͍ͭͨ
    ௕͖ͭ͞ϕΫτϧʂ
    ڥք৚݅΋ূ໌͠Α͏ʂ
    ͜Ε͚ͩͰ΋͔ͳΓେมͳͷͰɺʮΞϧΰϦζϜͷ
    ଥ౰ੑʯͱ͔͸͍ࣔͯ͠ͳ͍Ͱ͢ʢࢮ͵ʣ
    13೥5݄4೔౔༵೔

    View full-size slide

  259. ৄ͘͠͸ίʔυࢀর
    -- | N-ary Monomial. IntMap contains degrees for each xi.
    type Monomial (n :: Nat) = Vector Int n
    -- | Monomial with monomial order.
    newtype OrderedMonomial (ord :: ⋆) n =
    OrderedMonomial { getMonomial :: Monomial n }
    deriving instance (Eq (Monomial n)) ⇒
     Eq (OrderedMonomial ordering n)
    type MonomialOrder = ∀n. Monomial n → Monomial n → Ordering
    -- | Class to lookup ordering from its (type-level) name.
    class IsOrder (ordering :: ⋆) where
    cmpMonomial :: Proxy ordering → MonomialOrder
    -- | Class for Monomial orders.
    class IsOrder name ⇒ IsMonomialOrder name where
    13೥5݄4೔౔༵೔

    View full-size slide

  260. ৄ͘͠͸ίʔυࢀর
    data Lex = Lex
    data Revlex = Revlex
    data Grevlex = Grevlex
    lex :: MonomialOrder
    lex Nil Nil = EQ
    lex (x :- xs) (y :- ys) = x `compare` y <> xs `lex` ys
    lex _ _ = error "cannot happen"
    revlex :: Monomial n → Monomial n → Ordering
    revlex (x :- xs) (y :- ys) = xs `revlex` ys <> y `compare` x
    revlex Nil Nil = EQ
    revlex _ _ = error "cannot happen!"
    graded :: (Monomial n → Monomial n → Ordering) → (Monomial n → Monomial n →
    Ordering)
    graded cmp xs ys = comparing totalDegree xs ys <> cmp xs ys
    instance IsOrder Grevlex where
    cmpMonomial _ = graded revlex
    instance IsOrder Revlex where
    cmpMonomial _ = revlex
    13೥5݄4೔౔༵೔

    View full-size slide

  261. cannot happen!
    13೥5݄4೔౔༵೔

    View full-size slide

  262. cannot happen!
    ܕϨϕϧͰېࢭ͞ΕΔύλʔϯ
    13೥5݄4೔౔༵೔

    View full-size slide

  263. cannot happen!
    ܕϨϕϧͰېࢭ͞ΕΔύλʔϯ
    ͔͠͠ɺ -fwarn-incomplete-pattern Λࢦఆ
    ͢Δͱʮ͜ͷύλʔϯൈ͚ͯΔΑʂʯ
    13೥5݄4೔౔༵೔

    View full-size slide

  264. cannot happen!
    ܕϨϕϧͰېࢭ͞ΕΔύλʔϯ
    ͔͠͠ɺ -fwarn-incomplete-pattern Λࢦఆ
    ͢Δͱʮ͜ͷύλʔϯൈ͚ͯΔΑʂʯ
    ͦͷύλʔϯΛॻ͘ͱܕΤϥʔͰ஄͔ΕΔ
    13೥5݄4೔౔༵೔

    View full-size slide

  265. cannot happen!
    ܕϨϕϧͰېࢭ͞ΕΔύλʔϯ
    ͔͠͠ɺ -fwarn-incomplete-pattern Λࢦఆ
    ͢Δͱʮ͜ͷύλʔϯൈ͚ͯΔΑʂʯ
    ͦͷύλʔϯΛॻ͘ͱܕΤϥʔͰ஄͔ΕΔ
    ͔ͩΒ wildcard pattern
    13೥5݄4೔౔༵೔

    View full-size slide

  266. ΠσΞϧ hack
    data Ideal r = ∀n. Ideal (Vector r n)
    instance Eq r ⇒ Eq (Ideal r) where
    (≡) = (≡) `on` generators
    generators :: Ideal r → [r]
    generators (Ideal is) = toList is
    addToIdeal :: r → Ideal r → Ideal r
    addToIdeal i (Ideal is) = Ideal (i :- is)
    toIdeal :: NoetherianRing r ⇒ [r] → Ideal r
    toIdeal = foldr addToIdeal (Ideal Nil)
    13೥5݄4೔౔༵೔

    View full-size slide

  267. ΠσΞϧ hack
    data Ideal r = ∀n. Ideal (Vector r n)
    instance Eq r ⇒ Eq (Ideal r) where
    (≡) = (≡) `on` generators
    generators :: Ideal r → [r]
    generators (Ideal is) = toList is
    addToIdeal :: r → Ideal r → Ideal r
    addToIdeal i (Ideal is) = Ideal (i :- is)
    toIdeal :: NoetherianRing r ⇒ [r] → Ideal r
    toIdeal = foldr addToIdeal (Ideal Nil)
    ΠσΞϧ͸Ϧετ……Ͱ͸ͳ͍ʂ
    13೥5݄4೔౔༵೔

    View full-size slide

  268. ΠσΞϧ hack
    data Ideal r = ∀n. Ideal (Vector r n)
    instance Eq r ⇒ Eq (Ideal r) where
    (≡) = (≡) `on` generators
    generators :: Ideal r → [r]
    generators (Ideal is) = toList is
    addToIdeal :: r → Ideal r → Ideal r
    addToIdeal i (Ideal is) = Ideal (i :- is)
    toIdeal :: NoetherianRing r ⇒ [r] → Ideal r
    toIdeal = foldr addToIdeal (Ideal Nil)
    ΠσΞϧ͸Ϧετ……Ͱ͸ͳ͍ʂ
    ඇৗʹਂԕͳΔཧ༝ʹΑΓଘࡏྔԽ͞Εͨ sized-vector
    13೥5݄4೔౔༵೔

    View full-size slide

  269. ΠσΞϧ hack
    data Ideal r = ∀n. Ideal (Vector r n)
    instance Eq r ⇒ Eq (Ideal r) where
    (≡) = (≡) `on` generators
    generators :: Ideal r → [r]
    generators (Ideal is) = toList is
    addToIdeal :: r → Ideal r → Ideal r
    addToIdeal i (Ideal is) = Ideal (i :- is)
    toIdeal :: NoetherianRing r ⇒ [r] → Ideal r
    toIdeal = foldr addToIdeal (Ideal Nil)
    ΠσΞϧ͸Ϧετ……Ͱ͸ͳ͍ʂ
    ඇৗʹਂԕͳΔཧ༝ʹΑΓଘࡏྔԽ͞Εͨ sized-vector
    ফڈΠσΞϧͷܭࢉͷ࣌ʹ҉໧ཪʹܕΛ߹ΘͤΔҝ
    13೥5݄4೔౔༵೔

    View full-size slide

  270. ⁋᧒Λ߹Θͤʹ༻ҙ͞Εͨ
    data Monomorphic k = ∀a. Monomorphic (k a)
    -- | A types which have the monomorphic representation.
    class Monomorphicable k where
    -- | Monomorphic representation
    type MonomorphicRep k :: ⋆
    -- | Promote the monomorphic value to the polymophic one.
    promote :: MonomorphicRep k → Monomorphic k
    -- | Demote the polymorphic value to the monomorphic representation.
    demote :: Monomorphic k → MonomorphicRep k
    -- | Convinience function to demote polymorphic types
    -- into monomorphic one directly.
    demote' :: Monomorphicable k ⇒ k a → MonomorphicRep k
    demote' = demote ∘ Monomorphic
    -- | Demote polymorphic nested types directly into
    -- monomorphic representation.
    demoteComposed :: Monomorphicable (f :∘: g)
    ⇒ f (g a) → MonomorphicRep (f :∘: g)
    demoteComposed = demote ∘ Monomorphic ∘ Comp
    13೥5݄4೔౔༵೔

    View full-size slide

  271. ੍໿෇͚ͯΔײ͡
    thEliminationIdeal :: ( IsMonomialOrder ord, Field k, IsPolynomial k m
    , IsPolynomial k (m :-: n)
    , (n ≼ m) ~ True)
    ⇒ SNat n
    → Ideal (OrderedPolynomial k ord m)
    → Ideal (OrderedPolynomial k ord (m ⊖ n))
    thEliminationIdeal n =
    case singInstance n of
    SingInstance →
    mapIdeal (changeOrderProxy Proxy) ∘
    thEliminationIdealWith (weightedEliminationOrder n) n
    13೥5݄4೔౔༵೔

    View full-size slide

  272. ੍໿෇͚ͯΔײ͡
    thEliminationIdeal :: ( IsMonomialOrder ord, Field k, IsPolynomial k m
    , IsPolynomial k (m :-: n)
    , (n ≼ m) ~ True)
    ⇒ SNat n
    → Ideal (OrderedPolynomial k ord m)
    → Ideal (OrderedPolynomial k ord (m ⊖ n))
    thEliminationIdeal n =
    case singInstance n of
    SingInstance →
    mapIdeal (changeOrderProxy Proxy) ∘
    thEliminationIdealWith (weightedEliminationOrder n) n
    Gröbner جఈΛ࢖͏ͱɺ࿈ཱํఔ͔ࣜΒจࣈΛফ
    ڈग़དྷΔʢ͍͢͝ʂʣ
    13೥5݄4೔౔༵೔

    View full-size slide

  273. ੍໿෇͚ͯΔײ͡
    thEliminationIdeal :: ( IsMonomialOrder ord, Field k, IsPolynomial k m
    , IsPolynomial k (m :-: n)
    , (n ≼ m) ~ True)
    ⇒ SNat n
    → Ideal (OrderedPolynomial k ord m)
    → Ideal (OrderedPolynomial k ord (m ⊖ n))
    thEliminationIdeal n =
    case singInstance n of
    SingInstance →
    mapIdeal (changeOrderProxy Proxy) ∘
    thEliminationIdealWith (weightedEliminationOrder n) n
    Gröbner جఈΛ࢖͏ͱɺ࿈ཱํఔ͔ࣜΒจࣈΛফ
    ڈग़དྷΔʢ͍͢͝ʂʣ
    n จࣈ໨·ͰΛফڈ͍ͨ͠㱺 ม਺͸࠷௿Ͱ΋ n ݸ
    13೥5݄4೔౔༵೔

    View full-size slide

  274. ূ໌ͯ͠Δײ͡
    intersection :: ∀ r k n ord.
    ( IsMonomialOrder ord, Field r, IsPolynomial r k, IsPolynomial r n
    , IsPolynomial r (k ⊕ n)
    )
    ⇒ Vector (Ideal (OrderedPolynomial r ord n)) k
    → Ideal (OrderedPolynomial r ord n)
    intersection Nil = Ideal $ singletonV one
    intersection idsv@(_ :- _) =
    let sk = sLengthV idsv
    sn = sing :: SNat n
    ts = genVars (sk %+ sn)
    tis = zipWith (λ ideal t → mapIdeal ((t *) . shiftR sk) ideal)
    (toList idsv) ts
    j = foldr appendIdeal (principalIdeal (one - foldr (+) zero ts)) tis
    in case plusMinusEqR sn sk of
    Eql → case propToBoolLeq (plusLeqL sk sn) of
    LeqTrueInstance → thEliminationIdeal sk j
    13೥5݄4೔౔༵೔

    View full-size slide

  275. ࠓؾ෇͍͚ͨͲ
    શ෦આ໌͢Δͷແཧͩ
    13೥5݄4೔౔༵೔

    View full-size slide

  276. ΋͏ͩΊͩ
    13೥5݄4೔౔༵೔

    View full-size slide

  277. ৄ͘͠͸௚઀ั·͑ͯ
    㘤͍͍ͯͩ͘͞
    13೥5݄4೔౔༵೔

    View full-size slide

  278. ࠷ޙʹ͍͍͍ͨ͜ͱ
    13೥5݄4೔౔༵೔

    View full-size slide

  279. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  280. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    ূ໌͸࣮ߦ࣌ʹ஗Ԇ͞ΕΔ͔Βλμ͡Όͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  281. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    ূ໌͸࣮ߦ࣌ʹ஗Ԇ͞ΕΔ͔Βλμ͡Όͳ͍
    γϯάϧτϯ΋ίετ͕͔͔Δ
    13೥5݄4೔౔༵೔

    View full-size slide

  282. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    ূ໌͸࣮ߦ࣌ʹ஗Ԇ͞ΕΔ͔Βλμ͡Όͳ͍
    γϯάϧτϯ΋ίετ͕͔͔Δ
    Haskell ͰͷґଘܕͰ࣮༻తͳΞϓϦॻ͘ͷ͸Ή͍ͣ
    13೥5݄4೔౔༵೔

    View full-size slide

  283. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    ূ໌͸࣮ߦ࣌ʹ஗Ԇ͞ΕΔ͔Βλμ͡Όͳ͍
    γϯάϧτϯ΋ίετ͕͔͔Δ
    Haskell ͰͷґଘܕͰ࣮༻తͳΞϓϦॻ͘ͷ͸Ή͍ͣ
    HP ඪ४ఴ෇ͷ GHC 7.4.* ͸Ϋι
    13೥5݄4೔౔༵೔

    View full-size slide

  284. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    ূ໌͸࣮ߦ࣌ʹ஗Ԇ͞ΕΔ͔Βλμ͡Όͳ͍
    γϯάϧτϯ΋ίετ͕͔͔Δ
    Haskell ͰͷґଘܕͰ࣮༻తͳΞϓϦॻ͘ͷ͸Ή͍ͣ
    HP ඪ४ఴ෇ͷ GHC 7.4.* ͸Ϋι
    ίϯύΠϧ͢Δ౓ʹ rm *.hi *.o ͠ͳ͍ͱܕػೳ͕࢖
    ͑ͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  285. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    ূ໌͸࣮ߦ࣌ʹ஗Ԇ͞ΕΔ͔Βλμ͡Όͳ͍
    γϯάϧτϯ΋ίετ͕͔͔Δ
    Haskell ͰͷґଘܕͰ࣮༻తͳΞϓϦॻ͘ͷ͸Ή͍ͣ
    HP ඪ४ఴ෇ͷ GHC 7.4.* ͸Ϋι
    ίϯύΠϧ͢Δ౓ʹ rm *.hi *.o ͠ͳ͍ͱܕػೳ͕࢖
    ͑ͳ͍
    छଟ૬ͳ֎෦ϥΠϒϥϦͱϦϯΫग़དྷͳ͍
    13೥5݄4೔౔༵೔

    View full-size slide

  286. ࠷ޙʹ͍͍͍ͨ͜ͱ
    ؼೲ๏͸ίετ͕͔͔Δ
    ূ໌͸࣮ߦ࣌ʹ஗Ԇ͞ΕΔ͔Βλμ͡Όͳ͍
    γϯάϧτϯ΋ίετ͕͔͔Δ
    Haskell ͰͷґଘܕͰ࣮༻తͳΞϓϦॻ͘ͷ͸Ή͍ͣ
    HP ඪ४ఴ෇ͷ GHC 7.4.* ͸Ϋι
    ίϯύΠϧ͢Δ౓ʹ rm *.hi *.o ͠ͳ͍ͱܕػೳ͕࢖
    ͑ͳ͍
    छଟ૬ͳ֎෦ϥΠϒϥϦͱϦϯΫग़དྷͳ͍
    Ҋ֎ܕͷ⁋᧒͸͋͏
    13೥5݄4೔౔༵೔

    View full-size slide

  287. ·ͱΊ
    13೥5݄4೔౔༵೔

    View full-size slide

  288. ·ͱΊ
    GröbnerجఈΛ࢖͏ͱ୅਺ͷܭࢉ͕ग़དྷΔΑ͏ʹ
    13೥5݄4೔౔༵೔

    View full-size slide

  289. ·ͱΊ
    GröbnerجఈΛ࢖͏ͱ୅਺ͷܭࢉ͕ग़དྷΔΑ͏ʹ
    ΠσΞϧ঎ͱ͔ڞ௨෦෼ͱ͔
    13೥5݄4೔౔༵೔

    View full-size slide

  290. ·ͱΊ
    GröbnerجఈΛ࢖͏ͱ୅਺ͷܭࢉ͕ग़དྷΔΑ͏ʹ
    ΠσΞϧ঎ͱ͔ڞ௨෦෼ͱ͔
    จࣈফڈɺ࿈ཱํఔࣜͷղ
    13೥5݄4೔౔༵೔

    View full-size slide

  291. ·ͱΊ
    GröbnerجఈΛ࢖͏ͱ୅਺ͷܭࢉ͕ग़དྷΔΑ͏ʹ
    ΠσΞϧ঎ͱ͔ڞ௨෦෼ͱ͔
    จࣈফڈɺ࿈ཱํఔࣜͷղ
    ߴ଎Խख๏͕ز͔ͭ͋ͬͯɺ੾᛭ୖຏ
    13೥5݄4೔౔༵೔

    View full-size slide

  292. ·ͱΊ
    GröbnerجఈΛ࢖͏ͱ୅਺ͷܭࢉ͕ग़དྷΔΑ͏ʹ
    ΠσΞϧ঎ͱ͔ڞ௨෦෼ͱ͔
    จࣈফڈɺ࿈ཱํఔࣜͷղ
    ߴ଎Խख๏͕ز͔ͭ͋ͬͯɺ੾᛭ୖຏ
    Haskell ܕγεςϜͷࠓޙʹظ଴
    13೥5݄4೔౔༵೔

    View full-size slide

  293. ࢀߟจݙ
    D. Cox, J. Little and D. O’Shea. Ideals, Varieties
    and Algorithms. UTM. Springer.
    A. Giovini, T. Moran, G. Niesi, L. Robbiano and C.
    Traverse. "One sugar cube, please" OR Selection
    strategies in the Buchberger algorithm.
    ᑸݩ. άϨϒφʔجఈ͸໘ന͍ʂ. ߨٛ࿥.
    2012೥౓ૣҴాେֶجװཧ޻ֶ෦਺ֶՊ୅਺ֶC1
    ߨٛࢿྉ
    13೥5݄4೔౔༵೔

    View full-size slide

  294. Any Questions?
    13೥5݄4೔౔༵೔

    View full-size slide

  295. ޚਗ਼ௌ
    ͋Γ͕ͱ͏͍͟͝·ͨ͠
    13೥5݄4೔౔༵೔

    View full-size slide