Coordinates for the two explicit root-to-critical paths
DefinitionErdosProblems_Erdos1041_Counterexample_InstanceConnectivitydegree-seven-counterexampleerdos-1041polynomial-lemniscate
Defines affine and rescaled coordinates, auxiliary real and imaginary polynomials, and denominator data used to construct two paths inside the strict lemniscate. Path containment and endpoints are proved in separate theorem nodes.
Definition code
import Definitions.Def_ErdosProblems_Erdos1041_Counterexample_Defs
import Definitions.Def_ErdosProblems_Erdos1041_Counterexample_InstanceCritical
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Algebra.Polynomial.Div
import Mathlib.Algebra.Polynomial.Roots
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Analysis.Real.Pi.Bounds
import Mathlib.Analysis.SpecialFunctions.Complex.Log
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Tactic
import Mathlib.Tactic.ComputeDegree
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Ring
import Mathlib.Topology.Connected.LocallyConnected
import Mathlib.Topology.Connected.PathConnected
import Mathlib.Topology.EMetricSpace.BoundedVariation
import Mathlib.Topology.MetricSpace.Contracting
import Mathlib.Topology.Order.IntermediateValue
/-! External source: ani, erdosproblems.com forum thread 1041, 7 Sept 2026.
Formalisation of the connections to the roots (§4.2) of `ani_degree7_counterexample.tex`
at `s = 10^-6`. -/
/-!
Slice S5 of the Erdős #1041 formalisation: the two explicit paths inside `Ω(f)` of §4.2,
delivered as `Erdos1041.Counterexample.s5_roots_connected_to_critical`.
The 109 supplied subdivisions of the two rational-centre polylines are replaced by four
whole-segment degree-fourteen Bernstein certificates with positive integer coefficients
(`P3a`, `P3b`, `P6a`, `P6b`). On top of that the file carries the three endpoint joins:
* `joined_zs_wq` — the straight segment from the interior critical point to the rational
centre `wq`, inside the certified positive disc of radius `10⁻⁸`. The `10⁻⁸`
localisation is obtained from the coarse `ρε/1000` localisation by an exact Taylor
sharpening of `Q'` about `wq` (`delta_small`);
* `endpoint3` / `endpoint6` — the positive-sector bridge from the rational endpoints
`m₃`, `m₆` to `8ζⱼ`, followed by the physical radial segment down to the roots.
The localisation of the interior critical point is read off slice S4's `s4_instance_critical`.
-/
noncomputable section
open scoped ComplexConjugate
namespace Erdos1041.Counterexample.InstanceConnectivity
set_option maxRecDepth 100000
set_option maxHeartbeats 8000000
def scale (w : ℂ) : ℂ := (ρ : ℂ) * (ε : ℂ) * w
def affine (w₀ w₁ : ℂ) (τ : ℝ) : ℂ := w₀ + (τ : ℂ) * (w₁ - w₀)
/-- The exact rational lower lemniscate function. -/
def Hlo (w : ℂ) : ℝ :=
7 * (ε : ℝ) + (Q.eval w).re - (ε : ℝ) ^ 7 / 2 * Complex.normSq (Q.eval w)
def wq : ℂ :=
(39226583259917038484346953200647 / 10000000000000000000000000000000000000000) + (8232474661944848953672917849472800078083 / 10000000000000000000000000000000000000000) * Complex.I
def x3 : ℂ :=
(-59999999960773416740082961515653046799353 / 10000000000000000000000000000000000000000) + (38232474661944848953672917849472800078083 / 10000000000000000000000000000000000000000) * Complex.I
def m3 : ℂ :=
(-720775094321935300989 / 100000000000000000000) + (347106991294046496381 / 100000000000000000000) * Complex.I
def x6 : ℂ :=
(50000000039226583259917038484346953200647 / 10000000000000000000000000000000000000000) + (-41767525338055151046327082150527199921917 / 10000000000000000000000000000000000000000) * Complex.I
def m6 : ℂ :=
(24939592074349341221 / 5000000000000000000) + (-625465185974423846967 / 100000000000000000000) * Complex.I
def qRe (x y : ℝ) : ℝ :=
(1) * x ^ 7
+ (-23013813 / 32000000000000000000000000000000000000000000000000000000000000000) * x ^ 6
+ (-21) * x ^ 5 * y ^ 2
+ (243 / 6250000000000000000000000000000000000000000000000000000000000000000) * x ^ 5 * y
+ (-9 / 5000000000000000000000000000000000000000000) * x ^ 5
+ (69041439 / 6400000000000000000000000000000000000000000000000000000000000000) * x ^ 4 * y ^ 2
+ (-551827 / 160000000000000000000000000000000000000) * x ^ 4 * y
+ (329507 / 1600000000000000) * x ^ 4
+ (35) * x ^ 3 * y ^ 4
+ (-81 / 625000000000000000000000000000000000000000000000000000000000000000) * x ^ 3 * y ^ 3
+ (9 / 500000000000000000000000000000000000000000) * x ^ 3 * y ^ 2
+ (1 / 250000000000000000) * x ^ 3 * y
+ (-329507 / 1600) * x ^ 3
+ (-69041439 / 6400000000000000000000000000000000000000000000000000000000000000) * x ^ 2 * y ^ 4
+ (551827 / 80000000000000000000000000000000000000) * x ^ 2 * y ^ 3
+ (-988521 / 800000000000000) * x ^ 2 * y ^ 2
+ (3 / 1000000) * x ^ 2 * y
+ (9 / 5000000) * x ^ 2
+ (-7) * x * y ^ 6
+ (243 / 6250000000000000000000000000000000000000000000000000000000000000000) * x * y ^ 5
+ (-9 / 1000000000000000000000000000000000000000000) * x * y ^ 4
+ (-1 / 250000000000000000) * x * y ^ 3
+ (988521 / 1600) * x * y ^ 2
+ (-551827 / 400) * x * y
+ (23013813 / 32000) * x
+ (23013813 / 32000000000000000000000000000000000000000000000000000000000000000) * y ^ 6
+ (-551827 / 800000000000000000000000000000000000000) * y ^ 5
+ (329507 / 1600000000000000) * y ^ 4
+ (-1 / 1000000) * y ^ 3
+ (-9 / 5000000) * y ^ 2
+ (81 / 12500000) * y
def qIm (x y : ℝ) : ℝ :=
(7) * x ^ 6 * y
+ (-81 / 12500000000000000000000000000000000000000000000000000000000000000000) * x ^ 6
+ (-69041439 / 16000000000000000000000000000000000000000000000000000000000000000) * x ^ 5 * y
+ (551827 / 800000000000000000000000000000000000000) * x ^ 5
+ (-35) * x ^ 4 * y ^ 3
+ (243 / 2500000000000000000000000000000000000000000000000000000000000000000) * x ^ 4 * y ^ 2
+ (-9 / 1000000000000000000000000000000000000000000) * x ^ 4 * y
+ (-1 / 1000000000000000000) * x ^ 4
+ (23013813 / 1600000000000000000000000000000000000000000000000000000000000000) * x ^ 3 * y ^ 3
+ (-551827 / 80000000000000000000000000000000000000) * x ^ 3 * y ^ 2
+ (329507 / 400000000000000) * x ^ 3 * y
+ (-1 / 1000000) * x ^ 3
+ (21) * x ^ 2 * y ^ 5
+ (-243 / 2500000000000000000000000000000000000000000000000000000000000000000) * x ^ 2 * y ^ 4
+ (9 / 500000000000000000000000000000000000000000) * x ^ 2 * y ^ 3
+ (3 / 500000000000000000) * x ^ 2 * y ^ 2
+ (-988521 / 1600) * x ^ 2 * y
+ (551827 / 800) * x ^ 2
+ (-69041439 / 16000000000000000000000000000000000000000000000000000000000000000) * x * y ^ 5
+ (551827 / 160000000000000000000000000000000000000) * x * y ^ 4
+ (-329507 / 400000000000000) * x * y ^ 3
+ (3 / 1000000) * x * y ^ 2
+ (9 / 2500000) * x * y
+ (-81 / 12500000) * x
+ (-1) * y ^ 7
+ (81 / 12500000000000000000000000000000000000000000000000000000000000000000) * y ^ 6
+ (-9 / 5000000000000000000000000000000000000000000) * y ^ 5
+ (-1 / 1000000000000000000) * y ^ 4
+ (329507 / 1600) * y ^ 3
+ (-551827 / 800) * y ^ 2
+ (23013813 / 32000) * y
def Hxy (x y : ℝ) : ℝ :=
7 / 10 ^ 12 + qRe x y - (1 / (2 * 10 ^ 84)) * ((qRe x y) ^ 2 + (qIm x y) ^ 2)
/-! ### P3a: one segment, replacing the original subdivision. -/
def P3a_denominator : ℕ :=
312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
def P3a_rhs (τ : ℝ) : ℝ :=
17773408170879296322270815201228873784855604231135306145400216929432609111244043625894326404825011845938272863648869899110622951281654292468435901742650977966045982202533286504996792587697232302695772109763545057178652880675447087768064165085268574524424226381182004565315105997212365210380870557534889832798322488899436559125226310005148697132929806971779087768356215199963002033750208334077351644628834243813602986167550912318666369455049247938427493642474122458665745968893285708720000639682402052554693973491649123413491403623207073051164311439836776092560942935520686162521908515359969847254814193194914048045287517477824437971599511795042895105679202349002079117748193498392680734596471 * (1 - τ) ^ 14
+ 248827714392310148511791412817206426508555817601434475777168800879601647406125300070755447921385140951280986265496731704931261523252297861687107738985277156297321520327158866022332458368601320676207144423509699812207787623728772953421834513965549992125458429017878601093493135651671846884125860051699165480799530090005452076515533316715214363516323032181226100190630859698754914577963660116912151273221771663223846652592284525568926947179559686397439284273277499822706641102360902519627828007493060153411518179231360419096280610065038947289020128152445228649143049158410353962368758553479500538060524957348927647695349809542476432654411737688434237453088832886029107648474708977497530284350594 * τ * (1 - τ) ^ 13
+ 2127389627833258079471116926830144742281057475358325451822079259592209905192934243372139038969171901883817839946436307326464329272158442889046219129809092118368586112154369322704691756694249875536176139231159848466713563526095726753534771826462251992332422939916723331667446575800111599954737498147060346628392002235856215770313809190313213948364444734850478303495467891991971580513487628207502627194229477544728653529319704108657238935277461609416999346839933954567623727198800825736793403133710826248301445776950279329308776018409594754697200583625194146747925562813916651369113111469822304298419637310097220340320927342918383433570169769091797016600741632273347413759189199715085608353733946848278861 * τ ^ 2 * (1 - τ) ^ 12
+ 28732655000807433531843822235659873993504541240593050901740863210832658777241921544236624381120904412006926512247710968303450112555469879059472364846582891905698265617564307048619935282139552537718909786051952771102805572832588506563223449758586803355743190435986607488668672827409842539828295388894272659218009468678968618673794800808115066609439704153272873923902836142667919862376167241621024397242287664178589568310933457950227969851683167493813215401457387837127823309248486337845319283388904900315944413308302298488556100243451290596821978504200543303705957263913907412930278506731079184000663630153198063733583485083267972420456970903719670952906642884406469655036756798860342433414935787393115444 * τ ^ 3 * (1 - τ) ^ 11
+ 163788189081110868658641764041295515801441004860371468562526645868867110380712913467921025324130998362936654553482026328320251581874615905233798869003288899415765924037588020424858328818272797976822180786987609928634358195984693569682560346669958227128374409411044801523051443440406658512019657830785881068317814893598620084525927041947869564064027191497029431687394497222508446682092463098159169528384626613935992684752273660338164919380972853999404166538806433036516759392446757544632237885260492435588536801922111833139614527122349135449908596327387443555725165282335890732720752601586633462731411206002003289021921476430871630543241472510448423058378377909228761551351081196865941691891073415331067471 * τ ^ 4 * (1 - τ) ^ 10
+ 484542028811043959235776776765758963611680857527849290373616306250357882931406432440740863255948075297726988196783845205455413143407235367350614835892098904941669961225166545828988244277648269170337218624613643313586324956412205941734501526470534324457376989110138591123028613335250086402718217120750749887243366023966060880344491067985098731299785655585590501560990489919947492169793572421858869722625698809912519395832459646780450206369528149041451615282921944929258560978745780176061423465856815455175674257718815203753349327303750371564418986877168826011522514380325390525896103283293084934942749359306390530014461756255512673860452550071335501992526975772679463102702162393731883383782146830662134942 * τ ^ 5 * (1 - τ) ^ 9
+ 736004147065023365064559528617261125427507721338749785931126903526774756833577584877238070601645056276388013191114681073070592117490283446474710025836776692498501654138718389047624803713730750407804587860601806929599861352189242799368157272615494766796534486457822504300003864449224552046321865021838141512051975851542978701696728774771990979671742917297993038115660828364651826681716358284504839623938695358333669685352976725246708905328399687840767377904716673685548329739651981035018998123446481778995839822872673219376741178050954253807610496249025494245697157336206005097921530914820584310665146211624611809669848367208923129951633232682661236802445793590352104654053243590597825075673220245993202413 * τ ^ 6 * (1 - τ) ^ 8
+ 492214888667405939443440748739743800978861660981029672487822431745012245438924826802604300797702240035123030949366539500951825947586846141472663842742689883521944565969916849506928144131850404732012406131317612569993135588941148224020585566519589759655635336343150220351752353775380620995228461717275458511838575699760178686153381456869255300612767996457896300574746892955600329107627636678841368510373433902436761670271993956617231809926615277471887854992282388546492868247804673825984746040191636735191862820475865645698459734781875027263001798709231295191101526723013095193823345883603166986225485869715529041154550431736659713271528731723793394989829855453354302461775135532111800086483680281135088472 * τ ^ 7 * (1 - τ) ^ 7
+ 452177410574316151227484760020852569436833306879202897215017619653832726578536720232683985442325233444143590949401059248117834047831323002864312604298960729772207851825832118055832259785151389254008121768749296100169249659791233720448466800510981466362931327582077833160906226458181346903497980761769884154863681135416523827691185858212677522970981662594680616355591291049137505356086524332088134973973506585015021592449473112949195736791753251295798763522124548156460939718703784308556066222629505528051054857599224527899959388890652395340965087769007193096631989948254473548066886998686187809260585812089014099042842416065231368273542047833977204429756453453017924654053243590597825075673220245993202413 * τ ^ 8 * (1 - τ) ^ 6
+ 2225518029906327862902313028355082661521297533678755587526496102956761031904300337077477914529805632739829791041090265923588036708195060069776187544448157238421103774449898062423798672484838207591456064239138806267102267553746664264334499974765683087233187511271487036731635999616657676518044699361102124555850603869708240582654163512988300512545423789111013903745044968118434707292686706172181721894903488957323568602550399730902216699443480931720540476293148914645795228062525034760293958594762324846909584206956167936449606448140211763897498700021942140399166534847690052685024633893447222933070002159925593582511787154730590324956330970273090125495607855589567223102702162393731883383782146830662134942 * τ ^ 9 * (1 - τ) ^ 5
+ 5137654007531836767875366407513124661733030385048602838919391874066273511164772328143041919965361984739603550639791908107547791778605265396705543050667726750456263596910386125750205167789052549179167861455182604676140689673555031448011827663086530373930023142537066026129024843594820397383121393815989835786444195718355904126474073161702924214725478712123110533631701171286668932822936356924172002212334915594115257394476187855168392102984809398881935236915380761299473325218447457864802938467334872890718631642519231784326765084062441684227143703416964574246121818530317767634068887015452236961326850806466405578394915525287179868865150287661764390685689037771894581551351081196865941691891073415331067471 * τ ^ 10 * (1 - τ) ^ 4
+ 6007884987363498732342114796631709229968924764487317412621446124119640011760481323158188456054610794189612556977671099634381033060690808776232329081283361156417241241866985117610606333637173332920406470601533414061733307842224813928566327987889363040418174902405225506128661826984812900502035842710390323510231323029646005875511561903153916717883251086558883801772116369336182007364035431641580918640788452829468606216195799100310447192979319441432617165002340028719397485832324062740719055787496236227916260617300480486860964032256996820349854976425642062600639652441816263435306310241332583910592391921287453719187156357256023481909867305522539534044936053726911109655036756798860342433414935787393115444 * τ ^ 11 * (1 - τ) ^ 3
+ 3911579439715680892324045013423847183379242300784548919260258413244924295667164581013842594028119163675035217214396715643170011628779879074648721092165781667783489133784060393637023375349872660455393841148709865678948430393473266815850121743165437502854879696880903775242441868609364703923740787166980124568007397509732257716060239629358557519577228728959921952596468061501616558920692721158966912456788541980805317140147590018890136252098216389859693477224444321855859329955346131408525445864908520811115139999161534709104311086494300710400908736678893072081493424732487961167089369334782792531358334728289552112669562449896904480149010899337473004232859932520556047413759189199715085608353733946848278861 * τ ^ 12 * (1 - τ) ^ 2
+ 1364596319264660045384035959383335940900672752625011152621481763866655975620542539429755353511788060092852212696550538610832095255864341358731733134601829166316648651196227309603458541431515097535506876051945615685178220185965760737151061573405345146761612985838015116180034428920111943586167161410115709027836307079992688504523938724333116181431469340793651761897066930078418996023969758950128021900808299353942589066230878915891261383150572634905362809197937029583833565126824517765777235952250710036404784016388664360701690723356968271469514880825245991125315530484432559284799179900189378646626079209641959889695055054888431244587777688045278634608382438709136048832886029107648474708977497530284350594 * τ ^ 13 * (1 - τ)
+ 200158325418173723916177972420268791052222311706445631405830355698626964486890429127346608605618959488677222114682515849360756606252056962378839586281594081316952339695350051322275869611907803004486080363512212879050505016358646656998584806799891343165535711012772448519322898928353478205020715094691455705398892336518003683243969206470859802431023981119106486008766616247098484420950153592657577095909980707141240306104053975417004839815020819156381625156234034064110027183041683514542726774043951758564416420397426402981666036739828560366319332212765743075746843201331835812766201399598106065854743278939246427921337091318106612082330758739023618084352876601079259202349002079117748193498392680734596471 * τ ^ 14
/-! ### P3b: one segment, replacing the original subdivision. -/
def P3b_denominator : ℕ :=
312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
def P3b_rhs (τ : ℝ) : ℝ :=
158325419267473916177972420268791052222311706445631405830355698626964486890429127346608605618959488677222114682515849360756606252056962378839586281594081316952339695350051322275869611907803004486080363512212879050505016358646656998584806799891343165535711012772448519322898928353478205020715094691455705398892336518003683243969206470859802431023981119106486008766616247098484420950153592657577095909980707141240306104053975417004839815020819156381625156234034064110027183041683514542726774043951758564416420397426402981666036739828560366319332212765743075746843201331835812766201399598106065854743278939246427921337091318106612082330758739023618084352876601079259202349002079117748193498392680734596471 * (1 - τ) ^ 14
+ 367944651219158467814945524859099177831145136408110841068006263700576156043245809874677794536998992404999994216400310047001074032458678352302879787513593034487150594059954740329383470085130033924291552840432647255716908354984721200770446333525559999350970141236148433422931506331355326635662833883744149839382055487332761972156126792486248198505552213498627539086985984430954618068743084873418321009967937120183582857080002078626179470641816990450561750220141904017360652596767311254464910560830078417043202482235419120993614250113919164941086127346325697948448438480213302663623188660281896375667897935922561209601064020536267891121547319584321006658280525927867121442151226504355172386996785361469192942 * τ * (1 - τ) ^ 13
+ 4892597922698409568156217679976389797571833459117677579755720554303460039860798621865893699033236474808988068985961397372082675192858344973814081218097773346333071906310487940425709094900764214025669693421249131691027255570306538590190225423034990879183563011374311696086599971367810214191511868671656657952863784815376380701311917541292433995978285215201697798257325316831104984971238435419407858003915991731210516958143447707279103832093696740663406860016196411859416017786831622249506265665471528283140780886669133608719591680279329907595510754821378656305862114094870482774972802210729640798635560889065205469519713500454900596766534208764055747869921286609972407530741649951357100193498392680734596471 * τ ^ 2 * (1 - τ) ^ 12
+ 30060721820303208436591263919436515679534668036770660264043541332653165486039811557175720857669285956341360382916396449713273372447863538620759991924020549884974455351365849812052015023066747732755976278075241485836941455544181862706064890996549841458319136957388221698796386346542471632203602087294441901031254701787438602848651597651469961321082133096629452159604619625026561501956610132061863065596298003563958650470628924516676930513366249202645480678396633821474745431326939527689428162332363243184452115716765274725099557727881187687274920634189304641810419594817743664455061590777975339655018284637012901816399591493927583320821681643600149592152003556766724885290939425526119676000000000000000000000 * τ ^ 3 * (1 - τ) ^ 11
+ 112821841531629495963141860924222076755200903385451274314727152057616394058937566701068897208715711242990376218135100965153417363578942225328719848847399460878261618453973186863635579767924115547577002459825804719223989553669877851845527318657944194035966900835578425499577632062088688565111916699211159247346929007333641387575713149986341840220999548787351419248336757647630428017896703920383868418736789672265745058945381070232553730200372810617774716627675574576913732349905880595434945082064073940767222580991942604604355584033334004716991748809356254132600750534514261605658981284454757458805655122458627441764956215566136726160811518834759357283056009919483540340000000000000000000000000000000000000000 * τ ^ 4 * (1 - τ) ^ 10
+ 288485795204148924810698182849659721947148908993091748451994379124177852111805877835262179079255008856226106196481202665722100034241709879701649189492978994022189210883117130070988276559378824872231823946604902770942846672145076079325772085266991104960636985750089227860540143439338813993822785514459747488611156438567979551956570518863207575230846788337110367975470307746003585720881797433840031503116233078267627977190186193081449460955329495696335248794342399960405239158781984216833211289794925412023862561951006130984627489428361860959192258444624576883477029311744066951891610223509538491463676147859358087901105753233291699479300957958554200000000000000000000000000000000000000000000000000000000000000 * τ ^ 5 * (1 - τ) ^ 9
+ 530641705370735120892922858577698656950844163500996823469368085150920272782761779241824559017935540355840035642443458155538054024199406847811717420141798500813304169780996788839395601544193491351939778618473358671036091444266788767190866428595373327617572029864327077192902403231127747073211266759722763558111966845243995196209582194001321490146833323145991086866237111234053568344774265161502947157872180426325915720893352566554953425614422429982890406897362456400900910346663476887739439533453000617262850148304344468053711820922909721141494512666351438305832550050723356843325553733256783743123067954905636066044198325312326500000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 6 * (1 - τ) ^ 8
+ 722315705464859818690845483561374512003941789783133038769715178512257540022618871016239121851277301929729274395996023653690952688729130429044356617595821536822804417959337091147147798616127329061171788072855133526487721325896863213737747120510684275557670607323946534925194379930896694541958918417239831317635840417500898197574088844334286678772524686292957754692543467466482745836570572874099430789603425277384169897979580966868172754704617568782691968588706088816389055778531760617828230198036159814908014323834860442285308858497093996730507004724964690122564635368997991163822735487989971127295595468956000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 7 * (1 - τ) ^ 7
+ 736672834044518441001917774000472794989338563714132408575346273548109254390899873166667990455485474645449084662881235667933902751754658563900579751132787457335506088986537076475255921734837864358352332042294533091658367579772068463296007155677385556335760587027255553813423883103032404781382773954427966139123626481583684547123257884474607471894210948775311957122541751533460259817599228888556849743062828200317592012300879790593750732507786660767575676113873945921499552369561191289003235130922180317320424063050613806233305400374786288966009624128041306157271017621434004795996048617180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 8 * (1 - τ) ^ 6
+ 562892835681464295048123365465283137620132817011204676730985103904291965564245637534319400040478782774357246201991882526274953080485572251694494862236010991103445927462652186101963980747713414987873834638096017412487540323675818083114931775074543816984170888758559430252565320483925586167033865239681431968847429862492111312680365795134920674767537061406498874061929221317934243436116841724690337196256653746713629487536444888044515705209214433211729377895901122308355497252891041292174398027835826769735158658306444760372708288771059257972207454567508895834525242040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 9 * (1 - τ) ^ 5
+ 318249627980108036710403528206318620342406777253423327449261799098300682448303559379083367838269427545334060795100280214479645652316402044698275168143134890956986067487510588395034377618907001636939649216183627535203500329271315862830786315197497924228794733738483524681907112229920821365071247171688763241982891811034348185852042989068070708755916044315518702676909710706503953718564017758450866826979461387787504339191121226391417224153558627962932837426753148123785401726792279095442043306787548635080046711866834827857196610686203290410183714650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 10 * (1 - τ) ^ 4
+ 129404734981815715368423750159204584553865325052063152403780209432941584710235347901248835916936774086392716404700525698668270206341889142768169844123703706534381836873945605981375639810556634468646682639205127285101920600686689038593452447075905927617984591280712087273493165964373284437184735146044004900604314216265552607761138266320322430922414882896946864809220608004634262958475980249470352466801319827148211698012157168317958987874408311347788792365700069168055825286520499685078369729012181461054391403178660356417871800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 11 * (1 - τ) ^ 3
+ 35833618419694496522385785635832288160608928854754175730106082851572770654773609084844407348311670977596088715288238030068548838904456020626631092365869857936931942870894411014009194580530300418021676923983117179270406358382042517686553825538399189386111358865407142470098711792458753977010613049842908529343877775425949300424278531019791857452487494490268760312765727062077462550738934747133056846602690946209524428919811689608561521415915824804130001474354344665161100246266144298672067635366481380016347400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 12 * (1 - τ) ^ 2
+ 6056504004046343763206606419627806330352799934033261247718631188971876789257293437808536330496613364574584143016631647807485283865440158587736760369286601718762195430525178815828441430549008627026147163074608918638586890426621313243032833120051744674218786303054714014216736109977799739739713374426022682772438676957416814323775290370534913176699014496769886522374676953865800651518064460414671488315542277106788005910330973205718671051646035679306769871637392708424864217981916950612400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 13 * (1 - τ)
+ 471858213054196452859394902504281525784061467122515959334106142473099500222008467446009690407272425227338478333935714156944554451593119268704190845563015034056660224716688948554350149453192108647731371275014415997980437297900063416831688052442826150260706489667922547056793876705294968024199419823750819194482991279321819089642060937243064533552094871858621623103456926544228861697468780345188539681674412951607534803117114214482400396949872042991725656768703774111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 14
/-! ### P6a: one segment, replacing the original subdivision. -/
def P6a_denominator : ℕ :=
312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
def P6a_rhs (τ : ℝ) : ℝ :=
17773408170879296322270815201228873784855604231135306145400216929432609111244043625894326404825011845938272863648869899110622951281654292468435901742650977966045982202533286504996792587697232302695772109763545057178652880675447087768064165085268574524424226381182004565315105997212365210380870557534889832798322488899436559125226310005148697132929806971779087768356215199963002033750208334077351644628834243813602986167550912318666369455049247938427493642474122458665745968893285708720000639682402052554693973491649123413491403623207073051164311439836776092560942935520686162521908515359969847254814193194914048045287517477824437971599511795042895105679202349002079117748193498392680734596471 * (1 - τ) ^ 14
+ 248827714392310148511791412817205665558545053756511061432808270490207914244605692154277820884831561060141636439548979143807958635268638314960091306304402951717400917995808534883510471466430163774279878879505331904086230874989282454541418160430562058385332868909638073503179206154248958503854563422763834295587724051470544983292440681101670348380362552916900914848942486285378123267906221735262267863421841344103711471823692938852119650812644907304588515394937956013195817737836526842300510428974905583721764243296492049381783457691224696129099411715293396846492157309829139892133651124954807745891009259162207841883762098079133764448916479449770559886308832886029107648474708977497530284350594 * τ * (1 - τ) ^ 13
+ 2954707791963445223691612267033383448523378051302443015446366214320450325654030113148900024826954738954648997002192328181605601046321525786288224543209493214747184684291163662238450985642779457309438748349549057691073562158411667724983131486458679562350934703022513358536999430692675085197146791758238202943724093337658923069115139632062022180846563568636233323000428716560998319642200961780940442615276446851613333225590504128077457821686837663092724783495643410355999918823677899948709594957125069249685650897499635365970169521219540138330800469531498290553643379235521761523481306925904605270064986751900414208663170857367743184546715082420358659498113823905207413759189199715085608353733946848278861 * τ ^ 2 * (1 - τ) ^ 12
+ 50289731159720289476928425968870984639476894611602745953651855536303302695725525658180770039226895155768436376530032479731916985952582530933057201995936659468302514913565847013708835187008476399183460349043510179503842057035524387728994033809660999278990702348593633326579378162074255353854624659283466969534687458958458666490947623765526682471427277644095537614765749866439119199327036743401680422401446567091560374866823884577998733194144095258645642067554059241559875382753815532337467839712456624308918017194631907568511446410257654294560890208184068745276976350090470852053737534682405175085333861244058614612254552109964130926316242783691040810290876034197629655036756798860342433414935787393115444 * τ ^ 3 * (1 - τ) ^ 11
+ 358176328758630851361703404958556881693648194366477830294817815326577520308667678398314311911866262870059059589847300885770146699147542044985748965389555905090472713606587310444594583079790881672075717216711177704987471358358118348652347350664851675919927638956865652003899286529485574477576283604360995458110168591389636578814139225280234233638100198087560724033842037886252334968395261228709301917595694265750019464320389447936044426887878785156105799414088457123104888781532457679249166988052469236794731267866325913507142102652977044859103194269652825020803575450893996224196273784862546775976128546281977063695313277308757545064725469403676779202120566125129681551351081196865941691891073415331067471 * τ ^ 4 * (1 - τ) ^ 10
+ 1521459350652559573651963290498681147704668255234139134499443299174827768714376907852152414113281861948920178135738762669997133865521109134857779031870770440509300980843571092129286792416417012958951713170324086461475987480392818740974593520179216246869537137981603582812033196279974413635367471593648881415381872018580422537671228162471050855010174439560261555299883000066417963569493975401470319619071788710972349347289065066945724768905282636770483475811133705999874710404239437475963406158018660894814776347261859900290018498399732910627393987059458965265722045677843968194557639639285496582890192275706704353660269312900227460164162542304406392351882446312431763102702162393731883383782146830662134942 * τ ^ 5 * (1 - τ) ^ 9
+ 4185317917295903489665617390867632724733832378483419741613323301988524055817124930104011081120741626388786904713325878200336682553712614970560006457534093082869629109917920245454653263861068195410226807052669614344415041839669464569485853275819436458960488302263345497837042492631914382967825397060884754632082693891438020203631001380684635693824641579796346623380350354646093804103230343148641179706734886189864274857539281986306475697526585809596448030271231663595247236451463126362538158071339861131071605836652182816165089560846110392083818136878537766225737903989185197119311365224151656333674712679405859588764492467179409745298311218702188839449285640561906244654053243590597825075673220245993202413 * τ ^ 6 * (1 - τ) ^ 8
+ 7630995954072148497981299139910180417319817930949478551308258588837716530528736480696096423514415218029762837382304408713736754057921959208282816295516887065520318108365204718880343230403236923292400172030476460819573819128251050482143007109529382523259400792234617517981219251068693041629736741652974762068022584101208727190448509562786314655426422447014901773966844015962578384315128683907399252716287835203685537694369261154306387414883815424758481546885374044589525686002070771290650570040215140373685806035041959727503259242972555693366350172568383669271498349004144737013872748457437571092510466784438103275323663229043975200400432713083163531852282984748759822461775135532111800086483680281135088472 * τ ^ 7 * (1 - τ) ^ 7
+ 9317332206112432340848945146539821283565190147097493247081042111093687343252084804863762831689021266865810894731428119498067963288933043560693444889693866786650737802425181404414854057225937023185968270021113266454385273545010069245814318563092514301493109882146945580158349259863352290891095205613053377653312670318337863384004564690672359520596512463810911059991338204099137015851420006070757769575801130793993989314821341999315088716864718132664814776415364027038288455822279680702930033351411756802508592869575468685359228948629790872094089872265911561627738345293777217327443444737246899991151125684492498861921542544052546855402446029193347341292209582748423444654053243590597825075673220245993202413 * τ ^ 8 * (1 - τ) ^ 6
+ 7693711009842155245320867584409636510310028968382797395855628909405398106605428892287980608704489700275926543785244845223207447026085459569959619969334441084061877286848024793563495482299326276756428236766238073490981455890538591289316268948062117552831472199338479717047175643755066011257462986108313409341828014107022167091551613866163346665806936425702643786434873650051951818599658291447253270334356400667955806652137702541813186317037527340447895361226047260581992584833493103436052591539560570006854394071278034974093206363707420179483280933336396399893303730895549224114900567323412488126192076282488890051203002748731076940303008956292617728142447702561121363102702162393731883383782146830662134942 * τ ^ 9 * (1 - τ) ^ 5
+ 4441056208092182536682556899723004526175908102035058366596746846556473913388997181014424358649084657610697673011972686231999834231493648930739347587897322578421614281589205262955915205092057636914795740035874596390990579973089720871267850375081172653451890418920396101450330208755511958674895688051226505587919509103860775213036673574953921346292301126670543811742059502980138559257522367427055953237563440518115180307044517927743315082281312563990147183144832895393718370575030628924919527558848785980145654994359866279123285520295550782553757527844571368605966210378651141051328663297957790433452541551368616336852363354181894655168860279894835281045044508311646881551351081196865941691891073415331067471 * τ ^ 10 * (1 - τ) ^ 4
+ 1997507901275335458846014645731372173682763212491560957044911016114296515280365236179378978227856738233665390112770463511744193513583141461587519201701670188397039458891779460579789959908162173567224531383544139461739048359371769297383849558312959206509982625528799530172517529391802552022809023804599071515062810592943057059111425298549517883050142776336934026004456951627806276870730908353581625835686108071466724765607265199297363770410934612197340158365501735708122830590035252868783510407343989888260732966706153386349309964601339030376252578445284770924879184518830654545996845783455856645376928045528489777355066710593909396431351302415767890188678241942812029655036756798860342433414935787393115444 * τ ^ 11 * (1 - τ) ^ 3
+ 810853142124375302127688607774963259523153363622045657547810821447961372961016371371220404985178389070151182716532734875282787081874538397175279388949001784636165218990136103942214725448708811528370602621927810641310792752554197886974834510283993199917167851122201339610918570050062636008189153710286377361572030854999443525805887491367486874943065762724561216153662300400684359157255074803395283392891337064322635765694381339012460913056841356702448434034843031658180810941223425176800291077901894071549503395387507113920538575181880184541879214098320595252900161890460884498664846384667608189736188169340785152565791970383600638654870171217444374090244165670347207413759189199715085608353733946848278861 * τ ^ 12 * (1 - τ) ^ 2
+ 265315842574405201007482356870488890163274922827874583213536089210482567390925888729741183533502146085090626856469091464112072194973350935335203055487617113066612424714849622010509700344399637736983383638315586749519289650921160280447455542334629610059700761613601827361904096194967308032612494866835450797290603574570193665306727937864199082821116967541957031173487927272652950355282838743687101955264059327767722225428380276938287718056064628435614044062407914432082821054897364615462692381024955264042554208165348317838832352704384258489284108680964961473347042722886756224897477692705986620564854472223838960955862909292880604338754233358607196251279810900767908832886029107648474708977497530284350594 * τ ^ 13 * (1 - τ)
+ 43589279401067354680573812110407585277390597633429771175767871406767543215574588773469351400581785679153655438162895406466398297074590746699866225922764575544646215337425398238456990113723686221303654572767426675782951322517839466068295341166312523499494484416780032924880733660495927927221504447378266904045003944382417783781642057433423347481849160793481474616003587946060027523241896077686978623267058186260781024153285027923142570075278705376760876013529163356015209610691278544633294964497461270436700134440304840471687834594129202420211942095225155650602945407895784178185250148897009655968684941887083810167919972502295024370867416070818122826114212923512479202349002079117748193498392680734596471 * τ ^ 14
/-! ### P6b: one segment, replacing the original subdivision. -/
def P6b_denominator : ℕ :=
312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
def P6b_rhs (τ : ℝ) : ℝ :=
151779402161104680573812110407585277390597633429771175767871406767543215574588773469351400581785679153655438162895406466398297074590746699866225922764575544646215337425398238456990113723686221303654572767426675782951322517839466068295341166312523499494484416780032924880733660495927927221504447378266904045003944382417783781642057433423347481849160793481474616003587946060027523241896077686978623267058186260781024153285027923142570075278705376760876013529163356015209610691278544633294964497461270436700134440304840471687834594129202420211942095225155650602945407895784178185250148897009655968684941887083810167919972502295024370867416070818122826114212923512479202349002079117748193498392680734596471 * (1 - τ) ^ 14
+ 323079256693927611254256258866764438657386238968176624294409444245310429264830352181656275676926959911925461310615327476867886662011380910536377286547543013501852109341163530848299473944883751349118943351757687988801170425734691889747174830435393183233665086518983983133324293132882969029540615652386407826013541423059442193735787387833587652318572335449203839952697272559074536000059832232215543954168438075071811312942999073711484347480339473824873587263335120056613315477244175992189115726664596250146718698910972697785105426750350335457180185696228549139874183694746491627364634171186699379769567094795686624576553890709456558944922820590981363521091820005798976057869481377943780986996785361469192942 * τ * (1 - τ) ^ 13
+ 4502795937260905261383239986797815320754248095591227027859290187632414899965675191336017294669040484151896943601414818345233246712727519671006496256868549067141600176522648355345083582835487621522318802829480818331685560776636594317310694671859547898842586949742258444619085007929140093021448696340647026495818559186836250861175351439648156026110628889192432898542910175561007186774680928853513936202645976154618197589936096024504745554008874396685970053794995625732709720953812193881496500746276528632947494523753622084594614203374440852271174072077929730506460396154291155930053047367765358813257125426301496411286186333812107369000711719268413254418542310272200696762178159698534317393498392680734596471 * τ ^ 2 * (1 - τ) ^ 12
+ 28947639254680080730436403849371431369799673728345738444125764485699333443641042238480253463506062661183486708917886278373434875689636791524144247731080297894255579026374552620226020043154338036283125748986965257166658779931159102976031073737307392109143171305656663827706498597077346627142006293246754146146017651965670092729528530867660133970798710848281437187724695420492279911438491167292481698431086465247023124002468670711657021340627343547974180960938535776791738917775360317286430175561291782563078482751296047791803447966864760761041485578962928559855857762176558809655246742563594539069517909204763417547639452162589915885284349077734355659583066297147118779906657680399708284600000000000000000000 * τ ^ 3 * (1 - τ) ^ 11
+ 113459233132074944714811001420004949075008317273471259524591536693149384531824702774657397570715665423260297750223726792256818556945670977541850633235864271648976178256916292784265801764524493471178311555623430253447593852354257425964894825838210928966420309374909313057253722507361554072148991016364961225415169694550955692438378257861234817749795368488647060378457747738796739865241621449515924992211193629163918750035760531646290878838923699409507707645741400090371770509306156591812998781913837852831818658475699329896630968498198274320640955376815880276757146221806276323938027389330011876000616537318480553632381590337229707829138301570640506696059501593957204580000000000000000000000000000000000000000 * τ ^ 4 * (1 - τ) ^ 10
+ 302378802396209437688046182033966207459859076520113398543511881248280651712049263459798922160567617662196120875820042058929720465951833326238484950800928594716487540339559392314661302830111400598924524465574861353978880904927744708445468919037621877063201634125997739483989952667249753678323440283364301583052505094464221614851120611611097056212538336143505045611908112336690964125824966039899664161732730990767848541347265812697023319764649048018630033432374763309727673210522736898576776852069290204259260946016824451156902883205921779710381316950766300538854909629582961045428038127459249283216650063103041291812663702462935676639864411927130635000000000000000000000000000000000000000000000000000000000000 * τ ^ 5 * (1 - τ) ^ 9
+ 578566574250558309126940778981176739773294024219087297365395056795532270719094815831369595423768078794786409373531711410609002956769774907000686027551231066537869506034977877736375589860036360546043329085076893695193771266608454266593786813157801535342477942895269460143836379776946016006489319230481242592193243489590204831705352858649290042254873581046328890580038487966329597225971453071254338559035996920272164013021503367476382804397801396116034050214601592044121596985396595840370689171380104664371317391433752206674240795832023380359405423736101953961616854474818554954753086714048000810283537126270388708589809419658411125000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 6 * (1 - τ) ^ 8
+ 817614016404460920139678510943884160455630631007112150307045880219550880439673105519845047004811151382657345075665803751965494959526455114889752580736060379758412776318011752935182089657189940485034868810435172785874678058352440073176453417873887863858579102612899478611311391813894735721919089417190386470643709582039304931994456618323145675597786985732195430870221774458750669119913602542822898569500404374721558682107862439075259428906364854912682752912700731196978672026774866577656063475126719888742973369129734405626483605703097536921869686065964062610567465670682540030757191629707556856063218410610710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 7 * (1 - τ) ^ 7
+ 863988579936658980609022170842596265032192382721540575301529638067327022807963474943203253207598641935682546546449564494949201874174430401015408311466444830957554326323318298437306216304558348688465463301139655529519418608067919562744354128005766192295967900435368501470706923491625376235685010879104441949331056944036034157262907116747020851962659262809434379915990777623808681766323176465902761181229421473499998003540991413045803425021263343504730174734255934122028022991827407114690413165018624731231762577026238526155523377642505621339599685453711433259127917094182692987234258805981000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 8 * (1 - τ) ^ 6
+ 682668846164518156708309797559191269252423828951849862843344693757898243049970124404462642081839506986524998307055361587893904425405618620151363669074144840186430134642045945977762632249802868269780763129835094261326367479658332024234955380229188502692627270147080045595042390398600804276106848005358038937696455944176455389205152251414106566316355507637621358730650203350605033516889125866025481612025765908191698924843546219896372789917424820063074266867602742772907976258808824659550044508417172953872749458396928749450703422435703046981378545445824977114136303276550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 9 * (1 - τ) ^ 5
+ 398322755031280911913466733584161385824123503621898239375717812258556409301437953564257027982479605904060991093931617600982946283832524559979042259514671004494316757212925211648706895076886830416752472705182564089105861720951534619994898683245490964441044382421235778730601551444486058940094909803315171024921159455426851939876570544766614263642514848188029565843876757944421327781953872997119101872942312796238779298919212463489697400494819452066011440446815807475806612570839106175710402091226679574323816940479027458706739006741759537686789818653125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 10 * (1 - τ) ^ 4
+ 166809525118764581219906734575569351280278424593587917119591929266307270505301507108619892834672899418269948812707194856989305323202630579201026967099850224428722723297123669865392903909339952060747749196092213526480879211500856151794402924547089851161844809364152526425896769616901625461909388570293196375852266083683309732831729706795809814037022997707065196699556721540643359685614260589323072756076572569134474869804970460551552152712616764792105064492316118157165188984250019852295893524103932280966196905413911071204261741875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 11 * (1 - τ) ^ 3
+ 47475465806833428183367766722221322157245114182421111297854703581548833940230392548489269270137095645677721985797494524057365006299220051615938077080919513514167724248658219949106899481569804170619607460048746083605613529529509357943543612563630624139513167119966027638275194572755522533346176272814962044284012667198872760073051321630119543302712829639380627289134823305870749755547898807415190060639252895530625866691912675760811752115837485480488546711005501429555463212942076123869104279028746114530159862500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 12 * (1 - τ) ^ 2
+ 8229828128223572087958471953345603582065394793844223589968456870644418697200637622694728025634863641220891401782371146083655487862530314640956754285388717156306778345575477640278202309419658406083582233800779136198436773346796594371460821867619752858045456817812801145123244374826680050503409497026312918390397190273060459379127185417362041007563785236733421033644646578655982720436829803093684322381646794638890341511714974564162279014249079127289081064061114975698284073668854154880826875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 13 * (1 - τ)
+ 656180849481035271918091825125903070819435122178327807759209837473004533367921263997107374084521378026270064074505460844137747369700806048782852781301439445047359827248581074188872750366639586219454825960949637737917727120379277588075759512498211948833929167116848285160420854921228652434271974790874825852160202334959081188932713916059260461050560727550438463935034517206990228683922871091737691295032500514982653143354634781335712236859703911202217426609443571269234375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * τ ^ 14
/-! ### The coefficients of `Q` -/
def p1 : ℂ := 23013813 / 32000 - (81 / 12500000) * Complex.I
def p2 : ℂ := 9 / 5000000 + (551827 / 800) * Complex.I
def p3 : ℂ := -329507 / 1600 - (1 / 10 ^ 6) * Complex.I
def p4 : ℂ := 329507 / (16 * 10 ^ 14) - (1 / 10 ^ 18) * Complex.I
def p5 : ℂ := -9 / (5 * 10 ^ 42) + (551827 / (8 * 10 ^ 38)) * Complex.I
def p6 : ℂ := -23013813 / (32 * 10 ^ 63) - (81 / (125 * 10 ^ 65)) * Complex.I
/-! ### Norm helpers -/
/-! ### The positive sector -/
/-! ### The two unit seventh roots of unity and the rational anchors -/
def u3 : ℂ := Complex.exp (6 * (Real.pi : ℂ) * Complex.I / 7)
def u6 : ℂ := Complex.exp (-2 * (Real.pi : ℂ) * Complex.I / 7)
/-! ### Rational Taylor enclosures for `cos` and `sin` on `[0,1]` -/
/-! ### The two rational anchors -/
/-! ### Roots of `F` have modulus at most `101/100` -/
/-! ### Generic affine path in the physical plane -/
/-! ### The scaled root direction -/
/-! ### The sector bridge -/
/-! ### The radial bridge -/
/-! ### §3: the critical point reaches the rational centre `wq` -/
/-- `Q'` written out. -/
def Qd (w : ℂ) : ℂ :=
7 * w ^ 6 + 6 * p6 * w ^ 5 + 5 * p5 * w ^ 4 + 4 * p4 * w ^ 3 + 3 * p3 * w ^ 2 + 2 * p2 * w + p1
/-! ### Taylor coefficients of `Q` about `wq` -/
def hc0 : ℂ := wq ^ 7 + p6 * wq ^ 6 + p5 * wq ^ 5 + p4 * wq ^ 4 + p3 * wq ^ 3 + p2 * wq ^ 2 + p1 * wq
def hc1 : ℂ := 7 * wq ^ 6 + 6 * p6 * wq ^ 5 + 5 * p5 * wq ^ 4 + 4 * p4 * wq ^ 3 + 3 * p3 * wq ^ 2
+ 2 * p2 * wq + p1
def hc2 : ℂ := 21 * wq ^ 5 + 15 * p6 * wq ^ 4 + 10 * p5 * wq ^ 3 + 6 * p4 * wq ^ 2 + 3 * p3 * wq + p2
def hc3 : ℂ := 35 * wq ^ 4 + 20 * p6 * wq ^ 3 + 10 * p5 * wq ^ 2 + 4 * p4 * wq + p3
def hc4 : ℂ := 35 * wq ^ 3 + 15 * p6 * wq ^ 2 + 5 * p5 * wq + p4
def hc5 : ℂ := 21 * wq ^ 2 + 6 * p6 * wq + p5
def hc6 : ℂ := 7 * wq + p6
/-! ### Positivity on the closed disc of radius `10⁻⁸` about `wq` -/
/-! ### The Taylor sharpening of the critical-point localisation -/
/-! ### The two endpoint joins -/
end Erdos1041.Counterexample.InstanceConnectivity
namespace Erdos1041.Counterexample
end Erdos1041.Counterexample
Source
Lean source: https://github.com/wcook04/plectis-erdos-lean/blob/cc7e541cf2081c6fef5a5e377d52e365e33b01eb/ErdosProblems/Erdos1041/Counterexample/InstanceConnectivity.lean#L1-L1354
Construction by ani: https://www.erdosproblems.com/forum/thread/1041#post-8861
Related paper and provenance: https://github.com/wcook04/plectis-erdos/blob/551bae6dc6e732cf85172d66323c8d2bc77ba962/paper/1041/erdos-1041-lemniscate-newton-flow.tex#L25-L99
Paper prior-art bibliography: https://github.com/wcook04/plectis-erdos/blob/551bae6dc6e732cf85172d66323c8d2bc77ba962/paper/1041/erdos-1041-lemniscate-newton-flow.tex#L1662-L1772
AI-assisted formalization in Will Cook's project; ani is credited for the degree-seven construction. Independent correspondence of the 1958 Problem 5 wording to this modern formulation is unrecorded.