October 12, 2019
330

# SageMathで数学の力を上げます PyCon mini Hiroshima 2019 / Enlarge your ability of mathematics with SageMath

SageMathで数学の力を上げます PyCon mini Hiroshima 2019 / Enlarge your ability of mathematics with SageMath
PyCon mini Hiroshima 2019 での講演資料です。
@広島市立大学サテライトキャンパス 2019年10月12日(土)

October 12, 2019

## Transcript

1. ### SageMathͰ ਺ֶͷ ྗΛ ্͛·͢ Enlarge your ability of mathematics with

SageMath ๺㝳೗๏ PyCon mini Hiroshima 2019 @޿ౡࢢཱେֶαςϥΠτΩϟϯύε @2019೥10݄12೔(౔)

4. None

8. ### (͜͜Ͱ࠷ۙͷଞͷ׆ಈΛը૾(ུ)෇͖Ͱ͝঺հͨ͠) ▸ ཆ໋ञ΢Σϒಈը޿ࠂ ެࣜwwwww ୈ26ճ೔ຊϓϩϞʔγϣϯاըίϯςετͰάϥ ϯϓϦ৆wwww ▸ όϑΝϦϯ ΢Σϒಈը޿ࠂ ެࣜwwwww

▸ ؟ڸࢢ৔ ެࣜww ςϨϏCM wwww ▸ ؟ڸࢢ৔ TVCM (2018) Χʔϓww Τϧwww ▸ ؟ڸࢢ৔ TVCM (2019) ϑϥϯεΞwwwwwww ▸ ࠓ೥ RCCதࠃ์ૹ(TBSܥ) ʰΠϚͳ·ͬ!ʱίϝϯςʔλwwww

13. ### SageMathͰ ਺ֶͷ ྗΛ ্͛·͢ ͞ ͛ · ͢ ͋ ͛

· ͢ ʊਓਓਓਓਓਓʊ ʼɹμδϟϨɹʻ ʉ̮̮̮̮̮̮ʉ

22. ### Sage ▸ Φʔϓϯιʔεͷ਺ֶιϑτ΢ΣΞγεςϜ ▸ ͍ΖΜͳ਺ֶιϑτ΢ΣΞΛPythonͰ౷߹ ▸ GAP, Maxima, NumPy, SciPy,

mathplotlib, Sympy, FLINT, R ▸ ϛογϣϯ: Mathematica ͱ͔ Maple, Matlab, Magmaͷ୅ସΛ࡞Δ͜ͱ

26. ### ؆୯ʹࢼ͢ ▸ ΢Σϒ ▸ Sage Cell Server https://sagecell.sagemath.org/ ▸ CoCalc

(چSageMathCloud) https://cocalc.com ▸ Πϯετʔϧ ▸ ϩʔΧϧʹ ▸ ίϚϯυϥΠϯͰ΋
27. ### CoCalc ͍͢͝ɻ ▸ SageNotebook ▸ Jupyter Notebook ▸ Rmarkdown ▸

͚ͩ͡Όͳ͍ ▸ X11 ͱ͔΋Ͱ͖Δ

34. ### SageΛେֶͷतۀͰซ༻ ▸ ޿ౡେֶͷڭҭֶ෦Ͱ਺ֶΛڭ͍͑ͯΔ ▸ ୅਺ֶܥͷೖ໳ߨٛͷҰ෦ Sage Λ࢖༻ͨ͠ ▸ ڭҭֶ෦Ͱɺதɾߴͷ਺ֶՊͷڭһ໔ڐΛऔΖ͏ͱ͢Δֶੜ ▸

͕ͬͭΓϓϩάϥϛϯάΛ͢Δਓ޲͚Ͱ͸ͳ͍ ▸ ͪΐͬͱίϚϯυΛଧͬͯΈͯܭࢉͤ͞Δ͙Β͍Ͱे෼ศར ▸ ʮߴڃి୎ʯͱͯ͠

࠷େެ໿਺ is Կ?
37. ### ࠷େެ໿਺ ▸ ࠷େެ໿਺ greatest common divisor (GCD) ▸ (1) 12,

