Closed slel closed 3 years ago
Replying to @dkwo:
Do you know whether the error
isirreducible: symbol not found
that I get in #31392 is related to this ticket?
Most probably (there you build Sage 9.2 with system's Pari 2.13, if I am not mistaken). Try to apply the branch from here and see if it helps.
Replying to @dimpase:
It seems that only Conda is behind. Isuru, is Conda's PARI update in the works?
I don't have plans yet, but a PR is always welcome.
Replying to @tornaria:
It probably needs more work. In particular I think there may still be bad cases, so let's think a bit more about this.
My current thinking (after glancing at
smith_form_gens()
infgp_module.py
) that maybe something stronger is required, namely:
- if
X
in HNF, the correspondingU
is a permutation matrix andU.V
is upper triangular with 1s in the diagonal or something like thatOTOH I do wonder if this is really a strong requirement for correctness or just tradition.
I mean: what exactly is wrong with the answer in comment:13? I mean:
(0,-1)
is indeed a generator of V/W. Granted we were expecting(0,1)
but the answer is still correct, isn't it?
So, how do we proceed? Sure, both answers are mathematically correct, strictly speaking. But the fact that things like this now give the "natural" answer makes me think that your change is an overall improvement:
sage: V = ZZ^3; W = V.span([2*V.0, 2*V.1, 2*V.2])
sage: Q = V/W
sage: Q.gens()
((1, 0, 0), (0, 1, 0), (0, 0, 1))
sage: [x.lift() for x in Q.gens()]
[(1, 0, 0), (0, 1, 0), (0, 0, 1)]
Before:
sage: [x.lift() for x in Q.gens()]
[(0, 0, 1), (0, 1, 0), (1, 0, 0)]
sage -t --long --random-seed=0 src/sage/schemes/elliptic_curves/gal_reps_number_field.py # 1 doctest failed
sage -t --long --random-seed=0 src/sage/schemes/elliptic_curves/kraus.py # 1 doctest failed
These fail because pari throws multiple precision too low for generators, not given.
warnings. Is this something we should care about, or should we just filter them out?
what is the status here? still "needs work"?
Branch pushed to git repo; I updated commit sha1. New commits:
4686445 | Merge branch 'develop' of git://git.sagemath.org/sage into t/30801/pari-2.13.0-cypari-2.1.2 |
ec66c3c | Change example to one where the is actually no coercion map |
7c7843d | Fix tests in sage.geometry for new lattice generators |
3dc3251 | Fix tests in sage.schemes.toric for new lattice generators |
530914d | Fix one test in judson-abstract-algebra |
756781e | Fix tests in homology for different choice of generators |
Remaining issues:
sage -t --long --random-seed=0 src/sage/sandpiles/sandpile.py # 5 doctests failed
sage -t --long --random-seed=0 src/doc/en/thematic_tutorials/sandpile.rst # 5 doctests failed
These are probably OK, but someone who understands sandpiles should look at them to make sure.
sage -t --long --random-seed=0 src/sage/schemes/elliptic_curves/gal_reps_number_field.py # 1 doctest failed
sage -t --long --random-seed=0 src/sage/schemes/elliptic_curves/kraus.py # 1 doctest failed
See comment:84
sage -t --long --random-seed=0 src/sage/schemes/elliptic_curves/ell_number_field.py # 5 doctests failed
simon_two_descent
gives some different answers, someone should check if they're correct.
sage -t --long --random-seed=0 src/sage/rings/number_field/number_field_ideal.py # 1 doctest failed
stack overflow: cypari2.handle_error.PariError: the PARI stack overflows (current size: 8000000; maximum size: 865075200)
sage -t --long --random-seed=0 src/sage/rings/number_field/number_field_rel.py # 1 doctest failed
This one looks fishy: a relative discriminant gives a mathematically different answer now.
Upstream: Reported upstream. No feedback yet.
Replying to @antonio-rojas:
sage -t --long --random-seed=0 src/sage/rings/number_field/number_field_rel.py # 1 doctest failed
This one looks fishy: a relative discriminant gives a mathematically different answer now.
The new answer seems wrong, I've reported it upstream
https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2284
Branch pushed to git repo; I updated commit sha1. New commits:
b21951e | Backport rnfdisc fix |
And fixed
Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.
How did it happen that the cardinality of the elliptic curve changed? Not by much but still... at most one of the proposed result is correct.
--- a/src/sage/schemes/elliptic_curves/ell_finite_field.py
+++ b/src/sage/schemes/elliptic_curves/ell_finite_field.py
@@ -785,11 +785,13 @@ class EllipticCurve_finite_field(EllipticCurve_field, HyperellipticCurve_finite_
sage: len(E.gens())
2
sage: E.cardinality()
- 867361737988403547207212930746733987710588
- sage: E.gens()[0].order()
- 433680868994201773603606465373366993855294
- sage: E.gens()[1].order()
- 433680868994201773603606465373366993855294
+ 867361737988403547206134229616487867594472
+ sage: a = E.gens()[0].order(); a # random
+ 433680868994201773603067114808243933797236
+ sage: b = E.gens()[1].order(); b # random
+ 30977204928157269543076222486303138128374
+ sage: lcm(a,b)
+ 433680868994201773603067114808243933797236
"""
G = self.__pari__().ellgroup(flag=1)
return tuple(self.point(list(pt)) for pt in G[2])
}}}}
Replying to @videlec:
How did it happen that the cardinality of the elliptic curve changed? Not by much but still... at most one of the proposed result is correct.
Because the default generators for finite fields have changed between 2.11 and 2.13. So, in k.<a> = GF(5^60)
, 'a' is a different element now. See also the related changes in finite_field_constructor.py
I will have a look at the sandpile.
Replying to @antonio-rojas:
Replying to @videlec:
How did it happen that the cardinality of the elliptic curve changed? Not by much but still... at most one of the proposed result is correct.
Because the default generators for finite fields have changed between 2.11 and 2.13. So, in
k.<a> = GF(5^60)
, 'a' is a different element now. See also the related changes infinite_field_constructor.py
Just to double check:
With 2.11
sage: k.<a> = GF(5^60)
sage: a.minpoly()
x^60 + 2*x^59 + x^58 + 3*x^57 + 2*x^56 + x^55 + 2*x^54 + 4*x^53 + 4*x^52 + 4*x^51 + 2*x^50 + x^49 + 4*x^47 + 3*x^45 + 3*x^44 + 3*x^43 + 2*x^42 + 2*x^40 + 3*x^38 + 4*x^37 + 4*x^35 + x^34 + 3*x^33 + 4*x^32 + 3*x^31 + 2*x^30 + 4*x^29 + 3*x^28 + 2*x^27 + 3*x^25 + 4*x^24 + 4*x^23 + 3*x^21 + 4*x^20 + 2*x^19 + 4*x^18 + 4*x^17 + 4*x^16 + 3*x^15 + x^14 + 4*x^13 + 2*x^11 + x^10 + x^8 + 3*x^7 + 4*x^5 + 3*x^4 + 4*x^3 + 3*x^2 + 3
sage: E = EllipticCurve([a, a])
sage: E.cardinality()
867361737988403547207212930746733987710588
With 2.13:
sage: k.<a> = GF(5^60)
sage: a.minpoly()
x^60 + 3*x^56 + 3*x^55 + x^52 + 2*x^51 + 3*x^50 + x^45 + x^41 + x^37 + 3*x^36 + 3*x^35 + x^33 + 4*x^32 + 3*x^31 + 2*x^30 + x^29 + 3*x^28 + 4*x^27 + 2*x^26 + 4*x^21 + 4*x^20 + 4*x^17 + 4*x^16 + 2*x^15 + 4*x^13 + x^11 + 4*x^10 + 4*x^9 + 2*x^8 + 2*x^5 + 2*x^3 + 4*x^2 + 2*x + 4
sage: E = EllipticCurve([a, a])
sage: E.cardinality()
867361737988403547206134229616487867594472
sage: k.<b> = GF(5^60, modulus=x^60 + 2*x^59 + x^58 + 3*x^57 + 2*x^56 + x^55 + 2*x^54 + 4*x^53 + 4*x^52 + 4*x^51 + 2*x^50 + x^49 + 4*x^47 + 3*x^45 + 3*x^4
....: 4 + 3*x^43 + 2*x^42 + 2*x^40 + 3*x^38 + 4*x^37 + 4*x^35 + x^34 + 3*x^33 + 4*x^32 + 3*x^31 + 2*x^30 + 4*x^29 + 3*x^28 + 2*x^27 + 3*x^25 + 4*x^24 + 4*
....: x^23 + 3*x^21 + 4*x^20 + 2*x^19 + 4*x^18 + 4*x^17 + 4*x^16 + 3*x^15 + x^14 + 4*x^13 + 2*x^11 + x^10 + x^8 + 3*x^7 + 4*x^5 + 3*x^4 + 4*x^3 + 3*x^2 +
....: 3)
sage: E2=EllipticCurve([b,b])
sage: E2.cardinality()
867361737988403547207212930746733987710588
so it's all good.
:)
Nothing to worry about in sandpile. All come from the change in Smith form and are valid answers.
Branch pushed to git repo; I updated commit sha1. New commits:
4f53a36 | Update sandpiles tests for new Smith form |
The precision too low
in [comment:84] comes from
sage: from sage.schemes.elliptic_curves.gal_reps_number_field import deg_one_primes_iter
sage: K.<a> = NumberField(x^2 - x + 112941801)
sage: P = deg_one_primes_iter(K, principal_only=True)
sage: _ = [next(P) for _ in range(3)]
*** Warning: precision too low for generators, not given.
*** Warning: precision too low for generators, not given.
*** Warning: precision too low for generators, not given.
*** Warning: precision too low for generators, not given.
Actully, no need for elliptic curve to trigger the warning
sage: K.<a> = NumberField(x^2 - x + 112941801)
sage: I = K.ideal((112941823, a + 49942513))
sage: I.is_principal()
*** Warning: precision too low for generators, not given.
False
(this is called in deg_one_primes_iter
at line 803)
The above ultimately calls PARI/GP with
sage: bnf = K.pari_bnf()
sage: hnf = I.pari_hnf()
sage: bnf.bnfisprincipal(hnf, 1)
*** Warning: precision too low for generators, not given.
[[5665]~, []~]
And this is very bad: pari does not return the generator (the second item in the last output is empty). In the current sage version we have
bnf.bnfisprincipal(hnf, 1)
[[5665]~, [1005680112856001610090073934296316829467138866361766894525257437882253430879942065774355907438675356488324134889474584998905311415284353681043276105133423115318683310543272073477637300589338960081968708361807703046979508313368984026176585841244175713647681497236281752376606509937398970801793267104940057403236112391113303692273201879958967939674488863025182696946519634023730942473349983082215000407834010466580069375608789784758048104152978461419834803278904319596087872341193829514778888063778316177866395087779299764551322641650792423027180726365995085392258048238098639878001287457838906927025559523280511549386087090336592473896760739042298071391160432291174394824137946860118124404282979229184143719453742756269143097680009342314611948051930283376153131414706670056829331624943848792303898466070751623601801796312310892281516309119701337857274762757320078343943248940019654812535379459245841424571927506504714401584829273515275425263244136314100811717437028483821355172088608914231765343018676088429468602974870678332388362740795503483323546438590543834668601752766799279426809571588639840863182899151994294685170648109254538841007733841265757195339003000012740105833998913751748156278542317450865032226724534159549322507469897715570883846178284884934925927139411108181347492998550960796623038937957015115688920912058287132670816712787077722652142302022813561941270738322779237721182895820974361805531160340984165267884067984384934507471250082396847833818524050466962904745938171905956284686780241294207373575898758348602786420282414104418636033478629514453673727120417545486979349262724942498729615663533408933098472716462610746223340873224916356325049798415709852815179098082945068594726886769245691259236979553269715128964045161931272306583456510695445900210536294492420223945603966435638006097208106702624401128710741275008267785262364203915818653235371290410536706152509400193957786742250154595545629477334640639594843037280585496354412724040607706629548975485280239036672861403792257228273873223951366142131173208977036220063177945056305141723694419208202343495006886847255872360159457890094343404042121364030561355625107989431761677290762878761997805075720739609638293524879891418269558304984789737584642947688856075183040681127570913020836885548135902486022233122268518989917470477171463376207094489443300112083453671975520085981493122180011312717181508397266867443252468650087342491075278577219226483838834975922132435587687556334826969872403765974819119977356548475185141243447860028723934682964287752517823689498457113990739904389583066723293899687467098816867112903821484911791259602500118863723872580834212360274028751115910560284913196192572816918735831007543242727648234580661154261962178769898852141312976299160312006502841696191208025270422489394839650712002785292486960561705299241475775109545547817251668908605704108623609404929381572764215067827488035601722812024134189333895361036686155143470926041441422203185178683221543807531938314899725661504990537887938732251404985938041908193221724324794921781136390123869936226543519311489427540392248343667865593895153766932118235657601052305049272679149137935156623459052384644720342362619275137186290731483488444286389304271148816561733875957377593878312080879984923339287624638790229257972115601321914687187199777361516950494803326116009120509888689926688364677417293793966320775758584809271424360951590676965260954521735044247986018801311108069585561143045069036786312483681260909625432603456526446195112551447608340931959081805965503826397916563831134064470426073588909204625989884612026636269631215105938606528702826734757923982551326485015821546479886614211824267993197710265817389575724543479040788007689943671675047485899341798381799840297618920999806359257046091539158825239171382675316036787306863061087840377357239319898790867517267398778711399174086070859714153327908060380687112/15423787731598121784065181479851317095207965562744556951707615327319988174036900996596787851948102162487535818533246167408447397419284484962946343461932033151014987391818944468080419685988864089974219387374007662090557424422006655336216069435379908000252606721025845935267976159557298178922550487009997527879021269617041774920220964072886295088171880156639876949162194703408177549668332199744187466447813223174472717318384086294240294157543468652016206900519356895158706609190599420181623703486286482521072509532465042319426574643862112732814130061599984365389558490188838773162462651442384961798679610173832674655481574138416535083108050578888973213643445741144149495998169162177225073633210231935418464188261091635402084694759226846304163564397221923885069149960719552734337534114425497804201197146847638901747707144721006983429414898366581039987575516241530461997779437385212642295272483016600460552013332471354322105454747556599800164269728220545584715014879149173700602874605477747964274313916325623253519475913239766035219024045504100513780608732659125134344932814912834698269008084090017279295501852966639433334759085957736584349193299457808760025568726815347265156551997288569855520303083184580727093894206286099137444945253451384172170466112908530803958111097158459503468307451437534445133828888053117285991114033865881137411631835485708185248281679456128881401285564257032504189755725286118402351081317171302436222963916021942398932998857105632612418083654361791817954860417505656364464737860211461429324793494988542438129691273953575854400504405887003002082269313053108684985717274205390809192507223358732261077862527662595468692374702296371975940389359897955820467848264446200797116128658577897255361319125542970727979855299539164774736086342352390472332507124438834338187016413675061887871814555398868333435648711782210171158225697540592179316421357559768754046034560557045147158235469854157988886367295602929376013177169182332473063499496895922329510277364867631515203675503190910661772221158177549639625649093571783636989177154003958257267668260730805197733266709688283450995507923855449160848180441674759974202869687531620064611579801463991337558463643743997267135164234077639052966893238542545548750208212696980293483570717002942340339245397518062128505031494706881569437150040534163842562199131899755456505291752475319505037337714271025136002335192913569940956616169163902567800862024890258150353687883247496151620518758662190976990502427960537248635880282596773227140004292177736957176659160452235030295947942744100500254526493298850043601884234253104837163107628291336853849047349032922715961917418118153997126635661942563766184588457645980308034118788430236317091146609444645125885711112540315091390839292719192995927368217307862766487885884952909747229870463017592863289829170532967404520292121820993254273738890627629459722817897215980320122687403165592871004471038211167521547160486399318758271075144315508301920241394650251902061241787021841817326916417378824310961111757983639607837257509009072952188013741423402177546450623584713467936575516761749606129388853998090896099212762293594464289360758732029903043915542708445230346027591599147100251921863870112777155957711817988808198453771165908839240992119035489368255918464986846384897011045868602012809996701911417125497056612699480011029608303241300120573759919940809625031873997617290638206296876336664521749895994133364527996577259871662621348658003854081116617611523334893799895233315454117878627482715865092777403404290000039905748517139258316452750658333207122746504771475606862464541352233614692387919693313237801391454030184297215851376265590972276932615740994094543032570059914732358087315969509129131465213226337964364991060099390886823404506850632009502355939964365256980689737950555014650360875455621433531197686163996566785513792245023457838396912973254127473243910510573654688099195417343494453770602616193642848137384426169124577035126898650245026236066602939323948634836356704127035766759571373358679773372404475881623110732324054456140506141191811012149002547655229014812462255230135303720711836610126764747857578908314055890267904362154746880790791774593266985409206605469722072489612121470126191161170640137585344788894564385119276745912123555335802678514136687343422978694283526627243455011455093587990305315015794682183783903880302546533554335993322381960581092777146074262180395132207046858557700961280700201084502268413345545221557273152816254355176262742794802475764425737698580710739268628087195538972090318590912938020293852841408652229509844483656138375482948708242772482936665361990110583293262860768893793590172955556511058219658424203481764415924430012043594138005655933182334690019308210425377503727370100872617821601523164268595360660443304798383312297467650776852900112461563735643755909352585538493331481767789166091729453434978046334774247140179202927879199746225254274607506472866113793064345650274075194361194504227747371277617862767557668883880677397101655447974832622218039910391889660315183407560256559581823634686348751999970073338507159538586301746001898994233008724667075468873273429268909954946108472374015002132536966251343158102124440238347206518714347415616357288411158160813885068471448626549535529940737633555166867630276885014395911997648232176044478964205117102414922032065314960549290892077998179541417540291306137128346483175222986932978104286191392167137119056222817931540779913757159699677813708254999512499231303766256633170063282119793861096738828373012184921029465293667029308508857426112584333691741309463516608659736052588112677813543610866157072931265964949327385236209264935350001674757717532833782002008099641314548159468639777158514375801335086321588366628463233073085745744392982060077685319129024219154322573134525849980307737233121167335938628182347209217167257690130545125177873969108518551500995065686858185161519541397222934215544055392555177918529058302177084272491874075954479001465247841514195711761279015092461944770884666266943387468709452105804512201307050102059977841379810443691433051355935697950008342419711170303212511921090976858539118036164631025794898740862743011347633954749555625930473280961552555892377165479621241294839943992032801765507163708685747594848559555727439321273459887604115005341562064199786868571436158926411091472850719249117346546428550026090179384039612628802000610957776293412806618447051914767328893645889410257440364847398021323417813048815233364264704273114718271213520425340337069939876396133983864910147574811777818543655683927575470210079211268820856825639726836979792442447758820728867752361336008456238733666620390993350011824106274337041010679117648752791899869905198820670841771634746344788226807975414277232582151381553005526999373425378324517629421191169842538888155843366625374977129118657562608640832873287338553118786063859419439411462334285128905401552149497810650502735025427299551648144515157989172135679890354595771284131765172232889815864166054850412626480063621939725689936866067157580937044264830849522499516758430087713373429359189895069344766454187296118356652885297735547623443969837999386635109225628187815161497757080986429707705353219928565814662445205762922278917733114362603000541525110244727231616586879079658566405651276697894764234864067938500629562180085344452250106691572409406213072787048805913717109483763718856416913613012912470747632930718980052943756681766116792390349123276672023134828456060499646759933837264765656665596793330816685754103523308815555759665179511327163232285351996699699106863804633863524215279181005741744549306142485407499635207079986089109016524801564602163033986003363161616947551666459438302810674680053735915568635864006123325422535582785394986216592023329686223387365143, 80424414550646364071109413951047320548154724203692500102475964387152343735641955784748411247651791176225695132224501545830655292135351971248388164806308678489271313208673123149238617684205510067472873708708483823065195928585185648791603337039693017693486866125305984139436780928201920611463146920235561398002070224455183901721242650641177500019940806555610990907391822148892007049211319215495906436957606086125307785048118904799833786217368765724665678554101127485210401534445690306996616174545614076586094966258159679745118019220140115744652845218295837382867761138288409776383179585311827387445647338646805169652951119331493582422078526886894128599184974560242366515022171590686902473697233196797944475259058639778693166998923852909777132281665895399358776875234767137523959116595394308077153814711457093749656392193417265063364965333812703551207285083280756261764490953658945584325994516603427977110921650282238227257470153097990914229184083901901982724200800503611983577076526201217189432402688528089891378733592482177343767937677247399457485920975348061621977092999746535686758153425684676668259602753933634715803656277530589863060704342530564598719230638873653686786414955896322303376523061138894646105112943519443671859198816340598881690177758116581556429391931665294816807746500710413244921980760611251491553793888165001492165751540776225622801827638445075682057633889388301297265501704185423645901990910210801486179437831955356267663425311218493520756785259263203713453680163730064600912795788449394635676375721676048771986933389056386796312182892604103410019443042697908355325711801958646674952662128584387098996836292125611626372703986542930508710626471280499507014528354954848914796541777197938611708770915539296664904665044113593147207425231221112425309981190025635812046819915842604972600232502808914299802384397159301990409524126425347635590083353741458937327495404417020380441064365822826273561624208518035359749923593064851368841657912495054172023620903390834252569111873909957574204610904772251677622139737984654424657068605015847311934418911856641140432075855834511260018099715277396427903552075951626852693462074284175653131779541688496384571778652807326845464118195746102804268461777360351306772152021471784506507319736804220662526887565551058168012792652509842056790640954122939876970752988169817651033778764949620315241243314479956742969189135101963641187466734432347780364855216638013470784967435974681028092790311402177665237695821379246728951843415834902614931124860672143148717148526022586488021581461784461336032624243273814257434017810755360044702330597371456403824227161101442131231744253034892467972132649415605601673192023483395081342369752185008081115239666327009462376094472816592692539530899042557145340903398573562268497002949848267741141447119509197909912576437634009706432164020263232320876980120502517199066383470516756823139498324150396385879218790329382427067419359993727617945463698360039605777660585670770078655930977907651587050396042759224406618013258910982169771955461839612415237408978481404186490294047631083557192178973371031103764454876477336071248813527093035819650799905098374703780458879414309264999204021172480163195228510828630921369111155828207883643918569091526307054804267380299993417830166471691160528127969340142505679581805445667946924676591605909584461111115238038985017530634945670189726542180631513464043869965268412793391361182154982878554215607971566272512959835768632115951775492653917164292515967255941162972157441390277695353975991128891020834954034076285000697717265364379515802935964394330065554556407534442672392874973649265676435341099097627811910958024024211733583256194016703868231653619105438392223351899675954867203907924007640153606170556519540171057468097409787451905933867798282836537136835120330461390973442293633912548399707042995856102644430120454632706749426409766313204453/15423787731598121784065181479851317095207965562744556951707615327319988174036900996596787851948102162487535818533246167408447397419284484962946343461932033151014987391818944468080419685988864089974219387374007662090557424422006655336216069435379908000252606721025845935267976159557298178922550487009997527879021269617041774920220964072886295088171880156639876949162194703408177549668332199744187466447813223174472717318384086294240294157543468652016206900519356895158706609190599420181623703486286482521072509532465042319426574643862112732814130061599984365389558490188838773162462651442384961798679610173832674655481574138416535083108050578888973213643445741144149495998169162177225073633210231935418464188261091635402084694759226846304163564397221923885069149960719552734337534114425497804201197146847638901747707144721006983429414898366581039987575516241530461997779437385212642295272483016600460552013332471354322105454747556599800164269728220545584715014879149173700602874605477747964274313916325623253519475913239766035219024045504100513780608732659125134344932814912834698269008084090017279295501852966639433334759085957736584349193299457808760025568726815347265156551997288569855520303083184580727093894206286099137444945253451384172170466112908530803958111097158459503468307451437534445133828888053117285991114033865881137411631835485708185248281679456128881401285564257032504189755725286118402351081317171302436222963916021942398932998857105632612418083654361791817954860417505656364464737860211461429324793494988542438129691273953575854400504405887003002082269313053108684985717274205390809192507223358732261077862527662595468692374702296371975940389359897955820467848264446200797116128658577897255361319125542970727979855299539164774736086342352390472332507124438834338187016413675061887871814555398868333435648711782210171158225697540592179316421357559768754046034560557045147158235469854157988886367295602929376013177169182332473063499496895922329510277364867631515203675503190910661772221158177549639625649093571783636989177154003958257267668260730805197733266709688283450995507923855449160848180441674759974202869687531620064611579801463991337558463643743997267135164234077639052966893238542545548750208212696980293483570717002942340339245397518062128505031494706881569437150040534163842562199131899755456505291752475319505037337714271025136002335192913569940956616169163902567800862024890258150353687883247496151620518758662190976990502427960537248635880282596773227140004292177736957176659160452235030295947942744100500254526493298850043601884234253104837163107628291336853849047349032922715961917418118153997126635661942563766184588457645980308034118788430236317091146609444645125885711112540315091390839292719192995927368217307862766487885884952909747229870463017592863289829170532967404520292121820993254273738890627629459722817897215980320122687403165592871004471038211167521547160486399318758271075144315508301920241394650251902061241787021841817326916417378824310961111757983639607837257509009072952188013741423402177546450623584713467936575516761749606129388853998090896099212762293594464289360758732029903043915542708445230346027591599147100251921863870112777155957711817988808198453771165908839240992119035489368255918464986846384897011045868602012809996701911417125497056612699480011029608303241300120573759919940809625031873997617290638206296876336664521749895994133364527996577259871662621348658003854081116617611523334893799895233315454117878627482715865092777403404290000039905748517139258316452750658333207122746504771475606862464541352233614692387919693313237801391454030184297215851376265590972276932615740994094543032570059914732358087315969509129131465213226337964364991060099390886823404506850632009502355939964365256980689737950555014650360875455621433531197686163996566785513792245023457838396912973254127473243910510573654688099195417343494453770602616193642848137384426169124577035126898650245026236066602939323948634836356704127035766759571373358679773372404475881623110732324054456140506141191811012149002547655229014812462255230135303720711836610126764747857578908314055890267904362154746880790791774593266985409206605469722072489612121470126191161170640137585344788894564385119276745912123555335802678514136687343422978694283526627243455011455093587990305315015794682183783903880302546533554335993322381960581092777146074262180395132207046858557700961280700201084502268413345545221557273152816254355176262742794802475764425737698580710739268628087195538972090318590912938020293852841408652229509844483656138375482948708242772482936665361990110583293262860768893793590172955556511058219658424203481764415924430012043594138005655933182334690019308210425377503727370100872617821601523164268595360660443304798383312297467650776852900112461563735643755909352585538493331481767789166091729453434978046334774247140179202927879199746225254274607506472866113793064345650274075194361194504227747371277617862767557668883880677397101655447974832622218039910391889660315183407560256559581823634686348751999970073338507159538586301746001898994233008724667075468873273429268909954946108472374015002132536966251343158102124440238347206518714347415616357288411158160813885068471448626549535529940737633555166867630276885014395911997648232176044478964205117102414922032065314960549290892077998179541417540291306137128346483175222986932978104286191392167137119056222817931540779913757159699677813708254999512499231303766256633170063282119793861096738828373012184921029465293667029308508857426112584333691741309463516608659736052588112677813543610866157072931265964949327385236209264935350001674757717532833782002008099641314548159468639777158514375801335086321588366628463233073085745744392982060077685319129024219154322573134525849980307737233121167335938628182347209217167257690130545125177873969108518551500995065686858185161519541397222934215544055392555177918529058302177084272491874075954479001465247841514195711761279015092461944770884666266943387468709452105804512201307050102059977841379810443691433051355935697950008342419711170303212511921090976858539118036164631025794898740862743011347633954749555625930473280961552555892377165479621241294839943992032801765507163708685747594848559555727439321273459887604115005341562064199786868571436158926411091472850719249117346546428550026090179384039612628802000610957776293412806618447051914767328893645889410257440364847398021323417813048815233364264704273114718271213520425340337069939876396133983864910147574811777818543655683927575470210079211268820856825639726836979792442447758820728867752361336008456238733666620390993350011824106274337041010679117648752791899869905198820670841771634746344788226807975414277232582151381553005526999373425378324517629421191169842538888155843366625374977129118657562608640832873287338553118786063859419439411462334285128905401552149497810650502735025427299551648144515157989172135679890354595771284131765172232889815864166054850412626480063621939725689936866067157580937044264830849522499516758430087713373429359189895069344766454187296118356652885297735547623443969837999386635109225628187815161497757080986429707705353219928565814662445205762922278917733114362603000541525110244727231616586879079658566405651276697894764234864067938500629562180085344452250106691572409406213072787048805913717109483763718856416913613012912470747632930718980052943756681766116792390349123276672023134828456060499646759933837264765656665596793330816685754103523308815555759665179511327163232285351996699699106863804633863524215279181005741744549306142485407499635207079986089109016524801564602163033986003363161616947551666459438302810674680053735915568635864006123325422535582785394986216592023329686223387365143]~]
Replying to @videlec:
And this is very bad: pari does not return the generator (the second item in the last output is empty). In the current sage version we have
Do we actually need the generator here? From number_field_ideal.py
:
# Call bnfisprincipal().
# If gens_needed, use flag=3 which will insist on computing
# the generator. Otherwise, use flag=1, where the generator
# may or may not be computed.
v = bnf.bnfisprincipal(self.pari_hnf(), 3 if gens_needed else 1)
So it looks like sage is trying to find a generator even if it is not requested. According to the bnfisprincipal
docs, this makes the computation unnecessarily complex:
* 1: If set, outputs [e,t] as explained above, otherwise returns
only e, which is much easier to compute.
Should we change this to use the flag 0 when a generator is not needed?
Changed branch from u/arojas/pari-2.13.0-cypari-2.1.2 to public/30801
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
756781e | Fix tests in homology for different choice of generators |
a9fb51c | Update tests in modules.fg_pid for new Smith normal form |
d7cf527 | Fix tests in torsion quadratic modules for new Smith normal form |
b21951e | Backport rnfdisc fix |
eaa1e38 | A few more test fixes in schemes.toric |
df8c4d0 | One trivial fix in schemes.elliptic_curves |
b11ff20 | Elliptic curve group generators can be different on each run, mark tests as random |
4f53a36 | Update sandpiles tests for new Smith form |
521d582 | Merge branch 'develop' into pari-2.13.0-arojas |
58b84fd | fix a call to bnfisprincipal |
Commit: 58b84fd
Replying to @antonio-rojas:
Replying to @videlec:
And this is very bad: pari does not return the generator (the second item in the last output is empty). In the current sage version we have
Do we actually need the generator here? From
number_field_ideal.py
:# Call bnfisprincipal(). # If gens_needed, use flag=3 which will insist on computing # the generator. Otherwise, use flag=1, where the generator # may or may not be computed. v = bnf.bnfisprincipal(self.pari_hnf(), 3 if gens_needed else 1)
So it looks like sage is trying to find a generator even if it is not requested. According to the
bnfisprincipal
docs, this makes the computation unnecessarily complex:* 1: If set, outputs [e,t] as explained above, otherwise returns only e, which is much easier to compute.
Should we change this to use the flag 0 when a generator is not needed?
Good suggestion. Done in 58b84fd
.
hmm. After this change, the following test in schemes/elliptic_curves/isogeny_small_degree.py
hangs
Trying (line 1555): Psi2(71) # long time (1 second)
Expecting:
-2209380711722505179506258739515288584116147237393815266468076436521/71*u^210 + ... - 14790739586438315394567393301990769678157425619440464678252277649/71
Branch pushed to git repo; I updated commit sha1. New commits:
0381253 | tweak bnfisprincipal |
Haha: calling the compact form and expanding it works :) It is worth a report to PARI/GP.
Branch pushed to git repo; I updated commit sha1. New commits:
7e98037 | clarify comment |
Great, only the Simon 2-descent breaks doctest now. I suggest that we leave it aside and triggers a warning anytime it is called. At the same time I would send a message on sage-devel/sage-nt so that interested people if any can fix it.
Actually, the changes are clear regressions, but given the specification of simon_two_descent
the output is correct in all cases.
This is to upgrade to PARI 2.13.x. https://repology.org/project/pari/versions
This new PARI release brings a lot of bug fixes, new functionality, and speedups.
Changes in the PARI library that needs adaptation in SageMath code
Last upgrade:
29313 (Upgrade: pari 2.11.4), merged in Sage 9.2.beta7 (released 2020-08-03)
Follow-up ticket: #31754
Upstream: Fixed upstream, but not in a stable release.
CC: @dimpase @orlitzky @mkoeppe @slel @antonio-rojas @kiwifb @videlec @tobihan @collares @isuruf @dkwo @xcaruso @loefflerd @kliem
Component: packages: standard
Keywords: upgrade, pari
Author: Vincent Delecroix, Antonio Rojas, Gonzalo Tornaría
Branch:
c78b147
Reviewer: Dima Pasechnik, David Loeffler
Issue created by migration from https://trac.sagemath.org/ticket/30801