18 ͷ࠷େެ໿਺͸? ▸ (2) 123456789 ͱ 987654321 ͷ࠷େެ໿਺͸? ▸ ΍Γํ ▸ ໿਺Λશ෦͍͋͛ͯ͘ ▸ ૉҼ਺෼ղͯ͠ڞ௨ͷૉҼ਺Λ͔͚Δ ▸ ϢʔΫϦουͷޓআ๏

49. ### ༡ͼ΍ݚڀʹSageΛ࢖͏࿩ ▸ ྫ Twitter ΑΓ ▸ ࣗવ਺ ʹରͯ͠    ͕੔਺ͷͱ͖

͸ԿͰ͠ΐ͏͔ n 12502 + n3 n

52. ### ପԁۂઢ ▸ (ॏࠜͳ͠) Ͱఆٛ͞ΕΔʮۂઢʯ ▸ ΋ͷ͘͢͝ݚڀ͞Ε͍ͯΔɻݱࡏ΋ɻ ▸ ਺ֶతʹ͘͢͝ັྗతͳର৅ ▸ ઌ΄Ͳͷ໰୊ͩͱɺ

▸ Λ ͱ͓͍ͨΒɺ ▸ ͱ͍͏ପԁۂઢͷ্ͷ֨ࢠ఺ (੔਺఺) (࠲ඪ͕੔਺ʹͳ͍ͬͯΔ ఺) (ͷ͏ͪ ͷ΋ͷ) ΛٻΊΔ໰୊ y2 = xͷ3࣍ࣜ 12502 + n3 y y2 = 12502 + n3 y2 = x3 + 12502 x > 0
53. ### ପԁۂઢ ▸ ͷ஥ؒͨͪ y2 = x3 + 12502 -4 -2

0 2 4 -4 -2 0 2 4 y2 = x3 − x -4 -2 0 2 4 -4 -2 0 2 4 y2 = x3 + 1
54. ### ପԁۂઢ ▸ ͷ஥ؒͨͪ ▸ ͜Ε͸ ͕࣮਺Λಈ͍ͨਤ ▸ ͜ͷதͰ ͕ͱ΋ʹ੔਺ʹͳΔ఺Λ୳͢ ▸

࣮͸δʔήϧͷఆཧʮପԁۂઢͷ੔਺ղ͸ৗʹ༗ݶݸʯ y2 = x3 + 12502 x, y x, y -4 -2 0 2 4 -4 -2 0 2 4 y2 = x3 − x -4 -2 0 2 4 -4 -2 0 2 4 y2 = x3 + 1
55. ### SageͰପԁۂઢΛѻ͏ ▸ Λ΍Δ ▸ Weierstrassํఔࣜ ͩͱ EllipticCurve([a1,a2,a3,a4,a6]) Ͱ࡞ΕΔɻ ▸ ͷ

লུܗ: EllipticCurve([a4,a6]) ▸ E = EllipticCurve([0,0,0,0,1562500]) ▸ E.integral_points() y2 = x3 + 12502 y2 + a1 xy + a3 y = x3 + a2 x2 + a4 x + a6 a1 = a2 = a3 = 0

57. None

60. ### SageͰପԁۂઢΛѻ͏ ▸ E.integral_points() ▸ [(-100 : 750 : 1),  (0

: 1250 : 1),  (125 : 1875 : 1),  (500 : 11250 : 1),  (600 : 14750 : 1),  (66500 : 17148750 : 1)] ▸ ౴͑ n = 125, 500, 600, 66500
61. None

64. ### ͔͜͜Β͸͕࣌ؒ͋Ε͹͓·͚ ▸ scheme ͱ͔ generic point ͱ͔Ψνͷ୅਺زԿͷΫϥε΋༻ҙ͞Ε͍ͯ Δɻ ▸ Try:

ݚڀͰ࢖͓͏ͱͯ͠։ൃʹߩݙ͍ͨ͠ͱ͜Ζ͕Ͱ͖ͯͨͷͰߩݙ͢Δ ▸ ྫ΋͏Ұͭ